Title | Inference of reference immutability |
Publication Type | Conference Paper |
Year of Publication | 2008 |
Authors | Quinonez J, Tschantz MS, Ernst MD |
Conference Name | ECOOP 2008 –- Object-Oriented Programming, 22nd European Conference |
Pagination | 616–641 |
Date or Month Published | July |
Conference Location | Paphos, Cyprus |
Abstract | Javari is an extension of Java that supports reference immutability constraints. Programmers write \textttreadonly type qualifiers and other constraints, and the Javari type-checker detects mutation errors (incorrect side effects) or verifies their absence. While case studies have demonstrated the practicality and value of Javari, a barrier to usability remains. A Javari program will not typecheck unless all the references in the APIs of libraries it uses are annotated with Javari type qualifiers. Manually converting existing Java libraries to Javari is tedious and error-prone. \par We present an algorithm for inferring reference immutability in Javari. The flow-insensitive and context-sensitive algorithm is sound and produces a set of qualifiers that typecheck in Javari. The algorithm is precise in that it infers the most \textttreadonly qualifiers possible; adding any additional \textttreadonly qualifiers will cause the program to not typecheck. We have implemented the algorithm in a tool, Javarifier, that infers the Javari type qualifiers over a set of class files. \par Javarifier automatically converts Java libraries to Javari. Additionally, Javarifier eases the task of converting legacy programs to Javari by inferring the mutability of every reference in a program. In case studies, Javarifier correctly inferred mutability over Java programs of up to 110 KLOC. |
Downloads | https://groups.csail.mit.edu/pag/pubs/infer-refimmutability-quinonez-men... Quinonez thesis
https://types.cs.washington.edu/javari/javarifier/ Javarifier implementation
https://homes.cs.washington.edu/~mernst/pubs/infer-refimmutability-ecoop... PDF
|
Citation Key | QuinonezTE2008 |