paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Refinement of path expressions for static analysis

静态分析中路径表达式的精化
POPL 3(POPL)2019匹配度 3/10 · 该论文属于静态分析与抽象解释的基础算法研究,涉及路径表达式精化与循环分析精度提升,与用户对静态分析的兴趣有较弱的泛化关联;但不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,因此不匹配用户当前的核心交叉方向。引用 21 inbox
John Cyphert, Jason Breck, Zachary Kincaid, Thomas Reps
crossref: 2026-09-10

AI 速览

一句话:提出路径表达式精化算法,保证不降低静态分析精度,并显著提升循环断言证明能力。

代数程序分析通常先构造合法的路径表达式,再在语义代数中解释以得到分析结果。合法路径表达式有无穷多个,选择会显著影响精度;且按语言包含关系排除路径未必提升精度,甚至可能更差。本文提出路径表达式精化算法:输入合法路径表达式 E,输出合法 E′,保证分析结果不劣于 E。算法对叶子循环给出基础情形的不退化证明,并在非叶子循环处将体内各循环视为不可分原子后应用叶子循环算法。实验表明该技术使 Compositional Recurrence Analysis 在难循环微基准上多证明超过 25% 的断言。

问题
代数程序分析中,如何定义并计算一个比给定合法路径表达式更好的路径表达式,以提升静态分析精度。
方法
提出路径表达式精化算法,证明叶子循环变换不退化,并将其扩展至非叶子循环;不以语言包含作为精度标准。
评估
在循环微基准上实现于 Compositional Recurrence Analysis,证明断言数增加超过 25%。
原文摘要(Abstract)

Algebraic program analyses compute information about a program’s behavior by first (a) computing a valid path expression —i.e., a regular expression that recognizes all feasible execution paths (and usually more)—and then (b) interpreting the path expression in a semantic algebra that defines the analysis. There are an infinite number of different regular expressions that qualify as valid path expressions, which raises the question “ Which one should we choose? ” While any choice yields a sound result, for many analyses the choice can have a drastic effect on the precision of the results obtained. This paper investigates the following two questions: (1) What does it mean for one valid path expression to be “better” than another ? (2) Can we compute a valid path expression that is “better,” and if so, how ? We show that it is not satisfactory to compare two path expressions E 1 and E 2 solely by means of the languages that they generate . Counter to one’s intuition, it is possible for L ( E 2 ) ⊊ L ( E 1 ), yet for E 2 to produce a less-precise analysis result than E 1 —and thus we would not want to perform the transformation E 1 → E 2 . However, the exclusion of paths so as to analyze a smaller language of paths is exactly the refinement criterion used by some prior methods. In this paper, we develop an algorithm that takes as input a valid path expression E , and returns a valid path expression E ′ that is guaranteed to yield analysis results that are at least as good as those obtained using E . While the algorithm sometimes returns E itself, it typically does not: (i) we prove a no-degradation result for the algorithm’s base case—for transforming a leaf loop (i.e., a most-deeply-nested loop); (ii) at a non-leaf loop L , the algorithm treats each loop L ′ in the body of L as an indivisible atom, and applies the leaf-loop algorithm to L ; the no-degradation result carries over to (ii), as well. Our experiments show that the technique has a substantial impact: the loop-refinement algorithm allows the implementation of Compositional Recurrence Analysis to prove over 25% more assertions for a collection of challenging loop micro-benchmarks.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot649,
  title = {Refinement of path expressions for static analysis},
  author = {John Cyphert and Jason Breck and Zachary Kincaid and Thomas Reps},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290358}
}