paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Prosecutor: Bayesian Counterfactual Fault Localization

Prosecutor:贝叶斯反事实故障定位
OOPSLA 10(OOPSLA2)2026匹配度 7/10 · 论文将贝叶斯推理与反事实实验用于程序故障定位,属于你明确关注的“贝叶斯程序分析”方向;但未涉及 LLM/Agent、浮点程序分析或 ML 系统静态分析,因此与当前核心交叉方向仍有距离。引用 1 inbox
Sara Baradaran, Yifei Huang, Wei Le, Mukund Raghothaman
crossref: 2026-10-02

AI 速览

一句话:提出误差传播图与反事实实验的贝叶斯故障定位方法,在 Defects4J 上显著优于基线。

故障定位中,错误引入与传播可视为随机过程,已有方法用贝叶斯推断为语句赋予出错后验概率。本文提出误差传播图(EPG),在概率模型中引入更丰富的跨过程关系,并考虑未探索控制流分支对变量值的影响。EPG 可高效紧凑构建,并支持选择一组反事实实验:运行时翻转可疑分支谓词,观察其对测试结果的下游影响,将证据反馈到 EPG 以确认或推翻初始怀疑度。作者实现工具 Prosecutor,在 Defects4J 的 13 个项目 470 个含错版本上评估。结果显示,Prosecutor 的 top-3 预测覆盖 40% 真实故障位置,并在 top-1/3/5/10 预测中分别比多个基线多识别至少 10%、11%、15%、19% 的错误语句。

问题
程序故障定位中,错误引入与传播具有随机性,如何有效建模跨过程关系及未探索控制流的影响,并提高可疑语句排序精度。
方法
提出误差传播图(EPG)表示错误传播,结合贝叶斯推断与反事实实验:运行时翻转可疑分支谓词并观察下游测试结果,将新证据融入 EPG 更新怀疑度。
评估
在 Defects4J 的 13 个项目 470 个含错版本上评估,top-3 覆盖 40% 真实故障位置,并在 top-1/3/5/10 上分别比基线多识别至少 10%、11%、15%、19% 的错误语句。
原文摘要(Abstract)

Bayesian reasoning has emerged as a promising approach to fault localization, where the introduction of errors and their subsequent propagation through faulty executions is treated as a stochastic process. One can then perform Bayesian inference on a probabilistic model encoding the program execution to associate individual statements and values with a posterior probability of being erroneous. In this paper, we propose a new graph representation that effectively models error propagation through failing program executions. This structure, which we call the Error Propagation Graph (EPG), extends prior probabilistic approaches by incorporating richer inter-procedural relationships and accounting for the influence of unexplored control-flow branches that may affect variable values. We also show how EPGs can be constructed efficiently and compactly, and how this structure enables the selection of a set of counterfactual experiments, each involving artificially flipping a suspicious branch predicate at runtime and observing its downstream effect on the test outcome. The results of these experiments provide additional evidence that can be incorporated into the EPG to confirm or refute the model's initial suspiciousness estimates. We have implemented this technique in a tool named Prosecutor and evaluated it on 470 buggy versions of 13 projects from the Defects4J benchmark suite. Our experimental evaluation shows that Prosecutor places 40% of the true fault locations within its top-3 predictions. The technique also significantly outperforms a diverse set of baselines by identifying at least 10%, 11%, 15%, and 19% more buggy statements than each of the baselines in its top-1, top-3, top-5, and top-10 predictions, respectively.

链接与引用

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

BibTeX
@article{paperbot12123,
  title = {Prosecutor: Bayesian Counterfactual Fault Localization},
  author = {Sara Baradaran and Yifei Huang and Wei Le and Mukund Raghothaman},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839469}
}