Object-Oriented Fixpoint Programming with Datalog
David Klopp, Sebastian Erdweg, André Pacak
Abstract
Modern usages of Datalog exceed its original design purpose in scale and complexity. In particular, Datalog lacks abstractions for code organization and reuse, making programs hard to maintain. Is it possible to exploit abstractions and design patterns from object-oriented programming (OOP) while retaining a Datalog-like xpoint semantics? To answer this question, we design a new OOP language called OODL with common OOP features: dynamic object allocation, object identity, dynamic dispatch, and mutation. However, OODL has a Datalog-like xpoint semantics, such that recursive computations iterate until their result becomes stable. We develop two semantics for OODL: a xpoint interpreter and a compiler that translates OODL to Datalog. Although the side eects found in OOP (object allocation and mutation) conict with Datalog's xpoint semantics, we can mostly resolve these incompatibilities through extensions of OODL. Within xpoint computations, we employ immutable algebraic data structures (e.g. case classes in Scala), rather than relying on object allocation, and we introduce monotonically mutable data types (mono types) to enable a relaxed form of mutation. Our performance evaluation shows that the interpreter fails to solve xpoint problems eciently, whereas the compiled code exploits Datalog's semi-naïve evaluation. CCS Concepts: • Software and its engineering ! Object oriented languages; Constraint and logic languages; • Theory of computation ! Program analysis.
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 6a7b08da-6794-4df2-93d9-f2985d1a75e2Cited by top-tier papers2
- IncIDFA: An Efficient and Generic Algorithm for Incremental Iterative Dataflow AnalysisAman Nougrahiya, V. Krishna NandivadaOOPSLA 2025 · 4 citations
- A Typed Multi-level Datalog IR and Its Compiler FrameworkDavid Klopp, Sebastian Erdweg, André PacakOOPSLA 2024 · 2 citations
Builds on4
- 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
- Fixpoints for the masses: programming with first-class Datalog constraintsMagnus Madsen, Ondrej LhotákOOPSLA 2020 · 22 citations
- Seminaïve evaluation for a higher-order functional languageMichael Arntzenius, Neel KrishnaswamiPOPL 2020 · 15 citations
Related papers
- Bring Your Own Data Structures to DatalogArash Sahebolamri, Langston Barrett, Scott Moore, Kristopher K. MicinskiOOPSLA 2023 · 11 citations
- Optimizing Nested Recursive QueriesAmir Shaikhha, Dan Suciu, Maximilian Schleich, Hung Q. NgoSIGMOD 2024 · 5 citations
- Modular Type Safety for Traits with Extensible Variants and Deep Pattern MatchingAndong Fan, Lionel Parreaux, Ningning XieOOPSLA 2026
- Flix: A Design for Language-Integrated DatalogMagnus Madsen, Ondrej LhotákOOPSLA 2025
- Datalog with First-Class FactsThomas Gilray, Arash Sahebolamri, Yihao Sun, Sowmith Kunapaneni et al.VLDB 2025 · 3 citations
