Javari: Adding reference immutability to Java

TitleJavari: Adding reference immutability to Java
Publication TypeConference Paper
Year of Publication2005
AuthorsTschantz MS, Ernst MD
Conference NameObject-Oriented Programming Systems, Languages, and Applications (OOPSLA 2005)
Date or Month PublishedOctober 18–20
Conference LocationSan Diego, CA, USA
Abstract<p>This paper describes a type system that is capable of expressing and enforcing immutability constraints. The specific constraint expressed is that the abstract state of the object to which an immutable reference refers cannot be modified using that reference. The abstract state is (part of) the transitively reachable state: that is, the state of the object and all state reachable from it by following references. The type system permits explicitly excluding fields from the abstract state of an object. For a statically type-safe language, the type system guarantees reference immutability. If the language is extended with immutability downcasts, then run-time checks enforce the reference immutability constraints. </p> <p> This research builds upon previous research in language support for reference immutability. Improvements that are new in this paper include distinguishing the notions of assignability and mutability; integration with Java 5's generic types and with multi-dimensional arrays; a mutability polymorphism approach to avoiding code duplication; type-safe support for reflection and serialization; and formal type rules and type soundness proof for a core calculus. Furthermore, it retains the valuable features of the previous dialect, including usability by humans (as evidenced by experience with 160,000 lines of Javari code) and interoperability with Java and existing JVMs.</p>
Downloadsextended version (PDF) Javari implementation PDF slides (PowerPoint)
Citation KeyTschantzE2005
Last changed Mon, 2013-06-03 10:27