RCE Compile: A Proposed 7-Part Compiler Normal-Form Contract, Per-Machine Prelude Cuts, and De Bruijn Warm-Cache Bounds
Refutes a descriptive "Law of Compilation" in favor of a proposed 7-part contract, separating Zen 5 (20.07x) vs Core i9 (15.44x) prelude cuts and up to 448.5x best-case warm De Bruijn cache hits (Linux RAPL reported_j).
Primary Source: Primary Paper: research.openie.dev/papers/rce-compile/ · Canonical Digest:
blake3:tv:d561a8e7e445f1878caa5144e08df2f7cbe006ff65dba485bc787c7361a7027a· Telemetry Class:reported_j(Linux powercap RAPL core/PP0 & package counters on AMD Ryzen AI Max+ 395 (Zen 5) and dedicated Intel Core i9-13900H (reported_j; measured_j = null))Unattended Gate Flag (
human_in_gate = false): Automated build, benchmark, and proof-checking scripts ran without manual human override; signed & self-checked by OpenIE — not independently peer-reviewed (Verification & AI-Use Disclosure · Glossary).Inline Evidence Tags:
[T]machine-checked Lean 4 theorem over stated axioms ·[E]empirical benchmark or hardware log ·[M]analytical/mathematical model or simulation ·[S]external literature, filing, or specification citation.

Proposed 7-part Compiler Form contract, per-machine Linux RAPL reported_j compile payback, and De Bruijn warm-cache vs. cold-build separation.
Key Claims & Evidence Tags
- [M/S · Proposed Normal-Form Contract, Not a Law of Nature] The primary paper explicitly refutes the hypothesis that existing compilers obey a single “Law of Compilation,” restating it as a proposed 7-part engineering contract (
R, L, C, K, U, E, G) and disclosing in Appendix A that38of55audited external claims rested on[S]/[K]snippet checks (14partly overstated,4contradicted,17not found). - [E · Per-Machine Cold Prelude & Optimization Payback (
reported_j)] Across20integer/fixed-point kernels ×15compiler tiers (300/300matching checksums), factoring RCE’s emitted Rust runtime into pre-compiledlibrce_rt.rlibcut median per-kernelrustc -O3corereported_j20.07x(56.29 J -> 2.81 Jcore,896.93 J -> 27.05 Jpkg,24.58xfaster, lowering payback vs. Node JS from31,080to1,079runs) onAMD Ryzen AI Max+ 395(Zen 5, pinned CPU 0, co-tenant load on other cores noted), and replicated at15.44xPP0core (84.40 J -> 5.47 J,104.56 J -> 6.85 Jpkg =15.26x) on an idle dedicatedIntel Core i9-13900H(4.46 Widle pkg)—while-O2to-O3never paid back its extra compile joules on20%–30%of kernels. - [E · Warm De Bruijn Cache Hit (
up to 448.5x) vs. Cold Build] Crediting N. G. de Bruijn (1972) for nameless positional variable indexing (v0 - v1vs.v1 - v0),E5-Scale(245base programs,500verified semantic mutants,29,890cross-program pairs) recorded0 / 500false hits (whereas naive identifier-stripping collided on150 / 150(100%) variable-swap bugs) and cut rebuild work up to448.5x(1.166 J -> 2.60 mJrustc -O3corereported_j) and167.8x(0.682 J -> 4.07 mJclang -O3) strictly on warm cache hits over alpha-renamed single-file kernels (66.7%–69.2%rename hit rate;1.0xon cold unseen builds).
Methods, Baselines & Artifact Scope
| Methodological Dimension | Primary-Paper Grounding & Scope |
|---|---|
| Hardware & Telemetry | (1) E4-Energy / E4-Prelude / E5-Scale: AMD Ryzen AI Max+ 395 (Zen 5, 32 logical CPUs, pinned CPU 0, Linux RAPL core + pkg reported_j; co-tenants present on non-pinned cores); (2) Wave 5 idle replication: dedicated Intel Core i9-13900H (Raptor Lake, 4.46 W idle pkg, Linux RAPL PP0 + pkg reported_j); (3) E5 Wasm/object key study: Intel Xeon @ 2.80 GHz (Ubuntu 24.04.5, clang 18.1.3, rustc 1.97.0, unmetered hash comparison). measured_j = null (board_metered = false). |
| Workload & Benchmark Suite | E1: cross-directory/rename byte reproducibility; E4-Energy: 20 self-contained integer/fixed-point kernels × 15 C/Rust/Wasm/JS/Python tiers (300 cells); E5: 360 x86-64 objects, 144 Mach-O objects, 288 Wasm objects, 288 linked Wasm modules (26,208 cross-kernel pairs, 9,328 IR mutations); E5-Scale: 185 W1 RCE Forms + 60 C/Rust/Python kernels + 500 verified semantic mutants. |
| Baseline(s) Compared | Raw SHA-256 source/command hash (ccache-style), comment/whitespace-stripped hash, naive AST identifier-stripping (ID - ID), and De Bruijn positional canonicalization (de Bruijn 1972, Maziarz et al. PLDI 2021); inlined RCE Rust prelude vs. pre-compiled librce_rt.rlib. |
| Runs (N) & Spread / Uncertainty | E4: 20 kernels (medians and per-kernel payback distributions reported; 20%–30% of kernels never recover -O2 -> -O3 compile energy; R^2 = 0.9999 for power × time vs. 0.1154 for static Wasm IR size). E5-Scale: deterministic over 245 programs, 29,890 pairs, and 500 mutants. |
| Caching / Cold vs. Warm Scope | Explicitly separated: 448.5x (rustc -O3), 167.8x (clang -O3), and 17.15x (rce check+emit) apply only on warm De Bruijn cache hits (69.2% hit rate on 185 renamed RCE Forms; 66.7% on 60 renamed C/Rust/Python kernels). Cold first-time builds pay 100% of compiler cost plus 2.60–4.59 mJ canonicalizer overhead. |
| Artifact & License Availability | Kernels, mutant generators, and E4/E5 scripts public in openIE-dev/openie-research-experiments and openIE-dev/rce (Apache-2.0); self-checked by OpenIE, open for independent replication. |
From Refuted “Law” to Proposed Normal-Form Contract & Lineage
The manuscript opens by testing—and refuting—the claim that real compilers (gcc, clang, rustc, Go, GHC, XLA, CompCert) already satisfy a unified “Law of Compilation” [E, S]. Instead, it defines a proposed 7-part Compiler Form contract (Representation R, Lowering L, Cost C, Checker K, Reuse U, Energy E, Gate G). Nameless positional variable indexing in R directly applies N. G. de Bruijn (1972) lambda-calculus indices and Maziarz et al. (PLDI 2021) alpha-equivalent IR hashing, sitting alongside incremental build systems such as ccache, Bazel, Adapton (Hammer et al., PLDI 2014), and Rust’s Salsa query engine [S].
Per-Machine Compile Payback (Zen 5 vs. Core i9-13900H) & Warm-Cache Scope
-
Cold compile amortization (
E4-Energy&E4-Prelude)[E]: Lowering Python toclang -O3requires a median of2,490executions to pay back compilation joules; stepping from-O0to-O3requires53,464to102,720runs; and-O2to-O3never pays back on20%–30%of the 20 kernels. Pre-compiling RCE’s shared runtime intolibrce_rt.rlibcut per-kernelrustc -O3compile energy20.07x(56.29 J -> 2.81 Jcorereported_j) onAMD Ryzen AI Max+ 395(Zen 5) and15.44x(84.40 J -> 5.47 JPP0reported_j) on an idle dedicatedIntel Core i9-13900H[E]. -
Why De Bruijn positions beat naive ID-stripping (
E5-Scale)[E]: Naive identifier stripping (x - y->ID - ID) falsely collided on150 / 150(100%) variable-swap bugs (30.0%false-hit rate overall), whereas De Bruijn slot numbering (v0 - v1vs.v1 - v0) yielded0 / 500mutant collisions and0 / 29,890cross-program collisions. On best-case warm cache hits when rebuilding alpha-renamed single-file kernels on pinned CPU 0, De Bruijn lookup (2.60–4.07 mJ) avoided1.166 Jrustc -O3(448.5x) and0.682 Jclang -O3(167.8x) rebuilds[E].
Limitations, IR Debug-Path Misses & Literature Snippet Audit
-
Debug-path & comment misses (
E5&E5-Scale)[E]: Linked Rust Wasm modules missed on9/96two-directory and renamed pairs atopt-level=0/1because embedded panic column/path strings differed in the data segment; similarly, rawrce fmt namelesspreserves#comments unless stripped prior to hashing (128/185=69.2%alpha-rename hit rate)[E]. -
Single-file integer scope &
[S]/[K]citation limits:E4/E5-Scalecover single-file integer/fixed-point kernels without multi-TU C++ headers, LTO, or GPU shaders; and Appendix A flags38/55background literature claims as snippet-level checks requiring primary-text verification (§9)[S].
Energy & Telemetry Scope
All joule measurements are Regime-B Linux powercap RAPL core/PP0 and package reported_j (measured_j = null, board_metered = false), where power × wall_time explained 99.99% of RAPL variance (R^2 = 0.9999) compared with 11.54% for static Wasm byte size [E].
Related Work & References
- de Bruijn (Indag. Math., 1972) & Maziarz et al. (PLDI 2021): Nameless positional lambda-term indexing and hashing modulo alpha-equivalence
[S]. - Hammer et al. (Adapton, PLDI 2014), Rust Salsa,
ccache& Bazel: Demand-driven incremental computation and content-addressed build caching[S]. - Leroy (CompCert, CACM 2009) & Lopes et al. (Alive2, PLDI 2021): Verified compilation and translation validation
[S]. - Lattner et al. (MLIR, CGO 2021), Chen et al. (TVM, OSDI 2018), Halide & XLA: Multi-level IR lowering and cost-guided schedule search
[S].
David Charlot
Open Interface Engineering, Inc. · Signed Provenance · Self-Checked
E4/E5 kernel corpus and payback scripts public in openIE-dev/openie-research-experiments and openIE-dev/rce (Apache-2.0); prose CC0-1.0; self-checked, open for external replication. Full licensing & AI-use disclosure →
Video Summaries, Syndication & Site Reference
Check the primary artifacts or run an independent replication
Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.