Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tests/model/receipt.sh # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / model / receipt.sh` 146 lines ยท 6454 bytes Raw Blame History 1 #!/bin/sh 2 # SPDX-License-Identifier: Apache-2.0 3 # Copyright 2026 Drake Stapleton (AIEN / aien-dev) 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 # receipt.sh OUT_DIR [quiet] -- build OUT_DIR/LG-receipt.json from the logs 18 # the proof targets wrote (model.log, diff.log, tsan.log). Every field is read 19 # from a log or from git; nothing is assumed. A missing log is NOT_RUN. 20 # Evidence class: host (CPU only; no QEMU, no hardware chip). 21 set -u 22 out=$1 23 mode=${2:-run} 24 rcpt=$out/LG-receipt.json 25 26 commit=$(git rev-parse HEAD 2>/dev/null || echo unknown) 27 if [ -n "$(git status --porcelain 2>/dev/null)" ]; then dirty=true; else dirty=false; fi 28 cc_ver=$(${CC:-gcc} --version 2>/dev/null | head -n1) 29 host=$(uname -srm) 30 now=$(date -u +%Y-%m-%dT%H:%M:%SZ) 31 32 # get KEY: value of the last "RESULT KEY=..." line in any log, else empty. 33 get() { 34 cat "$out/model.log" "$out/diff.log" "$out/tsan.log" 2>/dev/null | 35 sed -n "s/^RESULT $1=//p" | tail -n1 36 } 37 # tsan values come only from tsan.log (the tsan build prints the same keys). 38 get_tsan() { sed -n "s/^RESULT $1=//p" "$out/tsan.log" 2>/dev/null | tail -n1; } 39 get_main() { 40 cat "$out/model.log" "$out/diff.log" 2>/dev/null | sed -n "s/^RESULT $1=//p" | tail -n1 41 } 42 esc() { printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g'; } 43 or_nr() { if [ -z "$1" ]; then echo NOT_RUN; else echo "$1"; fi; } 44 45 if [ "$mode" = quiet ]; then 46 cat > "$rcpt" < "$rcpt" 144 echo "receipt: $rcpt" 145 echo "LG proof: $overall (I1=$i1 I2=$i2 I3=$i3 I4=$i4 model=$model_v diff=$diff_v tsan=$tsan_v)" 146 case "$overall" in PASS|PASS_WITH_KNOWN_FAIL) exit 0 ;; *) exit 1 ;; esac