Context sensitivity is essential for achieving the precision in inter-procedural static analysis. To be (fully) context sensitive, top-down analysis needs to fully inline all statements of the callees at each callsite, leading to statement explosion. Compositional analysis, which inlines summaries of the callees, scales up but often loses precision, as it is not strictly context sensitive. We propose a compositional and strictly context sensitive framework for static analysis. This framework is based on one key observation: a compositional static analysis often loses precision only on some critical statements that need to be analyzed context sensitively. Our approach hybridly inlines the critical statements and the summaries of non-critical statements of each callee, thus avoiding the re-analysis of non-critical ones. In addition, our analysis lazily summarizes the critical statements, by stopping propagating the critical statements once the calling context accumulated is adequate. Hybrid Inlining can be as precise as context sensitive top-down analysis. We have designed and implemented a pointer analysis based on this framework. It can analyze large Java programs from the Dacapo benchmark suite and industry in minutes. In our evaluation, compared to context insensitive analysis, Hybrid Inlining just brings 65% and 1% additional time overhead on Dacapo and industrial applications respectively.
翻译:对于实现程序间静态分析的精确性而言,对背景的敏感性至关重要。为了(充分)对背景敏感,自上而下的分析需要在每个呼叫站完全嵌入所有被访者的所有声明,导致声明爆炸。构成分析,将被访者的摘要线内,按比例调整,但往往会失去精确性,因为它不是严格的环境敏感性。我们为静态分析提出了一个组成和严格背景敏感框架。这个框架基于一个关键观察:组成静态分析往往仅仅对一些需要敏感分析的背景性关键声明失去精确性。我们的方法混合地将每个被访者的关键声明和非批评性声明摘要的内嵌入全部内,从而避免对非关键声明的重新分析。此外,我们的分析拉动了关键声明的精度,停止了呼吁环境积累充分后对关键声明的传播。混合自上而上而下分析与背景敏感性分析一样精确。我们设计和实施了基于这个框架的指针分析。我们的方法可以从Dacappo基准套件和行业分析大型爪哇方案,在几分钟内对每个被访者进行额外时间分析。在评估时,将分别对Dasimalimalimalimalim 和Dabalimalima 和Dabalim 分别进行额外时间分析。