Base · 8453

Compiler & ISA

v4.0 · pipeline

The NWO-ASM compiler lowers a single source program into the Process-Matrix IR, then routes each block through the MetaState optimizer to its best substrate target. Multi-stage by design: parse, lower, optimize, schedule, emit. Targets are pluggable — and writing the language itself is free, MIT-licensed, with no platform lock-in.

HONEST STATUS · The CPU / GPU / QPU emission paths are live. The EVM-target backend (so EVM chains can invoke NWO-ASM computations and receive verified results back) is design-complete, integration in progress; the cross-chain quantum-secured bridge is roadmap. Nothing here is claimed before it is shipped.
Pipeline

Compilation as a routed pipeline

Each stage produces a typed artifact handed to the next. The optimizer chooses substrate placement after IR lowering, using free-energy minimisation across substrate cost models.

01 · SOURCE .nwo file process matrices 02 · PARSE AST typed syntax tree 03 · LOWER Process-Matrix IR .pmx 04 · OPTIMIZE MetaState route free-energy choice LLVM → CPU LIVE PTX/HIP → GPU LIVE QASM3 → QPU LIVE ECG-hive · BCI BETA EVM bytecode DESIGN Photonic · Neuro ROADMAP SOLID = LIVE TARGET · DASHED = NOT YET SHIPPED · MIT-LICENSED COMPILER · NO PLATFORM LOCK-IN
Features

Six pieces of the compiler

Multi-stage

Parse → AST → Process-Matrix IR → optimized IR → target emission. Each stage is inspectable and replaceable.

Live

MetaState routing

The optimizer evaluates a free-energy bound across substrate cost models to choose per-block placement.

Live

Optimization passes

Dead-code elimination, causal-coherence scheduling, kernel fusion, and substrate-aware tiling on the IR.

Live

Post-quantum signing

Compiled artifacts can be signed with CRYSTALS-Dilithium so the binary's provenance is verifiable on-chain.

Live

Multi-backend

One source emits to LLVM (CPU), PTX/HIP (GPU), or QASM3 (QPU). ECG-hive backend is BETA. EVM-target is design-complete.

Live

Agent-native

Compile, sign, and dispatch from an autonomous agent loop. The terminal exposes the full pipeline as commands.

Live
Worked example

From source to QASM3 + USDC settlement

A minimal NWO-ASM program that scores an anomaly signal with the symbolic regressor, then lifts the residual to a 2-qubit process matrix the optimizer can route to a QPU when present, with a classical fallback. Per-call settlement is automatic.

signal.nwo · source
# anomaly score on a 1-D signal, fit symbolic residual, route best path
module signal {
  input  s : f32[8192]
  output r : pmx[2]            # 2-qubit process matrix

  let v = anomaly.score(s)        # free-energy bound
  let e = eml.regress(s, v)       # closed-form residual
  r = pmx.lift(e)                  # causal-coherence channel

  route r via metastate {
    prefer: qpu                  # IBM or Origin Wukong if available
    fallback: gpu               # otherwise nwo-agi distributed GPU
    settle: usdc(base)          # per-call, via splitter — no new contract
  }
}
terminal · compile and emit
# compile and inspect IR
nwo-asm build signal.nwo --emit pmx,qasm3
  → signal.pmx
  → signal.qasm3

# sign and dispatch (settles in USDC on Base)
nwo-asm dispatch signal.qasm3 --backend qpu --wallet $WALLET
  → dispatched to backend = qpu(origin_wukong) · proof = 0xPOI…
  → settled $0.0008 USDC · split 35/35/30 · affiliate (if set) +15%
ISA reference

Core instruction set (stable)

OpSignatureNotes
anomaly.scoref32[N] → f32Free-energy anomaly metric on a signal.
eml.regress(f32[N], f32) → exprClosed-form symbolic regression.
pmx.liftexpr → pmx[k]Lift a symbolic expression into a k-qubit process matrix.
routepmx, policy → handleDefer placement to the MetaState optimizer.
poi.verifyhandle → proofProof of Inference; signed (PQC) and optionally zk.
anchorproof → txPrepare keccak256 calldata to settle on Base.
Tech stack

What it's built on

LayerTechStatus
Parser / IRRust · tree-sitter grammar · custom Process-Matrix IRLive
OptimizerMetaState kernel · free-energy bound across substrate cost modelsLive
CPU targetLLVM 17 lowering · x86 / ARM / RISC-VLive
GPU targetPTX (CUDA) · HIP (ROCm) · Metal · nwo-agi distributed meshLive
QPU targetOpenQASM 3.0 emission · Qiskit Runtime · Origin QPandaLive
SigningCRYSTALS-Dilithium (PQC) · proof-of-inference attestationLive
SettlementExisting MetaStateSplitter on Base · 35/35/30 + 15% affiliateLive · no new contract
EVM targetEVM bytecode emission for on-chain hooks · Solidity ABI surfaceDesign-complete
Cross-chain bridgeQuantum-secured message relay between chains and NWO-ASMRoadmap
Photonic / neuromorphic / DNA / crystallineBackend interfaces specified; pending hardware integrationRoadmap
Licensing. The compiler, ISA, and reference toolchain are MIT. Build on it, fork it, embed it, ship it — no royalty, no lock-in. Only the connectors that touch live external compute carry per-call USDC settlement.
Open terminal How-to & examples Architecture