interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / milestone-9-spec.md

83 lines · 4649 bytes Raw Blame History Rendered
1# Specification: Milestone 9 — Omega Synthesis V0 (`OMEGA_SYNTHESIS_V0`)
2
3```text
4Document ID: SPEC-OMEGA-M9
5Milestone: Milestone 9 (OMEGA_SYNTHESIS_V0)
6Classification: Sovereign Machine Canonical Specification
7Target Substrate: Deterministic Typed Program Synthesis over Base Primitives
8Status: COMPLETE (aien-spark/aien-architecture#21)
9Lineage: SILICON -> ATLAS (M1) -> PHYSICS (M2/M3) -> OMEGA (M4-M9) -> AIEN
10```
11
12---
13
14## 1. Executive Summary & Core Invariants
15
16Milestone 8 established explicit program objects (`OMEGA_PROGRAM`), typed contracts, monotonic cost accounting, and algebraic composition ($C = A \circ B$).
17Milestone 9 establishes the first sovereign program synthesis engine (`OMEGA_SYNTHESIS_V0`):
18
19> **AIEN / SEARCH PROPOSES. OMEGA VERIFIES. EVIDENCE SURVIVES.**
20
21The synthesis engine discovers programs satisfying declarative input/output specifications (`SynthesisTask`) without receiving an implementation:
221. **Deterministic Typed Search**: Bottom-up enumerative search over typed base primitives (arithmetic, bitwise, constants) bounded by search depth $D \le 3$ and monotonic cost budget.
232. **Equivalence & Canonical Deduplication**: Discard semantically identical or dominated candidate programs using observational equivalence pruning (canonical behavioral signatures) to prevent combinatorial explosion.
243. **Fail-Closed Type Pruning**: Intermediate type unification rejects ill-typed program compositions before realization or execution.
254. **Trusted Multi-Tier Verification**:
26 - $V_0$: Structural validation rejects malformed instructions, invalid registers, and boundary violations.
27 - $V_1$: Test suite execution evaluates candidates against all $N$ test cases on bare-metal AArch64.
28 - $V_2$: Invariant checking verifies property bounds and safety.
295. **Target Demonstrations**:
30 - Discovers non-trivial target functions purely from input-output examples:
31 - Linear affine transformation: $f(x) = 2x + 1$
32 - Composed transformation: $f(x) = 3x - 2$
33 - Discovered programs are realized to native AArch64 machine code, pass M7 verification, and produce canonical execution receipts.
34
35---
36
37## 2. Synthesis Engine Data Model & Architecture
38
39```c
40typedef struct {
41 size_t candidates_generated;
42 size_t candidates_pruned_type;
43 size_t candidates_pruned_equiv;
44 size_t candidates_failed_v1;
45 size_t solutions_found;
46} SynthesisStats;
47
48typedef struct {
49 uint32_t max_depth; /* Max composition depth (1..3) */
50 uint32_t max_cost; /* Maximum instruction count budget */
51 size_t max_candidates; /* Search cutoff */
52 bool deduplicate_equiv; /* Enable observational equivalence pruning */
53} SynthesisConfig;
54
55typedef struct {
56 bool solved;
57 OmegaProgram solution;
58 VerifyReport verify_report;
59 SynthesisStats stats;
60} SynthesisResult;
61
62int omega_synthesize(const SynthesisTask *task, const SynthesisConfig *config, SynthesisResult *result);
63```
64
65### Search Invariants:
661. **Monotonic Progression**: Candidate exploration proceeds strictly by increasing depth $d = 1, 2, \dots$ and increasing cost.
672. **Untrusted Proposer**: Candidate programs generated by search are untrusted proposals until validated through the M7 verification ladder.
683. **Receipt Provenance**: Synthesis qualification produces an immutable cryptographic receipt binding Task ID, Solution Program ID, and native Realization ID.
69
70---
71
72## 3. Qualification Gates for M9
73
741. `OMEGA_SYNTHESIS_PRIMITIVES_PASS`: Base primitive program bank constructed (arithmetic, bitwise, constants).
752. `OMEGA_SYNTHESIS_SEARCH_ORDERING_PASS`: Deterministic search strictly follows monotonic depth and cost ordering.
763. `OMEGA_SYNTHESIS_TYPE_PRUNING_PASS`: Ill-typed candidates pruned at composition boundary.
774. `OMEGA_SYNTHESIS_EQUIV_PRUNING_PASS`: Canonically equivalent/dominated candidate programs deduplicated and pruned.
785. `OMEGA_SYNTHESIS_V0_STRUCTURAL_PASS`: Generated candidates subject to M7 V0 structural validation.
796. `OMEGA_SYNTHESIS_V1_IO_FILTERING_PASS`: Candidate evaluation against input/output test suite eliminates non-conforming programs.
807. `OMEGA_SYNTHESIS_V2_PROPERTY_PASS`: Winning synthesized program passes M7 V2 invariant checking.
818. `OMEGA_SYNTHESIS_TARGET_AFFINE_PASS`: Sovereign engine discovers $f(x) = 2x + 1$ without human hint or implementation.
829. `OMEGA_SYNTHESIS_TARGET_COMPOSED_PASS`: Sovereign engine discovers $f(x) = 3x - 2$ via multi-step composition.
8310. `OMEGA_SYNTHESIS_RECEIPT_PASS`: Qualified synthesis produces canonical cryptographic evidence receipt binding Task ID, Solution Program ID, and Realization ID.