# NeuroCC 0.4.0 architecture NeuroCC exposes two compilation modes. They share the same frozen checkpoints, ABI checks, tensor backend, allocator, encoder, and output contract. ```text source text │ ├── ordinary mode (default) │ lexical packing → syntax/semantic tensors → SSA → backend │ └── hyperoptimization mode (opt-in) source SSA capture ├─ H4/H5 learned parameterized memory ├─ H6 expression-hole rules ├─ H7 alternative rules ├─ H7 neural retrieval ├─ structural/ABI compatibility guards └─ learned runtime-cost selection │ └── existing tensor backend → x86-64 function bytes ``` ## Ordinary compilation The default path is the qualified D5A implementation. It performs source-only lexical packing and validation, frozen neural syntax recognition, deterministic semantic preparation, tensor SSA construction, tensor instruction selection, compact liveness, learned allocation scoring, and frozen instruction encoding. The D5-Final scheduler remains available as an experimental implementation. The semantic and backend computations are tensor-first and run on CPU or CUDA where supported by the existing release. Host operations remain for source I/O, tokenization, compatibility planning, metadata, and final audit/export. GPU residency is therefore partial, not end-to-end. ## Optional H7 hyperoptimization H7 is inference-only and disabled by default. It loads four frozen artifacts: 1. H4/H5 parameterized transformation memory and graph retrieval model. 2. H6/H7 guarded expression-hole and alternative transformation rules. 3. H7 neural retrieval model. 4. H7 learned runtime-cost selector. The optimizer sees only the input source and the SSA packet captured from that source. It does not load training witnesses, expected targets, reference outputs, native oracle results, or evaluation labels. Candidate source/SSA transformations must pass exact structural and ABI guards. Each candidate is compiled by the existing backend. If no candidate is valid, selection fails, or an exception occurs, the ordinary result is returned. This mode does not replace neural components with a conventional compiler. The guard and selection logic is deterministic control flow around frozen neural retrieval and tensor backend calls. ## Contract The emitted bytes are candidate isolated x86-64 System V function bytes with no calls or relocations. The package does not assemble, link, execute, or claim semantic equivalence for arbitrary C/C++ programs. H7's native results are finite checks of the frozen research population, not a general proof.