詳細検索結果
以下の条件での結果を表示する: 検索条件を変更
クエリ検索: "Foreign function interface"
9件中 1-9の結果を表示しています
  • 上野 雄大, 大堀 淳
    コンピュータ ソフトウェア
    2010年 27 巻 2 号 2_142-2_168
    発行日: 2010/04/27
    公開日: 2010/05/17
    ジャーナル フリー
    本論文では,ML系高階関数型言語とC言語とのシームレスな連携を実現する外部関数インターフェースを提案する.このインターフェースによって,プログラマは整数や浮動小数点データなどの基本データ型はもちろん,それらを含む構造体や関数へのポインタなどを引数とする種々の型のCの関数を,特別なデータ変換処理などを書くことなく,MLプログラムに直接インポートし,利用することができる.この機構は,整数や浮動小数点データなどの実行時の表現をCと共通な自然なものにする型主導コンパイル技術と,ML系関数型言語とCとの関数表現の違いを克服しコールバックを含む言語間の関数呼び出しを可能にする外部関数とのインターフェース技術によって実現できる.本論文では,この外部関数インターフェイスの理論と実装の詳細を報告する.本論文で報告する外部関数インターフェイスは,Standard MLの拡張言語SML#に実装され,そのソースコードを含め公開されている.
  • Linhan LI, Qianying ZHANG, Zekun XU, Shijun ZHAO, Zhiping SHI, Yong GUAN
    IEICE Transactions on Information and Systems
    2024年 E107.D 巻 3 号 245-256
    発行日: 2024/03/01
    公開日: 2024/03/01
    ジャーナル フリー

    The Linux kernel has been applied in various security-sensitive fields, so ensuring its security is crucial. Vulnerabilities in the Linux kernel are usually caused by undefined behaviors of the C programming language, the most threatening of which are memory safety vulnerabilities. Both the software-based and hardware approaches to memory safety have disadvantages of poor performance, false positives, and poor compatibility. This paper explores the feasibility of using the safe programming language Rust to reconstruct a Linux kernel component and open-source the component's code. We leverage the Rust FFI mechanism to design a safe foreign interface layer to enable the reconstructed component to invoke other Linux functionalities, and then use Rust to reconstruct the component, during which we leverage Rust's type-safety and ownership mechanisms to improve its security, and finally export the C interface of the component to enable the invocation by the Linux kernel. The performance and memory overhead of the reconstructed component, referred to as “rOOM”, were evaluated, revealing a performance overhead of 8.9% in kernel mode, 5% in user mode, 3% in real time, and a memory overhead of 0.06%. These results suggest that it is possible to develop key components of the Linux kernel using Rust in terms of functionality, performance, and memory overhead.

  • Tomoya Michinaka, Hideyuki Kawabata, Tetsuo Hironaka
    Journal of Information Processing
    2021年 29 巻 676-684
    発行日: 2021年
    公開日: 2021/10/15
    ジャーナル フリー

    The GNU MPFR library for arbitrary-precision floating-point arithmetic is widely used, and its

    Foreign
    Function
    Interface
    bindings to various languages have been developed. For the Rust programming language, existing bindings to the MPFR library include gmp-mpfr-sys (a low-level binding) and Rug (a binding that utilizes gmp-mpfr-sys to provide a more user-friendly interface). However, neither has sufficient descriptiveness and performance as bindings for general users of Rust, which is a programming language featuring high memory safety and high speed. We have developed a Rust binding, Rumpfr, to the MPFR library, that offers an easy way to write programs that perform high-speed multiple-precision floating-point computation. Rumpfr provides an interface that follows that of the MPFR library but hides the complexity of managing the mantissa area of floating-point numbers from the user. Rumpfr uses Rust's variable-length arrays to allocate mantissa areas, making it easy to handle without compromising Rust's high memory safety. In this paper, we describe the design and implementation of Rumpfr and present the results of numerical experiments demonstrating that Rumpfr can be used to write programs with low overhead.

  • Toshi NAGATA, Kentaro SUZUKI
    Analytical Sciences
    2018年 34 巻 10 号 1213-1216
    発行日: 2018/10/10
    公開日: 2018/10/10
    ジャーナル フリー
    電子付録

    A low-cost, standalone electrochemical instrument was built from a credit card-sized computer and inexpensive A/D and D/A converter chips. The instrument is capable of cyclic voltammetry and constant potential electrolysis, with the potential range of –4 to +4 V and the current range of 1 μA to 20 mA.

  • Haruna Nishiwaki, Tomoharu Ugawa, Seiji Umatani, Masahiro Yasugi, Taiichi Yuasa
    Information and Media Technologies
    2012年 7 巻 4 号 1353-1358
    発行日: 2012年
    公開日: 2012/12/15
    ジャーナル フリー
    A static analysis tool has been developed for finding common mistakes in programs that use the Java Native Interface (JNI). Specific rules in JNI are not caught by C++ and other compilers, and this tool is aimed at rules about references to Java objects, which are passed to native methods as local references. Local references become invalid when the native method returns. To keep them valid after the return, the programmer should convert them into global references. If they are not converted, the garbage collector may malfunction and may, for example, fail to mark referenced objects. The developed static analysis tool finds assignments of local references to locations other than local variables such as global variables and structure fields. The tool was implemented as a plug-in for Clang, a compiler front-end for the LLVM. Application of this tool to native Android code demonstrated its effectiveness.
  • Haruna Nishiwaki, Tomoharu Ugawa, Seiji Umatani, Masahiro Yasugi, Taiichi Yuasa
    IPSJ Online Transactions
    2012年 5 巻 139-144
    発行日: 2012年
    公開日: 2012/08/22
    ジャーナル フリー
    A static analysis tool has been developed for finding common mistakes in programs that use the Java Native Interface (JNI). Specific rules in JNI are not caught by C++ and other compilers, and this tool is aimed at rules about references to Java objects, which are passed to native methods as local references. Local references become invalid when the native method returns. To keep them valid after the return, the programmer should convert them into global references. If they are not converted, the garbage collector may malfunction and may, for example, fail to mark referenced objects. The developed static analysis tool finds assignments of local references to locations other than local variables such as global variables and structure fields. The tool was implemented as a plug-in for Clang, a compiler front-end for the LLVM. Application of this tool to native Android code demonstrated its effectiveness.
  • 重弘 裕二, 増田 達也
    電気学会論文誌C(電子・情報・システム部門誌)
    2017年 137 巻 8 号 1090-1101
    発行日: 2017/08/01
    公開日: 2017/08/01
    ジャーナル フリー

    In this paper we consider, from the point of view of probability theory, an effective search method for large scale combinatorial optimization problems. The fundamental ideas on which our method is based are the following: 1) Many different neighborhood operations, which consist of the iterations of unit neighborhood operations, are applied to solutions. 2) The probability distribution of the objective function values of the neighborhood solutions is estimated, from the data obtained in the search process. 3) The neighborhood operation, which maximizes the expected value of the amount of the improvement of the current solution, is selected to be applied. From these ideas and the fundamentals of probability theory, a new method for searching for solutions is derived. We have applied the local search method, the genetic algorithm, and the proposed method to traveling salseman problems and maximum satisfiability problems. The effectiveness of the proposed method is shown by the computational experiments.

  • 稲葉 雅幸
    日本ロボット学会誌
    2012年 30 巻 9 号 824-829
    発行日: 2012年
    公開日: 2012/12/15
    ジャーナル フリー
  • 重弘 裕二, 山村 真由子
    電気学会論文誌C(電子・情報・システム部門誌)
    2025年 145 巻 2 号 145-155
    発行日: 2025/02/01
    公開日: 2025/02/01
    ジャーナル 認証あり

    In this paper, we consider an effective search method for large scale combinatorial optimization problems, only by means of neighborhood operations, not by means of such operation as crossover in genetic algorithm. The fundamental ideas on which our method is based are the following: 1) Many different neighborhood operations, which consist of the iterations of unit neighborhood operations, are applied to solutions. 2) The probability distribution of the objective function values of the neighborhood solutions is estimated, from the data obtained in the search process. 3) The neighborhood operation, which maximizes the expected value of the amount of the improvement of the current solution, is selected to be applied. From these ideas, a new method for searching for solutions is constructed, on the basis of the self-convolution and the inverse self-convolution. We have applied the local search method, the previously proposed method, and the newly proposed method to traveling salesman problems and maximum satisfiability problems. The effectiveness of the newly proposed method is shown by the computational experiments.

feedback
Top