paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Scaling Abstraction Refinement for Program Analyses in Datalog using Graph Neural Networks

使用图神经网络提升 Datalog 程序分析中抽象精化的可扩展性
OOPSLA 8(OOPSLA2)2024匹配度 4/10 · 论文将图神经网络用于 Datalog 程序分析的 CEGAR 抽象精化,属于机器学习辅助静态分析,与用户“AI→PL”方向相邻。但它不涉及用户重点关注的 LLM/Agent、浮点程序分析或贝叶斯程序分析,因此匹配度有限。引用 1 inbox
Zhenyu Yan, Xin Zhang, Peng Di
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:用图神经网络从 Datalog 求解计算构图并为抽象参数打分,缩减 CEGAR 约束求解空间,提升大规模程序分析的可扩展性。

反例引导的抽象精化(CEGAR)能以高精度与低时间开销自动选择抽象,但现有方法将其转化为约束求解问题,问题复杂导致难以扩展到大型程序或复杂分析。本文提出一种新方法:直接从 Datalog 求解器的计算过程构建图,再用图神经网络依据图中的信息为抽象参数打分;随后改写约束问题,使约束求解器忽略低分参数,从而缩小解空间与约束规模。由于图直接从 Datalog 计算构造、无需人工介入,该方法可适用于用 Datalog 实现的各类参数化静态分析。作者在指针分析与 typestate 分析上评估,在大型程序上分别比基线多回答 2.83 倍与 1.5 倍的查询。

问题
CEGAR 式抽象精化被编码为约束求解问题,但由于问题复杂度高,现有方法难以扩展到大型程序或复杂分析。
方法
直接从 Datalog 求解器的计算过程构建图,用图神经网络为抽象参数打分,并据此改写约束问题使求解器忽略低分参数,从而缩减解空间与约束规模。
评估
在指针分析与 typestate 分析两类参数化静态分析上进行评估,在大程序上分别比基线方法多回答 2.83 倍和 1.5 倍的查询。
原文摘要(Abstract)

Counterexample-guided abstraction refinement (CEGAR) is a popular approach for automatically selecting abstractions with high precision and low time costs. Existing works cast abstraction refinements as constraintsolving problems. Due to the complexity of these problems, they cannot be scaled to large programs or complex analyses. We propose a novel approach that applies graph neural networks to improve the scalability of CEGAR for Datalog-based program analyses. By constructing graphs directly from the Datalog solver’s calculations, our method then uses a neural network to score abstraction parameters based on the information in these graphs. Then we reform the constraint problems such that the constraint solver ignores parameters with low scores. This in turn reduces the solution space and the size of the constraint problems. Since our graphs are directly constructed from Datalog computation without human effort, our approach can be applied to a broad range of parametric static analyses implemented in Datalog. We evaluate our approach on a pointer analysis and a typestate analysis and our approach can answer 2.83× and 1.5× as many queries as the baseline approach on large programs for the pointer analysis and the typestate analysis, respectively.

链接与引用

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

BibTeX
@article{YanZD24,
  title = {Scaling Abstraction Refinement for Program Analyses in Datalog using Graph Neural Networks},
  author = {Zhenyu Yan and Xin Zhang and Peng Di},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689765}
}