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 | # POLYGLOT-0 build and test targets (pure seeded OM-2). spec/polyglot-0.md |
| 2 | # |
| 3 | # Targets: |
| 4 | # test-polyglot pure OM-2 shared verifier + bench_polyglot --selftest |
| 5 | # bench-polyglot timed benchmark writing receipts to $(POLYGLOT_EVIDENCE) |
| 6 | # bench-polyglot-smoke smoke run (N=3) writing receipts to $(OUT_DIR)/polyglot/smoke |
| 7 | # polyglot-explain deterministic explainer over $(POLYGLOT_RECEIPTS), run twice and cmp'd |
| 8 | ifndef POLYGLOT_MK_LOADED |
| 9 | POLYGLOT_MK_LOADED := 1 |
| 10 | |
| 11 | .PHONY: test-polyglot bench-polyglot bench-polyglot-smoke polyglot-explain |
| 12 | |
| 13 | PG_OMC ?= seed/out/omc |
| 14 | PG_OUT := $(OUT_DIR)/polyglot |
| 15 | POLYGLOT_EVIDENCE ?= evidence/POLYGLOT |
| 16 | POLYGLOT_RECEIPTS ?= $(POLYGLOT_EVIDENCE) |
| 17 | POLYGLOT_BENCH_ARGS ?= |
| 18 | POLYGLOT_RUN ?= |
| 19 | |
| 20 | PG_COMMON_OM := src/polyglot/omx_common.om |
| 21 | PG_VERIFY := $(PG_OUT)/verify_polyglot |
| 22 | PG_BENCH := $(PG_OUT)/bench_polyglot |
| 23 | PG_EXPLAIN := $(PG_OUT)/polyglot_explain |
| 24 | |
| 25 | $(PG_VERIFY): $(PG_COMMON_OM) tests/polyglot/verify_polyglot.om |
| 26 | @mkdir -p $(dir $@) |
| 27 | cat $(PG_COMMON_OM) tests/polyglot/verify_polyglot.om | $(PG_OMC) > $@ && chmod +x $@ |
| 28 | |
| 29 | $(PG_BENCH): $(PG_COMMON_OM) tests/polyglot/bench_polyglot.om |
| 30 | @mkdir -p $(dir $@) |
| 31 | cat $(PG_COMMON_OM) tests/polyglot/bench_polyglot.om | $(PG_OMC) > $@ && chmod +x $@ |
| 32 | |
| 33 | $(PG_EXPLAIN): $(PG_COMMON_OM) tests/polyglot/polyglot_explain.om |
| 34 | @mkdir -p $(dir $@) |
| 35 | cat $(PG_COMMON_OM) tests/polyglot/polyglot_explain.om | $(PG_OMC) > $@ && chmod +x $@ |
| 36 | |
| 37 | test-polyglot: $(PG_VERIFY) $(PG_BENCH) |
| 38 | ./$(PG_VERIFY) |
| 39 | ./$(PG_BENCH) --selftest |
| 40 | |
| 41 | bench-polyglot: $(PG_BENCH) |
| 42 | @mkdir -p $(POLYGLOT_EVIDENCE) |
| 43 | ./$(PG_BENCH) --spec spec/polyglot-0.md --out $(POLYGLOT_EVIDENCE) $(POLYGLOT_BENCH_ARGS) |
| 44 | |
| 45 | bench-polyglot-smoke: $(PG_BENCH) |
| 46 | @mkdir -p $(PG_OUT)/smoke |
| 47 | ./$(PG_BENCH) --spec spec/polyglot-0.md --out $(PG_OUT)/smoke --smoke --samples 3 $(POLYGLOT_BENCH_ARGS) |
| 48 | |
| 49 | polyglot-explain: $(PG_EXPLAIN) |
| 50 | ./$(PG_EXPLAIN) --spec spec/polyglot-0.md --receipts $(POLYGLOT_RECEIPTS) $(if $(POLYGLOT_RUN),--run $(POLYGLOT_RUN)) > $(PG_OUT)/polyglot_explain.1.txt |
| 51 | ./$(PG_EXPLAIN) --spec spec/polyglot-0.md --receipts $(POLYGLOT_RECEIPTS) $(if $(POLYGLOT_RUN),--run $(POLYGLOT_RUN)) > $(PG_OUT)/polyglot_explain.2.txt |
| 52 | cmp $(PG_OUT)/polyglot_explain.1.txt $(PG_OUT)/polyglot_explain.2.txt |
| 53 | @cat $(PG_OUT)/polyglot_explain.1.txt |
| 54 | @echo "polyglot-explain: two runs byte-identical ($(PG_OUT)/polyglot_explain.1.txt)" |
| 55 | |
| 56 | endif # POLYGLOT_MK_LOADED |