一句话:提出混合内联框架,让组合式静态分析实现严格上下文敏感并保持可扩展性。
过程间静态分析中,上下文敏感能显著提升精度,但自顶向下分析需在所有调用点完全内联被调函数,导致语句爆炸;组合式分析虽可扩展,却因非严格上下文敏感而损失精度。本文提出混合内联框架:仅对每个被调函数中影响精度的关键语句进行上下文敏感内联,对非关键语句使用摘要;同时延迟生成关键语句摘要,当累积的调用上下文足够时即停止传播。作者基于该框架实现指针分析等多种分析。在 DaCapo 与工业 Java 程序上的评估表明,指针分析可在数分钟内完成,相比上下文不敏感分析,在 DaCapo 和工业应用上仅增加 65% 和 1% 的时间开销。
Context-sensitivity is essential for achieving good precision in inter-procedural static analysis. To be context-sensitive, top-down analysis needs to fully inline all the statements in a callee at all its callsites, leading to statement explosion. Compositional analysis, which inlines summaries of all 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 a key observation: a compositional 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 re-analyzing 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. We have designed and implemented several analyses (including a pointer analysis) based on this framework. Our evaluation on the pointer analysis shows that it can analyze large Java programs from the DaCapo benchmark suite and industry in minutes. Compared to context-insensitive analysis, Hybrid Inlining introduces only 65% and 1% additional time overheads on DaCapo and industrial applications, respectively.
@inproceedings{LiuLDWZLX23,
title = {Hybrid Inlining: A Framework for Compositional and Context-Sensitive Static Analysis},
author = {Jiangchao Liu and Jierui Liu and Peng Di and Diyu Wu and Hengjie Zheng and Alex X. Liu and Jingling Xue},
booktitle = {ISSTA},
year = {2023},
doi = {10.1145/3597926.3598042}
}