Stateful Differential Operators for Incremental Computing

Read full text
Authors: Runqing Xu, Sebastian Erdweg
Cited by: 1
References: 27

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.

Fields of Study & Subjects

Advanced Database Systems and Queries Cloud Computing and Resource Management Distributed systems and fault tolerance

Publication details

Journal / source
Proceedings of the ACM on Programming Languages
Publisher
Association for Computing Machinery (ACM)
Volume
10
Issue
POPL
Pages
2494–2522
Publication date
8 January 2026
Language
EN