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 / one-layer-acceptance.mk

38 lines · 2466 bytes Raw Blame History
1# One-layer stage 1: hostile acceptance harness (omega#443, tests/one_layer/acceptance/).
2# Contract: tests/one_layer/acceptance/HARNESS_INTERFACE.md (v1, sha256 pinned in RULES).
3# Picked up by `-include mk/*.mk`; not part of `all` or `test`.
4#
5# one-layer-acceptance-tools build/one_layer/{ola,ola_runner}
6# test-one-layer-acceptance selftest on the PUBLIC sample corpus (tests/one_layer/acceptance/sample/):
7# expected verdict per sample case, every isolation probe blocked + its
8# negative control escaping, two clean replays identical, tally gate
9# logic, and mutants of the harness that each must be caught.
10# Scoring the sealed corpus is NOT a make target: tests/one_layer/acceptance/ola.sh score <tar> <SEALED.sha256>
11ifndef ONE_LAYER_ACCEPTANCE_MK
12ONE_LAYER_ACCEPTANCE_MK := 1
13.PHONY: one-layer-acceptance-tools test-one-layer-acceptance
14OLA_SRC_DIR = tests/one_layer/acceptance
15OLA_DIR = $(OUT_DIR)/one_layer
16OLA_CFLAGS = -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -Isrc -Isrc/compiler
17# the runner links the OSC compiler (oscc's library, mk/compiler.mk OSC_LIB) and the program IR
18# stack (Makefile RESOLVE_PROGRAM_STACK: omega_program_ir_decode + realize + exec)
19OLA_OSC_LIB = $(filter-out src/compiler/oscc_main.c,$(wildcard src/compiler/*.c))
20OLA_PROG_STACK = src/omega_program_ir.c src/omega_program.c src/omega_canonical.c src/omega_validate.c \
21 src/omega_core.c src/omega_codec.c src/aarch64_encoder.c src/aarch64_decoder.c src/omega_realize.c \
22 src/omega_exec.c src/omega_verify.c src/omega_realize_synth.c src/omega_machine.c
23OLA_DEPS = $(wildcard src/compiler/*.h) $(wildcard src/*.h)
24
25$(OLA_DIR)/ola: $(OLA_SRC_DIR)/ola.c src/omega_om_units.c src/sha256.h
26 @mkdir -p $(OLA_DIR)
27 $(CC) $(OLA_CFLAGS) -o $@ $(OLA_SRC_DIR)/ola.c src/omega_om_units.c
28
29$(OLA_DIR)/ola_runner: $(OLA_SRC_DIR)/ola_runner.c $(OLA_OSC_LIB) $(OLA_PROG_STACK) src/omega_om_units.c $(OLA_DEPS)
30 @mkdir -p $(OLA_DIR)
31 $(CC) $(OLA_CFLAGS) -o $@ $(OLA_SRC_DIR)/ola_runner.c $(OLA_OSC_LIB) $(OLA_PROG_STACK) src/omega_om_units.c
32
33one-layer-acceptance-tools: $(OLA_DIR)/ola $(OLA_DIR)/ola_runner
34
35test-one-layer-acceptance: one-layer-acceptance-tools
36 CC="$(CC)" OLA_CFLAGS="$(OLA_CFLAGS)" OLA_RUNNER_SRCS="$(OLA_OSC_LIB) $(OLA_PROG_STACK) src/omega_om_units.c" \
37 OLA_PROG_SRCS="$(OLA_PROG_STACK) src/omega_om_units.c" bash $(OLA_SRC_DIR)/selftest.sh $(abspath $(OLA_DIR))
38endif