ACM Home Page
Please provide us with feedback. Feedback
A practical type system and language for reference immutability
Full text PdfPdf (172 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
Vancouver, BC, Canada
SESSION: Generics table of contents
Pages: 35 - 49  
Year of Publication: 2004
ISBN:1-58113-831-9
Also published in ...
Authors
Adrian Birka  MIT Computer Science and Artificial Intelligence Lab, Cambridge, MA
Michael D. Ernst  MIT Computer Science and Artificial Intelligence Lab, Cambridge, MA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 6,   Downloads (12 Months): 38,   Citation Count: 11
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1028976.1028980
What is a DOI?

ABSTRACT

This paper describes a type system that is capable of expressing and enforcing immutability constraints. The specific constraint expressed is that the abstract state of the object to which an immutable reference refers cannot be modified using that reference. The abstract state is (part of) the transitively reachable state: that is, the state of the object and all state reachable from it by following references. The type system permits explicitly excluding fields or objects from the abstract state of an object. For a statically type-safe language, the type system guarantees reference immutability. If the language is extended with immutability downcasts, then run-time checks enforce the reference immutability constraints.

In order to better understand the usability and efficacy of the type system, we have implemented an extension to Java, called Javari, that includes all the features of our type system. Javari is interoperable with Java and existing JVMs. It can be viewed as a proposal for the semantics of the Java const keyword, though Javari's syntax uses readonly instead. This paper describes the design and implementation of Javari, including the type-checking rules for the language. This paper also discusses experience with 160,000 lines of Javari code. Javari was easy to use and provided a number of benefits, including detecting errors in well-tested code.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
2
3
 
4
A. Birka. Compiler-enforced immutability for the Java language. Technical Report MIT-LCS-TR-908, MIT Laboratory for Computer Science, Cambridge, MA, June 2003. Revision of Master's thesis.
 
5
6
 
7
8
9
 
10
11
12
13
14
15
16
 
17
 
18
 
19
D. Lea. Personal communictation, Aug. 1, 2004.
 
20
X. Leroy. The Objective Caml system, release 3.07, Sept. 29, 2003. with Damien Doligez, Jacques Garrigue, Didier Rémy and Jérôme Vouillon.
21
 
22
 
23
 
24
J. H. Morris. Sniggering type checker experiment. Experiment at Xerox PARC, 1978. Personal communication, May 2004.
 
25
P. Müller and A. Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen, 2001.
 
26
27
28
29
 
30
 
31
32
 
33
 
34
 
35
 
36
J.-P. Talpin and P. Jouvelot. The type and effect discipline. In Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science, pages 162--173, Santa Cruz, CA, June 22-25 1992.
 
37
P. Wadler. Linear types can change the world! In IFIP TC 2 Working Conference on Programming Concepts and Methods, pages 347--359, Sea of Galilee, Israel, Apr. 1990.

CITED BY  11

Collaborative Colleagues:
Adrian Birka: colleagues
Michael D. Ernst: colleagues