一句话:提出基于值流分析的选择性加宽,仅对参与值流回边的变量加宽,在保持精度不变的同时大幅加速抽象解释。
抽象解释是静态分析的系统化框架,其中加宽算子用于保证无限高度格上的分析终止。现有抽象解释器在加宽点(如循环头)对所有变量统一执行加宽与不动点检测,造成大量冗余计算。作者通过实证研究发现,无限上升链通常只源自值流环中的一小部分变量,因而存在选择性加宽与定向不动点检测的空间。本文提出面向非关系型抽象域的高效优化方法:设计模块化精简值流图(MVFG),通过检测跨过程的值流环精确识别需要加宽的变量,并引入高效捷径边来概括跨过程值流,以线性复杂度达到上下文敏感分析的精度;再将值流环与控制流图的弱拓扑序(WTO)对齐,得到最小的加宽变量集,仅对参与值流回边的变量施加加宽。在大规模开源项目上的评估表明,该方法在精度完全相同的前提下将分析时间最多降低 41.2%,加宽变量数最多减少 99.5%,且代码规模越大收益越显著。
Abstract interpretation provides a systematic framework for static analysis, where widening operators are crucial for ensuring termination when analyzing programs over infinite-height lattices. Current abstract interpreters apply widening operations and fixpoint detection uniformly across all variables at the identified widening point (e.g., control-flow loop headers), leading to costly computations. Through our empirical study, we observe that infinite ascending chains typically originate from only a subset of variables involved in value-flow cycles, providing opportunities for selective widening and targeted fixpoint detection. This paper introduces an efficient approach to optimize abstract interpretation over non-relational domains through selective widening guided by value-flow analysis. We develop a modular and condensed value-flow graph (MVFG) that enables precise identification of variables requiring widening by detecting value-flow cycles across procedure boundaries. Our MVFG design incorporates efficient shortcut edges that summarize interprocedural value flows, achieving the precision of context-sensitive analysis but with linear complexity. By aligning value-flow cycles with the weak topological ordering (WTO) of the control-flow graph, we identify the minimal set of variables requiring widening operations, applying widening exclusively to variables that participate in value-flow back edges. Our evaluation on large-scale open-source projects shows that our selective widening approach reduces analysis time by up to 41.2% while maintaining identical precision. The method significantly reduces the number of widened variables by up to 99.5%, with greater benefits observed in larger codebases.
@article{paperbot2926,
title = {Efficient Abstract Interpretation via Selective Widening},
author = {Jiawei Wang and Xiao Cheng and Yulei Sui},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763083}
}