Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/blob/main/docs/milestone-9-spec.md # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-architecture-mv / docs / milestone-9-spec.md` 83 lines · 4649 bytes Raw Blame History Source # Specification: Milestone 9 — Omega Synthesis V0 (`OMEGA_SYNTHESIS_V0`) ``` Document ID: SPEC-OMEGA-M9 Milestone: Milestone 9 (OMEGA_SYNTHESIS_V0) Classification: Sovereign Machine Canonical Specification Target Substrate: Deterministic Typed Program Synthesis over Base Primitives Status: COMPLETE (aien-spark/aien-architecture#21) Lineage: SILICON -> ATLAS (M1) -> PHYSICS (M2/M3) -> OMEGA (M4-M9) -> AIEN ``` ## 1. Executive Summary & Core Invariants Milestone 8 established explicit program objects (`OMEGA_PROGRAM`), typed contracts, monotonic cost accounting, and algebraic composition ($C = A \circ B$). Milestone 9 establishes the first sovereign program synthesis engine (`OMEGA_SYNTHESIS_V0`): AIEN / SEARCH PROPOSES. OMEGA VERIFIES. EVIDENCE SURVIVES. The synthesis engine discovers programs satisfying declarative input/output specifications (`SynthesisTask`) without receiving an implementation: - 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. - Equivalence & Canonical Deduplication: Discard semantically identical or dominated candidate programs using observational equivalence pruning (canonical behavioral signatures) to prevent combinatorial explosion. - Fail-Closed Type Pruning: Intermediate type unification rejects ill-typed program compositions before realization or execution. - Trusted Multi-Tier Verification: - $V_0$: Structural validation rejects malformed instructions, invalid registers, and boundary violations. - $V_1$: Test suite execution evaluates candidates against all $N$ test cases on bare-metal AArch64. - $V_2$: Invariant checking verifies property bounds and safety. - Target Demonstrations: - Discovers non-trivial target functions purely from input-output examples: - Linear affine transformation: $f(x) = 2x + 1$ - Composed transformation: $f(x) = 3x - 2$ - Discovered programs are realized to native AArch64 machine code, pass M7 verification, and produce canonical execution receipts. ## 2. Synthesis Engine Data Model & Architecture ``` typedef struct { size_t candidates_generated; size_t candidates_pruned_type; size_t candidates_pruned_equiv; size_t candidates_failed_v1; size_t solutions_found; } SynthesisStats; typedef struct { uint32_t max_depth; /* Max composition depth (1..3) */ uint32_t max_cost; /* Maximum instruction count budget */ size_t max_candidates; /* Search cutoff */ bool deduplicate_equiv; /* Enable observational equivalence pruning */ } SynthesisConfig; typedef struct { bool solved; OmegaProgram solution; VerifyReport verify_report; SynthesisStats stats; } SynthesisResult; int omega_synthesize(const SynthesisTask *task, const SynthesisConfig *config, SynthesisResult *result); ``` ### Search Invariants: - Monotonic Progression: Candidate exploration proceeds strictly by increasing depth $d = 1, 2, \dots$ and increasing cost. - Untrusted Proposer: Candidate programs generated by search are untrusted proposals until validated through the M7 verification ladder. - Receipt Provenance: Synthesis qualification produces an immutable cryptographic receipt binding Task ID, Solution Program ID, and native Realization ID. ## 3. Qualification Gates for M9 - `OMEGA_SYNTHESIS_PRIMITIVES_PASS`: Base primitive program bank constructed (arithmetic, bitwise, constants). - `OMEGA_SYNTHESIS_SEARCH_ORDERING_PASS`: Deterministic search strictly follows monotonic depth and cost ordering. - `OMEGA_SYNTHESIS_TYPE_PRUNING_PASS`: Ill-typed candidates pruned at composition boundary. - `OMEGA_SYNTHESIS_EQUIV_PRUNING_PASS`: Canonically equivalent/dominated candidate programs deduplicated and pruned. - `OMEGA_SYNTHESIS_V0_STRUCTURAL_PASS`: Generated candidates subject to M7 V0 structural validation. - `OMEGA_SYNTHESIS_V1_IO_FILTERING_PASS`: Candidate evaluation against input/output test suite eliminates non-conforming programs. - `OMEGA_SYNTHESIS_V2_PROPERTY_PASS`: Winning synthesized program passes M7 V2 invariant checking. - `OMEGA_SYNTHESIS_TARGET_AFFINE_PASS`: Sovereign engine discovers $f(x) = 2x + 1$ without human hint or implementation. - `OMEGA_SYNTHESIS_TARGET_COMPOSED_PASS`: Sovereign engine discovers $f(x) = 3x - 2$ via multi-step composition. - `OMEGA_SYNTHESIS_RECEIPT_PASS`: Qualified synthesis produces canonical cryptographic evidence receipt binding Task ID, Solution Program ID, and Realization ID.