omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
| 1 | # Specification: Milestone 13 — Omega Machine Graph (`OMEGA_MACHINE_GRAPH`) |
| 2 | |
| 3 | ```text |
| 4 | Document ID: SPEC-OMEGA-M13 |
| 5 | Milestone: Milestone 13 (OMEGA_MACHINE_GRAPH) |
| 6 | Classification: Sovereign Machine Canonical Specification |
| 7 | Target Substrate: Formal Machine Hardware Graph ($G_M$) Describing Execution Pipelines and Memory Hierarchies |
| 8 | Status: SPECIFIED / IN PROGRESS (aien-spark/omega#18, aien-spark/aien-architecture#24) |
| 9 | Lineage: SILICON -> ATLAS (M1) -> PHYSICS (M2/M3) -> OMEGA (M4-M13) -> AIEN |
| 10 | ``` |
| 11 | |
| 12 | --- |
| 13 | |
| 14 | ## 1. Executive Summary & Doctrine |
| 15 | |
| 16 | Milestone 13 establishes the formal machine hardware graph substrate (`OMEGA_MACHINE_GRAPH`): |
| 17 | |
| 18 | > **PHYSICS GOVERNS THE MACHINE; OMEGA MODELS ITS CAPACITIES. THE MACHINE GRAPH $G_M$ EXPOSES PHYSICAL REALITY AS AN AUTHORITATIVE, IMMUTABLE REASONING SURFACE WITHOUT DEFILING PURE SEMANTICS.** |
| 19 | |
| 20 | In sovereign architecture: |
| 21 | - $G_S$ defines pure mathematical/computational meaning without machine commitments. |
| 22 | - $G_M$ defines the physical target machine: pipelines, functional execution units, register files, and cache/memory topologies, authorized by Physics. |
| 23 | - $G_R$ (M14) is synthesized from $G_S \times G_M \to G_R$, matching execution structures to physical hardware properties. |
| 24 | |
| 25 | --- |
| 26 | |
| 27 | ## 2. Core Invariants |
| 28 | |
| 29 | 1. **Physics Authority Ingress**: $G_M$ is initialized from capability-bounded physical descriptors verified by Physics. |
| 30 | 2. **Canonical Machine Identity (`MACHINE_ID`)**: Every distinct hardware configuration possesses a deterministic, canonical SHA-256 identity. |
| 31 | 3. **Execution Pipeline Modeling**: Explicit representation of issue width, dispatch ports, execution latency, and throughput per unit type. |
| 32 | 4. **Memory Hierarchy Modeling**: Multi-level cache topologies (L1I, L1D, L2, L3) with capacity, line size, associativity, and cycle latency. |
| 33 | 5. **Topology Disambiguation**: Heterogeneous microarchitectures (e.g., NVIDIA DGX Spark Neoverse V2 vs QEMU Cortex-A57) yield distinct `MACHINE_ID`s. |
| 34 | `MACHINE_ID` here names a hardware *profile*, not a machine: two boxes of the same model share it. The identity of one physical machine is the canonical `AienMachineId` (`src/runtime/aien_machine_id.h`, M20), which FORGE `machine_identity`, the Aienux receipt `machine_id_digest` and ARGUS `machine_id` all carry. |
| 35 | 6. **Realization Cost Grounding**: $G_M$ provides empirical cost functions (cycle latency, register pressure limits) to guide optimal realization synthesis. |
| 36 | |
| 37 | --- |
| 38 | |
| 39 | ## 3. Data Structures & Declarations |
| 40 | |
| 41 | ```c |
| 42 | typedef enum { |
| 43 | UNIT_ALU = 0, |
| 44 | UNIT_BRANCH = 1, |
| 45 | UNIT_MULTIPLIER = 2, |
| 46 | UNIT_DIVIDER = 3, |
| 47 | UNIT_LOAD_STORE = 4, |
| 48 | UNIT_VECTOR = 5, |
| 49 | UNIT_ACCELERATOR_PORT = 6 |
| 50 | } ComputeUnitType; |
| 51 | |
| 52 | typedef struct { |
| 53 | ComputeUnitType type; |
| 54 | uint32_t count; |
| 55 | uint32_t latency_cycles; |
| 56 | uint32_t throughput_per_cycle; |
| 57 | } MachineComputeUnit; |
| 58 | |
| 59 | typedef struct { |
| 60 | uint32_t issue_width; |
| 61 | uint32_t max_in_flight; |
| 62 | bool out_of_order; |
| 63 | size_t unit_count; |
| 64 | MachineComputeUnit units[8]; |
| 65 | } MachinePipeline; |
| 66 | |
| 67 | typedef struct { |
| 68 | uint32_t gpr_count; /* 31 for AArch64 X0-X30 */ |
| 69 | uint32_t gpr_width_bits; /* 64-bit */ |
| 70 | uint32_t vector_count; /* 32 for V0-V31 */ |
| 71 | uint32_t vector_width_bits; /* 128-bit for NEON / 256+ for SVE */ |
| 72 | } MachineRegisterFile; |
| 73 | |
| 74 | typedef struct { |
| 75 | uint32_t level; /* 1 = L1, 2 = L2, 3 = L3 */ |
| 76 | bool is_instruction; |
| 77 | uint64_t size_bytes; |
| 78 | uint32_t line_size_bytes; |
| 79 | uint32_t associativity; |
| 80 | uint32_t latency_cycles; |
| 81 | } MachineCacheLevel; |
| 82 | |
| 83 | typedef struct { |
| 84 | SemanticId machine_id; |
| 85 | char name[64]; |
| 86 | uint8_t target_profile; |
| 87 | MachinePipeline pipeline; |
| 88 | MachineRegisterFile registers; |
| 89 | size_t cache_count; |
| 90 | MachineCacheLevel caches[8]; |
| 91 | uint64_t dram_base; |
| 92 | uint64_t dram_size; |
| 93 | bool is_physics_authorized; |
| 94 | uint8_t physics_receipt_seal[32]; |
| 95 | } OmegaMachineGraph; |
| 96 | ``` |
| 97 | |
| 98 | --- |
| 99 | |
| 100 | ## 4. Qualification Gates |
| 101 | |
| 102 | 1. `OMEGA_MACHINE_INIT_PASS`: Machine graph initialized with valid profile and bounds. |
| 103 | 2. `OMEGA_MACHINE_PIPELINE_PASS`: Multi-unit execution pipeline modeled with issue width and latencies. |
| 104 | 3. `OMEGA_MACHINE_REGISTER_FILE_PASS`: Register file capacities and widths validated. |
| 105 | 4. `OMEGA_MACHINE_MEMORY_HIERARCHY_PASS`: Multi-tier cache hierarchy (L1I, L1D, L2, L3) modeled. |
| 106 | 5. `OMEGA_MACHINE_PHYSICS_INGRESS_PASS`: Physical descriptor ingested and verified against Physics receipt. |
| 107 | 6. `OMEGA_MACHINE_CANONICAL_ID_PASS`: Deterministic bit-for-bit `MACHINE_ID` generation. |
| 108 | 7. `OMEGA_MACHINE_TOPOLOGY_DIFFERENCE_PASS`: Distinct hardware topologies yield distinct `MACHINE_ID`s. |
| 109 | 8. `OMEGA_MACHINE_CYCLE_PREVENTION_PASS`: Topological validation ensures acyclic dependency across memory hierarchy. |
| 110 | 9. `OMEGA_MACHINE_COST_EVALUATION_PASS`: Execution cost modeled accurately according to hardware parameters. |
| 111 | 10. `OMEGA_MACHINE_RECEIPT_PASS`: Master qualification receipt generated with full provenance. |