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
omega-mv / mk / estimation_v3.mk
| 1 | # ESTIMATION-2 protocol v3: discrete predictive layer (src/estimation/est_pred.c). |
| 2 | # Picked up by `-include mk/*.mk`; not part of `all` or `test`. |
| 3 | # |
| 4 | # test-est-pred hostile suite, plain + ASan/UBSan |
| 5 | # est-v3-purity nm -u on est_pred.o against EST_FORBIDDEN |
| 6 | # test-estimation-v3 both |
| 7 | ifndef ESTIMATION_V3_MK |
| 8 | ESTIMATION_V3_MK := 1 |
| 9 | include mk/estimation.mk |
| 10 | .PHONY: test-est-pred est-v3-purity test-estimation-v3 |
| 11 | ESTV3_DIR = $(OUT_DIR)/tests-estimation-v3 |
| 12 | ESTV3_SRCS = src/estimation/est_pred.c src/estimation/est_mix.c $(EST_TYPES_SRCS) |
| 13 | ESTV3_HDRS = src/estimation/est_pred.h $(EST_HDRS) |
| 14 | |
| 15 | $(ESTV3_DIR)/est_pred.o: src/estimation/est_pred.c $(ESTV3_HDRS) |
| 16 | @mkdir -p $(ESTV3_DIR) |
| 17 | $(CC) $(EST_CFLAGS) -c -o $@ $< |
| 18 | |
| 19 | est-v3-purity: $(ESTV3_DIR)/est_pred.o |
| 20 | @if nm -u $^ | grep -E $(EST_FORBIDDEN) ; then \ |
| 21 | echo "est_pred.o references an operation an estimator must not have"; exit 1; fi |
| 22 | @echo "est-v3-purity: est_pred.o references no forbidden symbol" |
| 23 | |
| 24 | EST_OM_PRED = $(EST_OM_TYPES) src/estimation/est_mix.om src/estimation/est_pred.om |
| 25 | |
| 26 | $(ESTV3_DIR)/test_est_pred: $(EST_OM_PRED) tests/estimation/test_est_pred.om |
| 27 | @mkdir -p $(ESTV3_DIR) |
| 28 | cat $^ | $(EST_OMC) > $@ && chmod +x $@ |
| 29 | |
| 30 | test-est-pred: $(ESTV3_DIR)/test_est_pred |
| 31 | ./$(ESTV3_DIR)/test_est_pred |
| 32 | @echo "test-est-pred: est_pred contract, numerics and calibration scenarios pass (pure OM-2)" |
| 33 | |
| 34 | test-estimation-v3: est-v3-purity test-est-pred |
| 35 | @echo "test-estimation-v3: ESTIMATION-2 v3 predictive layer passes" |
| 36 | endif |