paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Automated Debugging of Datalog Programs

Datalog 程序的自动化调试
OOPSLA 10(OOPSLA2)2026匹配度 5/10 · Datalog 是静态分析(如 Doop)的主流实现语言,论文面向 Datalog 程序的自动化故障定位并构建了首个调试 benchmark,属于用户所在 PL/静态分析生态的基础设施工作,且符合“在缺乏 benchmark 的重要场景下建 benchmark”“问题驱动、指出现有交互式方法失效”的偏好。但论文不涉及 LLM/Agent 与静态分析的交叉,也与浮点程序分析、贝叶斯程序分析无直接关系,因此只是相邻而非正中核心方向。引用 0 inbox
Jiashen Wei, Baoyuan Luo, Runshuo Xie, Yun Qi, Yiyu Zhang, Xizao Wang, Xintao Niu, Zhiqiang Zuo
crossref: 2026-10-02

AI 速览

一句话:将派生事实视为测试用例、证明树视为执行谱,把 SBFL 迁移到 Datalog,实现无需人工交互的故障规则定位。

Datalog 已被广泛用于程序分析、安全与数据密集型系统,但其声明式语义、缺乏显式控制流以及派生事实规模庞大,使调试极为困难。现有的证明树检查、算法调试与交互式调试都要求开发者手动在深层递归推导中导航,难以应对真实程序。本文提出一种全自动调试思路:从统计视角重新解释 Datalog 执行,不再解释单个事实,而是把派生事实整体当作测试用例、把其证明树当作执行谱,从而将基于谱的故障定位(SBFL)适配到 Datalog,弥合了声明式逻辑程序与面向命令式语言设计的自动调试技术之间的范式鸿沟。为支持系统评估,作者从 Doop 框架的演化历史中挖掘出首个 Datalog 调试基准套件,包含 96 个真实实例、37 个唯一故障,每个实例标注了真实故障规则并按三级故障分类组织。实验表明该方法无需任何用户交互即可有效定位故障,最优可疑度度量在故障规则定位上达到 87.50% 的 Hit@1,故障谓词定位的 Hit@1 为 37.50%–53.12%。

问题
Datalog 程序的声明式语义、无显式控制流与海量派生事实,使得开发者必须手动在深度递归的证明树中导航,现有证明树检查、算法调试和交互式调试方法在真实规模程序上难以可行。
方法
将 Datalog 执行重新解释为统计问题:把派生事实当作测试用例、把其证明树当作执行谱,从而将面向命令式语言的基于谱的故障定位(SBFL)技术适配到声明式逻辑程序上。
评估
构建了据称首个 Datalog 调试基准套件,包含从 Doop 框架演化历史中挖掘的 96 个真实实例(37 个唯一故障)并标注真实故障规则与三级故障分类;实验显示无需用户交互即可定位故障,最优度量在故障规则定位上 Hit@1 为 87.50%,故障谓词定位 Hit@1 为 37.50%–53.12%。
原文摘要(Abstract)

Datalog has become a widely adopted language in program analysis, security, and data-intensive systems. However, debugging Datalog programs remains fundamentally challenging due to their declarative semantics, lack of explicit control flow, and massive scale of derived facts. Existing approaches, such as inspecting proof trees, algorithmic debugging, or interactive debugging, all require developers to manually navigate through deeply recursive derivations, which quickly becomes infeasible for real-world programs. In this paper, we take a step toward fully automated debugging of Datalog programs. Our key insight is to reinterpret Datalog execution through a statistical lens: instead of explaining individual facts, we analyze multiple facts collectively, treating derived facts as test cases and their proof trees as execution spectra. This abstraction enables us to adapt Spectrum-based Fault Localization (SBFL) to Datalog, bridging the paradigm gap between declarative logic programs and automated debugging techniques originally designed for imperative languages. To enable systematic evaluation, we construct, to the best of our knowledge, the first benchmark suite for Datalog debugging, comprising 96 real-world instances (37 unique faults) mined from the evolution history of the Doop framework. Each instance is annotated with ground-truth faulty rules and organized under a three-level fault taxonomy. Experimental results demonstrate that our approach effectively localizes faults without any user interaction. The best suspiciousness metric achieves 87.50% Hit@1 (i.e., top-1 hit rate) for faulty rule localization, while faulty predicate localization reaches 37.50%–53.12% Hit@1.

链接与引用

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

BibTeX
@article{paperbot12092,
  title = {Automated Debugging of Datalog Programs},
  author = {Jiashen Wei and Baoyuan Luo and Runshuo Xie and Yun Qi and Yiyu Zhang and Xizao Wang and Xintao Niu and Zhiqiang Zuo},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839516}
}