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/mk/polyglot.mk # 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 / mk / polyglot.mk` 64 lines ยท 3039 bytes Raw Blame History 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_ENC_OM := src/polyglot/omx_encoder.om 22 PG_VERIFY := $(PG_OUT)/verify_polyglot 23 PG_BENCH := $(PG_OUT)/bench_polyglot 24 PG_EXPLAIN := $(PG_OUT)/polyglot_explain 25 PG_MANIFEST := $(PG_OUT)/manifest.tsv 26 27 $(PG_VERIFY): $(PG_COMMON_OM) $(PG_ENC_OM) tests/polyglot/verify_polyglot.om $(PG_OMC) 28 @mkdir -p $(dir $@) 29 cat $(PG_COMMON_OM) $(PG_ENC_OM) tests/polyglot/verify_polyglot.om | $(PG_OMC) > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ 30 31 $(PG_BENCH): $(PG_COMMON_OM) $(PG_ENC_OM) tests/polyglot/bench_polyglot.om $(PG_OMC) 32 @mkdir -p $(dir $@) 33 cat $(PG_COMMON_OM) $(PG_ENC_OM) tests/polyglot/bench_polyglot.om | $(PG_OMC) > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ 34 35 $(PG_EXPLAIN): $(PG_COMMON_OM) tests/polyglot/polyglot_explain.om $(PG_OMC) 36 @mkdir -p $(dir $@) 37 cat $(PG_COMMON_OM) tests/polyglot/polyglot_explain.om | $(PG_OMC) > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ 38 39 $(PG_MANIFEST): $(PG_BENCH) 40 @mkdir -p $(dir $@) 41 @printf 'src/polyglot/omx_common.om\tom2\t%s\tcat src/polyglot/omx_common.om src/polyglot/omx_encoder.om tests/polyglot/bench_polyglot.om | $(PG_OMC) > @OUT@\n' '$(PG_BENCH)' > $@.tmp 42 @printf 'src/polyglot/omx_encoder.om\tom2\t%s\t-\n' '$(PG_BENCH)' >> $@.tmp 43 @mv $@.tmp $@ 44 45 test-polyglot: $(PG_VERIFY) $(PG_BENCH) 46 ./$(PG_VERIFY) 47 ./$(PG_BENCH) --selftest 48 49 bench-polyglot: $(PG_BENCH) $(PG_MANIFEST) 50 @mkdir -p $(POLYGLOT_EVIDENCE) 51 ./$(PG_BENCH) --spec spec/polyglot-0.md --manifest $(PG_MANIFEST) --out $(POLYGLOT_EVIDENCE) $(POLYGLOT_BENCH_ARGS) 52 53 bench-polyglot-smoke: $(PG_BENCH) $(PG_MANIFEST) 54 @mkdir -p $(PG_OUT)/smoke 55 ./$(PG_BENCH) --spec spec/polyglot-0.md --manifest $(PG_MANIFEST) --out $(PG_OUT)/smoke --smoke --samples 3 --sparsity 0 $(POLYGLOT_BENCH_ARGS) 56 57 polyglot-explain: $(PG_EXPLAIN) 58 ./$(PG_EXPLAIN) --spec spec/polyglot-0.md --receipts $(POLYGLOT_RECEIPTS) $(if $(POLYGLOT_RUN),--run $(POLYGLOT_RUN)) > $(PG_OUT)/polyglot_explain.1.txt 59 ./$(PG_EXPLAIN) --spec spec/polyglot-0.md --receipts $(POLYGLOT_RECEIPTS) $(if $(POLYGLOT_RUN),--run $(POLYGLOT_RUN)) > $(PG_OUT)/polyglot_explain.2.txt 60 cmp $(PG_OUT)/polyglot_explain.1.txt $(PG_OUT)/polyglot_explain.2.txt 61 @cat $(PG_OUT)/polyglot_explain.1.txt 62 @echo "polyglot-explain: two runs byte-identical ($(PG_OUT)/polyglot_explain.1.txt)" 63 64 endif # POLYGLOT_MK_LOADED