Immutable Objects for a Java-Like Language

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.

[1]  Martin C. Rinard,et al.  Purity and Side Effect Analysis for Java Programs , 2005, VMCAI.

[2]  Yi Lu,et al.  Protecting representation with effect encapsulation , 2006, POPL '06.

[3]  Vivek Sarkar,et al.  Immutability specification and its applications: Research Articles , 2005 .

[4]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

[5]  Yi Lu,et al.  On Ownership and Accessibility , 2006, ECOOP.

[6]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[7]  Jan Vitek,et al.  Confined types in Java , 2001, Softw. Pract. Exp..

[8]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[9]  Michael D. Ernst,et al.  A practical type system and language for reference immutability , 2004, OOPSLA '04.

[10]  Bilha Mendelson,et al.  Automatic detection of immutable fields in Java , 2000, CASCON.

[11]  Michael D. Ernst,et al.  Javari: adding reference immutability to Java , 2005, OOPSLA '05.

[12]  Jens Palsberg,et al.  Type-based confinement , 2006, J. Funct. Program..

[13]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

[14]  Peter Müller,et al.  Universes: Lightweight Ownership for JML , 2005, J. Object Technol..

[15]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[16]  Vivek Sarkar,et al.  Immutability specification and its applications , 2005, Concurr. Pract. Exp..