PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
April 18, 20260 citationsOpen Access

Differential Execution with Lexical Tracing

SESebastian ErdwegRXRunqing XuMBMo Bitar

Key Points

  • The aim is to enhance differential execution by incorporating lexical tracing and caching to improve efficiency in imperative languages.
  • Developed a formal theory of cache stability for lexical traces.
  • Applied differential execution in conjunction with lexical tracing.
  • Proved correctness and completeness of differential caching semantics in Rocq.
  • Achieved formally verified differential execution with asymptotic efficiency.
  • Identified execution steps uniquely using their path in the derivation tree.
  • Demonstrated significant speed-ups in computation after minor input edits.

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 AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Erdweg et al. (2026) studied this question.

synapsesocial.com/papers/69e3211640886becb65403afhttps://doi.org/10.5445/ir/1000192219
Ask AI
Helpful
Bookmark
Share
View Full Paper