Modelling Java requires state

  • Authors:
  • Alexander J. Summers

  • Affiliations:
  • Imperial College London, South Kensington, London

  • Venue:
  • Proceedings of the 11th International Workshop on Formal Techniques for Java-like Programs
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.