interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / mk / dual_applicability.mk

47 lines · 2760 bytes Raw Blame History
1# DUAL applicability experiment (ARCH-0031 / ADR 0031, offline evidence lane):
2# when is aggregate (macroscopic) load control predictive, and when must
3# discrete per-item scheduling dominate? Standalone: pure seeded OM-2 under
4# src/dual_experiment/, tools/dual_experiment/, tests/dual_experiment/,
5# docs/dual/, evidence/DUAL/applicability/. Picked up by `-include mk/*.mk`;
6# not part of `all` or `test`. Nothing in src/runtime/ includes or links it.
7# EXPERIMENT ONLY: no production gate, no production classifier.
8#
9# test-dual-applicability unit suite (determinism, ledger, predictor, controls)
10# built with seed/out/omc, plus the purity check
11# dual-applic-purity static purity scan on src/dual_experiment/*.om
12# dual-applic-run run the campaign, write evidence/DUAL/applicability/
13ifndef DUAL_APPLICABILITY_MK
14DUAL_APPLICABILITY_MK := 1
15.PHONY: test-dual-applicability dual-applic-purity dual-applic-run
16DAP_DIR = $(OUT_DIR)/dual-applicability
17DAP_OMC = seed/out/omc
18DAP_LIB = src/dual_experiment/applic.om
19DAP_EVIDENCE = evidence/DUAL/applicability
20DAP_FORBIDDEN = '\b(rx_[A-Za-z0-9_]*|aienos_[A-Za-z0-9_]*|argus_[A-Za-z0-9_]*|forge_[A-Za-z0-9_]*|aegis[A-Za-z0-9_]*|mmap|mprotect|fork|exec|execprog|execenv|execpure|dlopen|system|socket|socknew|connect|bind|listen|accept|fopen|fclose|read|write|pread|pwrite|unlink|makedir|rmdir|chdir|chmod|chown|killpid|waitpid|pipefds|dupfd|mapnew|devctl|uvmctl|vfioctl|random|monons|realns|sleepns|open)\b'
21
22# The experiment library is a pure calculator: no authority, World, generation,
23# capability, memory-mapping, process, network or file host words.
24dual-applic-purity: src/dual_experiment/applic.om src/dual_experiment/applic_core.om
25 @for f in src/dual_experiment/*.om; do \
26 if grep -v '^[[:space:]]*note\([[:space:]]\|$$\)' "$$f" | grep -En $(DAP_FORBIDDEN) ; then \
27 echo "dual-applic-purity: $$f references a forbidden operation"; exit 1; \
28 fi; \
29 done
30 @echo "dual-applic-purity: src/dual_experiment/*.om reference no forbidden symbol or host word"
31
32$(DAP_DIR)/test_applic: $(DAP_LIB) tests/dual_experiment/test_applic.om $(DAP_OMC)
33 @mkdir -p $(DAP_DIR)
34 cat $(DAP_LIB) tests/dual_experiment/test_applic.om | $(DAP_OMC) > $@ && chmod +x $@
35
36$(DAP_DIR)/applic_run: $(DAP_LIB) tools/dual_experiment/applic_run.om $(DAP_OMC)
37 @mkdir -p $(DAP_DIR)
38 cat $(DAP_LIB) tools/dual_experiment/applic_run.om | $(DAP_OMC) > $@ && chmod +x $@
39
40test-dual-applicability: dual-applic-purity $(DAP_DIR)/test_applic
41 ./$(DAP_DIR)/test_applic
42 @echo "test-dual-applicability: determinism, ledger, predictor and negative-control checks pass (pure seeded OM-2)"
43
44dual-applic-run: $(DAP_DIR)/applic_run
45 @mkdir -p $(DAP_EVIDENCE)
46 ./$(DAP_DIR)/applic_run $(DAP_EVIDENCE)
47endif