Program–value separability: the structural precondition for compilation, caching, and dense journaling in a DSL runtime

This paper is an analytic theory contribution in the sense of Gregor's (2006) theory for analyzing (Type I): it introduces a structural construct — program-value separability — and the binary taxonomy it induces, states a necessary-condition claim about the runtime consequences that follow from it, and presents one realization in production as an existence proof that the construct is realizable — not the design-science evaluation of an artifact (Hevner, March, Park, & Ram, 2004), which a companion case-study paper is the venue for. Compilation of a domain-specific language program to native code, caching of compiled programs across invocations, and dense journaling of operations rather than their effects are commonly treated as independent runtime optimizations. This paper argues that they are not — that all three are downstream consequences of a single structural property of DSL programs, which we name program–value separability: the syntactically decidable condition that a program declares its parameters explicitly rather than embedding values in its body. The property itself is long known — partial evaluation and related compilation techniques exploit the same static/dynamic separation — but where that tradition uses the split to specialize execution and then discards it, this paper repositions it as the precondition for persistence and identity: the separated program becomes the durable, replayable unit of state, and compilation is only one of four consequences that follow. Three of them — compilation, caching, and dense journaling — are developed and measured here as projections of this single precondition; a fourth, replication-bounded entropy, follows from the same precondition and is taken up in a companion paper. We characterize one concrete realization in a CQRS + Actor + Event Sourcing runtime — the same Puppeteer framework introduced in the prior paper of this series — and report empirical magnitudes from two independent open-source DDD aggregates (dotnet/eShop's Order and kgrzybek/modular-monolith's SubscriptionPayment): a compiled-versus-interpreted speedup that scales with DSL-bound work (roughly 1.5× to 3.1×); a cold compile cost amortized within several hundred invocations; and a journal that stored, on each of the two aggregates, about 99.8% of parametric entries as compact action references — 3.5× and 5.6× denser than the equivalent literal-script storage. The journal-density values are exact per-host counts and the speedups carry run-to-run variation; all are reported as illustrations of the structural property on the cases measured, not as estimates of its magnitude in general. The principle generalizes beyond any one runtime: program-value separability characterizes the structural condition any DSL runtime must satisfy to admit compilation, caching, and dense persistence at all.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-06-17
DOI
https://doi.org/10.5281/zenodo.20740697
Primary Topic
Logic, programming, and type systems
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Program–value separability: the structural precondition for compilation, caching, and dense journaling in a DSL runtime

Álvaro Antonio Rivera
Zenodo (CERN European Organization for Nuclear Research)
Logic, programming, and type systems
preprint

Program–value separability: the structural precondition for compilation, caching, and dense journaling in a DSL runtime

Álvaro Antonio Rivera
preprint en

Abstract

This paper is an analytic theory contribution in the sense of Gregor's (2006) theory for analyzing (Type I): it introduces a structural construct — program-value separability — and the binary taxonomy it induces, states a necessary-condition claim about the runtime consequences that follow from it, and presents one realization in production as an existence proof that the construct is realizable — not the design-science evaluation of an artifact (Hevner, March, Park, & Ram, 2004), which a companion case-study paper is the venue for. Compilation of a domain-specific language program to native code, caching of compiled programs across invocations, and dense journaling of operations rather than their effects are commonly treated as independent runtime optimizations. This paper argues that they are not — that all three are downstream consequences of a single structural property of DSL programs, which we name program–value separability: the syntactically decidable condition that a program declares its parameters explicitly rather than embedding values in its body. The property itself is long known — partial evaluation and related compilation techniques exploit the same static/dynamic separation — but where that tradition uses the split to specialize execution and then discards it, this paper repositions it as the precondition for persistence and identity: the separated program becomes the durable, replayable unit of state, and compilation is only one of four consequences that follow. Three of them — compilation, caching, and dense journaling — are developed and measured here as projections of this single precondition; a fourth, replication-bounded entropy, follows from the same precondition and is taken up in a companion paper. We characterize one concrete realization in a CQRS + Actor + Event Sourcing runtime — the same Puppeteer framework introduced in the prior paper of this series — and report empirical magnitudes from two independent open-source DDD aggregates (dotnet/eShop's Order and kgrzybek/modular-monolith's SubscriptionPayment): a compiled-versus-interpreted speedup that scales with DSL-bound work (roughly 1.5× to 3.1×); a cold compile cost amortized within several hundred invocations; and a journal that stored, on each of the two aggregates, about 99.8% of parametric entries as compact action references — 3.5× and 5.6× denser than the equivalent literal-script storage. The journal-density values are exact per-host counts and the speedups carry run-to-run variation; all are reported as illustrations of the structural property on the cases measured, not as estimates of its magnitude in general. The principle generalizes beyond any one runtime: program-value separability characterizes the structural condition any DSL runtime must satisfy to admit compilation, caching, and dense persistence at all.

Zenodo (CERN European Organization for Nuclear Research)
Institute for Development and Economic Analysis (ID)
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.