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/gate11.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 / gate11.sh` 37 lines ยท 1223 bytes Raw Blame History 1 #!/bin/sh 2 # gate11.sh -- reserved-word compatibility. The benchmark corpus used bits, min, max, abs and sqrt as 3 # ordinary names, so those spellings are not keywords; the float words are bitcast/fsqrt/fabs/fmin/ 4 # fmax. This gate pins both halves of that rule. RC=0 only when every case below passed. 5 set -eu 6 R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) 7 cd "$R" 8 B=build/seed/r11 9 T=seed/omc/tests/keywords 10 S=seed/out/omc 11 mkdir -p "$B" 12 [ -x "$S" ] || { printf 'FAIL: %s missing; run sh seed/omega-from-seed.sh first\n' "$S" >&2; exit 1; } 13 bad() { printf 'FAIL: %s\n' "$*" >&2; exit 1; } 14 say() { printf '%s\n' "$*"; } 15 16 set +e 17 "$S" < "$T/names.om" > "$B/names.bin" 2> "$B/names.err" 18 crc=$? 19 set -e 20 [ "$crc" = 0 ] || bad "names: compiler exit $crc ($(cat "$B/names.err"))" 21 chmod +x "$B/names.bin" 22 set +e 23 "$B/names.bin" > /dev/null 24 rrc=$? 25 set -e 26 [ "$rrc" = 10 ] || bad "names: ran $rrc, wanted 10" 27 say "PASS names exit 10 (bits/min/max/abs/sqrt usable as names)" 28 29 set +e 30 "$S" < "$T/neg_reserved.om" > "$B/neg.bin" 2> "$B/neg.err" 31 crc=$? 32 set -e 33 [ "$crc" = 16 ] || bad "neg_reserved: compiler exit $crc, wanted 16 ($(cat "$B/neg.err"))" 34 say "PASS neg_reserved error 16 (bitcast is a keyword)" 35 36 say "PASS gate11 2 cases" 37 exit 0