Alexander Herz and Kalmer Apinis. Class-Modular, Class-Escape and Points-to Analysis for Object-Oriented Languages. In Alwyn Goodloe and Suzette Person, editors, NASA Formal Methods, volume 7226 of Lecture Notes in Computer Science, pages 106-119, 2012. Springer Berlin / Heidelberg.

We present a combined class-modular points-to and class-escape analysis that allows to analyze class declarations even if no information about the code that invokes the class’s methods is available as is the case for e.g. shared libraries. Any standard whole-program or summary-based points-to analysis can be plugged into our framework and thus be transformed into a class-modular, class-escape and points-to analysis. The analysis framework uses the flow restrictions imposed by the access modifiers (e.g. private , public and protected in Java) to find all fields that may be modified by code that is not part of the class declaration. These fields escape the class. Unlike method-based summaries instantiated with an unknown context, our analysis framework can give detailed points-to information for non-escaping fields. In addition, the knowledge of which fields belong to the region that does not escape a class can be exploited to perform other analysis like class-modular object in-lining [6] more efficiently or enable the automatic inference of class invariants [10]. We prove the soundness of the analysis and present a set of benchmarks showing that the analysis is suitable to analyze real world code and that more than 75% of the fields from the benchmarked classes are identified as non-escaping.

Download: PDF Reference: Bibtex