All 57 Entries
Era 0 · Historical Whitepaper (Verbatim + Nov 2026 Addendum) Wave I · Neural-Symbolic Runtime (Jan 2026) engineering est_j · Analytical / TDP Model Measured/Empirical Engineering Archival PDF (#03, Jan 12, 2026); original Cortex prototype in private energy-efficient-agi repo (unreproduced externally); deterministic runtime successor public at openIE-dev/rce

Cortex: Neural-Symbolic Programming for Energy-Efficient Code Execution

January 12, 2026 whitepaper introducing Cortex: a polyglot tree-sitter ingestion, 128-dim Mamba context monitor, SSA optimizer, and Cranelift/Metal execution prototype, with November 25, 2026 errata scoping its 5-language evaluation, 34.4x energy ratio, and in-house interpreter baseline.

David Charlot • • Addendum & Errata: Nov 25, 2026 • 7 min read • Glossary • Verification & AI-Use Disclosure
cortex neural-symbolic cranelift metal-gpu rce historical-whitepaper

Part I: Contemporary Historical Summary (As Written in January 2026)

Historical Source Provenance (Original Date: January 12, 2026): David Jean Charlot, PhD · Open Interface Engineering. Preserved from our January 2026 systems runtime series (Download Original Jan 2026 PDF).

Abstract: Closing the Interpret-vs-Reason Gap

In January 2026 we asked why AI-assisted software workflows often incurred a double overhead: burning tens of joules in a cloud LLM to translate or inspect glue scripts across language boundaries, and then paying a dynamic-interpreter execution overhead on every run.

Cortex was an early neural-symbolic runtime prototype in Rust designed to ingest polyglot source files into a unified Static Single Assignment (SSA) intermediate representation, monitor execution context via an embedded 128-dimensional selective state-space model (Mamba), run scalar and elementwise tensor optimization passes, and lower hot paths to Cranelift native JIT or Apple Metal GPU compute shaders.

Four-Layer Cortex Pipeline

Layer 1: Polyglot Ingestion (21 tree-sitter Parser Grammars Wired + Usage-Based Type Inference)
   │      Benchmarked lowering on 5 languages: Rust, Python, Go, JavaScript, C (see Errata)
   ▼
Layer 2: Neural Context Tracker (128-dim Selective SSM + `infer` introspection primitive)
   │      Delta[k] = softplus(u[k] * W_Delta)   (~0.05 J modeled local state step vs. ~50 J cloud LLM)
   ▼
Layer 3: SSA IR PassManager
   │      Dead Code Elim (DCE) · CSE · Constant Folding · LICM · Elementwise Tensor Fusion
   ▼
Layer 4: Multi-Backend Execution Engine
          ├── Zero-Warmup AST/Bytecode Interpreter (one-shot tiny scripts)
          ├── Rayon `parfor` Work-Stealing CPU Pool
          ├── Cranelift Native JIT (~100 ms warmup)
          └── Apple Metal Compute Backend (fused GPU shaders)

1. Usage-Based Polyglot Lifting (96.0% Across 500 Programs in 5 Languages)

While the ingestion crate linked 21 tree-sitter language grammars (Superseded / corrected — see Nov 25, 2026 Errata below), Cortex evaluated bottom-up usage-based type specialization across a 500-program benchmark spanning 5 languages (100 programs per language), lifting and executing 480 of 500 programs (96.0%) without manual type annotations:

Source LanguagePrograms TestedLift & Execute Pass RatePrimary Residual Failure Mode (Jan 2026)
Rust10098%Procedural macro expansion outside CST
Python10097%Dynamic getattr / monkey-patched globals
Go10096%Reflection-heavy interface switches
JavaScript10095%Prototype mutation & implicit string coercion
C10094%Unbounded pointer aliasing / union punning

2. Multi-Backend Matmul & Composite Pipeline Benchmarks

On a 1000 x 1000 f32 matrix multiplication microbenchmark (2.0e9 FLOPs) measured relative to Cortex’s own unoptimized interpreter (Superseded / corrected — see Nov 25, 2026 Errata below):

Cortex BackendWarmup Cost1000x1000 f32 Matmul LatencySpeedup vs. Cortex InterpreterModeled Energy
Cortex Tree/Bytecode Interpreter0 ms8,200 ms (denominator)1.0x41.0 J
Cranelift Native JIT~100 ms420 ms19.5x (8200 / 420)2.1 J
Apple Metal GPU Shader~18 ms (cached)45 ms182.2x (8200 / 45)0.9 J

Across composite polyglot pipeline tasks (lifting + local context check + native execution vs. cloud LLM + interpreted execution), the January 2026 paper reported modeled mean energy falling from 110 J to 3.2 J, summarizing the interval in prose as "35–100x" (Superseded / corrected — see Nov 25, 2026 Errata below).

Contemporary v0.1 Limitations Noted in January 2026

  • Heuristic infer Thresholds: Decision thresholds on the 128-dim Mamba anomaly state were hand-tuned constants rather than calibrated probabilistic bounds.
  • Static Tensor Shapes Only: Symbolic dynamic dimensions such as [?, 512] were unsupported in the SSA Tensor Fusion pass.

Arithmetic & Baseline Scope Errata (2026-11-25 Audit)

  1. Exact Task Energy Ratio (110 J / 3.2 J = 34.4x, Below Stated 35x Floor): Dividing the 110 J baseline numerator by the 3.2 J Cortex composite denominator yields 34.375x (34.4x), which falls slightly below the rounded "35–100x" headline interval printed in the January 2026 PDF. We report 34.4x explicitly.
  2. Scoping "21-Language" Ingestion vs. 5-Language Empirical Evaluation: Linking 21 tree-sitter grammar crates provided syntactic Concrete Syntax Tree (CST) parsing across 21 languages, not verified semantic SSA lowering across 21 languages. All 480 / 500 (96.0%) lift-and-execute validation was conducted strictly across the 5 languages in Table 1 (Rust, Python, Go, JavaScript, and C); the other 16 grammars were parser-only stubs in January 2026.
  3. Matmul Baseline Disclosure (In-House Interpreter, NOT Tuned BLAS / Accelerate / cuBLAS): Both the 19.5x (8,200 ms / 420 ms) Cranelift speedup and the 182.2x (8,200 ms / 45 ms) Metal speedup used Cortex’s own unoptimized scalar AST/bytecode interpreter (8,200 ms, ~0.24 GFLOPS) as the 1.0x baseline denominator—NOT a vendor-tuned linear-algebra library (Apple Accelerate / AMX, OpenBLAS, Intel MKL, or cuBLAS). At 2.0e9 FLOPs (2 * 1000^3), 45 ms on Metal corresponds to ~44.4 GFLOPS (a naive un-tiled shader), whereas tuned Apple Accelerate cblas_sgemm or Metal MPSMatrixMultiplication executes 1000 x 1000 f32 matmul in < 1 ms (> 2,000 GFLOPS). The table therefore measures internal interpreter-to-JIT/GPU lowering inside Cortex v0.1, not state-of-the-art GEMM throughput.
  4. Epistemic & Licensing Status (est_j, Private Prototype): Energy figures (41.0 J -> 2.1 J -> 0.9 J and 110 J -> 3.2 J) were analytical active-wattage envelope × wall-clock estimates (est_j). Archival PDF (#03) is public at /papers/archive/03-Cortex-Neural-Symbolic-Programming.pdf under CC BY-ND 4.0. The January 2026 Cortex prototype in openIE-dev/energy-efficient-agi is a private repository (unreproduced externally); our clean-room deterministic IR successor is public at openIE-dev/rce.

Chronological Evolution Within OpenIE Research

  1. Decoupling Verified Execution From Neural State (Reality Code Engine (RCE)): Examined the fragility of mixing heuristic SSM activations into an execution runtime by separating deterministic verified IR semantics (2,221 checks in openIE-dev/rce) from learned predictors.
  2. Hardware-Counter Compiler Memoization (RCE-Compile): Addressed Cortex’s ~100 ms JIT warmup tax via content-addressed build caching, measured at up to 448.5x warm-cache cut (chip counter, reported_j).
  3. Latent Predictive World Models (RCE-JEPA): Explored calibrated Joint-Embedding Predictive Architecture (JEPA) latent surprise signals gated by deterministic RCE invariants in place of Cortex’s hand-tuned 128-dim infer thresholds.
  • Lattner, C., Amini, M., Bondhugula, U., Cohen, A., Davis, A., Pienaar, J., Riddle, R., Shpeisman, T., Vasilache, N., & Zinenko, O. (2021). MLIR: Scaling Compiler Infrastructure for Domain Specific Computation. CGO 2021, 2–14 — foundational multi-level IR infrastructure unifying scalar, loop, and tensor dialects.
  • Chen, T., Moreau, T., Jiang, Z., Zheng, L., Yan, E., Shen, H., Cowan, M., Wang, L., Hu, Y., Ceze, L., Guestrin, C., & Krishnamurthy, A. (2018). TVM: An Automated End-to-End Optimizing Compiler for Deep Learning. OSDI 2018, 578–594.
  • Sabne, A. / OpenXLA (2020). XLA: Compiling Machine Learning for Peak Performance — HLO graph fusion and multi-backend tensor compilation.
  • Ragan-Kelley, J., Barnes, C., Adams, A., Paris, S., Durand, F., & Amarasinghe, S. (2013). Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines. PLDI 2013, 519–530.
  • ONNX Runtime Developers (2019–2026). ONNX Runtime: Cross-Platform Accelerated ML Inference and Graph Optimization.
  • Gu, A., & Dao, T. (2023). Mamba: Linear-Time Sequence Modeling with Selective State Spaces. arXiv:2312.00752.
  • Bytecode Alliance (2018–2026). Cranelift Code Generator (wasmtime / Rust SSA native backend).

Changelog (2026-11-25)

  • Separated Part I (January 12, 2026 contemporary summary) from Part II (November 25, 2026 arithmetic/baseline errata, provenance, and prior art).
  • Corrected 110 J / 3.2 J to 34.4x (noting it sits below the originally printed 35x floor).
  • Scoped "21-language" support explicitly to 21 wired tree-sitter parser grammars vs. 5 empirically evaluated lowering languages (Rust, Python, Go, JavaScript, C).
  • Disclosed explicitly that the 182.2x matmul figure used Cortex’s unoptimized in-house interpreter (8,200 ms) as the baseline rather than Apple Accelerate / OpenBLAS / MKL / cuBLAS.
  • Added prior-art citations to MLIR (2021), Apache TVM (2018), XLA, Halide (2013), ONNX Runtime, Mamba (2023), and Cranelift.
DC

David Charlot

Open Interface Engineering, Inc. · Signed Provenance · Self-Checked

Archival PDF (#03) public at /papers/archive/03-Cortex-Neural-Symbolic-Programming.pdf under CC BY-ND 4.0; original Cortex prototype in openIE-dev/energy-efficient-agi is private (externally unreproduced); successor runtime openIE-dev/rce is public. Full licensing & AI-use disclosure →

Archival PDF (#03, Jan 12, 2026); original Cortex prototype in private energy-efficient-agi repo (unreproduced externally); deterministic runtime successor public at openIE-dev/rce

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.