Javari: Adding Reference Immutability to Java
Author(s)
Tschantz, Matthew S.![Thumbnail](/bitstream/handle/1721.1/33963/MIT-CSAIL-TR-2006-059.pdf.jpg?sequence=4&isAllowed=y)
DownloadMIT-CSAIL-TR-2006-059.pdf (1.161Mb)
Additional downloads
Other Contributors
Program Analysis
Advisor
Michael Ernst
Metadata
Show full item recordAbstract
This paper describes a programming language, Javari, 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.The type system is distinguishes the notions of assignability and mutability; integrates with Java's generic types and with multi-dimensional arrays; provides a mutability polymorphism approach to avoiding code duplication; and has type-safe support for reflection and serialization. This paper describes a core calculus including formal type rules for the language.Additionally, this paper describes a type inference algorithm that can be used convert existing Java programs to Javari. Experimental results from a prototype implementation of the algorithm are presented.
Description
MEng thesis
Date issued
2006-09-05Other identifiers
MIT-CSAIL-TR-2006-059
Series/Report no.
Massachusetts Institute of Technology Computer Science and Artificial Intelligence Laboratory
Keywords
assignable, languages, mutable, readonly, type system, verification