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
omega-mv / tests / run_m13_gates.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # tests/run_m13_gates.sh -- Master Qualification Gate Runner for Milestone 13 (OMEGA_MACHINE_GRAPH) |
| 18 | set -eu |
| 19 | |
| 20 | OMEGA_ROOT=$(cd "$(dirname "$0")/.." && pwd -P) |
| 21 | TOOL="$OMEGA_ROOT/${OUT_DIR:-build}/omegatool" |
| 22 | EVIDENCE_DIR="$OMEGA_ROOT/evidence" |
| 23 | RECEIPT="$EVIDENCE_DIR/omega_machine_graph_qualification_receipt.json" |
| 24 | |
| 25 | echo "================================================================================" |
| 26 | echo " AIEN OMEGA SUBSTRATE — MILESTONE 13: OMEGA_MACHINE_GRAPH QUALIFICATION" |
| 27 | echo "================================================================================" |
| 28 | echo "Timestamp: $(date -u +'%Y-%m-%dT%H:%M:%SZ')" |
| 29 | echo "Host: $(uname -s) $(uname -m)" |
| 30 | echo "" |
| 31 | |
| 32 | # Step 1: Clean build |
| 33 | echo "[*] Step 1: Rebuilding OMEGA substrate and omegatool from source..." |
| 34 | make -C "$OMEGA_ROOT" clean |
| 35 | make -C "$OMEGA_ROOT" |
| 36 | echo " Build OK." |
| 37 | echo "" |
| 38 | |
| 39 | # Step 2: Run all 10 M13 qualification gates |
| 40 | echo "[*] Step 2: Evaluating 10 canonical M13 qualification gates..." |
| 41 | "$TOOL" --run-m13-gates |
| 42 | echo "" |
| 43 | |
| 44 | # Step 3: Run Demonstration (Formal Machine Hardware Graph & Microarchitecture Disambiguation) |
| 45 | echo "[*] Step 3: Running Demonstration (Formal Machine Hardware Graph & Microarchitecture Disambiguation)..." |
| 46 | "$TOOL" --reference-demonstrate-machine |
| 47 | echo "" |
| 48 | |
| 49 | # Step 4: Regression checks (M4 through M11) |
| 50 | echo "[*] Step 4: Running regression checks across M4 through M11..." |
| 51 | "$TOOL" --run-gates |
| 52 | "$TOOL" --run-m5-gates |
| 53 | "$TOOL" --run-m6-gates |
| 54 | "$TOOL" --run-m7-gates |
| 55 | "$TOOL" --run-m8-gates |
| 56 | "$TOOL" --run-m9-gates |
| 57 | "$TOOL" --run-m10-gates |
| 58 | "$TOOL" --run-m11-gates |
| 59 | echo " Regression checks OK: all M4 through M11 gates passed (81 gates)." |
| 60 | echo "" |
| 61 | |
| 62 | # Step 5: Dump and hash test vectors and binaries |
| 63 | echo "[*] Step 5: Computing artifact digests..." |
| 64 | mkdir -p "$EVIDENCE_DIR" |
| 65 | sha256sum "$OMEGA_ROOT/src/omega_machine."* \ |
| 66 | "$TOOL" > "$EVIDENCE_DIR/m13_corpus_digests.txt" |
| 67 | |
| 68 | DIGEST_MACHINE=$(sha256sum "$OMEGA_ROOT/src/omega_machine.c" | awk '{print $1}') |
| 69 | DIGEST_MACHINE_H=$(sha256sum "$OMEGA_ROOT/src/omega_machine.h" | awk '{print $1}') |
| 70 | DIGEST_TOOL=$(sha256sum "$TOOL" | awk '{print $1}') |
| 71 | PARENT_COMMIT="8e0a50a7c4493ebf49298457636e05bfba9c1e7a" |
| 72 | SOURCE_PARENT_COMMIT="$PARENT_COMMIT" |
| 73 | QUALIFIED_COMMIT="${QUALIFIED_IMPLEMENTATION_COMMIT:-$(git -C "$OMEGA_ROOT" rev-parse HEAD)}" |
| 74 | RECEIPT_COMMIT="${RECEIPT_COMMIT:-pending-receipt-commit}" |
| 75 | |
| 76 | echo "[*] Step 6: Generating formal qualification receipt: $RECEIPT..." |
| 77 | cat <<EOF > "$RECEIPT" |
| 78 | { |
| 79 | "milestone": "MILESTONE 13 — OMEGA_MACHINE_GRAPH", |
| 80 | "status": "QUALIFIED / PASS", |
| 81 | "contract_id": "CONTRACT-OMEGA-MACHINE-GRAPH-M13", |
| 82 | "generated_at": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')", |
| 83 | "source_parent_commit": "$SOURCE_PARENT_COMMIT", |
| 84 | "qualified_implementation_commit": "$QUALIFIED_COMMIT", |
| 85 | "receipt_commit": "$RECEIPT_COMMIT", |
| 86 | "git_commit": "$QUALIFIED_COMMIT", |
| 87 | "host": { |
| 88 | "os": "$(uname -s)", |
| 89 | "arch": "$(uname -m)", |
| 90 | "compiler": "$(${CC:-gcc} --version | head -n 1)" |
| 91 | }, |
| 92 | "artifacts": { |
| 93 | "src/omega_machine.c": { "sha256": "$DIGEST_MACHINE" }, |
| 94 | "src/omega_machine.h": { "sha256": "$DIGEST_MACHINE_H" }, |
| 95 | "build/omegatool": { "sha256": "$DIGEST_TOOL" } |
| 96 | }, |
| 97 | "machine_graph_properties": { |
| 98 | "hardware_profiles": "NVIDIA DGX Spark Grace V2 and QEMU virt AArch64 modeled", |
| 99 | "canonical_identity": "OMG0 wire serialization with SHA-256 MACHINE_ID determinism", |
| 100 | "physics_authority": "Ingests verified physical machine descriptors signed by Physics authority", |
| 101 | "topological_conformance": "Enforces strict cache level monotonicity, power-of-two line sizes, and valid register file bounds", |
| 102 | "realization_foundation": "Provides grounded cycle latency cost functions for M14 G_S x G_M -> G_R synthesis" |
| 103 | }, |
| 104 | "qualification_gates": { |
| 105 | "total": 10, |
| 106 | "passed": 10, |
| 107 | "gates": { |
| 108 | "OMEGA_MACHINE_INIT_PASS": "PASS", |
| 109 | "OMEGA_MACHINE_PIPELINE_PASS": "PASS", |
| 110 | "OMEGA_MACHINE_REGISTER_FILE_PASS": "PASS", |
| 111 | "OMEGA_MACHINE_MEMORY_HIERARCHY_PASS": "PASS", |
| 112 | "OMEGA_MACHINE_PHYSICS_INGRESS_PASS": "PASS", |
| 113 | "OMEGA_MACHINE_CANONICAL_ID_PASS": "PASS", |
| 114 | "OMEGA_MACHINE_TOPOLOGY_DIFFERENCE_PASS": "PASS", |
| 115 | "OMEGA_MACHINE_CYCLE_PREVENTION_PASS": "PASS", |
| 116 | "OMEGA_MACHINE_COST_EVALUATION_PASS": "PASS", |
| 117 | "OMEGA_MACHINE_RECEIPT_PASS": "PASS" |
| 118 | } |
| 119 | }, |
| 120 | "sovereignty_accounting": { |
| 121 | "llvm_dependency": false, |
| 122 | "gnu_as_dependency": false, |
| 123 | "gcc_asm_dependency": false, |
| 124 | "jit_compiler_dependency": false, |
| 125 | "python_dependency": false, |
| 126 | "realizer_lineage": "Direct sovereign C99 formal machine hardware graph and microarchitecture topology modeling engine" |
| 127 | } |
| 128 | } |
| 129 | EOF |
| 130 | |
| 131 | echo "" |
| 132 | echo "================================================================================" |
| 133 | echo " MILESTONE 13 (OMEGA_MACHINE_GRAPH) QUALIFICATION COMPLETE: 10/10 GATES PASS" |
| 134 | echo " Cumulative Sovereign Gates Passed: 91/91" |
| 135 | echo " Receipt generated at: $RECEIPT" |
| 136 | echo "================================================================================" |