Glacier: Transitive Class Immutability for Java

Author email: mcoblenz@cs.cmu.edu
Tool name: Glacier
Description: Though immutability has been long-proposed as a way to prevent bugs in software, little is known about how to make immutability support in programming languages effective for software engineers. We designed a new formalism that extends Java to support transitive class immutability, the form of immutability for which there is the strongest empirical support, and implemented that formalism in a tool called Glacier. We applied Glacier successfully to two real-world systems. We also compared Glacier to Java's final in a user study of twenty participants. We found that even after being given instructions on how to express immutability with final, participants who used final were unable to express immutability correctly, whereas almost all participants who used Glacier succeeded. We also asked participants to make specific changes to immutable classes and found that participants who used final all incorrectly mutated immutable state, whereas almost all of the participants who used Glacier succeeded. Glacier represents a promising approach to enforcing immutability in Java and provides a model for enforcement in other languages.
Bibtex: @inproceedings{10.1109/ICSE.2017.52, author = {Coblenz, Michael and Nelson, Whitney and Aldrich, Jonathan and Myers, Brad and Sunshine, Joshua}, title = {Glacier: Transitive Class Immutability for Java}, year = {2017}, isbn = {9781538638682}, publisher = {IEEE Press}, url = {https://doi.org/10.1109/ICSE.2017.52}, doi = {10.1109/ICSE.2017.52}, booktitle = {Proceedings of the 39th International Conference on Software Engineering}, pages = {496–506}, numpages = {11}, keywords = {programming language usability, immutability, empirical studies of programmers}, location = {Buenos Aires, Argentina}, series = {ICSE ’17} }
Link to public pdf: https://dl.acm.org/doi/abs/10.1109/ICSE.2017.52
Link to tool webpage: http://mcoblenz.github.io/Glacier/
Link to demo: Not provided by authors
Category: None
Year and Conference: 2017, ICSE
Terms of use