Architecture
v4.0 · full stackNWO-ASM's full stack, end to end. A user writes process-matrix code at the top; signed USDC settlement comes out at the bottom. Each layer below is independent and replaceable — the language and runtime are MIT-licensed; only the substrate connectors that touch live external compute carry per-call fees. The vertical flow makes the boundaries obvious.
The full vertical stack
Read top to bottom — source becomes signed settlement. Solid white lines are live data paths; dashed lines are designed/roadmap.
Nine layers, top to bottom
Source
The NWO-ASM language itself. Process matrices and causal coherence as first-class primitives. MIT-licensed, no platform lock-in. Files are .nwo; modules, types, and routing directives compose like ordinary code.
Parser & AST
A Rust parser using a tree-sitter grammar produces a typed AST. Diagnostics are user-friendly; errors come with source spans and suggested fixes.
Process-Matrix IR
The AST is lowered into .pmx, a substrate-agnostic algebraic form. Every operation in the IR is a well-defined algebraic transformation — the IR is human-readable and inspectable.
MetaState optimizer
Places each IR block on the substrate that minimises a free-energy bound across substrate cost models. Optional manual mode pins targets explicitly. Output: optimized IR plus a placement map.
Runtime & dispatcher
Async dispatcher with health-aware retries, fallback substrates, and live metric collection (what Portals visualise). Every dispatch is signed before it leaves the runtime.
Substrate connectors
One small adapter per substrate. Live: CPU (LLVM), GPU (CUDA/ROCm/Metal + nwo-agi mesh), QPU (IBM, Origin Wukong 72q + Wukong-180). Beta: ECG hive + BCI/EEG mapping. Roadmap: photonic (Jiuzhang-class), neuromorphic (Loihi/Lava), DNA (strand displacement), crystalline (quantum-dot lattice). Each connector is replaceable without touching the language above it.
Verification
MetaState independently re-fits the inference and emits a Proof of Inference, signed with CRYSTALS-Dilithium (post-quantum). A Groth16 zero-knowledge variant is available when the data must stay private.
Settlement
The signed proof becomes calldata into the deployed MetaStateSplitter at 0x93a7…1BE4 on Base. The split is 35% guardian · 35% savings · 30% operations, with an optional +15% affiliate payout when a referrer is attached. No new contract is deployed for NWO-ASM — we reuse what's already audited.
Delivered
The caller receives: the computed result, the signed proof, and the on-chain transaction hash. Every step from source to delivered is auditable; every boundary in the diagram is inspectable.
What each layer is built on
| Layer | Tech | Status |
|---|---|---|
| 01 · Source | NWO-ASM grammar · process matrices · causal coherence · MIT | Live |
| 02 · Parser | Rust · tree-sitter · ariadne diagnostics | Live |
| 03 · IR | Process-Matrix IR · .pmx · serde | Live |
| 04 · Optimizer | MetaState kernel · free-energy bound · causal-coherence scheduler | Live |
| 05 · Runtime | tokio · health probes · sparkline collectors (what Portals show) | Live |
| 06 · CPU | LLVM 17 · x86 / ARM / RISC-V | Live |
| 06 · GPU | CUDA · ROCm · Metal · nwo-agi distributed mesh | Live |
| 06 · QPU | Qiskit Runtime (IBM) · QPanda (Origin Wukong 72q · Wukong-180) | Live |
| 06 · ECG Hive · BCI | OpenBCI / Muse / LSL · CRYSTALS-Dilithium identity hive · neural-state encoder | Beta |
| 06 · Photonic | Linear-optical · Gaussian Boson Sampling adapters (Jiuzhang-class) | Roadmap |
| 06 · Neuromorphic | Intel Loihi · Lava SDK · spiking-net IR lowering | Roadmap |
| 06 · DNA | Strand-displacement compiler · Oxford Nanopore I/O | Roadmap |
| 06 · Crystalline | Quantum-dot lattice · custom backend (long-horizon) | Roadmap |
| 07 · Verification | CRYSTALS-Dilithium · liboqs · Groth16 zk (snarkjs/arkworks) | Live |
| 08 · Settlement | MetaStateSplitter · Base 8453 · USDC (0x8335…2913) | Live · existing audited contract |
| Side · EVM target | EVM bytecode emission for cross-chain invocation | Design-complete |
| Side · Cross-chain bridge | Quantum-secured message relay between chains and NWO-ASM | Roadmap |
Why it's shaped this way
One language, many substrates
Source code never names a backend. The optimizer at layer 04 picks; replacing a substrate (or adding a new one) does not change a single line of user code.
Every layer is inspectable
You can dump the AST, the IR, the optimizer's placement, the runtime's metrics, the proof, and the calldata. No hidden state, no opaque steps.
Honesty is structural
Roadmap substrates can't be silently dispatched to; the runtime refuses. The diagrams use dashed lines for the same paths the code refuses to traverse.
No new on-chain contract
Settlement reuses the audited MetaStateSplitter. No new ABI, no new audit, no new attack surface for NWO-ASM specifically.