interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / spec / realize_synth.md

85 lines · 4282 bytes Raw Blame History Rendered
1# Specification: Milestone 14 — Omega Realization Synthesis (`OMEGA_REALIZATION_SYNTHESIS`)
2
3```text
4Document ID: SPEC-OMEGA-M14
5Milestone: Milestone 14 (OMEGA_REALIZATION_SYNTHESIS)
6Classification: Sovereign Machine Canonical Specification
7Target Substrate: Automated $G_S \times G_M \to G_R$ Synthesis Targeting Declared Hardware Capabilities
8Status: SPECIFIED / IN PROGRESS (aien-spark/omega#19, aien-spark/aien-architecture#25)
9Lineage: SILICON -> ATLAS (M1) -> PHYSICS (M2/M3) -> OMEGA (M4-M14) -> AIEN
10```
11
12---
13
14## 1. Executive Summary & Doctrine
15
16Milestone 14 establishes **automated machine-aware realization synthesis**:
17
18> **LOWERING IS NOT A HARDCODED COMPILER BACKEND. REALIZATION IS SYNTHESIS: $G_S \times G_M \to G_R$. THE MACHINE DISCOVERS HOW BEST TO EXECUTE A GIVEN SEMANTIC GRAPH ON PHYSICAL SILICON.**
19
20In the sovereign hierarchy:
21- $G_S$ defines what computation means.
22- $G_M$ defines the physical hardware topology (issue width, units, latencies, memory hierarchy), certified by Physics.
23- $G_R$ is the synthesized native realization, bound to BOTH $G_S$ and $G_M$ via a cryptographic triple binding:
24 $$\text{REALIZATION\_ID} = \text{SHA256}(\text{OMG0} \mid \text{SEMANTIC\_ID} \mid \text{MACHINE\_ID} \mid \text{code\_bytes})$$
25
26---
27
28## 2. Core Invariants
29
301. **Triple Identity Binding**: $REALIZATION_ID$ deterministically incorporates $SEMANTIC_ID$ ($G_S$), $MACHINE_ID$ ($G_M$), and machine code bytes.
312. **Machine-Aware Scheduling**: Synthesis evaluates candidate instruction schedules and registers to exploit $G_M$'s issue width (e.g., 4-wide dispatch on DGX Spark Neoverse V2 vs 2-wide on QEMU virt) and functional unit concurrency.
323. **Strict Semantic Preservation**: Executing $G_R$ natively produces outputs bit-for-bit identical to semantic evaluation of $G_S$.
334. **Zero Foreign Toolchain**: Direct machine byte generation without LLVM, Clang, GCC assembler, or GNU `as`.
345. **Mandatory M7 Verification**: Every synthesized realization passes $V_0$ structural, $V_1$ differential, and $V_2$ property verification before admission.
35
36---
37
38## 3. Data Structures & Declarations
39
40```c
41typedef struct {
42 const OmegaProgram *program;
43 const OmegaMachineGraph *machine;
44 bool optimize_latency;
45 uint32_t max_unroll_factor;
46} RealizationSynthesisTask;
47
48typedef struct {
49 bool solved;
50 RealizationObject realization;
51 SemanticId realization_id;
52 uint32_t estimated_cycles;
53 uint32_t code_bytes_len;
54 VerifyReport verify_report;
55} RealizationSynthesisResult;
56
57int omega_synthesize_realization(const RealizationSynthesisTask *task,
58 RealizationSynthesisResult *result);
59```
60
61---
62
63## 4. Qualification Gates
64
651. `OMEGA_REAL_SYNTH_INIT_PASS`: Synthesis task initialized with valid $G_S$ and $G_M$.
662. `OMEGA_REAL_SYNTH_TRIPLE_ID_PASS`: `REALIZATION_ID` deterministically incorporates $SEMANTIC_ID$ and $MACHINE_ID$.
673. `OMEGA_REAL_SYNTH_SCHEDULE_OPT_PASS`: Machine-aware schedule optimization generates valid AArch64 machine words.
684. `OMEGA_REAL_SYNTH_DGX_SPARK_PASS`: Realization specialized for 4-wide DGX Spark Grace V2 pipeline.
695. `OMEGA_REAL_SYNTH_QEMU_VIRT_PASS`: Realization specialized for 2-wide QEMU virt pipeline.
706. `OMEGA_REAL_SYNTH_SEMANTIC_PARITY_PASS`: Native execution matches semantic evaluation on test inputs.
717. `OMEGA_REAL_SYNTH_V0_STRUCTURAL_PASS`: Synthesized realization passes M7 V0 structural verification.
728. `OMEGA_REAL_SYNTH_V1_DIFFERENTIAL_PASS`: Synthesized realization passes M7 V1 differential evaluation.
739. `OMEGA_REAL_SYNTH_V2_PROPERTY_PASS`: Synthesized realization passes M7 V2 property verification.
7410. `OMEGA_REAL_SYNTH_RECEIPT_PASS`: Master qualification receipt generated binding $G_S$, $G_M$, and $G_R$.
75
76---
77
78## 5. Amendment: program-driven realization
79
80Until `spec/program-realization.md`, `omega_synthesize_realization` emitted the fixed
81`f(x) = 3x - 2` schedule for every program and checked it against hard-coded `3x - 2` values.
82It now compiles the task's program body (schedule chosen from $G_M$, meaning never) and
83verifies native execution against the independent semantic evaluator. The ten gates above
84still pass; for the 3x-2 program the DGX Spark (preload) and QEMU virt (sequential) bytes are
85unchanged.