Incrementalizing Context-sensitive Analyses for Modularized Programs

Isabel Garcia-Contreras, José F. Morales, Manuel V. Hermenegildo · arXiv (Cornell University) · 2018

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 modular analysis, aimed at reducing memory consumption, that localizes the analysis recomputation mainly to the modules affected by changes; and through global incremental fixpoint algorithms that achieve cost reductions at finer 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, by reusing a (non-modular) analyzer that meets some conditions. The experimental results show that the proposed modular algorithm achieves competitive and, in some cases, improved, performance when compared to existing non-modular, fine-grain incremental analysis techniques. Furthermore, thanks to the proposed inter-modular propagation of analysis information, our algorithm outperforms traditional modular analysis even when analyzing from scratch.

Read the paper · More papers on PaperTik