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 / tools / codebook / build.sh

16 lines · 1026 bytes Raw Blame History
1#!/bin/sh
2# build.sh -- compile tools/codebook/codebook.om with the seeded omc, after the seeded SHA-256 core.
3# Run from the repo root: sh tools/codebook/build.sh (OMC defaults to seed/out/omc)
4# codebook.om is the shared core (also compiled into tools/trit); main.om is the command line.
5# Same composition as tools/trit/build.sh and seed/omega-from-seed.sh step 5: om2 line, the
6# `abstract` line (omc refuses it after any fn, error 9), sha256.om up to "fn sha256", the program.
7set -eu
8R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
9cd "$R"
10OMC=${OMC:-seed/out/omc}
11B=${B:-build/codebook}
12mkdir -p "$B"
13{ printf 'om2\n'; grep '^abstract ' tools/codebook/codebook.om; sed '/^fn sha256 /,$d' seed/trace/sha256.om; grep -v '^abstract ' tools/codebook/codebook.om; cat tools/codebook/main.om; } > "$B/codebook.full.om"
14"$OMC" < "$B/codebook.full.om" > "$B/codebook"
15chmod +x "$B/codebook"
16sha256sum "$OMC" tools/codebook/codebook.om tools/codebook/main.om tools/codebook/codebook.tsv "$B/codebook.full.om" "$B/codebook"