TY - GEN
T1 - Fine-grained interoperability through mirrors and contracts
AU - Gray, Kathryn E.
AU - Findler, Robert Bruce
AU - Flatt, Matthew
N1 - Copyright:
Copyright 2020 Elsevier B.V., All rights reserved.
PY - 2005
Y1 - 2005
N2 - 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.
AB - 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.
KW - Contracts
KW - Interoperability
KW - Java
KW - Mirrors
KW - Scheme
UR - http://www.scopus.com/inward/record.url?scp=31744447223&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=31744447223&partnerID=8YFLogxK
U2 - 10.1145/1094811.1094830
DO - 10.1145/1094811.1094830
M3 - Conference contribution
AN - SCOPUS:31744447223
SN - 1595930310
SN - 9781595930316
T3 - Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA
SP - 231
EP - 245
BT - OOPSLA'05 - Conference Proceedings
PB - Association for Computing Machinery
T2 - OOPSLA'05 - 20th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications
Y2 - 16 October 2005 through 20 October 2005
ER -