paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Datalog-based scalable semantic diffing of concurrent programs

基于 Datalog 的并发程序可扩展语义差分
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 3/10 · 论文属于静态程序分析/Datalog 方向,与用户对程序分析的方法论兴趣有弱关联,但其核心是并发程序同步语义差异检测,完全不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析。对用户当前主线的 AI 与 PL 交叉问题帮助有限,仅可作为静态分析工程实现与 Datalog 推理规则的背景参考。引用 8 inbox
Chungha Sung, Shuvendu K. Lahiri, Constantin Enea, Chao Wang
crossref: 2026-09-12

AI 速览

一句话:提出基于 Datalog 的快速近似静态分析,通过识别差异化数据流边来计算并发程序的同步语义差异。

当并发程序因线程同步问题被修改时,需要确认修改不会引入意外行为。人工比较两个程序的语义差异费时且易错,而基于模型检测的方法计算代价高昂。为此,本文提出一种快速且近似的静态分析,用于计算两个程序的同步差异。该方法不依赖重量级模型检测,而是利用多项式时间的 Datalog 程序分析框架来计算差异化数据流边,即一个程序允许而另一个程序不允许的边。尽管采用近似,但通过精心设计的 Datalog 推理规则,并迭代增加表示差异所需的数据流边,方法仍具有足够精度。作者实现该方法并在大量多线程 C 程序上评估,通常在数秒内得到与人工判断一致的差异;相比之下,已有模型检测技术需要数分钟甚至数小时,慢 10 倍到 1000 倍。

问题
并发程序修改同步逻辑后,如何快速确认修改未引入意外行为;人工语义比较费时易错,模型检测则计算代价过高。
方法
提出快速近似静态分析,利用多项式时间 Datalog 推理规则计算两个程序间的差异化数据流边,并通过迭代增加表示差异所需的边来提高精度。
评估
实现工具并在大量多线程 C 程序上评估,通常数秒内得到与人工一致的差异,较模型检测方法快 10 倍到 1000 倍。
原文摘要(Abstract)

When an evolving program is modified to address issues related to thread synchronization, there is a need to confirm the change is correct, i.e., it does not introduce unexpected behavior. However, manually comparing two programs to identify the semantic difference is labor intensive and error prone, whereas techniques based on model checking are computationally expensive. To fill the gap, we develop a fast and approximate static analysis for computing synchronization differences of two programs. The method is fast because, instead of relying on heavy-weight model checking techniques, it leverages a polynomial-time Datalog-based program analysis framework to compute differentiating data-flow edges, i.e., edges allowed by one program but not the other. Although approximation is used our method is sufficiently accurate due to careful design of the Datalog inference rules and iterative increase of the required data-flow edges for representing a difference. We have implemented our method and evaluated it on a large number of multithreaded C programs to confirm its ability to produce, often within seconds, the same differences obtained by human; in contrast, prior techniques based on model checking take minutes or even hours and thus can be 10x to 1000x slower.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4779,
  title = {Datalog-based scalable semantic diffing of concurrent programs},
  author = {Chungha Sung and Shuvendu K. Lahiri and Constantin Enea and Chao Wang},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3238211}
}