Representing Java classes in a typed intermediate language

Citation
C. League et al., Representing Java classes in a typed intermediate language, ACM SIGPL N, 34(9), 1999, pp. 183-196
Citations number
37
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
34
Issue
9
Year of publication
1999
Pages
183 - 196
Database
ISI
SICI code
1523-2867(199909)34:9<183:RJCIAT>2.0.ZU;2-8
Abstract
We propose a conservative extension of the polymorphic lambda calculus (F-o mega) as an intermediate language for compiling languages with name-based c lass and interface hierarchies. Our extension enriches standard F-omega wit h recursive types, existential types, and row polymorphism, but only ordere d records with no subtyping. Basing our language on F-omega makes it also a suitable target for translation from other higher-order languages; this en ables the safe interoperation between class-based and higher-order language s and the reuse of common type-directed optimization techniques, compiler b ack ends, and runtime support. We present the formal semantics of our intermediate language and illustrate its features by providing a formal translation from a subset of Java, incl uding classes, interfaces, and private instance variables. The translation preserves the name-based hierarchical relation between Java classes and int erfaces, and allows access to private instance variables of parameters of t he same class as the one defining the method. It also exposes the details o f method invocation and instance variable access and allows many standard o ptimizations to be performed on the object-oriented code.