Research paper · about
The Reality Code Engine: One Lossless Form for Native, Verified, Low-Energy Programming
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.
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
- A program is written once, in one precise form, and the computer produces the same program in many languages from it.
- 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.
- 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
- 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.
- Checks in layers. The grammar, the types, ownership, the
requiresrules, the examples, the property tests and the mutation scores each catch a different kind of fault, and each is run on every commit. - 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.
- 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_jreceipts on Apple M5 Max record49.04 mJper Form check and15.44 Jper 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 onLean 4.36.0(migrated fromv4.12.0to closeCVE-2026-72844,CVE-2026-72711,#16688.oleanreplay bypasses, and#16693Lean.ofReduceBool), auditing5,393RCEtheorem constants across64top-levelRCEmodules (from the unchanged1,264theorem and lemma declarations in source, theoremsT1toT63, standard axioms only, zerosorry, zeroopaque, zeroofReduceBool) and passinglake check --paranoidinside a Linuxbubblewrapsandbox across all6 / 6independent proof checkers (con-leche --verifiedandcon-ron --verified:68,090declarations;lean4lean,nanoda,leanchecker --paranoid, andLean v4.36.0:68,092declarations), alongside837Rust checker unit tests across159test files and53built-in standard-library modules. - All 311 normative clauses of the language have at least one conformance test. Of the
2,236conformance tests, the reference interpreter passes2,221with0failures and15unsupported;rce-spec-checkaccepts62/62valid example Forms and flags13/13syntax and73/73type/admissibility negative examples as requiring change (zero grammar conflicts across118rules and1,206states). The Python and JavaScript emitters each pass1,462of the tests that apply to them, with0failures. - First on-chip
reported_jreceipts recorded on Apple M5 Max (macOS 27.2.1, per-process kernelproc_pid_rusage(RUSAGE_INFO_V6).ri_energy_njL3counter paired withmacmonIOReportL2):49.04 mJmedian per Form check (7.32 ms/Form,3.04 Jper 62-Form pass across 20 passes) and15.44 Jper full 62-Form check, trace-run and five-target emit lifecycle (2.32 s/suite). Across the 151-taskrce repairladder,rce repair criterionverifies the 2% stochastic promotion ceiling on external proposals (116/151exact closes,3/119 = 2.5% > 2.0%observed rung-fcloses,3/3passingW-MUT-1,0contradictions, keeping rungfinobservemode). - 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 asmeasured_jare 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.
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).