kirancodes.me
To Proof Maintenance & Beyond!

Transformation for class immutability

Fredrik Kjolstad, Danny Dig, Gabriel Acevedo, Marc Snir

Abstract

It is common for object-oriented programs to have both mutable and immutable classes. Immutable classes simplify programing because the programmer does not have to reason about side-effects. Sometimes programmers write immutable classes from scratch, other times they transform mutable into immutable classes. To transform a mutable class, programmers must find all methods that mutate its transitive state and all objects that can enter or escape the state of the class. The analyses are non-trivial and the rewriting is tedious. Fortunately, this can be automated.

BibTeX
@inproceedings{Kjolstad-al:ICSE11,
  author    = {Fredrik Kjolstad and
               Danny Dig and
               Gabriel Acevedo and
               Marc Snir},
  title     = {Transformation for class immutability},
  booktitle = {ICSE},
  pages     = {61--70},
  publisher = {{ACM}},
  year      = {2011},
}

Related papers