首页    期刊浏览 2025年06月12日 星期四
登录注册

文章基本信息

  • 标题:Reasoning About Foreign Function Interfaces Without Modelling the Foreign Language
  • 本地全文:下载
  • 作者:Alexi Turcotte ; Ellen Arteca ; Gregor Richards
  • 期刊名称:LIPIcs : Leibniz International Proceedings in Informatics
  • 电子版ISSN:1868-8969
  • 出版年度:2019
  • 卷号:134
  • 页码:1-32
  • DOI:10.4230/LIPIcs.ECOOP.2019.16
  • 出版社:Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik
  • 摘要:Foreign function interfaces (FFIs) allow programs written in one language (called the host language) to call functions written in another language (called the guest language), and are widespread throughout modern programming languages, with C FFIs being the most prevalent. Unfortunately, reasoning about C FFIs can be very challenging, particularly when using traditional methods which necessitate a full model of the guest language in order to guarantee anything about the whole language. To address this, we propose a framework for defining whole language semantics of FFIs without needing to model the guest language, which makes reasoning about C FFIs feasible. We show that with such a semantics, one can guarantee some form of soundness of the overall language, as well as attribute errors in well-typed host language programs to the guest language. We also present an implementation of this scheme, Poseidon Lua, which shows a speedup over a traditional Lua C FFI.
  • 关键词:Formal Semantics; Language Interoperation; Lua; C; Foreign Function Interfaces
国家哲学社会科学文献中心版权所有