Reference immutability type systems such as Javari and ReIm ensure that a given reference cannot be used to mutate the referenced object. These systems are conservative in the sense that a mutable reference may be mutable due to approximation. In this paper, we present ReM (for definite Re[ference] M[utability]). It separates mutable references into (1) definitely mutable, and (2) maybe mutable, i.e., references whose mutability is due to inherent approximation. In addition, we propose a CFL-reachability system for reference immutability, and prove that it is equivalent to ReIm/ReM, thus building a novel framework for reasoning about correctness of reference immutability type systems. We have implemented ReM and applied it on a large benchmark suite. Our results show that approximately 86.5% of all mutable references are definitely mutable.
@InProceedings{milanova:LIPIcs.ECOOP.2018.25, author = {Milanova, Ana}, title = {{Definite Reference Mutability}}, booktitle = {32nd European Conference on Object-Oriented Programming (ECOOP 2018)}, pages = {25:1--25:30}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-079-8}, ISSN = {1868-8969}, year = {2018}, volume = {109}, editor = {Millstein, Todd}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2018.25}, URN = {urn:nbn:de:0030-drops-92303}, doi = {10.4230/LIPIcs.ECOOP.2018.25}, annote = {Keywords: reference immutability, type inference, CFL-reachability, precision} }
Feedback for Dagstuhl Publishing