ACM Home Page
Please provide us with feedback. Feedback
Object and reference immutability using Java generics
Full text PdfPdf (261 KB)
Source
Foundations of Software Engineering archive
Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering table of contents
Dubrovnik, Croatia
SESSION: Code analysis table of contents
Pages: 75 - 84  
Year of Publication: 2007
ISBN:978-1-59593-811-4
Authors
Yoav Zibin  Massachusetts Institute of Technology, Cambridge, MA
Alex Potanin  Victoria University of Wellington, Wellington, New Zealand
Mahmood Ali  Massachusetts Institute of Technology, Cambridge, MA
Shay Artzi  Massachusetts Institute of Technology, Cambridge, MA
Adam Kie|un  Massachusetts Institute of Technology, Cambridge, MA
Michael D. Ernst  Massachusetts Institute of Technology, Cambridge, MA
Sponsors
ACM: Association for Computing Machinery
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 77,   Citation Count: 5
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/1287624.1287637
What is a DOI?

ABSTRACT

A compiler-checked immutability guarantee provides useful documentation, facilitates reasoning, and enables optimizations. This paper presents 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. In IGJ, each class has one additional type parameter that is Immutable, Mutable, or ReadOnly. IGJ guarantees both reference immutability (only mutable references can mutate an object) and object immutability (an immutable reference points to an immutable object). IGJ is the first proposal for enforcing object immutability within Java's syntax and type system, and its reference immutability is more expressive than previous work. IGJ also permits covariant changes of type parameters in a type-safe manner, e.g., a readonly list of integers is a subtype of a readonly list of numbers. IGJ extends Java's type system with a few simple rules. We formalize this type system and prove it sound. Our IGJ compiler works by type-erasure and generates byte-code that can be executed on any JVM without runtime penalty.


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
S. Artzi, M. D. Ernst, A. Kiežun, C. Pacheco, and J. H. Perkins. Finding the needles in the haystack: Generating legal test inputs for object-oriented programs. In M-TOOS, Oct. 2006.
2
 
3
 
4
J. Boyland. Why we should not add readonly to Java (yet). In FTfJP, July 2005.
 
5
6
 
7
8
 
9
L. R. Clausen. A Java bytecode optimizer using side-effect analysis. Concurrency: Practice and Experience, 9(11):1031--1045, 1997.
10
 
11
R. DeLine and M. Fähndrich. Typestates for objects. In ECOOP, pages 465--490, June 2004.
 
12
W. Dietl and P. Müller. Universes: Lightweight ownership for JML. Journal of Object Technology (JOT), 4(8):5--32, Oct. 2005.
 
13
 
14
 
15
M. D. Ernst and D. Coward. JSR 308: Annotations on Java types. http://pag.csail.mit.edu/jsr308/, Oct. 17, 2006.
16
 
17
M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, 2000.
 
18
19
20
21
 
22
 
23
Y. Lu and J. Potter. On ownership and accessibility. In ECOOP, pages 99--123, July 2006.
 
24
25
 
26
27
 
28
A. Sǎlcianu. Pointer analysis for Java programs: Novel techniques and applications. PhD thesis, MIT Dept. of EECS, Sept. 2006.
 
29
M. Skoglund and T. Wrigstad. A mode system for read-only references in Java. In FTfJP, June 2001.
30
31
 
32
T. Xie. Augmenting automatically generated unit-test suites with regression oracle checking. In ECOOP, pages 380--403, July 2006.


Collaborative Colleagues:
Yoav Zibin: colleagues
Alex Potanin: colleagues
Mahmood Ali: colleagues
Shay Artzi: colleagues
Adam Kie|un: colleagues
Michael D. Ernst: colleagues