Interactive Debugging of Datalog Programs
André Pacak, Sebastian Erdweg
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 602e7b78-de4d-4da8-8e7b-6b800a3a7b2cCited by top-tier papers2
- A Typed Multi-level Datalog IR and Its Compiler FrameworkDavid Klopp, Sebastian Erdweg, André PacakOOPSLA 2024 · 2 citations
- Navigating AND-OR Graph Modifications to Debug Failing Proof SearchJustin Lubin, Marlena Preigh, Max Willsey, Sarah E. ChasinsPLDI 2026
Builds on3
- Incremental whole-program analysis in Datalog with latticesTamás Szabó, Sebastian Erdweg, Gábor BergmannPLDI 2021 · 39 citations
- Formulog: Datalog for SMT-based static analysisAaron Bembenek, Michael Greenberg, Stephen ChongOOPSLA 2020 · 26 citations
- A systematic approach to deriving incremental type checkersAndré Pacak, Sebastian Erdweg, Tamás SzabóOOPSLA 2020 · 16 citations
Related papers
- FlowLog: Efficient and Extensible Datalog via IncrementalityHangdong Zhao, Zhenghong Yu, Srinag Rao, Simon Frisk et al.VLDB 2026
- Finding Cross-Rule Optimization Bugs in Datalog EnginesChi Zhang, Linzhang Wang, Manuel RiggerOOPSLA 2024 · 2 citations
- Automated Debugging of Datalog ProgramsJiashen Wei, Baoyuan Luo, Runshuo Xie, Yun Qi et al.OOPSLA 2026
- An efficient interpreter for Datalog by de-specializing relationsXiaowen Hu, David Zhao, Herbert Jordan, Bernhard ScholzPLDI 2021 · 6 citations
- Optimizing Datalog for the GPUYihao Sun, Ahmedur Rahman Shovon, Thomas Gilray, Sidharth Kumar et al.ASPLOS 2025 · 3 citations
