JOURNAL ARTICLE

Debugging Large-scale Datalog

David ZhaoPavle SubotićBernhard Scholz

Year: 2020 Journal:   ACM Transactions on Programming Languages and Systems Vol: 42 (2)Pages: 1-35   Publisher: Association for Computing Machinery

Abstract

Logic programming languages such as Datalog have become popular as Domain Specific Languages (DSLs) for solving large-scale, real-world problems, in particular, static program analysis and network analysis. The logic specifications that model analysis problems process millions of tuples of data and contain hundreds of highly recursive rules. As a result, they are notoriously difficult to debug. While the database community has proposed several data provenance techniques that address the Declarative Debugging Challenge for Databases, in the cases of analysis problems, these state-of-the-art techniques do not scale. In this article, we introduce a novel bottom-up Datalog evaluation strategy for debugging: Our provenance evaluation strategy relies on a new provenance lattice that includes proof annotations and a new fixed-point semantics for semi-naïve evaluation. A debugging query mechanism allows arbitrary provenance queries, constructing partial proof trees of tuples with minimal height. We integrate our technique into Soufflé, a Datalog engine that synthesizes C++ code, and achieve high performance by using specialized parallel data structures. Experiments are conducted with D OOP /DaCapo, producing proof annotations for tens of millions of output tuples. We show that our method has a runtime overhead of 1.31× on average while being more flexible than existing state-of-the-art techniques.

Keywords:
Datalog Computer science Debugging Tuple Programming language Semantics (computer science) Overhead (engineering) Logic programming Theoretical computer science

Metrics

19
Cited By
4.91
FWCI (Field Weighted Citation Impact)
47
Refs
0.95
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Scientific Computing and Data Management
Social Sciences →  Decision Sciences →  Information Systems and Management
Distributed and Parallel Computing Systems
Physical Sciences →  Computer Science →  Computer Networks and Communications
Advanced Database Systems and Queries
Physical Sciences →  Computer Science →  Computer Networks and Communications

Related Documents

JOURNAL ARTICLE

Interactive Debugging of Datalog Programs

André PacakSebastian Erdweg

Journal:   Proceedings of the ACM on Programming Languages Year: 2023 Vol: 7 (OOPSLA2)Pages: 745-772
JOURNAL ARTICLE

Interactive Debugging of Datalog Programs

Pacak, AndréErdweg, Sebastian

Journal:   KITopen Year: 2023
JOURNAL ARTICLE

Large-scale Ontological Reasoning via Datalog

Mario AlvianoMarco Manna

Journal:   arXiv (Cornell University) Year: 2020
BOOK-CHAPTER

Large-Scale Ontological Reasoning via Datalog

Mario AlvianoMarco Manna

Studies on the semantic web Year: 2020
BOOK-CHAPTER

Declarative Datalog Debugging for Mere Mortals

Sven KöhlerBertram LudäscherYannis Smaragdakis

Lecture notes in computer science Year: 2012 Pages: 111-122
© 2026 ScienceGate Book Chapters — All rights reserved.