Published June 17, 2026 | Version 0.1-draft

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

  • 1. NCubo Ideas, Costa Rica

Description

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.

Series information (English)

Paper 2 of the Puppeteer Papers Series. The series develops a research program around journaled-program substrates and their structural consequences for software architecture.

Companion papers already deposited:
- Paper 1: Anti-porous architecture (DOI: 10.5281/zenodo.20404863)
- Paper 6: Most infrastructure layers are symptoms of the persistence model (DOI: 10.5281/zenodo.20317450)
- Paper 7: After the substrate (DOI: 10.5281/zenodo.20398998)

A unified monograph integrating all seven papers (Puppeteer: Journaled Programs and the Dissolution of Infrastructure) is available at https://github.com/alvaroNCubo/puppeteer-papers/blob/main/puppeteer-monograph.pdf.

Technical info (English)

Source-code references resolve against commit b42d0f7 of https://github.com/alvaroNCubo/puppeteer (2026-05-26), archived in Software Heritage at:

  swh:1:dir:177e2d61486bdbdfd2d5e774fcf392a45406e60d
  ;origin=https://github.com/alvaroNCubo/puppeteer
  ;anchor=swh:1:rev:b42d0f76b4278c36a45c221cc1453e3ee8ffb3de

Empirical data: the paper02-data.zip file in this deposit contains the raw CSV outputs of the labs reported in §5 (29 CSV files across 10 lab directories: lab01-eshop through lab07-pool-hit-rate plus paper2-synthetic). The harness code (BenchmarkDotNet-based) that produced these CSVs lives in the labs/ directory of the Puppeteer repository at the same commit. Running the harnesses against b42d0f7 reproduces the CSVs (modulo run-to-run variance on timing measurements; density and pool-hit-rate counts are deterministic).

Files

02-program-value-separability.md

Files (526.7 kB)

Name Size Download all
md5:c556250757cddecb11e6fcd1b0e21427
109.4 kB Preview Download
md5:4bf5a5882408b676d70a9031d25e533b
218.0 kB Preview Download
md5:b2c604b29f9c1cb9bf780decce0f0795
123.8 kB Download
md5:fe23c5895e0b5bf61d70f8aaab17bc68
75.5 kB Preview Download

Additional details

Software

Programming language
C#
Development Status
Active