paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Interactive Debugging of Datalog Programs

Datalog 程序的交互式调试
OOPSLA 7(OOPSLA2)2023匹配度 4/10 · 论文属于程序语言与形式语义领域,研究 Datalog 的交互式调试,与用户核心关注的 PL 与 AI 交叉(如 LLM 辅助静态分析、ML/Agent 程序的静态分析、浮点或贝叶斯程序分析)无直接关联;但 Datalog 是静态分析常用基础设施,若用户从事基于 Datalog 的静态分析工具开发,则有一定参考价值。引用 3 inbox
André Pacak, Sebastian Erdweg
crossref: 2026-09-10

AI 速览

一句话:提出基于自顶向下小步操作语义的 Datalog 交互式调试器,支持 step-into/step-over,并适配 Soufflé 与 IncA。

Datalog 用于包含大量相互依赖谓词的复杂编程任务,但缺乏支持逐步执行与执行状态检查的交互式调试技术。本文提出遵循自顶向下求值策略(递归查询/子查询)的 Datalog 交互式调试。作者首次给出自顶向下 Datalog 的小步操作语义,将子查询表示为嵌套中间项,以支撑调试器的 step-into;并提出混合 Datalog 语义,在自顶向下语义中加入自底向上数据库,以高效实现 step-over。作者实现了 core Datalog 调试器,并说明如何适配 Soufflé 和 IncA 的前端语言。评估表明,该混合语义可用于调试具有真实负载的实际 Datalog 程序。

问题
Datalog 程序常由众多相互依赖的谓词构成,但缺乏可逐步执行并检查执行状态的交互式调试技术。
方法
提出基于递归查询/子查询的自顶向下调试方法,给出首个自顶向下 Datalog 的小步操作语义,并用混合自顶向下/自底向上语义高效支持 step-into 与 step-over;实现 core Datalog 调试器并适配 Soufflé/IncA。
评估
在具有真实负载的实际 Datalog 程序上评估,表明混合 Datalog 语义可有效用于调试。
原文摘要(Abstract)

Datalog is used for complex programming tasks nowadays, consisting of numerous inter-dependent predicates. But Datalog lacks interactive debugging techniques that support the stepwise execution and inspection of the execution state. In this paper, we propose interactive debugging of Datalog programs following a top-down evaluation strategy called recursive query/subquery. While the recursive query/subquery approach is well-known in the literature, we are the first to provide a complete programming-language semantics based on it. Specifically, we develop the first small-step operational semantics for top-down Datalog, where subqueries occur as nested intermediate terms. The small-step semantics forms the basis of step-into interactions in the debugger. Moreover, we show how step-over interactions can be realized efficiently based on a hybrid Datalog semantics that adds a bottom-up database to our top-down operational semantics. We implemented a debugger for core Datalog following these semantics and explain how to adopt it for debugging the frontend languages of Soufflé and IncA. Our evaluation shows that our hybrid Datalog semantics can be used to debug real-world Datalog programs with realistic workloads.

链接与引用

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

BibTeX
@article{paperbot1879,
  title = {Interactive Debugging of Datalog Programs},
  author = {André Pacak and Sebastian Erdweg},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA2},
  year = {2023},
  doi = {10.1145/3622824}
}