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 / train / omega-llm / tools / contrast / Makefile

41 lines · 1465 bytes Raw Blame History
1# Build on AArch64 Linux with the repository's seeded compiler.
2ROOT := $(abspath ../../../..)
3OUT ?= $(ROOT)/build/omega-contrast
4OMC ?= $(ROOT)/seed/out/omc
5DRIVER := ../wdrive/wbuild.om
6JSON := $(ROOT)/seed/json/json.om
7MODEL := $(addprefix $(ROOT)/,$(shell awk '$$1=="ollm_aarch64" {$$1=""; print}' $(ROOT)/train/units.tsv))
8.DELETE_ON_ERROR:
9.PHONY: all replay
10all: $(addprefix $(OUT)/,contrast mix grade select with-example mean)
11
12$(OUT):
13 mkdir -p "$@"
14
15$(OUT)/driver.om: $(DRIVER) | $(OUT)
16 sed 's/^fn main to int$$/fn wbmain to int/' $< > "$@"
17
18$(OUT)/common.om: $(OUT)/driver.om $(JSON) grade.om
19 cat $^ | sed 's/^fn main to int$$/fn priorgrade to int/' > "$@"
20
21$(OUT)/contrast: $(OUT)/driver.om contrast.om $(OMC)
22 cat $(filter %.om,$^) | "$(OMC)" > "$@" && chmod +x "$@"
23
24$(OUT)/mix: mix.om $(OMC) | $(OUT)
25 "$(OMC)" < $< > "$@" && chmod +x "$@"
26
27$(OUT)/grade: $(OUT)/driver.om $(JSON) grade.om $(OMC)
28 cat $(filter %.om,$^) | "$(OMC)" > "$@" && chmod +x "$@"
29
30$(OUT)/select: $(OUT)/common.om select.om $(OMC)
31 cat $(filter %.om,$^) | "$(OMC)" > "$@" && chmod +x "$@"
32
33$(OUT)/with-example: $(OUT)/common.om read.om with-example.om $(OMC)
34 cat $(filter %.om,$^) | "$(OMC)" > "$@" && chmod +x "$@"
35
36$(OUT)/mean: $(MODEL) mean.om $(OMC) | $(OUT)
37 sed 's/^fn main to int$$/fn previousmodel to int/' $(MODEL) > "$(OUT)/model-library.om"
38 cat "$(OUT)/model-library.om" mean.om | "$(OMC)" > "$@" && chmod +x "$@"
39
40replay: all
41 bash replay.sh "$(OUT)" "$(OMC)"