paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Context-, flow-, and field-sensitive data-flow analysis using synchronized Pushdown systems

使用同步下推系统的上下文、流与字段敏感数据流分析
POPL 3(POPL)2019匹配度 5/10 · 论文提出同步下推系统(SPDS)实现高精度的上下文、流、字段敏感数据流分析,属于静态分析/形式化方法的核心技术,可能为分析 ML/Agentic 程序提供基础,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等用户具体交叉方向。引用 71 inbox
Johannes Späth, Karim Ali, Eric Bodden
crossref: 2026-09-10

AI 速览

一句话:提出同步下推系统(SPDS),将过程调用/返回与字段读写编码为两个同步的 CFL 可达性问题,实现高精度且可扩展的上下文、流、字段敏感数据流分析。

精确静态分析需上下文、字段与流敏感,但上下文敏感和字段敏感均可归约为 CFL 可达性;在同一数据流路径上同时求解二者不可判定,因此现有流敏感分析常用 k-limited 访问路径或访问图近似字段敏感,难以扩展到递归数据结构。本文提出同步下推系统(SPDS),将过程调用/返回与字段读写编码为两个独立但同步的 CFL 可达性问题,分别精确求解,仅在二者均满足却不在同一路径的罕见情形近似。复杂度由 k-limiting 的 |F|^{3k} 降至 |S||F|^2。DaCapo 评估显示,SPDS 精度等同 k=∞ 而效率接近 k=1;typestate 分析对字段访问多但跨方法少的数据流最高加速 83 倍。

问题
如何同时实现上下文、字段和流敏感的数据流分析,避免对字段敏感性的过度近似,并在递归数据结构上保持可扩展性。
方法
将过程调用/返回和字段存储/加载建模为两个同步的下推系统与 CFL 可达性问题,分别精确求解,仅在两者均满足但不在同一数据流路径的罕见情形引入近似。
评估
在 DaCapo 基准上实现并与 k-limiting 方法比较效率与精度,同时评估 typestate 分析中字段访问多但跨方法少的数据流所获得的加速。
原文摘要(Abstract)

Precise static analyses are context-, field- and flow-sensitive. Context- and field-sensitivity are both expressible as context-free language (CFL) reachability problems. Solving both CFL problems along the same data-flow path is undecidable, which is why most flow-sensitive data-flow analyses over-approximate field-sensitivity through k -limited access-path, or through access graphs. Unfortunately, as our experience and this paper show, both representations do not scale very well when used to analyze programs with recursive data structures. Any single CFL-reachability problem is efficiently solvable, by means of a pushdown system. This work thus introduces the concept of synchronized pushdown systems (SPDS). SPDS encode both procedure calls/returns and field stores/loads as separate but “synchronized” CFL reachability problems. An SPDS solves both individual problems precisely, and approximation occurs only in corner cases that are apparently rare in practice: at statements where both problems are satisfied but not along the same data-flow path. SPDS are also efficient: formal complexity analysis shows that SPDS shift the complexity from | F | 3 k under k -limiting to | S || F | 2 , where F is the set of fields and S the set of statements involved in a data-flow. Our evaluation using DaCapo shows this shift to pay off in practice: SPDS are almost as efficient as k -limiting with k =1 although their precision equals k =∞. For a typestate analysis SPDS accelerate the analysis up to 83× for data-flows of objects that involve many field accesses but span rather few methods. We conclude that SPDS can provide high precision and further improve scalability, in particularly when used in analyses that expose rather local data flows.

链接与引用

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

BibTeX
@article{paperbot672,
  title = {Context-, flow-, and field-sensitive data-flow analysis using synchronized Pushdown systems},
  author = {Johannes Späth and Karim Ali and Eric Bodden},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290361}
}