Object and reference immutability using Java generics

dc.contributor.authorZibin, Yoaven
dc.contributor.authorPotanin, Alexen
dc.contributor.authorAli, Mahmooden
dc.contributor.authorArtzi, Shayen
dc.contributor.authorKieun, Adamen
dc.contributor.authorErnst, Michael D.en
dc.date.accessioned2026-03-01T17:41:16Z
dc.date.available2026-03-01T17:41:16Z
dc.date.issued2007en
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 type 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 within Java's syntax and type system, and its reference immutability is more expressive than previous work. IGJ also permits covariant changes of type parameters 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.en
dc.description.statusPeer-revieweden
dc.format.extent10en
dc.identifier.isbn9781595938114en
dc.identifier.otherdblp:conf/sigsoft/ZibinPAAKE07en
dc.identifier.otherORCID:/0000-0002-4242-2725/work/206894454en
dc.identifier.scopus37849021932en
dc.identifier.urihttps://hdl.handle.net/1885/733806849
dc.language.isoenen
dc.publisherAssociation for Computing Machinery (ACM)en
dc.relation.ispartof6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007en
dc.relation.ispartofseries6th Joint Meeting of the European Software Engineering Conference and the 14th ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007en
dc.subjectConsten
dc.subjectGenericen
dc.subjectIGJen
dc.subjectImmutabilityen
dc.subjectJavaen
dc.subjectReadonlyen
dc.titleObject and reference immutability using Java genericsen
dc.typeConference paperen
dspace.entity.typePublicationen
local.bibliographicCitation.lastpage84en
local.bibliographicCitation.startpage75en
local.contributor.affiliationZibin, Yoav; Massachusetts Institute of Technologyen
local.contributor.affiliationPotanin, Alex; Victoria University of Wellingtonen
local.contributor.affiliationAli, Mahmood; Massachusetts Institute of Technologyen
local.contributor.affiliationArtzi, Shay; Massachusetts Institute of Technologyen
local.contributor.affiliationKieun, Adam; Massachusetts Institute of Technologyen
local.contributor.affiliationErnst, Michael D.; Massachusetts Institute of Technologyen
local.identifier.doi10.1145/1287624.1287637en
local.identifier.purebac66566-e612-4746-857f-b5f835530cf4en
local.identifier.urlhttps://www.scopus.com/pages/publications/37849021932en
local.type.statusPublisheden

Downloads