paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Principled Approach to Selective Context Sensitivity for Pointer Analysis

指针分析中选择性上下文敏感的一种原则性方法
TOPLAS 42(2)2020匹配度 3/10 · 该论文属于静态程序分析中的指针分析上下文敏感选择,与用户关注的 PL 与 LLM/Agent 交叉、浮点程序分析或贝叶斯程序分析无直接关系;仅在“静态分析理论+工程实现”这一宽泛层面相关。引用 65 inbox
Yue Li, Tian Tan, Anders Møller, Yannis Smaragdakis
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出基于值流模式的ZIPPER算法,选择性应用上下文敏感,在指针分析中兼顾精度与速度。

上下文敏感可提升指针分析精度,但全量应用代价高,已有选择性方法多依赖启发式。本文基于上下文不敏感分析中值流导致的精度损失模式,识别精度关键方法,并提出按需启用上下文敏感的算法 ZIPPER;其变体 ZIPPERe 还考虑分析成本。实验在标准基准和真实 Java 程序上表明:ZIPPER 保留 2obj 约 98.8% 精度,平均加速 3.4 倍、最高 9.4 倍;ZIPPERe 保留 94.7% 精度,平均加速 25.5 倍、最高 88 倍。对 2obj 三小时内无法分析的 10 个程序,ZIPPERe 可引导其在 11 分钟内完成。

问题
上下文敏感指针分析精度高但代价大;如何仅对真正影响精度的少量方法启用上下文敏感,而非依赖启发式选择。
方法
本文分析上下文不敏感指针分析中值流造成精度损失的一般模式,据此识别精度关键方法,并实现按需上下文敏感算法 ZIPPER;ZIPPERe 进一步纳入方法分析成本。
评估
在标准基准和真实 Java 程序上与高精度 2obj 及上下文不敏感分析比较,报告精度保持率和加速比;并测试 2obj 超时的程序。
原文摘要(Abstract)

Context sensitivity is an essential technique for ensuring high precision in static analyses. It has been observed that applying context sensitivity partially, only on a select subset of the methods, can improve the balance between analysis precision and speed. However, existing techniques are based on heuristics that do not provide much insight into what characterizes this method subset. In this work, we present a more principled approach for identifying precision-critical methods, based on general patterns of value flows that explain where most of the imprecision arises in context-insensitive pointer analysis. Using this theoretical foundation, we present an efficient algorithm, Z IPPER , to recognize these flow patterns in a given program and employ context sensitivity accordingly. We also present a variant, Z IPPER e , that additionally takes into account which methods are disproportionally costly to analyze with context sensitivity. Our experimental results on standard benchmark and real-world Java programs show that Z IPPER preserves effectively all of the precision (98.8%) of a highly precise conventional context-sensitive pointer analysis (2-object-sensitive with a context-sensitive heap, 2obj for short), with a substantial speedup (on average, 3.4× and up to 9.4×), and that Z IPPER e preserves 94.7% of the precision of 2obj, with an order-of-magnitude speedup (on average, 25.5× and up to 88×). In addition, for 10 programs that cannot be analyzed by 2obj within a three-hour time limit, on average Z IPPER e can guide 2obj to finish analyzing them in less than 11 minutes with high precision compared to context-insensitive and introspective context-sensitive analyses.

链接与引用

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

BibTeX
@article{LiTMS20,
  title = {A Principled Approach to Selective Context Sensitivity for Pointer Analysis},
  author = {Yue Li and Tian Tan and Anders Møller and Yannis Smaragdakis},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {42},
  number = {2},
  year = {2020},
  doi = {10.1145/3381915}
}