ABSTRACT
Interesting questions concerning Java-like languages are often studied in the context of smaller programming calculi such as Featherweight Java. The simplicity of the syntax, and small number of features, and in particular the lack of state, make it possible to focus on the issues of interest. Although the programming languages are imperative, Featherweight Java and various similar calculi are functional.
We argue that the study of the type system of Java 5.0 and beyond requires a calculus with state. For example, the treatment of wildcards in Java is tailored to preserve soundness in the presence of stateful computation, a feature that is not present in functional calculi. A stateful calculus is necessary before the potential pitfalls of an incorrect proposal can be seen. We illustrate this point by showing that a traditional treatment of existential types (based on that historically known for the Lambda Calculus) is unsound for Java but remains sound for Featherweight Java.
- Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight java: a minimal core calculus for java and gj. ACM ToPLAS, 23(3):396--450, 2001. Google ScholarDigital Library
- John C. Mitchell and Gordon D. Plotkin. Abstract types have existential type. ACM Transactions on Programming Languages and Systems, 10(3):470--502, 1988. Google ScholarDigital Library
- Benjamin C. Pierce. Types and programming languages. MIT Press, Cambridge, MA, USA, 2002. Google ScholarDigital Library
- Mads Torgersen, Christian Plesner Hansen, Erik Ernst, Peter von der Ahé, Gilad Bracha, and Neal Gafter. Adding wildcards to the java programming language. In SAC '04: Proceedings of the 2004 ACM symposium on Applied computing, pages 1289--1296, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
Index Terms
- Modelling Java requires state
Comments