Fine-grained interoperability through mirrors and contracts

Fine-grained interoperability through mirrors and contracts
复制标题

通过镜像和合约实现细粒度的互操作性

DOI:
--
复制
发表时间:
2005
期刊:
Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子:
--
通讯作者:
M. Flatt
M. Flatt
中科院分区:
--
文献类型:
--
作者:
Kathryn E. Gray;R. Findler;M. Flatt

文献摘要

被引文献

相似文献

当一个值跨越互操作语言之间的边界时,必须对其进行检查和转换,以适应目标语言的类型和表示。对于简单形式的数据,检查和验证可以是即时的;对于高阶数据,如函数和对象,一些必须延迟,直到值以特定方式使用。通常,这些检查和检查由包装器、反射和动态谓词的特别混合实现。我们观察到1)包装器和反射操作符合镜像的轮廓,2)检查对应于合约,3)镜像操作的时间和形状与合约操作的时间和形状一致。基于这些见解,我们提出了一个新的模型的互操作性,建立在镜像和合同的想法,我们描述了一个可互操作的实现的Java和计划,是由该模型指导。
As a value flows across the boundary between interoperating languages, it must be checked and converted to fit the types and representations of the target language. For simple forms of data, the checks and coercions can be immediate; for higher order data, such as functions and objects, some must be delayed until the value is used in a particular way. Typically, these coercions and checks are implemented by an ad-hoc mixture of wrappers, reflection, and dynamic predicates. We observe that 1) the wrapper and reflection operations fit the profile of mirrors, 2) the checks correspond to contracts, and 3) the timing and shape of mirror operations coincide with the timing and shape of contract operations. Based on these insights, we present a new model of interoperability that builds on the ideas of mirrors and contracts, and we describe an interoperable implementation of Java and Scheme that is guided by the model.