skip to main content
10.1145/1176617.1176755acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Interlanguage migration: from scripts to programs

Published: 22 October 2006 Publication History

Abstract

As scripts grow into full-fledged applications, programmers should want to port portions of their programs from scripting languages to languages with sound and rich type systems. This form of interlanguage migration ensures type-safety and provides minimal guarantees for reuse in other applications, too.In this paper, we present a framework for expressing this form of interlanguage migration. Given a program that consists of modules in the untyped lambda calculus, we prove that rewriting one of them in a simply typed lambda calculus produces an equivalent program and adds the expected amount of type safety, i.e., code in typed modules can't go wrong. To ensure these guarantees, the migration process infers constraints from the statically typed module and imposes them on the dynamically typed modules in the form of behavioral contracts.

References

[1]
Martin Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Trans. Program. Lang. Syst., 13(2):237--268, 1991.
[2]
Alexander Aiken, Edward L. Wimmers, and T. K. Lakshman. Soft typing with conditional types. In POPL '94: Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 163--173, New York, NY, USA, 1994. ACM Press.
[3]
Ken Anderson, Timothy Hickey, and Peter Norvig. JScheme user manual, 2002. http://jscheme.sf.net.
[4]
Arthur I. Baars and S. Doaitse Swierstra. Typing dynamic typing. In ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 157--166, New York, NY, USA, 2002. ACM Press.
[5]
Kent Beck. Test Driven Development: By Example. Addison-Wesley Professional, November 2002.
[6]
Gilad Bracha. Pluggable type systems. In Revival of Dynamic Languages workshop at OOPSLA 2004, October 2004.
[7]
Gilad Bracha and David Griswold. Strongtalk: typechecking smalltalk in a production environment. In OOPSLA '93: Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, pages 215--230, New York, NY, USA, 1993. ACM Press.
[8]
Frederick P. Brooks Jr. The Mythical Man-Month. Addison Wesley, 1995. Anniversary Edition.
[9]
Robert Cartwright and Mike Fagan. Soft typing. In PLDI '91: Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation, pages 278--292, New York, NY, USA, 1991. ACM Press.
[10]
William D. Clinger. Common Larceny. In International Lisp Conference, pages 101--107, June 2005. Invited paper.
[11]
Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In ICFP '02: Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming, pages 48--59, New York, NY, USA, 2002. ACM Press.
[12]
Cormac Flanagan and Matthias Felleisen. Componential set-based analysis. ACM Trans. Program. Lang. Syst., 21(2):370--416, 1999.
[13]
Kathryn E. Gray, Robert Bruce Findler, and Matthew Flatt. Fine-grained interoperability through mirrors and contracts. In OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object Oriented Programming, Systems, Languages, and Applications, pages 231--245, New York, NY, USA, 2005. ACM Press.
[14]
Groovy, 2004--2006. http://groovy.codehaus.org.
[15]
Fritz Henglein and Jakob Rehof. Safe polymorphic type inference for a dynamically typed language: translating Scheme to ML. In FPCA '95: Proceedings of the seventh international conference on Functional programming languages and computer architecture, pages 192--203, New York, NY, USA, 1995. ACM Press.
[16]
Jim Hugunin. IronPython, 2003--2006. http://www.ironpython.com.
[17]
Jython, 2003--2006. http://www.jython.com.
[18]
Xavier Leroy and Michel Mauny. Dynamics in ML. In Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, pages 406--426, London, UK, 1991. Springer-Verlag.
[19]
Vassily Litvinov. Contraint-based polymorphism in Cecil: towards a practical and static type system. In OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 388--411, New York, NY, USA, 1998. ACM Press.
[20]
Robert A. MacLachlan. The Python compiler for CMU Common Lisp. In LFP '92: Proceedings of the 1992 ACM conference on LISP and functional programming, pages 235--246, New York, NY, USA, 1992. ACM Press.
[21]
Simon Marlow and Philip Wadler. A practical subtyping system for Erlang. In ICFP '97: Proceedings of the second ACM SIGPLAN international conference on Functional programming, pages 136--149, New York, NY, USA, 1997. ACM Press.
[22]
Jacob Matthews and Robert Bruce Findler. The Meaning of Multi-Language Programs, 2006. Unpublished manuscript.
[23]
Philippe Meunier, Robert Bruce Findler, and Matthias Felleisen. Modular set-based analysis from contracts. In POPL '06: Conference Record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 218--231, New York, NY, USA, 2006. ACM Press.
[24]
Robin Milner. A theory of type polymorphism in programming. Journal of Computer Systems Science, 17:348--375, 1978.
[25]
Manuel Serrano. Bigloo: A practical Scheme compiler, 1992--2002.
[26]
Jeremy G. Siek and Walid Taha. Gradual typing for functional languages. In ICFP '06: Proceedings of the Eleventh ACM SIGPLAN International Conference on Functional Programming, New York, NY, USA, 2006. ACM Press.
[27]
Dorai Sitaram. ScheLog, http://www.ccs.neu.edu/home/dorai/ schelog/schelog.html 1993--2004.
[28]
Guy Lewis Steele Jr. Common Lisp - The Language. Digital Press, 1984.
[29]
Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification (Second Edition). Sun Microsystems, 1999.
[30]
Andrew K. Wright and Robert Cartwright. A practical soft type system for scheme. ACM Trans. Program. Lang. Syst., 19(1):87--152, 1997.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications
October 2006
530 pages
ISBN:159593491X
DOI:10.1145/1176617
  • General Chair:
  • Peri Tarr,
  • Program Chair:
  • William R. Cook
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: 22 October 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. λ-calculus
  2. contract
  3. interlanguage migration
  4. module systems

Qualifiers

  • Article

Conference

OOPSLA06
Sponsor:

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)17
  • Downloads (Last 6 weeks)1
Reflects downloads up to 24 Dec 2024

Other Metrics

Citations

Cited By

View all

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