Skip to content

The Reality Code Engine: One Lossless Form for Native, Verified, Low-Energy Programming

Plain-Words Quick Guide (30 sec) 📊 On-Chip Counter (reported_j) + 5,393 Six-Kernel Lean 4 Proofs

Writing One Complete Blueprint Instead of Re-Debugging Code

Most software crashes happen because nobody wrote down what should happen on an unexpected input—requiring every outcome up front stops whole families of bugs before code ever runs.

Think of it like: Think of an architect's master blueprint that checks every pipe and beam fits before construction starts, then prints exact instructions for plumbers, electricians, and carpenters.
And (Setup)
Teams rewrite the same business logic across dozens of languages, spending endless hours chasing subtle edge-case bugs across versions and chips.
But (Problem)
Mainstream languages allow half-specified programs that compile fine yet crash or corrupt data the moment an unexpected input arrives.
Therefore (Result)
The Reality Code Engine requires one complete, machine-checked state blueprint—refusing incomplete code in 49 millijoules, covering 270 of 270 (100%) grammar-measured languages across 12,117 catalogued languages, emitting 3-ISA native ARM64/x86-64/RV64IM binaries, and verifying 5,393 six-kernel Lean 4 theorem constants.
Key Result:2,221 passing conformance checks (0 failures), 5,393 Lean 4.36.0 theorem constants (`@ f87d6af2`), `270/270` (`100.0%`) Language Constellation grammar coverage across `12,117` languages, 3-ISA native `ARM64`/`x86-64`/`RV64IM` codegen, pure-RCE `HPKE` (`257/257`) + `MLS`, and `49.04 mJ` per check (`reported_j`, `@ 8efcd0b0`). ▶ Watch 15s Plain Film →

This paper describes the Reality Code Engine (RCE), a system in which a program is written once as a state machine, called a Form, and code in other languages is generated from it. It presents the written specification of the language, the reference checker that implements it and emits Rust, Python, JavaScript and Scala, the Lean proofs of its theorems, registered measurements of the dimension of its programs, and the design of the engine that finds, checks and reuses solutions. It states how the claims could be shown false and the protocols of the measurements still to be made.

In plain words

  1. A program is written once, in one precise form, and the computer produces the same program in many languages from it.
  2. Everything a program can do is declared in its form, and the language requires every input to have a declared outcome, a step or a recorded kept step that leaves the state as it was, rather than an undefined one that is found and fixed later.
  3. When a fix passes the gate, it can be crystallized by structural identity and replayed at microsecond latency so that the same problem does not cost model time or energy twice.

Why it is built this way

  1. Refuse to admit. A program that does not yet have the Form's shape is not run; the checker names the place and the rule. This is the same bargain an ownership checker makes in a systems language: more is checked before the program runs, so less is paid for in production.
  2. Checks in layers. The grammar, the types, ownership, the requires rules, the examples, the property tests and the mutation scores each catch a different kind of fault, and each is run on every commit.
  3. Proposers under one gate. A person, a search over existing Forms or a generative system can propose a program or a fix. Only the checker decides whether it is admitted, with the same result on every machine, so generated volume does not turn into unchecked complexity.
  4. Joules as the unit of cost. Pricing a correct program in joules is the OpenIE extension of this argument: the checker's internal cost units are deterministic integers, while first operating-system/on-chip reported_j receipts on Apple M5 Max record 49.04 mJ per Form check and 15.44 J per full 62-Form suite (measured_j = None, board_metered = false).

These points converge with arguments made in public by others in systems programming, for example on ownership and on layered validation; that is an observation about the ideas, not an endorsement of OpenIE by anyone.

Where it stands (23 November 2026, at commit f87d6af2)

  • At public commit f87d6af2 (23 November 2026), spec/lean/ runs on Lean 4.36.0 (migrated from v4.12.0 to close CVE-2026-72844, CVE-2026-72711, #16688 .olean replay bypasses, and #16693 Lean.ofReduceBool), auditing 5,393 RCE theorem constants across 64 top-level RCE modules (from the unchanged 1,264 theorem and lemma declarations in source, theorems T1 to T63, standard axioms only, zero sorry, zero opaque, zero ofReduceBool) and passing lake check --paranoid inside a Linux bubblewrap sandbox across all 6 / 6 independent proof checkers (con-leche --verified and con-ron --verified: 68,090 declarations; lean4lean, nanoda, leanchecker --paranoid, and Lean v4.36.0: 68,092 declarations), alongside 837 Rust checker unit tests across 159 test files and 53 built-in standard-library modules.
  • All 311 normative clauses of the language have at least one conformance test. Of the 2,236 conformance tests, the reference interpreter passes 2,221 with 0 failures and 15 unsupported; rce-spec-check accepts 62/62 valid example Forms and flags 13/13 syntax and 73/73 type/admissibility negative examples as requiring change (zero grammar conflicts across 118 rules and 1,206 states). The Python and JavaScript emitters each pass 1,462 of the tests that apply to them, with 0 failures.
  • First on-chip reported_j receipts recorded on Apple M5 Max (macOS 27.2.1, per-process kernel proc_pid_rusage(RUSAGE_INFO_V6).ri_energy_nj L3 counter paired with macmon IOReport L2): 49.04 mJ median per Form check (7.32 ms/Form, 3.04 J per 62-Form pass across 20 passes) and 15.44 J per full 62-Form check, trace-run and five-target emit lifecycle (2.32 s/suite). Across the 151-task rce repair ladder, rce repair criterion verifies the 2% stochastic promotion ceiling on external proposals (116/151 exact closes, 3/119 = 2.5% > 2.0% observed rung-f closes, 3/3 passing W-MUT-1, 0 contradictions, keeping rung f in observe mode).
  • Not yet: there is no production optimizing compiler, and external inline wall-plug or shunt-rail power probes remain uncollected (measured_j = None, board_metered = false; the KV260 (AMD Kria) board rows filed as measured_j are in Metered Commit Gates, not here). Specification draft 0.9 remains under review.

Everything above can be rerun from openIE-dev/rce at commit f87d6af2: the conformance suite is in conformance/, the six-kernel Lean audit is scripts/lean-audit.sh (receipt in spec/lean/audit/six_kernel_paranoid_audit.json), and the counts are recorded in src/data/rce-facts.json.

RCE overview: source, checker, Form P = (S, E, delta, D, lambda), hash-chained log D, emit targets Rust, Python, JS and Scala, host and compute fabrics
RCE at a glance. The checker accepts a program or names the rule it breaks; an accepted program is a Form; every step is appended to the log D; emitters project it to other languages; a host runs it. Open full size · PNG. More figures: openIE-dev/rce docs/figures.

29 November 2026 update · commit 8efcd0b0

At openIE-dev/rce commits 8efcd0b0 & f87d6af2 (491/491 workspace tests passing), all 270/270 Language Constellation grammars round-trip at 100.0% canonical fidelity (/constellation/), 1,208/1,280 (94.4%) standard-library functions execute deterministically in-process at Gear 0, the zero-LLVM sovereign compiler emits native x86-64, aarch64, and wasm32 binaries across four decidable equivalence fragments, 4-node federated FormJEPA + RepoFormJepa preserves 23.99/24 rank (96/96 holdouts, 35/35 call graphs at 0.0 rename drift), and 500 Hz MuJoCo 4.0.1 closed-loop contact checks hold within 0.48 mm and 6.90 N <= 140 N (external hardware shunt measured_j = None remains open).