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
| 1 | # ANS, Inertial Alignment v1 (docs/ans/INERTIAL_ALIGNMENT_SPEC_V1.md, ARCH-0032). |
| 2 | # Pure seeded OM-2 standalone module under src/ans/ and tests/ans/. |
| 3 | # Picked up by `-include mk/*.mk`; not part of `all` or `test`. Nothing in |
| 4 | # src/runtime/ includes or links it. ANS is advisory: it never authorizes or promotes. |
| 5 | # |
| 6 | # test-ans unit suite (10 tests + 6 frozen SHA-256 goldens), built with seed/out/omc |
| 7 | # ans-purity checks src/ans/*.om against forbidden runtime/authority/syscall/promote symbols |
| 8 | # test-inertial-alignment both |
| 9 | ifndef ANS_MK |
| 10 | ANS_MK := 1 |
| 11 | .PHONY: test-ans ans-purity test-inertial-alignment |
| 12 | ANS_DIR = $(OUT_DIR)/tests-ans |
| 13 | ANS_FORBIDDEN = 'rx_|aienos_|argus_|forge_|aegis|rx_gen_promote|\b(fopen|fclose|read|write|stat|renames|socknew|bind|listen|accept|send|recv|connect|execve|fork|mmap|malloc|calloc|realloc|free)\b' |
| 14 | |
| 15 | ans-purity: src/ans/ans.om src/ans/ans_core.om |
| 16 | @for f in src/ans/ans.om src/ans/ans_core.om; do \ |
| 17 | if sed -E '/^[[:space:]]*note([[:space:]].*)?$$/d' "$$f" | grep -nE $(ANS_FORBIDDEN) ; then \ |
| 18 | echo "ans module $$f references a forbidden runtime, authority, syscall or promotion symbol"; exit 1; fi; \ |
| 19 | done |
| 20 | @echo "ans-purity: src/ans/ans.om and src/ans/ans_core.om reference no forbidden symbol and no rx_gen_promote" |
| 21 | |
| 22 | $(ANS_DIR)/test_ans: src/ans/ans.om tests/ans/test_ans.om seed/out/omc |
| 23 | @mkdir -p $(ANS_DIR) |
| 24 | cat src/ans/ans.om tests/ans/test_ans.om | seed/out/omc > $@ |
| 25 | chmod +x $@ |
| 26 | |
| 27 | test-ans: $(ANS_DIR)/test_ans |
| 28 | ./$(ANS_DIR)/test_ans |
| 29 | @echo "test-ans: ANS checks pass (pure seeded OM-2)" |
| 30 | |
| 31 | test-inertial-alignment: ans-purity test-ans |
| 32 | @echo "test-inertial-alignment: Inertial Alignment v1 (ANS) passes" |
| 33 | endif |