Immutability specification and its applications

@article{Pechtchanski2002ImmutabilitySA,
  title={Immutability specification and its applications},
  author={Igor Pechtchanski and Vivek Sarkar},
  journal={Concurrency and Computation: Practice and Experience},
  year={2002},
  volume={17}
}
A location is said to be immutable if its value and the values of selected locations reachable from it are guaranteed to remain unchanged during a specified time interval. We introduce a framework for immutability specification, and discuss its application to code optimization. Compared with a final declaration, an immutability assertion in our framework can express a richer set of immutability properties along three dimensions—lifetime, reachability and context. We present a framework for… 
Parameter reference immutability: formal definition, inference tool, and comparison
TLDR
Pidasa is presented, a tool for classifying parameter reference immutability, and experimental results on programs of up to 185 kLOC show that, compared to previous approaches, Pidasa increases both run-time performance and overall accuracy ofImmutability inference.
Javari: adding reference immutability to Java
TLDR
Improvements that are new in this paper include distinguishing the notions of assignability and mutability; integration with Java 5's generic types and with multi-dimensional arrays; a mutability polymorphism approach to avoiding code duplication; type-safe support for reflection and serialization; and formal type rules and type soundness proof for a core calculus.
Constraint based optimization of stationary fields
TLDR
This work presents a language extension whereby the programmer can express that a field will have an unchanging value once it satisfies a given constraint, and creates an optimization framework that uses this information to perform specialisation and partial evaluation.
A practical type system and language for reference immutability
TLDR
The design and implementation of Javari is described, including the type-checking rules for the language, which can be viewed as a proposal for the semantics of the Java const keyword, though Javari's syntax uses readonly instead.
Immutability : An Empirical Study in Scala LUDVIG AXELSSON
TLDR
An immutability analysis and evaluation of six small-to-large open source projects written in Scala providing empirical data onimmutability usage and Inheritance is shown to be an important factor when it comes to a template’s immutable and mutability was found to be lower for the template types case class and singleton object.
Object and reference immutability using Java generics
TLDR
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, is presented.
Transformation for class immutability
TLDR
An algorithm and a tool, Immutator, that enables the programmer to safely transform a mutable class into an immutable class and is fast enough to be used interactively, and is much safer than manual transformations.
Refactoring for Immutability
TLDR
Experience with refactoring several opensource programs shows that IMMUTATOR is useful: (i) it reduces the burden of making classes immutable, (ii) is fast enough to be used interactively, and (iii) is much safer than manual refactorings performed by open-source developers.
Combined static and dynamic mutability analysis
TLDR
A novel, dynamic mutability analysis is presented, in which several lightweight, scalable analyses are combined in stages, with each stage refining the overall result, which is scalable and combines the strengths of its component analyses.
Compiler-Enforced Immutability for the Java Language
TLDR
The design, implementation, and evaluation of an extension to the Java language, ConstJava, that is capable of expressing immutability constraints and verifying them at compile time are presented.
...
...

References

SHOWING 1-10 OF 27 REFERENCES
Automatic detection of immutable fields in Java
TLDR
A static flow-sensitive analysis algorithm which can be applied to any Java component and identifies situations that expose variables to potential modification by code outside the component, as well as situations where variables are modified by the analyzed code.
Dynamic optimistic interprocedural analysis: a framework and an application
TLDR
A framework for performing dynamic optimistic interprocedural analysis is presented, designed to be used in the context of dynamic class loading and dynamic compilation, and includes mechanisms for event notification and dependence tracking (to enable invalidation of optimistic assumptions).
Detecting equality of variables in programs
TLDR
An algorithm for detecting when two computations produce equivalent values by developing a static property called congruence, which is conservative in that any variables detected to be e:quivalent will in fact be equivalent, but not all equivalences are detected.
ABCD: eliminating array bounds checks on demand
TLDR
ABCD is a light-weight algorithm for elimination of Array Bounds Checks on Demand that can be applied to a set of frequently executed (hot) bounds checks, which makes it suitable for the dynamic-compilation setting, in which compile-time cost is constrained but hot statements are known.
An automatic object inlining optimization and its evaluation
TLDR
An object inlining transformation is presented, focusing on a new algorithm which optimizes class field layout to minimize code expansion, and it is shown that, compared to traditional 1-CFA, that infrastructure provides better results and lower and more scalable cost.
Java annotation-aware just-in-time (AJIT) complilation system
TLDR
This paper presents an alternative to an optimizing JIT compiler that makes use of code annotations generated by the Java front-end that uses this information to produce high-performance native code without forming much of the necessary analyses or transformations.
Annotating Java class files with virtual registers for performance
TLDR
This paper proposes verifiable, machine-independent annotations to the Java class file to bring the quality of the code generated by a ‘just-in-time’ compiler closer to that of an optimizing compiler without a significant increase in code generation time.
The Jalapeño virtual machine
TLDR
Jalapeno is a virtual machine for JavaTM servers written in the Java language to be as self-sufficient as possible and to obtain high quality code for methods that are observed to be frequently executed or computationally intensive.
A framework for optimizing Java using attributes
TLDR
It is shown how class file attributes may be used to convey both optimization opportunities and profile information to a variety of Java virtual machines including ahead-of- time compilers and just-in-time compilers.
Fixing the Java memory model
  • W. Pugh
  • Computer Science
    JAVA '99
  • 1999
TLDR
This paper reviews issues and suggests replacement memory models for Java and concludes that programming idioms used by some programmers and used within Sun’s Java Development Kit is not guaranteed to be valid according to the existing Java memory model.
...
...