[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

A simple typed intermediate language for object-oriented languages

Published: 12 January 2005 Publication History

Abstract

Traditional class and object encodings are difficult to use in practical type-preserving compilers because of the complexity of the encodings. We propose a simple typed intermediate language for compiling object-oriented languages and prove its soundness. The key ideas are to preserve lightweight notions of classes and objects instead of compiling them away and to separate name-based subclassing from structure-based subtyping. The language can express standard implementation techniques for both dynamic dispatch and runtime type tests. It has decidable type checking even with subtyping between quantified types with different bounds. Because of its simplicity, the language is a more suitable starting point for a practical type-preserving compiler than traditional encoding techniques.

References

[1]
Martin Abadi and Luca Cardelli. A Theory of Objects. Springer, New York, 1996.]]
[2]
Martín Abadi, Luca Cardelli, and Ramesh Viswanathan. An interpretation of objects and object types. In ACM Symposium on Principles of Programming Languages, pages 396--409, St. Petersburg Beach, Florida, 1996.]]
[3]
Paolo Baldan, Giorgio Ghelli, and Alessandra Raffaeta. Basic theory of f-bounded quantification. Information and Computation, 153(1):173--237, 1999.]]
[4]
Kim B. Bruce. A paradigmatic object-oriented programming language: Design, static typing and semantics. Journal of Functional Programming, 4(2):127--206, 1994.]]
[5]
Peter Canning, William Cook, Walt Hill, Walter Olthoff, and John C. Mitchell. F-bounded quantification for object-oriented programming. In Fourth International Conference on Functional Programming Languages and Computer Architecture, pages 273--280, 1989.]]
[6]
Luca Cardelli. A semantics of multiple inheritance. Information and Computation, 76(2/3):138--164, February/March 1988.]]
[7]
Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. ACM Computing Surveys, 17(4):471--522, 1985.]]
[8]
Giuseppe Castagna and Benjamin C. Pierce. Corrigendum: Decidable Bounded Quantification. http://www.cis.upenn.edu/~bcpierce/papers/fsubnew-corrigendum.ps.]]
[9]
Giuseppe Castagna and Benjamin C. Pierce. Decidable bounded quantification. In 21st ACM Symposium on Principles of Programming Languages, pages 151--162. ACM Press, 1994.]]
[10]
Juan Chen and David Tarditi. A simple typed intermediate language for object-oriented languages. Technical report, Microsoft Corporation. http://www.research.microsoft.com/~juanchen/tr.pdf.]]
[11]
Christopher Colby, Peter Lee, George C. Necula, Fred Blau, Ken Cline, and Mark Plesko. A certifying compiler for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, June 2000.]]
[12]
William R. Cook, Walter Hill, and Peter S. Canning. Inheritance is not subtyping. In 17th ACM Symposium on Principles of Programming Languages, pages 125--135. ACM Press, 1990.]]
[13]
Karl Crary. Simple, efficient object encoding using intersection types. Technical report. CMU Technical Report CMU-CS-99-100.]]
[14]
Microsoft Corp. et al. Common Language Infrastructure. 2002. http://msdn.microsoft.com/net/ecma/.]]
[15]
Kathleen Fisher. Type Systems for Object-oriented Programming Languages. PhD thesis, Stanford University, 1996.]]
[16]
Kathleen Fisher, John H. Reppy, and Jon G. Riecke. A calculus for compiling and linking classes. In Proceedings of the 9th European Symposium on Programming Languages and Systems, pages 135--149. Springer-Verlag, 2000.]]
[17]
Giorgio Ghelli. Recursive types are not conservative over F≤. In Proceedings of the International Conference on Typed Lambda Calculi and Applications, pages 146--162. Springer-Verlag, 1993.]]
[18]
Giorgio Ghelli. Divergence of F‹ type checking. Theoretical Computer Science, 139(1--2):131--162, 1995.]]
[19]
Neal Glew. Type dispatch for named hierarchical types. In ACM SIGPLAN International Conf. on Functional Programming, pages 172--182, 1999.]]
[20]
Neal Glew. An efficient class and object encoding. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 311--324, 2000.]]
[21]
Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. on Programming Languages and Systems, 23(3):396--450, 2001.]]
[22]
S. Kamin. Inheritance in Smalltalk-80: a denotational definition. In 15th ACM Symposium on Principles of Programming Languages, pages 80--87. ACM Press, 1988.]]
[23]
Christopher League. A Type-preserving Compiler Infrastructure. PhD thesis, Yale University, 2002.]]
[24]
Christopher League, Zhong Shao, and Valery Trifonov. Type-preserving compilation of Featherweight Java. ACM Trans. on Programming Languages and Systems, 24(2), March 2002.]]
[25]
Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1999.]]
[26]
Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From System F to typed assembly language. ACM Trans. on Programming Languages and Systems, 21(3):527--568, May 1999.]]
[27]
George Necula. Proof-Carrying Code. In ACM Symposium on Principles of Programming Languages, pages 106--119. ACM Press, 1997.]]
[28]
Benjamin C. Pierce. Intersection types and bounded polymorphism. In Typed Lambda Calculi and Applications, volume 664, pages 346--360. Springer-Verlag, 1993.]]
[29]
Benjamin C. Pierce. Bounded quantification is undecidable. In Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design, pages 427--459. The MIT Press, MA, 1994.]]
[30]
Benjamin C. Pierce and David N. Turner. Simple type-theoretic foundations for object-oriented programming. Journal of Functional Programming, 4(2):207--247, 1994.]]
[31]
Didier Rémy. Programming objects with ml-art, an extension to ml with abstract and record types. In International Conference on Theoretical Aspects of Computer Software, pages 321--346. Springer-Verlag, 1994.]]
[32]
Zhong Shao. An overview of the FLINT/ML compiler. In ACM SIGPLAN Workshop on Types in Compilation, June 1997.]]
[33]
D. Tarditi, G. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A type-directed optimizing compiler for ML. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 181--192, 1996.]]
[34]
Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38--94, 1994.]]
[35]
Andrew K. Wright, Suresh Jagannathan, Cristian Ungureanu, and Aaron Hertzmann. Compiling Java to a typed lambda-calculus: A preliminary report. In Types in Compilation, pages 9--27, 1998.]]
[36]
Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In ACM SIGPLAN Symposium on Principles of Programming Languages, pages 224--235, New Orleans, January 2003.]]

Cited By

View all
  • (2012)Software modeling language with frames and multi-abstractionsProceedings of the 11th international conference on Artificial Intelligence and Soft Computing - Volume Part II10.1007/978-3-642-29350-4_67(564-572)Online publication date: 29-Apr-2012
  • (2010)Inferable object-oriented typed assembly languageACM SIGPLAN Notices10.1145/1809028.180664445:6(424-435)Online publication date: 5-Jun-2010
  • (2010)Inferable object-oriented typed assembly languageProceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1806596.1806644(424-435)Online publication date: 5-Jun-2010
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 40, Issue 1
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2005
391 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1047659
Issue’s Table of Contents
  • cover image ACM Conferences
    POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2005
    402 pages
    ISBN:158113830X
    DOI:10.1145/1040305
    • General Chair:
    • Jens Palsberg,
    • Program Chair:
    • Martín Abadi
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 January 2005
Published in SIGPLAN Volume 40, Issue 1

Check for updates

Author Tags

  1. class and object encoding
  2. typed intermediate language

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2012)Software modeling language with frames and multi-abstractionsProceedings of the 11th international conference on Artificial Intelligence and Soft Computing - Volume Part II10.1007/978-3-642-29350-4_67(564-572)Online publication date: 29-Apr-2012
  • (2010)Inferable object-oriented typed assembly languageACM SIGPLAN Notices10.1145/1809028.180664445:6(424-435)Online publication date: 5-Jun-2010
  • (2010)Inferable object-oriented typed assembly languageProceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1806596.1806644(424-435)Online publication date: 5-Jun-2010
  • (2009)A typed intermediate language for supporting interfacesProceedings of the 11th International Workshop on Formal Techniques for Java-like Programs10.1145/1557898.1557899(1-6)Online publication date: 6-Jul-2009
  • (2009)PetaBricksACM SIGPLAN Notices10.1145/1543135.154248144:6(38-49)Online publication date: 15-Jun-2009
  • (2009)CEALACM SIGPLAN Notices10.1145/1543135.154248044:6(25-37)Online publication date: 15-Jun-2009
  • (2009)Safe and timely updates to multi-threaded programsACM SIGPLAN Notices10.1145/1543135.154247944:6(13-24)Online publication date: 15-Jun-2009
  • (2008)The role of semantics in games and simulationsComputers in Entertainment10.1145/1461999.14620096:4(1-35)Online publication date: 24-Dec-2008
  • (2008)Type-preserving compilation for large-scale optimizing object-oriented compilersACM SIGPLAN Notices10.1145/1379022.137560443:6(183-192)Online publication date: 7-Jun-2008
  • (2008)Type-preserving compilation for large-scale optimizing object-oriented compilersProceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1375581.1375604(183-192)Online publication date: 7-Jun-2008
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media