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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Allen, E., Bannet, J., Cartwright, R.: A first-class approach to genericity. In: Proc. OOPSLA 2003, pp. 96–114 (2003)
Agesen, O., Freund, S.N., Mitchell, J.C.: Adding type parameterization to the java language. In: Proc. OOPSLA 1997, pp. 49–65 (1997)
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
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
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)
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)
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)
Bruce, K.B.: Foundations of Object-Oriented Languages: Types and Semantics. MIT Press, Cambridge (2002)
Bruce, K.B.: Some challenging typing issues in object-oriented languages. Electronic notes in Theoretical Computer Science 82(8) (2003)
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)
Burstein, J.: Rupiah: An extension to Java supporting match-bounded parametric polymorphism, ThisType, and exact typing. Williams College Senior Honors Thesis (1998)
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)
Cartwright, R., Steele, G.L.: Compatible genericity with run-time types for the Java programming language (1998)
Foster, J.N.: Rupiah: Towards an Expressive Static Type System for Java. Williams College Senior Honors Thesis (2001)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1996)
Gonzalez, R.: In the World of Type Checking, Smarter Is Faster. Williams College Senior Honors Thesis (2003)
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
Myers, A.C., Bank, J.A., Liskov, B.: Parameterized types for Java. In: Proc. POPL 1997, pp. 132–145 (1997)
Odersky, M., Wadler, P.: Pizza into Java: Translating theory into practice. In: Proc. POPL 1997, pp. 146–159 (1997)
Torgersen, M.: The expression problem revisited. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 123–146. Springer, Heidelberg (2004) (to appear)
Viroli, M., Natali, A.: Parametric polymorphism in Java: an approach to translation based on reflective features. In: Proc. OOPSLA 2000, pp. 146–165 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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