Differential Execution with Lexical Tracing
Sebastian Erdweg, Runqing Xu, Mo Bitar
Abstract
Incremental computing promises large speed-ups after small input edits. Yet, most incrementality approaches merely skip unchanged work and recompute the remaining sub-computations, even when the inputs change only slightly. Differential execution avoids this by propagating data changes (i.e., deltas), and prior work has shown how to develop a provably correct differential big-step semantics. Unfortunately, that semantics must still replay the original computation at every step, squandering much of the potential gain of incrementalization. While the semantics clearly needs caching to avoid recomputations, a sound and efficient caching discipline is challenging. First, each execution step must be uniquely identified; second, the identifier must remain stable even when the preceding control flow changes. To this end, we develop lexical tracing , which identifies execution steps through their path in the derivation tree of the big-step semantics. We then extend differential execution with lexical tracing and caching to deliver, for the first time, a formally verified, asymptotically efficient account of differential execution for imperative languages. In particular, we developed a novel mechanized theory of cache stability for lexical traces and their semantic rules, which was essential in proving the differential caching semantics correct and complete in Rocq.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 9247434e-3378-44c3-92d5-5ea9d30bcb2eRelated papers
- Stateful Differential Operators for Incremental ComputingRunqing Xu, Sebastian ErdwegPOPL 2026 · 1 citation
- DeCo: A Core Calculus for Incremental Functional Programming with Generic Data TypesTimon Böhler, Tobias Reinhard, David Richter, Mira MeziniOOPSLA 2026
- Stop the Flip-Flop: Context-Preserving Verification for Fast Revocable Diffusion DecodingYanzheng Xiang, Lan Wei, Yizhen Yao, Qinglin Zhu et al.ICML 2026 · 3 citations
- Incremental type-checking for free: using scope graphs to derive incremental type-checkersAron Zwaan, Hendrik van Antwerpen, Eelco VisserOOPSLA 2022 · 3 citations
- Interactive Debugging of Datalog ProgramsAndré Pacak, Sebastian ErdwegOOPSLA 2023 · 4 citations
