一句话:提出增量代数程序分析算法,通过树表示路径表达式并增量更新解释结果,显著加速分析。
代数程序分析(APA)分两步:先计算路径表达式以概括程序路径,再用语义代数解释得到程序性质。程序变更后从头分析开销大。本文提出增量式 APA 方法:一是用树结构高效表示路径表达式,并给出基于树的解释方法;二是设计在路径表达式变化时高效更新程序性质的技术。作者实现该方法并在 DaCapo 基准的 13 个 Java 程序上评估。实验表明,增量计算路径表达式与增量解释路径表达式均能加速分析;相比基线 APA 和两种先进 APA 方法,加速比依分析类型从 160 倍到 4761 倍不等。
We propose a method for conducting algebraic program analysis (APA) incrementally in response to changes of the program under analysis. APA is a program analysis paradigm that consists of two distinct steps: computing a path expression that succinctly summarizes the set of program paths of interest, and interpreting the path expression using a properly-defined semantic algebra to obtain program properties of interest. In this context, the goal of an incremental algorithm is to reduce the analysis time by leveraging the intermediate results computed before the program changes. We have made two main contributions. First, we propose a data structure for efficiently representing path expression as a tree together with a tree-based interpreting method. Second, we propose techniques for efficiently updating the program properties in response to changes of the path expression. We have implemented our method and evaluated it on thirteen Java applications from the DaCapo benchmark suite. The experimental results show that both our method for incrementally computing path expression and our method for incrementally interpreting path expression are effective in speeding up the analysis. Compared to the baseline APA and two state-of-the-art APA methods, the speedup of our method ranges from 160× to 4761× depending on the types of program analyses performed.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{ZhouFWW25,
title = {An Incremental Algorithm for Algebraic Program Analysis},
author = {Chenyu Zhou and Yuzhou Fang and Jingbo Wang and Chao Wang},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {POPL},
year = {2025},
doi = {10.1145/3704901}
}