Context-sensitive global analysis of large code bases can be expensive, which can make its use impractical during software development. However, there are many situations in which modifications are small and isolated within a few components, and it is desirable to reuse as much as possible previous analysis results. This has been achieved to date through incremental global analysis fixpoint algorithms that achieve cost reductions at fine levels of granularity, such as changes in program lines. However, these fine-grained techniques are not directly applicable to modular programs, nor are they designed to take advantage of modular structures. This paper describes, implements, and evaluates an algorithm that performs efficient context-sensitive analysis incrementally on modular partitions of programs. The experimental results show that the proposed modular algorithm shows significant improvements, in both time and memory consumption, when compared to existing non-modular, fine-grain incremental analysis techniques. Furthermore, thanks to the proposed inter-modular propagation of analysis information, our algorithm also outperforms traditional modular analysis even when analyzing from scratch.
翻译:对大型代码基础进行对背景敏感的全球分析可能费用昂贵,因此在软件开发过程中使用起来不切实际。然而,在很多情况下,修改是小的,在几个组件中是孤立的,因此最好尽可能地重新利用先前的分析结果。迄今为止,通过渐进的全球分析固定点算法实现了这一点,这种算法在微粒度微小的水平上实现了成本的降低,例如程序线的变化。然而,这些细微区分的技术并不直接适用于模块化程序,也没有设计来利用模块化结构。本文描述、实施和评价一种对程序模块分割进行高效率的对背景敏感的递增分析的算法。实验结果显示,与现有的非模块化、微量增量分析技术相比,拟议的模块化算法在时间和记忆消耗方面都显示出了显著的改进。此外,由于拟议的分析信息的模块化传播方式,我们的算法也超越了传统的模块化分析,即使从头分析也是如此。