Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1190216.1190220acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Operational semantics for multi-language programs

Published: 17 January 2007 Publication History

Abstract

Inter-language interoperability is big business, as the success of Microsoft's .NET and COM and Sun's JVM show. Programming language designers are designing programming languages that reflect that fact --- SML#, Mondrian, and Scala, to name just a few examples, all treat interoperability with other languages as a central design feature. Still, current multi-language research tends not to focus on the semantics of interoperation features, but only on how to implement them efficiently. In this paper, we take first steps toward higher-level models of interoperating systems. Our technique abstracts away the low-level details of interoperability like garbage collection and representation coherence, and lets us focus on semantic properties like type-safety and observable equivalence.Beyond giving simple expressive models that are natural compositions of single-language models, our studies have uncovered several interesting facts about interoperability. For example, higher-order contracts naturally emerge as the glue to ensure that interoperating languages respect each other's type systems. While we present our results in an abstract setting, they shed light on real multi-language systems and tools such as the JNI, SWIG, and Haskell's stable pointers.

References

[1]
M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237--268, April 1991.]]
[2]
E. Barzilay and J. Clements. Laziness without all the hard work. In Workshop on Functional and Declarative Programming in Education (FDPE), 2005.]]
[3]
E. Barzilay and D. Orlovsky. Foreign interface for PLT Scheme. In Workshop on Scheme and Functional Programming, 2004.]]
[4]
D. Beazley. Pointers, constraints, and typemaps. In SWIG 1.1 Users Manual. Available online: http://www.swig.org/Doc1.1/HTML/Typemaps.html.]]
[5]
D. Beazley. SWIG: An easy to use tool for integrating scripting languages with C and C++. In 4th Tcl/Tk Workshop, pages 129--139, 1996. Available online: http://www.swig.org/papers/Tcl96/tcl96.html.]]
[6]
N. Benton. Embedded interpreters. Journal of Functional Programming, 15:503--542, July 2005.]]
[7]
N. Benton and A. Kennedy. Interlanguage working without tears: Blending SML with Java. In ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 126--137, 1999.]]
[8]
N. Benton, A. Kennedy, and C. V. Russo. Adventures in interoperability: the SML.NET experience. In Proceedings of the 6th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP), pages 215--226, 2004.]]
[9]
M. Blume. No-longer-foreign: Teaching an ML compiler to speak C "natively". In Workshop on Multi-Language Infrastructure and Interoperability (BABEL), 2001.]]
[10]
L. Cardelli. Amber. In G. Cousineau, P.-L. Curien, and B. Robinet, editors, Combinators and functional programming languages, volume 242. Springer-Verlag, 1986.]]
[11]
M. M. T. Chakravarty. C → HASKELL, or yet another interfacing tool. In International Workshop on Implementation of Functional Languages (IFL), 1999.]]
[12]
M. M. T. Chakravarty. The Haskell 98 foreign function interface 1.0, 2002. Available online: http://www.cse.unsw.edu.au/~chak/haskell/ffi/.]]
[13]
C. Chambers and The Cecil Group. The Cecil language: Specification and rationale, version 3.2. Technical report, Department of Computer Science and Engineering, University of Washington, February 2004. Available online: http://www.cs.washington.edu/research/projects/cecil/pubs/cecil-spec.html.]]
[14]
M. Felleisen. On the expressive power of programming languages. Science of Computer Programming, 17:35--75, 1991.]]
[15]
M. Felleisen and R. Hieb. The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science, 102:235--271, 1992. Original version in: Technical Report 89--100, Rice University, June 1989.]]
[16]
R. B. Findler and M. Blume. Contracts as pairs of projections. In International Symposium on Functional and Logic Programming (FLOPS), 2006.]]
[17]
R. B. Findler and M. Felleisen. Contracts for higher-order functions. In ACM SIGPLAN International Conference on Functional Programming (ICFP), 2002.]]
[18]
S. Finne, D. Leijen, E. Meijer, and S. Peyton Jones. Calling Hell from Heaven and Heaven from Hell. In ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 114--125, 1999.]]
[19]
K. Fisher, R. Pucella, and J. Reppy. A framework for interoperability. In Workshop on Multi-Language Infrastructure and Interoperability (BABEL), 2001.]]
[20]
C. Flanagan. Hybrid type checking. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), 2006.]]
[21]
M. Furr and J. S. Foster. Checking type safety of foreign function calls. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 62--72, 2005.]]
[22]
A. D. Gordon and D. Syme. Typing a multi-language intermediate code. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 248--260, 2001.]]
[23]
K. E. Gray, R. B. Findler, and M. Flatt. Fine grained interoperability through mirrors and contracts. In Conference on Object-Oriented Programming: Systems, Languages, and Applications (OOPSLA), 2005.]]
[24]
F. Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22(3):197--230, 1994.]]
[25]
F. Henglein and J. Rehof. Safe polymorphic type inference for a dynamically typed language: translating Scheme to ML. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture (FPCA), 1995.]]
[26]
R. Ibrahim and C. Szyperski. The COMEL language. Technical Report FIT-TR-97-06, Faculty of Information Technology, Queensland University of Technology, Brisbane, Australia, 1997.]]
[27]
Jython. http://www.jython.org/.]]
[28]
A. Kennedy. Securing the .NET programming model. Theoretical Computer Science, To appear. http://research.microsoft.com/~akenn/sec/.]]
[29]
L. Kornstaedt. Alice in the land of Oz - an interoperability-based implementation of a functional language on top of a relational language. In Workshop on Multi-Language Infrastructure and Interoperability (BABEL), 2001.]]
[30]
J. Matthews and R. B. Findler. An operational semantics for R5RS Scheme. In Workshop on Scheme and Functional Programming, 2005.]]
[31]
J. Matthews, R. B. Findler, M. Flatt, and M. Felleisen. A visual en-vironment for developing context-sensitive term rewriting systems. In Proceedings of the International Conference on Rewriting Techniques and Applications (RTA), 2004.]]
[32]
E. Meijer, N. Perry, and A. van Yzendoorn. Scripting .NET using Mondrian. In European Conference on Object-Oriented Programming (ECOOP), pages 150--164, London, UK, 2001. Springer-Verlag.]]
[33]
P. Meunier and D. Silva. From Python to PLT Scheme. In Proceedings of the Fourth Workshop on Scheme and Functional Programming, pages 24--29, 2003.]]
[34]
M. Odersky, P. Altherr, V. Cremet, B. Emir, S. Micheloud, N. Mihaylov, M. Schinz, E. Stenman, and M. Zenger. An Introduction to Scala. http://scala.epfl.ch/docu/files/ScalaIntro.pdf, 2005.]]
[35]
A. Ohori and K. Kato. Semantics for communication primitives in an polymorphic language. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 99--112, 1993.]]
[36]
P. Pinto. Dot-Scheme: A PLT Scheme FFI for the .NET framework. In Workshop on Scheme and Functional Programming, November 2003.]]
[37]
G. D. Plotkin. LCF considered as a programming language. Theoretical Computer Science, pages 223--255, 1977.]]
[38]
R. Pucella. Towards a formalization for COM, part I: The primitive calculus. In Conference on Object-Oriented Programming: Systems, Languages, and Applications (OOPSLA), 2002.]]
[39]
N. Ramsey. Embedding an interpreted language using higher-order functions and types. In Interpreters, Virtual Machines and Emulators (IVME '03), pages 6--14, 2003.]]
[40]
J. Reppy and C. Song. Application-specific foreign-interface generation. In International Conference on Generative Programming and Component Engineering (GPCE), 2006.]]
[41]
P. Steckler. MysterX: A Scheme toolkit for building interactive applications with COM. In Technology of Object-Oriented Languages and Systems (TOOL), pages 364--373, 1999. Available online: citeseer.ist.psu.edu/steckler99mysterx.html.]]
[42]
V. Trifonov and Z. Shao. Safe and principled language interoperation. In European Symposium on Programming (ESOP), pages 128--146, 1999.]]
[43]
A. Wright and M. Felleisen. A syntactic approach to type soundness. Information and Computation, pages 38--94, 1994. First appeared as Technical Report TR160, Rice University, 1991.]]
[44]
S. Zdancewic, D. Grossman, and G. Morrisett. Principals in programming languages. In ACM SIGPLAN International Conference on Functional Programming (ICFP), 1999.]]

Cited By

View all
  • (2024)Compiled, Extensible, Multi-language DSLs (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746278:ICFP(64-87)Online publication date: 15-Aug-2024
  • (2024)Effectful Software ContractsProceedings of the ACM on Programming Languages10.1145/36329308:POPL(2639-2666)Online publication date: 5-Jan-2024
  • (2024)Static Blame for gradual typingJournal of Functional Programming10.1017/S095679682400002934Online publication date: 25-Mar-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2007
400 pages
ISBN:1595935754
DOI:10.1145/1190216
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 1
    Proceedings of the 2007 POPL Conference
    January 2007
    379 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1190215
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 January 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. interoperability
  2. multi-language systems
  3. operational semantics

Qualifiers

  • Article

Conference

POPL07

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)68
  • Downloads (Last 6 weeks)6
Reflects downloads up to 23 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Compiled, Extensible, Multi-language DSLs (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746278:ICFP(64-87)Online publication date: 15-Aug-2024
  • (2024)Effectful Software ContractsProceedings of the ACM on Programming Languages10.1145/36329308:POPL(2639-2666)Online publication date: 5-Jan-2024
  • (2024)Static Blame for gradual typingJournal of Functional Programming10.1017/S095679682400002934Online publication date: 25-Mar-2024
  • (2023)Melocoton: A Program Logic for Verified Interoperability Between OCaml and CProceedings of the ACM on Programming Languages10.1145/36228237:OOPSLA2(716-744)Online publication date: 16-Oct-2023
  • (2023)Semantic Encapsulation using Linking TypesProceedings of the 8th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3609027.3609405(14-28)Online publication date: 30-Aug-2023
  • (2023)DimSum: A Decentralized Approach to Multi-language Semantics and VerificationProceedings of the ACM on Programming Languages10.1145/35712207:POPL(775-805)Online publication date: 11-Jan-2023
  • (2022)Lang-n-Send: Processes That Send LanguagesElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.356.5356(46-56)Online publication date: 24-Mar-2022
  • (2022)Gradual System FJournal of the ACM10.1145/355598669:5(1-78)Online publication date: 28-Oct-2022
  • (2022)Karp: a language for NP reductionsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523732(762-776)Online publication date: 9-Jun-2022
  • (2022)Semantic soundness for language interoperabilityProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523703(609-624)Online publication date: 9-Jun-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media