Advertisement

Two Ways to Bake Your Pizza — Translating Parameterised Types into Java

  • Martin Odersky
  • Enno Runne
  • Philip Wadler
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1766)

Abstract

We have identified in previous work two translations for parametrically typed extensions of Java. The homogeneous translation maps type variables to a uniform representation, while the heterogeneous translation expands the program by specialising parameterised classes according to their arguments. This paper describes both translations in detail, compares their time and space requirements and discusses how each affects the Java security model.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. AFM97.
    Ole Agesen, Stephen N. Freund, and John C. Mitchell. Adding type parameterization to the java language. In Proc. ACM Conference on Object-Oriented Programming: Systems, Languages and Applications, 1997.Google Scholar
  2. Bru97.
    Kim Bruce. Increasing Java’s expressiveness with ThisType and match-bounded polymorphism. Technical report, Williams College, 1997.Google Scholar
  3. CDG+88._L. Cardelli, J. Donahue, L. Glassman, M. Jordan, B. Kalsow, and G. Nelson. Modula-3 report. Technical Report 31, DEC SRC, 1988.Google Scholar
  4. FKF98.
    Matthew Flatt, Shriram Krishnamourthi, and Matthias Felleisen. Mixins for java. In Proc. 25th ACM Symposium on Principles of Programming Languages, January 1998.Google Scholar
  5. GJS96.
    James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Java Series, Sun Microsystems, 1996. ISBN 0-201-63451-1.Google Scholar
  6. HM95.
    Robert Harper and Greg Morrisett. Compiling polymorphism using intensional type analysis. In Proc. 22nd ACM Symposium on Principles of Programming Languages, pages 130–141, January 1995.Google Scholar
  7. Ler90.
    Xavier Leroy. Efficient data representation in polymorphic languages. In P. Deransart and J. Małuszyński, editors, Programming Language Implementation and Logic Programming, pages 255–276. Springer-Verlag, 1990. Lecture Notes in Computer Science 456.CrossRefGoogle Scholar
  8. LY96.
    Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Java Series, Sun Microsystems, 1996. ISBN 0-201-63452-X.Google Scholar
  9. MBL97.
    Andrew C. Myers, Joseph. A. Bank, and Barbara Liskov. Parameterised types for Java. In Proc. 24th ACM Symposium on Principles of Programming Languages, pages 132–145, January 1997.Google Scholar
  10. oD80.
    United States Department of Defense. The Programming Language Ada Reference Manual. Springer-Verlag, 1980.Google Scholar
  11. OW97a.
    Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In Proc. 24th ACM Symposium on Principles of Programming Languages, pages 146–159, January 1997.Google Scholar
  12. OW97b.
    Martin Odersky and Philip Wadler. Two approaches to type structure, 1997.Google Scholar
  13. SA95.
    Zhong Shao and Andrew W. Appel. A type-based compiler for Standard ML. In Proc. 1995A CM Conf. on Programming Language Design and Implementation, (ACM SIGPLAN Notices vol. 30), pages 116–129, June 1995.Google Scholar
  14. Str86.
    Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, 1986.Google Scholar
  15. Tho97.
    Kresten Krab Thorup. Genericity in java with virtual types. In Proc. ECOOP’97, LNCS 1241, pages 444–471, June 1997.Google Scholar
  16. Tor97.
    Mads Torgersen. Virtual types are statically safe. Note, circulated on the java-genericity mailing list, 1997.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Martin Odersky
    • 1
  • Enno Runne
    • 2
  • Philip Wadler
    • 3
  1. 1.Ecole Polytechnique Fèdèrale de LausanneLausanne
  2. 2.University of KarlsruheKarlsruhe
  3. 3.Lucent TechnologiesUSA

Personalised recommendations