混合内联:一个组合和上下文敏感的静态分析框架
Hybrid Inlining: A Compositional and Context Sensitive Static Analysis Framework
摘要:
上下文敏感性对于实现过程间静态分析的精确性是必不可少的。为了(完全)对上下文敏感,自顶向下的分析需要在每个调用点完全内联被调用方的所有语句,从而导致语句爆炸。组成分析,内联被调用者的摘要,规模扩大,但往往失去精度,因为它不是严格的上下文敏感。我们提出了一个组合和严格上下文敏感的静态分析框架。这个框架基于一个关键的观察:组合静态分析通常只在一些需要对上下文敏感地进行分析的关键语句上失去精确性。我们的方法混合内联的关键语句和每个被调用者的非关键语句的摘要,从而避免了非关键的重新分析。此外,我们的分析懒洋洋地总结了关键语句,停止传播的关键语句,一旦调用上下文积累是足够的。混合内联可以像上下文敏感的自顶向下分析一样精确。我们已经设计并实现了一个基于该框架的指针分析。它可以在几分钟内分析来自Dacapo基准套件和行业的大型Java程序。在我们的评估中,与上下文不敏感分析相比,混合内联在Dacapo和工业应用上分别带来了65%和1%的额外时间开销。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。