Enforcing reference and object immutability in Java

  • Authors:
  • Mahmood Ali;Yoav Zibin;Matt M. Papi;Michael D. Ernst

  • Affiliations:
  • Massachusetts Institute of Technology, Cambridge, MA, USA;Massachusetts Institute of Technology, Cambridge, MA, USA;Massachusetts Institute of Technology, Cambridge, MA, USA;Massachusetts Institute of Technology, Cambridge, MA, USA

  • Venue:
  • Companion to the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Immutability information is useful in many software engineering tasks, such as modeling, verification, optimization, and refactoring. Furthermore, undesired mutation or side-effect are hard to detect and debug. This paper describes a javac plug-in that enables programmers to write immutability annotations in a Java program to detect and prevent bugs. The IGJ annotations are rich and flexible; the tools are scalable; case studies show they are effective and easy to use; and the annotated program remains compilable with a standard compiler.