Skip to main content

LOOJ: Weaving LOOM into Java

  • Conference paper
Book cover ECOOP 2004 – Object-Oriented Programming (ECOOP 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3086))

Included in the following conference series:

Abstract

LOOJ is an extension of Java obtained by adding bounded parametric polymorphism and new type expressions ThisClass and ThisType, which are similar to MyType in LOOM. Through examples we demonstrate the utility of this language even over very expressive extensions such as GJ. The LOOJ compiler generates standard JVML code and supports instanceof and casts for all types including type variables and the other new type expressions. The core of the LOOJ type system is sound, as demonstrated by a soundness proof for an extension of Featherweight GJ. This paper also highlights difficulties that arise from the use of both classes and interfaces as types in Java.

This work was partially supported by the National Science Foundation under grants CCR-0306486 and CCR-9988210.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allen, E., Bannet, J., Cartwright, R.: A first-class approach to genericity. In: Proc. OOPSLA 2003, pp. 96–114 (2003)

    Google Scholar 

  2. Agesen, O., Freund, S.N., Mitchell, J.C.: Adding type parameterization to the java language. In: Proc. OOPSLA 1997, pp. 49–65 (1997)

    Google Scholar 

  3. Bracha, G., Cohen, N., Kemper, C., Marx, S., Odersky, M., Panitz, S.-E., Stoutamire, D., Thorup, K., Wadler, P.: Adding generics to the Java programming language (2001), http://jcp.org/aboutJava/communityprocess/review/jsr014/index.html

  4. Bruce, K.B., Foster, J.N.: LOOJ: Weaving LOOM into Java. Technical Report MS-CIS-03-38, University of Pennsylvania (2004), http://www.cis.upenn.edu/~jnfoster/papers/MS-CIS-03-38.ps

  5. Bruce, K.B., Fiech, A., Petersen, L.: Subtyping is not a good “match” for object-oriented languages. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 104–127. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  6. Bruce, K.B., Fiech, A., Schuett, A., van Gent, R.: PolyTOIL: A type-safe polymorphic object-oriented language. ACM TOPLAS 25(2), 225–290 (2003)

    Article  Google Scholar 

  7. Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: Adding genericity to the Java programming language. In: Proc. OOPSLA (1998)

    Google Scholar 

  8. Bruce, K.B.: Foundations of Object-Oriented Languages: Types and Semantics. MIT Press, Cambridge (2002)

    Google Scholar 

  9. Bruce, K.B.: Some challenging typing issues in object-oriented languages. Electronic notes in Theoretical Computer Science 82(8) (2003)

    Google Scholar 

  10. Bruce, K.B., Schuett, A., van Gent, R.: PolyTOIL: A typesafe polymorphic object-oriented language. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 27–51. Springer, Heidelberg (1995) (extended abstract)

    Google Scholar 

  11. Burstein, J.: Rupiah: An extension to Java supporting match-bounded parametric polymorphism, ThisType, and exact typing. Williams College Senior Honors Thesis (1998)

    Google Scholar 

  12. Bruce, K.B., Vanderwaart, J.C.: Semantics-driven language design: Statically type-safe virtual types in object-oriented languages. Electronic notes in Theoretical Computer Science 20 (1999)

    Google Scholar 

  13. Cartwright, R., Steele, G.L.: Compatible genericity with run-time types for the Java programming language (1998)

    Google Scholar 

  14. Foster, J.N.: Rupiah: Towards an Expressive Static Type System for Java. Williams College Senior Honors Thesis (2001)

    Google Scholar 

  15. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  16. Gonzalez, R.: In the World of Type Checking, Smarter Is Faster. Williams College Senior Honors Thesis (2003)

    Google Scholar 

  17. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001); An earlier version appeared in Proc. OOPSLA 1999

    Article  Google Scholar 

  18. Myers, A.C., Bank, J.A., Liskov, B.: Parameterized types for Java. In: Proc. POPL 1997, pp. 132–145 (1997)

    Google Scholar 

  19. Odersky, M., Wadler, P.: Pizza into Java: Translating theory into practice. In: Proc. POPL 1997, pp. 146–159 (1997)

    Google Scholar 

  20. Torgersen, M.: The expression problem revisited. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 123–146. Springer, Heidelberg (2004) (to appear)

    Chapter  Google Scholar 

  21. Viroli, M., Natali, A.: Parametric polymorphism in Java: an approach to translation based on reflective features. In: Proc. OOPSLA 2000, pp. 146–165 (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bruce, K.B., Foster, J.N. (2004). LOOJ: Weaving LOOM into Java . In: Odersky, M. (eds) ECOOP 2004 – Object-Oriented Programming. ECOOP 2004. Lecture Notes in Computer Science, vol 3086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24851-4_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24851-4_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22159-3

  • Online ISBN: 978-3-540-24851-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics