We consider the problem of making expressive, interactive static analyzers compositional. Such a technique could help bring the power of server-based static analyses to integrated development environments (IDEs), updating their results live as the code is modified. Compositionality is key for this scenario, as it enables reuse of already-computed analysis results for unmodified code. Previous techniques for interactive static analysis either lack compositionality, cannot express arbitrary abstract domains, or are not from-scratch consistent. We present demanded summarization, the first algorithm for incremental compositional analysis in arbitrary abstract domains that guarantees from-scratch consistency. Our approach analyzes individual procedures using a recent technique for demanded analysis, computing summaries on demand for procedure calls. A dynamically updated summary dependency graph enables precise result invalidation after program edits, and the algorithm is carefully designed to guarantee from-scratch-consistent results after edits, even in the presence of recursion and in arbitrary abstract domains. We formalize our technique and prove soundness, termination, and from-scratch consistency. An experimental evaluation of a prototype implementation on synthetic and real-world program edits provides evidence for the feasibility of this theoretical framework, showing potential for major performance benefits over non-demanded compositional analyses.
我们考虑制作表达性,交互式静态分析仪组成的问题。这样的技术可以帮助将基于服务器的静态分析的功能带入集成的开发环境(IDE),随着代码的修改,更新其结果。组成性是这种情况的关键,因为它可以重用未修改的代码已经计算的分析结果。交互式静态分析的先前技术要么缺乏组成性,不能表达任意的抽象域,要么是从划痕一致的。我们提出了要求的摘要,这是保证从划痕一致性的任意抽象域中增量组成分析的第一种算法。我们的方法使用最新技术进行了要求的分析,分析了单个程序,按要求计算程序调用的摘要。动态更新的摘要依赖图在程序编辑后可以确切的结果无效,并且算法经过精心设计,以确保编辑后的划痕结果,即使在递归和任意抽象域的存在下也是如此。我们正式化技术并证明了健全性,终止和从划伤的一致性。对合成和现实世界程序编辑的原型实施的实验评估为这一理论框架的可行性提供了证据,显示了与非修复成分分析相比,可能具有重大绩效益处的潜力。