Stateful Differential Operators for Incremental Computing
Runqing Xu, Sebastian Erdweg
Abstract
Differential operators map input changes to output changes and form the building blocks of efficient incremental computations. For example, differential operators for relational algebra are used to perform live view maintenance in database systems. However, few differential operators are known and it is unclear how to develop and verify new efficient operators. In particular, we found that differential operators often need to use internal state to selectively cache relevant information, which is not supported by prior work. To this end, we designed a specification for stateful differential operators that allows custom state, yet places sufficient constraints to ensure correctness. We model our specification in Rocq and show that the specification not only guides the design of novel differential operators, but also can capture some of the most sophisticated existing differential operators: database join and Datalog aggregation. We show how to describe complex incremental computations in OCaml by composing stateful differential operators, which we have extracted from Rocq.
CCS Concepts: • Theory of computation → Design and analysis of algorithms; Semantics and reasoning.
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 11565f9f-1935-4366-9e6e-abf9b1ed3517Builds on3
- DBSP: Automatic Incremental View Maintenance for Rich Query LanguagesMihai Budiu, Tej Chajed, Frank McSherry, Leonid Ryzhyk et al.VLDB 2023 · 41 citations
- Incremental whole-program analysis in Datalog with latticesTamás Szabó, Sebastian Erdweg, Gábor BergmannPLDI 2021 · 39 citations
- A Typed Multi-level Datalog IR and Its Compiler FrameworkDavid Klopp, Sebastian Erdweg, André PacakOOPSLA 2024 · 2 citations
Related papers
- Differential Execution with Lexical TracingSebastian Erdweg, Runqing Xu, Mo BitarOOPSLA 2026
- Optimizing Differentially-Maintained Recursive Queries on Dynamic GraphsKhaled Ammar, Siddhartha Sahu, Semih Salihoglu, M. Tamer ÖzsuVLDB 2022 · 6 citations
- Incremental Bidirectional Typing via Order MaintenanceThomas Porter, Marisa Kirisame, Ivan Wei, Pavel Panchekha et al.OOPSLA 2025 · 2 citations
- FlowLog: Efficient and Extensible Datalog via IncrementalityHangdong Zhao, Zhenghong Yu, Srinag Rao, Simon Frisk et al.VLDB 2026
- A HAT Trick: Automatically Verifying Representation Invariants using Symbolic Finite AutomataZhe Zhou, Qianchuan Ye, Benjamin Delaware, Suresh JagannathanPLDI 2024 · 7 citations
