Show simple item record

Object and Reference Immutability using Java Generics

dc.date.accessioned2007-03-16T21:01:46Z
dc.date.accessioned2018-11-24T10:25:23Z
dc.date.available2007-03-16T21:01:46Z
dc.date.available2018-11-24T10:25:23Z
dc.date.issued2007-03-16
dc.identifier.urihttp://hdl.handle.net/1721.1/36850
dc.identifier.urihttp://repository.aust.edu.ng/xmlui/handle/1721.1/36850
dc.description.abstractA compiler-checked immutability guarantee provides useful documentation, facilitates reasoning, and enables optimizations. This paper presents Immutability Generic Java (IGJ), a novel language extension that expresses immutability without changing Java s syntax by building upon Java s generics and annotation mechanisms. In IGJ, each class has one additional generic parameter that is Immutable, Mutable, or ReadOnly. IGJ guarantees both reference immutability (only mutable references can mutate an object) and object immutability (an immutable reference points to an immutable object). IGJ is the first proposal for enforcing object immutability, and its reference immutability is more expressive than previous work. IGJ also permits covariant changes of generic arguments in a type-safe manner, e.g., a readonly list of integers is a subtype of a readonly list of numbers. IGJ extends Java s type system with a few simple rules. We formalize this type system and prove it sound. Our IGJ compiler works by type-erasure and generates byte-code that can be executed on any JVM without runtime penalty.
dc.format.extent12 p.
dc.titleObject and Reference Immutability using Java Generics


Files in this item

FilesSizeFormatView
MIT-CSAIL-TR-2007-018.pdf519.6Kbapplication/pdfView/Open
MIT-CSAIL-TR-2007-018.ps2.590Mbapplication/postscriptView/Open

This item appears in the following Collection(s)

Show simple item record