Semantic soundness for language interoperability

Semantic soundness for language interoperability
复制标题

语言互操作性的语义健全性

DOI:
10.1145/3519939.3523703
复制
发表时间:
2022
期刊:
Proceed- ings of the 43rd ACM SIGPLAN International Conference on Program- ming Language Design and Implementation (PLDI ’22
影响因子:
--
通讯作者:
Ahmed, Amal
Ahmed, Amal
中科院分区:
--
文献类型:
--
作者:
Patterson, Daniel;Mushtak, Noble;Wagner, Andrew;Ahmed, Amal

文献摘要

参考文献

被引文献

相似文献

程序很少用一种语言实现,因此类型可靠性的问题不仅要解决单一语言的语义,还要解决它如何与其他语言交互。即使在类型安全的语言之间,不同的特性也会阻碍互操作性,因为一种语言的不变量很容易在另一种语言中被违反。在他们2007年的开创性论文中,马修斯和芬德勒提出了一种多语言结构,它通过一对边界来增强互操作语言,允许一种语言的代码嵌入另一种语言。虽然这种技术已经被广泛应用,但它们的语法源代码级互操作性并不能反映实际的实现,其中交互的行为只在编译到公共目标后定义,并且任何安全性都必须由目标不变量或插入的目标级“粘合代码”来确保。在本文中,我们提出了一个新的框架,设计和验证的声音语言的互操作性,遵循互操作后编译策略。语言设计者通过可转换关系τA <$τB(“τ A可转换为τB”)指定两种语言类型之间可以转换的数据,并指定实现转换的目标级粘合代码。然后,通过给出源语言类型的语义模型作为目标语言术语的集合,他们不仅可以建立源类型的含义,而且可以建立转换的合理性:即,每当τA> τB时,对应的转换对(粘合代码)将行为类似τ A的目标项转换为行为类似τB的目标项,反之亦然。这样,他们就可以证明整个系统的语义类型可靠性。我们通过一系列的案例研究来说明我们的框架,这些案例研究展示了我们的语义互操作编译后的方法如何使我们既可以考虑语言语义中的复杂差异,又可以根据编译器或目标的特殊性进行效率权衡。
Programs are rarely implemented in a single language, and thus questions of type soundness should address not only the semantics of a single language, but how it interacts with others. Even between type-safe languages, disparate features can frustrate interoperability, as invariants from one language can easily be violated in the other. In their seminal 2007 paper, Matthews and Findler proposed a multi-language construction that augments the interoperating languages with a pair ofboundariesthat allow code from one language to be embedded in the other. While this technique has been widely applied, their syntactic source-level interoperability doesn’t reflect practical implementations, where the behavior of interaction is only defined after compilation to a common target, and any safety must be ensured by target invariants or inserted target-level “glue code.”In this paper, we present a novel framework for the design and verification of sound language interoperability that follows an interoperation-after-compilation strategy. Language designers specify what data can be converted between types of the two languages via a convertibility relation τA∼ τB(“τAis convertible to τB”) and specify target-level glue code implementing the conversions. Then, by giving a semantic model of source-language types as sets of target-language terms, they can establish not only the meaning of the source types, but alsosoundness of conversions: i.e., whenever τA∼ τB, the corresponding pair of conversions (glue code) convert target terms that behave like τAto target terms that behave like τB, and vice versa. With this, they can prove semantic type soundness for the entire system. We illustrate our framework via a series of case studies that demonstrate how our semantic interoperation-after-compilation approach allows us both to account for complex differences in language semantics and make efficiency trade-offs based on particularities of compilers or targets.
不再是外来的:教 ML 编译器“原生地”讲 C
DOI: 10.1016/s1571-0661(05)80452-9
发表时间: 2001
影响因子: 0.6
作者:
Matthias Blume
通讯作者: Matthias Blume
细粒度的语言构成
DOI: --
发表时间: 2015
期刊: arXiv.org
影响因子: --
作者:
Edd Barrett;Carl Friedrich Bolz;Lukas Diekmann;L. Tratt
通讯作者: L. Tratt
模块化的外部函数接口
DOI: --
发表时间: 2017
影响因子: 1.3
作者:
J. Yallop;David Sheets;Anil Madhavapeddy
通讯作者: Anil Madhavapeddy
DOI: --
发表时间: --
期刊:
影响因子: --
作者:
Robert Kleffner
通讯作者: Robert Kleffner
Clojure 的历史
DOI: --
发表时间: 2020
期刊: Proc. ACM Program. Lang.
影响因子: --
作者:
R. Hickey
通讯作者: R. Hickey