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 160X to 4761X depending on the types of program analyses performed.
翻译:我们提出了一种方法,用于在分析的程序发生变化时增量地进行代数程序分析。APA是一种程序分析范式,包含两个不同的步骤:计算一个路径表达式,以简洁地总结感兴趣的程序路径集合;以及使用一个正确定义的语义代数来解释该路径表达式,以获得感兴趣的程序属性。在此背景下,增量算法的目标是通过利用程序变更前计算的中间结果来减少分析时间。我们做出了两个主要贡献。首先,我们提出了一种数据结构,用于将路径表达式高效地表示为树,并配以基于树的解释方法。其次,我们提出了在路径表达式发生变化时高效更新程序属性的技术。我们实现了我们的方法,并在来自DaCapo基准测试套件的十三个Java应用程序上对其进行了评估。实验结果表明,我们增量计算路径表达式的方法和增量解释路径表达式的方法都能有效地加速分析。与基线APA方法和两种最先进的APA方法相比,我们的方法加速比在160倍到4761倍之间,具体取决于所执行的程序分析类型。