一句话:提出统一格模型关联已有纯度层级并新增泛化层级,实现可扩展模块化纯度分析,精度显著优于相关工作。
面向对象程序中方法的副作用自由与确定性(数学纯度)分析已有大量研究,但领域缺少统一术语,部分术语使用不一致,现有方法仅报告选定的纯度信息,适用场景受限。本文提出细粒度统一格模型,将文献中的纯度层级相互关联,并引入一个可泛化既有定义的新层级;同时实现可扩展、模块化的纯度分析。评估表明,该分析在真实程序上比表现最好的相关工作显著更精确,并发现真实项目中存在所有已定义纯度层级。
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 side-effect 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.
DOI 原文 ·
@inproceedings{paperbot4775,
title = {A unified lattice model and framework for purity analyses},
author = {Dominik Helm and Florian Kübler and Michael Eichberg and Michael Reif and Mira Mezini},
booktitle = {ASE},
year = {2018},
doi = {10.1145/3238147.3238226}
}