paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generalized Points-to Graphs

广义 points-to 图
TOPLAS 42(2)2020匹配度 4/10 · 该论文是纯静态分析中的指向分析方法研究,提出广义 points-to 图以提升精度与可扩展性;虽属于程序分析核心方向,但未涉及用户重点关注的目标:将静态分析用于 ML/Agentic 程序、用 LLM/Agent 改进静态分析、浮点程序分析或贝叶斯程序分析。引用 7 inbox
Pritam M. Gharat, Uday P. Khedker, Alan Mycroft
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出广义 points-to 图(GPG),用紧凑的自底向上过程摘要实现精确且可扩展的指向分析。

精确且穷尽(全流敏感、上下文敏感)的 points-to 分析代价高:自顶向下需按上下文重复分析过程,自底向上难处理经调用者指针间接访问的未知对象,扩展性差。本文反向从精确方法提升可扩展性:先生成朴素过程摘要,再用优化压缩并保持可靠与精度。作者提出广义 points-to 图(GPG),将指向关系视为内存更新,以间接层级计数泛化,令未知指向对象隐式表示。GPG 以内存更新及控制流表示紧凑的自底向上摘要,用强度削减、控制流最小化和调用内联保证紧凑。结果显示其丢弃大量控制流仍不损失精度,可扩展到 158 kLoC 的 C 程序。

问题
精确且穷尽的 points-to 分析在大程序上代价高;现有自顶向下与自底向上方法难以同时保持精度和可扩展性。
方法
提出广义 points-to 图(GPG),把指向关系抽象为内存更新,并通过强度削减、控制流最小化与调用内联构造紧凑的自底向上过程摘要。
评估
在 C 程序上实现并扩展至 158 kLoC,表明 GPG 能丢弃大量控制流而不损失可靠性与精度。
原文摘要(Abstract)

Computing precise (fully flow- and context-sensitive) and exhaustive (as against demand-driven) points-to information is known to be expensive. Top-down approaches require repeated analysis of a procedure for separate contexts. Bottom-up approaches need to model unknown pointees accessed indirectly through pointers that may be defined in the callers and hence do not scale while preserving precision. Therefore, most approaches to precise points-to analysis begin with a scalable but imprecise method and then seek to increase its precision. We take the opposite approach in that we begin with a precise method and increase its scalability. In a nutshell, we create naive but possibly non-scalable procedure summaries and then use novel optimizations to compact them while retaining their soundness and precision. For this purpose, we propose a novel abstraction called the generalized points-to graph (GPG), which views points-to relations as memory updates and generalizes them using the counts of indirection levels leaving the unknown pointees implicit. This allows us to construct GPGs as compact representations of bottom-up procedure summaries in terms of memory updates and control flow between them. Their compactness is ensured by strength reduction (which reduces the indirection levels), control flow minimization (which removes control flow edges while preserving soundness and precision), and call inlining (which enhances the opportunities of these optimizations). The effectiveness of GPGs lies in the fact that they discard as much control flow as possible without losing precision. This is the reason GPGs are very small even for main procedures that contain the effect of the entire program. This allows our implementation to scale to 158 kLoC for C programs. At a more general level, GPGs provide a convenient abstraction to represent and transform memory in the presence of pointers. Future investigations can try to combine it with other abstractions for static analyses that can benefit from points-to information.

链接与引用

DOI 原文 · DBLP

BibTeX
@article{GharatKM20,
  title = {Generalized Points-to Graphs},
  author = {Pritam M. Gharat and Uday P. Khedker and Alan Mycroft},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {42},
  number = {2},
  year = {2020},
  doi = {10.1145/3382092}
}