Michael Reif

Software Technology Group @ TU Darmstadt

A Unified Lattice Model and Framework for Purity Analyses

by Dominik Helm, Florian Kübler, Michael Eichberg, Michael Reif, and Mira Mezini

Abstract: Analyzing methods in object-oriented programs whether they are side-effect free and also deterministic, i.e., mathematically pure, has been the target of extensive research. Identifying such methods helps to find code smells and security related issues, and also helps analyses detecting concurrency bugs. Pure methods are also used by formal verification approaches as the foundations for specifications and proving the pureness is necessary to ensure correct specifications. However, so far no common terminology exists which describes the purity of methods. Furthermore, some terms (e.g., pure or sideeffect free) are also used inconsistently. Further, all current approaches only report selected purity information making them only suitable for a smaller subset of the potential use cases. In this paper, we present a fine-grained unified lattice model which puts the purity levels found in the literature into relation and which adds a new level that generalizes existing definitions. We have also implemented a scalable, modularized purity analysis which produces significantly more precise results for real-world programs than the best-performing related work. The analysis shows that all defined levels are found in real-world projects

Resources

BibTeX

@inproceedings {HKERM,
  title = {{A Unified Lattice Model and Framework for Purity Analyses}},
  author = {Helm, Dominik and Kübler, Florian and Eichberg, Michael and Reif, Michael and Mezini, Mira},
  booktitle = {{Proceedings of the 2018 33rd ACM/IEEE International Conference on Automated Software Engineering}},
  series = {ASE 2018},
  year = {2018},
}