Immutable objects for a java-like language

  • Authors:
  • C. Haack;E. Poll;J. Schäfer;A. Schubert

  • Affiliations:
  • Radboud Universiteit Nijmegen, The Netherlands;Radboud Universiteit Nijmegen, The Netherlands;Technische Universität Kaiserlautern, Germany;Radboud Universiteit Nijmegen, The Netherlands and Warsaw University, Polan

  • Venue:
  • ESOP'07 Proceedings of the 16th European conference on Programming
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We extend a Java-like language with immutability specifications and a static type system for verifying immutability. A class modifier immutable specifies that all class instances are immutable objects. Ownership types specify the depth of object states and enforce encapsulation of representation objects. The type system guarantees that the state of immutable objects does not visibly mutate during a program run. Provided immutability-annotated classes and methods are final, this is true even if immutable classes are composed with untrusted classes that follow Java's type system, but not our immutability type system.