paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Indexing the extended Dyck-CFL reachability for context-sensitive program analysis

为上下文敏感程序分析索引扩展 Dyck-CFL 可达性
OOPSLA 6(OOPSLA2)2022匹配度 5/10 · 论文属于上下文敏感数据流分析的基础技术,与静态分析方向相关,但未涉及画像中重点关注的 LLM/Agentic、浮点程序分析或贝叶斯程序分析,因此匹配度中等。引用 11 inbox
Qingkai Shi, Yongchao Wang, Peisen Yao, Charles Zhang
crossref: 2026-09-10

AI 速览

一句话:将扩展 Dyck-CFL 可达性转化为普通图可达性,并借索引实现上下文敏感数据流分析的近常数时间查询。

上下文敏感数据流分析常可归结为扩展 Dyck-CFL 可达性问题,其中函数调用与返回被建模为部分匹配的括号。然而标准 Dyck-CFL 可达性已有较多工作,扩展版本仍面临二次空间与近三次时间开销,严重限制可扩展性。本文首次提出一种低成本转换,将扩展 Dyck-CFL 可达性归约为传统图可达性,从而复用成熟的可达性索引方案,使上下文敏感数据流分析中的可达性查询可在几乎常数时间内完成,且仅需少量额外空间。作者在指针别名分析与信息流追踪两类分析中实现该方法。实验表明,相比原始分析,可获 10^2 倍至 10^5 倍加速,空间开销适中,实现已公开。

问题
上下文敏感数据流分析中扩展 Dyck-CFL 可达性求解仍具二次空间和近三次时间复杂度,难以扩展。
方法
通过将扩展 Dyck-CFL 可达性转化为普通图可达性,并利用现成可达性索引方案支持近常数时间查询。
评估
在指针别名分析和信息流追踪中实现,并与原始分析对比,取得 10^2× 到 10^5× 加速且仅有适中空间开销。
原文摘要(Abstract)

Many context-sensitive dataflow analyses can be formulated as an extended Dyck-CFL reachability problem, where function calls and returns are modeled as partially matched parentheses. Unfortunately, despite many works on the standard Dyck-CFL reachability problem, solving the extended version is still of quadratic space complexity and nearly cubic time complexity, significantly limiting the scalability of program analyses. This paper, for the first time to the best of our knowledge, presents a cheap approach to transforming the extended Dyck-CFL reachability problem to conventional graph reachability, a much easier and well-studied problem. This transformation allows us to benefit from recent advances in reachability indexing schemes, making it possible to answer any reachability query in a context-sensitive dataflow analysis within almost constant time plus only a few extra spaces. We have implemented our approach in two common context-sensitive dataflow analyses, one determines pointer alias relations and the other tracks information flows. Experimental results demonstrate that, compared to their original analyses, we can achieve orders of magnitude (10 2 × to 10 5 ×) speedup at the cost of only a moderate space overhead. Our implementation is publicly available.

链接与引用

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

BibTeX
@article{paperbot1409,
  title = {Indexing the extended Dyck-CFL reachability for context-sensitive program analysis},
  author = {Qingkai Shi and Yongchao Wang and Peisen Yao and Charles Zhang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {OOPSLA2},
  year = {2022},
  doi = {10.1145/3563339}
}