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/omega-mv/blob/main/seed/omc/gate-objects.sh # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / omc / gate-objects.sh` 30 lines ยท 1078 bytes Raw Blame History 1 #!/bin/sh 2 # Python is an independent object test oracle, not a native linker dependency. 3 set -eu 4 R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) 5 cd "$R" 6 S=${1:-seed/out/omc} 7 case "$S" in /*) ;; *) S="$R/$S";; esac 8 test -x "$S" 9 T=$(mktemp -d) 10 trap 'rm -rf "$T"' EXIT HUP INT TERM 11 python3 seed/omc/tests/objects/check.py "$S" 12 for mode in target stack; do 13 python3 - "$mode" "$T/mut.om" <<'PY' 14 from pathlib import Path 15 import sys 16 s=Path("seed/omc/omc.om").read_text() 17 old,new={"target":("objhdr 16 1","objhdr 16 99"), 18 "stack":("obj64 a_g 87 i","obj64 0")}[sys.argv[1]] 19 assert s.count(old)==1 20 Path(sys.argv[2]).write_text(s.replace(old,new)) 21 PY 22 "$S" < "$T/mut.om" > "$T/mut" 23 chmod +x "$T/mut" 24 rc=0 25 python3 seed/omc/tests/objects/check.py "$T/mut" > "$T/$mode.log" 2>&1 || rc=$? 26 test "$rc" = 1 || { cat "$T/$mode.log"; echo "FAIL object mutant $mode status=$rc"; exit 1; } 27 grep -q "object-$mode-contract" "$T/$mode.log" || { cat "$T/$mode.log"; exit 1; } 28 echo "PASS object compiler mutant $mode caught" 29 done 30 echo "OBJECTGATE PASS mutants=2"