Immutability specification and its applications

  • Authors:
  • Igor Pechtchanski;Vivek Sarkar

  • Affiliations:
  • New York University;T. J. Watson Research Center

  • Venue:
  • JGI '02 Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

A location is said to be immutable if its value and thevalues of selected locations reachable from it are guaranteed toremain unchanged during a specified time interval. We introduce aframework for immutability specification, and discuss itsapplication to code optimization. Compared to a finaldeclaration, an immutability assertion in our framework can expressa richer set of immutability properties along three dimensions ---lifetime, reachability and context.We present a framework for processing and verifying immutabilityannotations in Java, as well as extending optimizations so as toexploit immutability information. Preliminary experimental resultsshow that a significant number (82%) of read accesses couldpotentially be classified as immutable in our framework. Further,use of immutability information yields substantial reductions (33%to 99%) in the number of dynamic read accesses, and also measurablespeedups in the range of 5% to 10% for certain benchmarkprograms.