From be456d44e9078ab4b015b9d61020adbf54c7b296 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 03:19:24 +0000 Subject: [PATCH] fix(v4): #190 POST regenerates the same; #16 sanitizers and hosted-check nightly Captain Bob, 2026-11-13: "Create the issues then fix them before the long acceptance test runs"; #16: "Nightly". #190 -- make -C v4 post79 did not reproduce POST: - mkpost.py runs v3 with address randomisation off (setarch -R): its printed addresses (>IN, FIND) are the same each run, so POST79.md is. - v4/Makefile post79 builds hosted v3 from this tree's source first and uses it, not the lfs/ copy, which can be older. - post_cases.c and POST79.md regenerated: 539 cases -- LOAD.rest_of_line, which v3 gets through since it changed after 2026-10-07. Two runs the same. POST_FLOOR 538 -> 539 (#173). - test_host_unit.c takes the table's count, not 538 typed in the test. #16 -- scripts/nightly.sh v4-checks: make -C v4 sanitize hosted-check, logged under logs//v4-checks/, refused without qemu-user; nightly.yml runs it after publishing, before the proofs, installing qemu-user if the image lacks it. Evidence (logs/20261113-014927/post79, -024314): before, regenerated with nothing changed: 539 cases and addresses differing run to run; after: the same twice, hosted POST 539/539; test, test-32 99 programs 0 failures; v4-checks 79 programs under the sanitizers 0 failures, the hosted builds alike. The first verification failed at test_host_unit.c:442 (kept); a stray v4-checks run stopped at once is kept, labelled (-014453). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm --- .gitea/workflows/nightly.yml | 14 +- docs/v4.0.0/POST79.md | 10 +- logs/20261113-014453/v4-checks/README.txt | 3 + .../v4-checks/v4-checks-20261113-014453.log | 3 + logs/20261113-014927/post79/README.txt | 7 + logs/20261113-014927/post79/after-run1.log | 3 + logs/20261113-014927/post79/after-run2.log | 3 + .../post79/after-test-test32.log | 3 + .../post79/before-addresses-vary.txt | 8 + .../before-regenerated-with-fresh-v3.log | 3 + .../post79/before-regenerated-with-lfs-v3.log | 3 + .../post79/failed-1-test-test32.log | 3 + .../post79/failed-1-v4-checks.log | 3 + logs/20261113-020030/v4-checks/README.txt | 2 + .../v4-checks/v4-checks-20261113-020030.log | 3 + .../v4-checks/v4-checks-20261113-024314.log | 3 + scripts/nightly.sh | 14 +- v4/Makefile | 9 +- v4/system/POST_FLOOR | 2 +- v4/system/post_cases.c | 612 +++++++++--------- v4/tests/test_host_unit.c | 7 +- v4/tools/mkpost.py | 10 +- 22 files changed, 408 insertions(+), 320 deletions(-) create mode 100644 logs/20261113-014453/v4-checks/README.txt create mode 100644 logs/20261113-014453/v4-checks/v4-checks-20261113-014453.log create mode 100644 logs/20261113-014927/post79/README.txt create mode 100644 logs/20261113-014927/post79/after-run1.log create mode 100644 logs/20261113-014927/post79/after-run2.log create mode 100644 logs/20261113-014927/post79/after-test-test32.log create mode 100644 logs/20261113-014927/post79/before-addresses-vary.txt create mode 100644 logs/20261113-014927/post79/before-regenerated-with-fresh-v3.log create mode 100644 logs/20261113-014927/post79/before-regenerated-with-lfs-v3.log create mode 100644 logs/20261113-014927/post79/failed-1-test-test32.log create mode 100644 logs/20261113-014927/post79/failed-1-v4-checks.log create mode 100644 logs/20261113-020030/v4-checks/README.txt create mode 100644 logs/20261113-020030/v4-checks/v4-checks-20261113-020030.log create mode 100644 logs/20261113-024314/v4-checks/v4-checks-20261113-024314.log diff --git a/.gitea/workflows/nightly.yml b/.gitea/workflows/nightly.yml index b950a66f..ec8b09f7 100644 --- a/.gitea/workflows/nightly.yml +++ b/.gitea/workflows/nightly.yml @@ -1,8 +1,9 @@ # Nightly snapshot of the kernel images: the acceptance protocol, the board images, Nexus, then -# the proofs. Each stage is a step of scripts/nightly.sh (its header says what each does); any +# v4 under the sanitizers with the hosted builds (#16), and the proofs. Each stage is a step of scripts/nightly.sh (its header says what each does); any # failure stops the run, and nothing is published unless every stage before it passed. The proofs # come last and run whatever happened before them: they check the theories, not the images, so a -# failed proof does not hold back images that passed acceptance -- it turns the run red. +# failed proof does not hold back images that passed acceptance -- it turns the run red. The v4 +# checks (#16; Captain Bob, 2026-11-13: "Nightly") are the same: the engine on the host, not the images. # # org.starship:kernelImage:-SNAPSHOT, starshipos-snapshots # classifier pc StarshipOS.iso amd64, UEFI -- the ISO the amd64 acceptance boot booted @@ -80,6 +81,15 @@ jobs: name: kernel-images-${{ github.run_number }} path: build/nightly/ + - name: v4 under the sanitizers, and the hosted builds alike + if: always() + run: | # hosted-check runs aarch64 and riscv64 under qemu-user (#16) + if ! command -v qemu-aarch64 >/dev/null || ! command -v qemu-riscv64 >/dev/null; then + S=$([ "$(id -u)" = 0 ] || echo sudo) + $S apt-get update -qq && $S env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq qemu-user + fi + scripts/nightly.sh v4-checks + - name: Isabelle/HOL proofs if: always() run: scripts/nightly.sh proofs diff --git a/docs/v4.0.0/POST79.md b/docs/v4.0.0/POST79.md index 60d28ae9..324a8b53 100644 --- a/docs/v4.0.0/POST79.md +++ b/docs/v4.0.0/POST79.md @@ -3,7 +3,7 @@ Written by `v4/tools/mkpost.py` from `v4/tools/post79_rules.py`; do not edit. Design: `NUCLEUS.md` section 6. The cases are `v4/system/post_cases.c`. -POST runs 538 cases. 431 are v3's, with what the hosted v3 binary did as the +POST runs 539 cases. 432 are v3's, with what the hosted v3 binary did as the expected result. This file lists every other case, and why. ## 1. Rewritten for FORTH-79 (59) @@ -60,11 +60,11 @@ standard's and not v3's. | `CMOVE.basic` | `HERE S" Test" DUP >R HERE 10 + SWAP CMOVE CR` | stack `317`, printed `\n` | `65 PAD C! 66 PAD 1+ C! PAD PAD 10 + 2 CMOVE PAD 10 + C@ . PAD 11 + C@ . CR` | stack `empty`, prints `65 66 \n` | v3's address unit is a byte; a v4 address unit is a cell (D-1); and the v3 case leaves a value on the return stack | | `TYPE.basic_string` | `HERE S" Hello" DUP >R HERE SWAP CMOVE HERE R> TYPE CR` | stack `392`, printed `Hello\n` | `72 PAD C! 105 PAD 1+ C! PAD 2 TYPE CR` | stack `empty`, prints `Hi\n` | v3's address unit is a byte; a v4 address unit is a cell (D-1); and FORTH-79: >R R> R@ are for use inside a definition; v4 refuses them at the prompt | | `TYPE.numbers` | `HERE S" 12345" DUP >R HERE SWAP CMOVE HERE R> TYPE CR` | stack `398`, printed `12345\n` | `49 PAD C! 50 PAD 1+ C! PAD 2 TYPE CR` | stack `empty`, prints `12\n` | v3's address unit is a byte; a v4 address unit is a cell (D-1); and FORTH-79: >R R> R@ are for use inside a definition; v4 refuses them at the prompt | -| `>IN.initial` | `>IN @ . CR` | stack `empty`, printed `657828592 \n` | unchanged | stack `empty`, prints `6 \n` | FORTH-79: >IN is the offset into the input, 6 here; v3 prints an address | +| `>IN.initial` | `>IN @ . CR` | stack `empty`, printed `7884064 \n` | unchanged | stack `empty`, prints `6 \n` | FORTH-79: >IN is the offset into the input, 6 here; v3 prints an address | | `UPDATE.no_block` | `0 SCR ! UPDATE` | error | unchanged | stack `empty`, prints nothing | v3 raises an error FORTH-79 does not ask for | -| `SCR.after_load` | `1 LOAD SCR @ . CR` | stack `empty`, printed `` | unchanged | stack `empty`, prints `1 \n` | v3 prints nothing after 1 LOAD; SCR is still 1 from the LIST before | -| `FIND.existing` | `FIND DUP . CR` | stack `empty`, printed `657827952 \n` | unchanged | 0 value(s) left; output not compared | FORTH-79: FIND takes the next word, DUP here, and leaves its address, which is printed | -| `FIND.user_word` | `: test5 44 ; FIND test5 . CR` | stack `empty`, printed `658154448 \n` | unchanged | 0 value(s) left; output not compared | the address FIND leaves is printed | +| `SCR.after_load` | `1 LOAD SCR @ . CR` | stack `empty`, printed `1 \n` | unchanged | stack `empty`, prints `1 \n` | v3 prints nothing after 1 LOAD; SCR is still 1 from the LIST before | +| `FIND.existing` | `FIND DUP . CR` | stack `empty`, printed `7883424 \n` | unchanged | 0 value(s) left; output not compared | FORTH-79: FIND takes the next word, DUP here, and leaves its address, which is printed | +| `FIND.user_word` | `: test5 44 ; FIND test5 . CR` | stack `empty`, printed `8203888 \n` | unchanged | 0 value(s) left; output not compared | the address FIND leaves is printed | | `FIND.empty` | `FIND` | error | unchanged | stack `0`, prints nothing | FORTH-79: FIND leaves 0 when there is no word; v3 raises an error | | `VOCABULARY.cross_vocab_access` | `VOCABULARY V1 V1 DEFINITIONS : V1WORD 11 ; FORTH V1WORD . CR` | stack `empty`, printed `11 \n` | unchanged | an error | FORTH-79: a word defined in another vocabulary is not found from FORTH; v3 finds it | | `VOCABULARY.duplicate` | `VOCABULARY TESTVOC VOCABULARY TESTVOC` | error | unchanged | stack `empty`, prints nothing | v3 raises an error FORTH-79 does not ask for: defining a name again | diff --git a/logs/20261113-014453/v4-checks/README.txt b/logs/20261113-014453/v4-checks/README.txt new file mode 100644 index 00000000..f222b0c8 --- /dev/null +++ b/logs/20261113-014453/v4-checks/README.txt @@ -0,0 +1,3 @@ +# Stopped, not a result: started by mistake on 2026-11-13 by a test of v4-checks's refusal +# without qemu-user, which found qemu-user after all (/bin is /usr/bin here). Stopped by hand +# at once; the stage was then tested with a PATH holding no qemu-*. diff --git a/logs/20261113-014453/v4-checks/v4-checks-20261113-014453.log b/logs/20261113-014453/v4-checks/v4-checks-20261113-014453.log new file mode 100644 index 00000000..6c1f661b --- /dev/null +++ b/logs/20261113-014453/v4-checks/v4-checks-20261113-014453.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:542d7f8e1feb632a36bf6d8a0220ffa35efef9e000d3d0f21ff4399500f83fbd +size 13987 diff --git a/logs/20261113-014927/post79/README.txt b/logs/20261113-014927/post79/README.txt new file mode 100644 index 00000000..a8343ab6 --- /dev/null +++ b/logs/20261113-014927/post79/README.txt @@ -0,0 +1,7 @@ +# #190: make -C v4 post79 +before-*: the table regenerated with nothing changed, with the committed lfs/amd64/starforth and with v3 built from source: 539 cases, LOAD.rest_of_line added (v3 changed since 2026-10-07); POST79.md's v3 addresses different each run. +after-run1/2.log: post79 after the fix (v3 built from source, run with setarch -R): post_cases.c and POST79.md the same both runs; 539 cases; hosted POST 539/539. +failed-1-*.log: the first verification after the fix: test_host_unit.c:442 wanted 538 POST cases, typed in the test; POST ran 539 of 539. The test now takes the table's own count. +after-test-test32.log: make -C v4 test test-32 after both fixes: 99 programs, 3724162 checks, 0 failures. +logs/20261113-024314/v4-checks: scripts/nightly.sh v4-checks (#16), its first real run: 79 programs under the sanitizers, 0 failures; the hosted builds alike. +logs/20261113-020030/v4-checks: the same stage on the first verification, which failed at test_host_unit.c:442 (see failed-1-*). diff --git a/logs/20261113-014927/post79/after-run1.log b/logs/20261113-014927/post79/after-run1.log new file mode 100644 index 00000000..372fc70c --- /dev/null +++ b/logs/20261113-014927/post79/after-run1.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43a1bffaa680f6fcd23c1480f58e63710928923ff18e3b1bcfae9351de3f3ecb +size 12536 diff --git a/logs/20261113-014927/post79/after-run2.log b/logs/20261113-014927/post79/after-run2.log new file mode 100644 index 00000000..372fc70c --- /dev/null +++ b/logs/20261113-014927/post79/after-run2.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43a1bffaa680f6fcd23c1480f58e63710928923ff18e3b1bcfae9351de3f3ecb +size 12536 diff --git a/logs/20261113-014927/post79/after-test-test32.log b/logs/20261113-014927/post79/after-test-test32.log new file mode 100644 index 00000000..109c8d58 --- /dev/null +++ b/logs/20261113-014927/post79/after-test-test32.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:549f70378a8b80e095c19b02c593899253f6104e7da17aee972b4442080ec432 +size 45570 diff --git a/logs/20261113-014927/post79/before-addresses-vary.txt b/logs/20261113-014927/post79/before-addresses-vary.txt new file mode 100644 index 00000000..f91e6695 --- /dev/null +++ b/logs/20261113-014927/post79/before-addresses-vary.txt @@ -0,0 +1,8 @@ +# #190, before the fix: POST79.md as mkpost.py wrote it from v3 built from source (<) against the committed one (>): +# v3's printed addresses differ. Two runs of that same binary also differed from each other: >IN.initial printed 1076337952, then 241286432. +< | `>IN.initial` | `>IN @ . CR` | stack `empty`, printed `1076337952 \n` | unchanged | stack `empty`, prints `6 \n` | FORTH-79: >IN is the offset into the input, 6 here; v3 prints an address | +> | `>IN.initial` | `>IN @ . CR` | stack `empty`, printed `657828592 \n` | unchanged | stack `empty`, prints `6 \n` | FORTH-79: >IN is the offset into the input, 6 here; v3 prints an address | +< | `FIND.existing` | `FIND DUP . CR` | stack `empty`, printed `1076337312 \n` | unchanged | 0 value(s) left; output not compared | FORTH-79: FIND takes the next word, DUP here, and leaves its address, which is printed | +< | `FIND.user_word` | `: test5 44 ; FIND test5 . CR` | stack `empty`, printed `1076657776 \n` | unchanged | 0 value(s) left; output not compared | the address FIND leaves is printed | +> | `FIND.existing` | `FIND DUP . CR` | stack `empty`, printed `657827952 \n` | unchanged | 0 value(s) left; output not compared | FORTH-79: FIND takes the next word, DUP here, and leaves its address, which is printed | +> | `FIND.user_word` | `: test5 44 ; FIND test5 . CR` | stack `empty`, printed `658154448 \n` | unchanged | 0 value(s) left; output not compared | the address FIND leaves is printed | diff --git a/logs/20261113-014927/post79/before-regenerated-with-fresh-v3.log b/logs/20261113-014927/post79/before-regenerated-with-fresh-v3.log new file mode 100644 index 00000000..790881d8 --- /dev/null +++ b/logs/20261113-014927/post79/before-regenerated-with-fresh-v3.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:849dfe7a3b232a188a21b71ace0f3253e4fd23496afc9b009b5379bc1e94bcdc +size 5904 diff --git a/logs/20261113-014927/post79/before-regenerated-with-lfs-v3.log b/logs/20261113-014927/post79/before-regenerated-with-lfs-v3.log new file mode 100644 index 00000000..78fff522 --- /dev/null +++ b/logs/20261113-014927/post79/before-regenerated-with-lfs-v3.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f1b2a630941a8911c46e07a36e7f84ae74a5f9158eddba6641a79e99e38d3c2 +size 6028 diff --git a/logs/20261113-014927/post79/failed-1-test-test32.log b/logs/20261113-014927/post79/failed-1-test-test32.log new file mode 100644 index 00000000..336c2a20 --- /dev/null +++ b/logs/20261113-014927/post79/failed-1-test-test32.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d10ce287e7037bb427c1831c30bdc600486a7fb7f053baa95c9fbddcb845ce1 +size 114922 diff --git a/logs/20261113-014927/post79/failed-1-v4-checks.log b/logs/20261113-014927/post79/failed-1-v4-checks.log new file mode 100644 index 00000000..98083ed8 --- /dev/null +++ b/logs/20261113-014927/post79/failed-1-v4-checks.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51ac0ced961400f1a7fe30bba5104a20a9a5e06218d203d4cc3be919f16a1db7 +size 118948 diff --git a/logs/20261113-020030/v4-checks/README.txt b/logs/20261113-020030/v4-checks/README.txt new file mode 100644 index 00000000..0c103063 --- /dev/null +++ b/logs/20261113-020030/v4-checks/README.txt @@ -0,0 +1,2 @@ +# The first real run of scripts/nightly.sh v4-checks (#16), on the first verification of #190: it +# stopped at test_host_unit.c:442 (538 typed in the test; POST ran 539). Kept as evidence. diff --git a/logs/20261113-020030/v4-checks/v4-checks-20261113-020030.log b/logs/20261113-020030/v4-checks/v4-checks-20261113-020030.log new file mode 100644 index 00000000..98083ed8 --- /dev/null +++ b/logs/20261113-020030/v4-checks/v4-checks-20261113-020030.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51ac0ced961400f1a7fe30bba5104a20a9a5e06218d203d4cc3be919f16a1db7 +size 118948 diff --git a/logs/20261113-024314/v4-checks/v4-checks-20261113-024314.log b/logs/20261113-024314/v4-checks/v4-checks-20261113-024314.log new file mode 100644 index 00000000..3b637aca --- /dev/null +++ b/logs/20261113-024314/v4-checks/v4-checks-20261113-024314.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb74700033532ac18a6321a8149cb5e5e44e83820930e85dd258b77d7446ba51 +size 65397 diff --git a/scripts/nightly.sh b/scripts/nightly.sh index 18b7e62f..48bbe39b 100755 --- a/scripts/nightly.sh +++ b/scripts/nightly.sh @@ -19,6 +19,10 @@ # found, and one value (#172 -- it was one distinct value, which two of the three could make). # scripts/nightly.sh test-32 # make -C v4 test-32: v4 with 32-bit cells, every test (the acceptance's last part). +# scripts/nightly.sh v4-checks +# make -C v4 sanitize hosted-check (#16; Captain Bob, 2026-11-13: in the nightly): every v4 +# test under ASan and UBSan at both widths, and the three hosted builds booting alike -- +# aarch64 and riscv64 under qemu-user (make init). Its log is logs//v4-checks/. # scripts/nightly.sh proofs # isabelle build -c -D proof/, capped to fit the server (one thread, small heaps): the StarForth # session checked afresh every run, whatever is @@ -76,7 +80,7 @@ DOCS=build/nightly-docs LITHOS=$(sed -n 's/^LITHOS_VERSION *?= *//p' kernel/Makefile) VERSION=${NIGHTLY_VERSION:-$LITHOS-SNAPSHOT} usage() { - echo "Usage: scripts/nightly.sh accept | test-32 | proofs | images" >&2 + echo "Usage: scripts/nightly.sh accept | test-32 | v4-checks | proofs | images" >&2 echo " | publish | docs | publish-docs | gitea-release " >&2 echo " | protocol [...] | protocol-report | dict-hash | post-count" >&2 echo " protocol stages: $PROTOCOL_STAGES" >&2 @@ -182,6 +186,14 @@ test-32) make --no-print-directory -C v4 test-32 2>&1 | tee "$OUT/test-32.txt" echo "=== nightly: test-32: $(grep -cE '[0-9]+ checks, 0 failures' "$OUT/test-32.txt") programs, 0 failures" ;; +v4-checks) + command -v qemu-aarch64 >/dev/null && command -v qemu-riscv64 >/dev/null \ + || { echo "nightly: v4-checks needs qemu-user (qemu-aarch64, qemu-riscv64): make init" >&2; exit 1; } + ts=$(date -u +%Y%m%d-%H%M%S) + mkdir -p "logs/$ts/v4-checks" + make --no-print-directory -C v4 sanitize hosted-check 2>&1 | tee "logs/$ts/v4-checks/v4-checks-$ts.log" + echo "=== nightly: v4-checks: $(grep -cE '[0-9]+ checks, 0 failures' "logs/$ts/v4-checks/v4-checks-$ts.log") programs under the sanitizers, 0 failures; the hosted builds alike" + ;; proofs) need "$OUT/.started" ts=$(date -u +%Y%m%d-%H%M%S) diff --git a/v4/Makefile b/v4/Makefile index dc25fcf1..c243370e 100644 --- a/v4/Makefile +++ b/v4/Makefile @@ -218,13 +218,16 @@ $(foreach i,$(HOSTED_ISAS),$(eval $(call HOSTED_RULE,$(i)))) # `make post` boots the amd64 system alone, which is the quick check after a # change to the vocabulary: nucleus, forth79.4th, POST, prompt. `make # post79` writes POST's cases, system/post_cases.c, again from -# v3's cases and tools/post79_rules.py (tools/mkpost.py); it needs the -# hosted v3 binary. +# v3's cases and tools/post79_rules.py (tools/mkpost.py), with the hosted v3 +# binary built first from this tree's source -- v3/Makefile, in its own build +# directory; not the lfs/ copy, which can be older (#190). +V3_HOSTED = $(shell $(MAKE) -s -C $(ROOT) -f v3/Makefile --eval 'v3bin: ; @echo $$(BINARY)' v3bin 2>/dev/null) .PHONY: post post79 post: $(BINDIR)/starforth4-amd64 @$(BINDIR)/starforth4-amd64 < /dev/null post79: - python3 $(HERE)/tools/mkpost.py + $(MAKE) --no-print-directory -C $(ROOT) -f v3/Makefile $(V3_HOSTED) + python3 $(HERE)/tools/mkpost.py --v3 $(ROOT)/$(V3_HOSTED) # `make hosted` builds the three. `make hosted-check` boots each with no # input and requires that all three print the same lines, ending in diff --git a/v4/system/POST_FLOOR b/v4/system/POST_FLOOR index 86bb7161..5469f90a 100644 --- a/v4/system/POST_FLOOR +++ b/v4/system/POST_FLOOR @@ -1,3 +1,3 @@ -538 +539 # v4 POST: the fewest tests an accepted boot may report (#173). Raise it when POST grows; # never lower it without Captain Bob. scripts/nightly.sh post-count reads the first line. diff --git a/v4/system/post_cases.c b/v4/system/post_cases.c index 431f440a..7376cc51 100644 --- a/v4/system/post_cases.c +++ b/v4/system/post_cases.c @@ -400,160 +400,161 @@ static const char *const l384[] = { "1 LOAD" }; static const char *const l385[] = { "0 LOAD" }; static const char *const l386[] = { "9999 LOAD" }; static const char *const l387[] = { "LOAD" }; -static const char *const l388[] = { "1 LIST" }; -static const char *const l389[] = { "0 LIST" }; -static const char *const l390[] = { "9999 LIST" }; -static const char *const l391[] = { "LIST" }; -static const char *const l392[] = { "SCR @ . CR" }; -static const char *const l393[] = { "1 LIST SCR @ . CR" }; -static const char *const l394[] = { "1 LOAD SCR @ . CR" }; -static const char *const l395[] = { "HERE HERE = . CR" }; -static const char *const l396[] = { "HERE 42 , HERE SWAP - 1 CELLS = 0 SWAP /" }; -static const long long s396[] = { 0LL }; -static const char *const l397[] = { "HERE 65 C, HERE SWAP - . CR" }; -static const char *const l398[] = { "HERE 10 ALLOT HERE SWAP - . CR" }; -static const char *const l399[] = { "HERE DUP HERE = . CR" }; -static const char *const l400[] = { "HERE 10 ALLOT HERE SWAP - . CR" }; -static const char *const l401[] = { "HERE 0 ALLOT HERE SWAP - . CR" }; -static const char *const l402[] = { "HERE -4 ALLOT HERE SWAP - . CR" }; -static const char *const l403[] = { "HERE 100 ALLOT HERE SWAP - . CR" }; -static const char *const l404[] = { "ALIGN HERE 10 ALLOT 42 OVER ! @ . CR" }; -static const char *const l405[] = { "ALLOT" }; -static const char *const l406[] = { "42 , HERE 1 CELLS - @ . CR" }; -static const char *const l407[] = { "-999 , HERE 1 CELLS - @ . CR" }; -static const char *const l408[] = { "0 , HERE 1 CELLS - @ . CR" }; -static const char *const l409[] = { "2147483647 , HERE 1 CELLS - @ . CR" }; -static const char *const l410[] = { "-2147483648 , HERE 1 CELLS - @ . CR" }; -static const char *const l411[] = { "10 , 20 , HERE 1 CELLS - @ . HERE 1 CELLS - @ . CR" }; -static const char *const l412[] = { "," }; -static const char *const l413[] = { "PAD PAD = . CR" }; -static const char *const l414[] = { "PAD HERE = . CR" }; -static const char *const l415[] = { "PAD DUP PAD = . CR" }; -static const char *const l416[] = { "CREATE test1 42 , test1 @ . CR" }; -static const char *const l417[] = { "CREATE" }; -static const char *const l418[] = { "CREATE T 1 , CREATE T 2 , T @ . CR" }; -static const char *const l419[] = { "CREATE test2 CREATE test2" }; -static const char *const l420[] = { "CREATE abcdefghijklmnopqrstuvwxyz" }; -static const char *const l421[] = { "CREATE temp1 FORGET temp1" }; -static const char *const l422[] = { ": test3 42 ; IMMEDIATE test3 . CR" }; -static const char *const l423[] = { ": test4 43 ; IMMEDIATE IMMEDIATE" }; -static const char *const l424[] = { "FIND DUP . CR" }; -static const char *const l425[] = { ": test5 44 ; FIND test5 . CR" }; -static const char *const l426[] = { "FIND nonexistent . CR" }; -static const char *const l427[] = { "FIND" }; -static const long long s427[] = { 0LL }; -static const char *const l428[] = { "FORTH DEFINITIONS" }; -static const char *const l429[] = { "FORTH DEFINITIONS DEFINITIONS" }; -static const char *const l430[] = { "VOCABULARY TEST-VOC1 TEST-VOC1 DEFINITIONS" }; -static const char *const l431[] = { "VOCABULARY MYVOC MYVOC DEFINITIONS CONTEXT @ . CR" }; -static const char *const l432[] = { "VOCABULARY ISOLATED ISOLATED DEFINITIONS : ISOWORD 99 ; FORTH", "DEFINITIONS" }; -static const char *const l433[] = { "VOCABULARY V1 V1 DEFINITIONS : V1WORD 11 ; FORTH V1WORD . CR" }; -static const char *const l434[] = { "VOCABULARY VA VOCABULARY VB VOCABULARY VC VA DEFINITIONS" }; -static const char *const l435[] = { "VOCABULARY TESTVOC VOCABULARY TESTVOC" }; -static const char *const l436[] = { "VOCABULARY" }; -static const char *const l437[] = { "FORTH DEFINITIONS" }; -static const char *const l438[] = { "FORTH : TEST1 42 ; TEST1 . CR" }; -static const char *const l439[] = { "VOCABULARY OTHER-VOC OTHER-VOC FORTH" }; -static const char *const l440[] = { "FORTH DEFINITIONS" }; -static const char *const l441[] = { "VOCABULARY TEST-VOC6 TEST-VOC6 DEFINITIONS" }; -static const char *const l442[] = { "VOCABULARY TEST-VOC7 TEST-VOC7 DEFINITIONS : TEST2 43 ;" }; -static const char *const l443[] = { "CONTEXT @ . CR" }; -static const char *const l444[] = { "FORTH CONTEXT @ . CR" }; -static const char *const l445[] = { "CURRENT @ . CR" }; -static const char *const l446[] = { "VOCABULARY TEST-VOC8 TEST-VOC8 DEFINITIONS CURRENT @ . CR" }; -static const char *const l447[] = { "ABORT" }; -static const char *const l448[] = { "1 2 3 ABORT DEPTH . CR" }; -static const char *const l449[] = { ": BAD-WORD ABORT ; 123 BAD-WORD DEPTH . CR" }; -static const char *const l450[] = { ": TEST1 42 ; TEST1 . CR" }; -static const char *const l451[] = { ":" }; -static const char *const l452[] = { ";" }; -static const char *const l453[] = { ": TEST4 42 ; IMMEDIATE TEST4 . CR" }; -static const char *const l454[] = { "42 CONSTANT MEANING MEANING . CR" }; -static const char *const l455[] = { "0 CONSTANT ZERO ZERO . CR" }; -static const char *const l456[] = { "-1 CONSTANT MINUS MINUS . CR" }; -static const char *const l457[] = { "CONSTANT" }; -static const char *const l458[] = { "VARIABLE VAR1 42 VAR1 ! VAR1 @ . CR" }; -static const char *const l459[] = { "VARIABLE VAR2 VARIABLE VAR3" }; -static const char *const l460[] = { "VARIABLE VAR4 -99 VAR4 ! VAR4 @ . CR" }; -static const char *const l461[] = { "CREATE OBJ1" }; -static const char *const l462[] = { "CREATE OBJ2 42 , OBJ2 @ . CR" }; -static const char *const l463[] = { "CREATE" }; -static const char *const l464[] = { ": CONST CREATE , DOES> @ ; 42 CONST MEANING MEANING . CR" }; -static const char *const l465[] = { ": ARRAY CREATE DOES> SWAP CELLS + ; CREATE ARR 10 CELLS ALLOT" }; -static const char *const l466[] = { "DOES>" }; -static const char *const l467[] = { ": TEST5 [ 42 ] LITERAL ; TEST5 . CR" }; -static const char *const l468[] = { "[" }; -static const char *const l469[] = { ": TEST6 [ ] 42 ; TEST6 . CR" }; -static const char *const l470[] = { ": TEST1 IF 42 ELSE 24 THEN ; -1 TEST1 . CR" }; -static const char *const l471[] = { ": TEST2 IF 42 ELSE 24 THEN ; 0 TEST2 . CR" }; -static const char *const l472[] = { ": TEST3 IF IF 1 ELSE 2 THEN ELSE 3 THEN ; -1 -1 TEST3 . CR" }; -static const char *const l473[] = { ": TEST4 IF 42 THEN ; -1 TEST4 . CR" }; -static const char *const l474[] = { "IF" }; -static const char *const l475[] = { "ELSE" }; -static const char *const l476[] = { "THEN" }; -static const char *const l477[] = { ": TEST5 0 BEGIN 1+ DUP 5 = UNTIL ; TEST5 . CR" }; -static const char *const l478[] = { ": TEST6 0 BEGIN DUP 5 < WHILE 1+ REPEAT ; TEST6 . CR" }; -static const char *const l479[] = { "BEGIN" }; -static const char *const l480[] = { ": TEST8 BEGIN DUP 1- DUP 0= UNTIL ; 5 TEST8 . CR" }; -static const long long s480[] = { 5LL, 4LL, 3LL, 2LL, 1LL }; -static const char *const l481[] = { ": TEST9 BEGIN 1 UNTIL ; IMMEDIATE" }; -static const char *const l482[] = { "UNTIL" }; -static const char *const l483[] = { ": TEST10 BEGIN DUP 5 < WHILE 1+ REPEAT ; 0 TEST10 . CR" }; -static const char *const l484[] = { ": TEST11 BEGIN DUP 0< WHILE 1+ REPEAT ; 0 TEST11 . CR" }; -static const char *const l485[] = { "WHILE" }; -static const char *const l486[] = { ": TEST12 BEGIN DUP 5 < WHILE 1+ REPEAT ; 0 TEST12 . CR" }; -static const char *const l487[] = { "REPEAT" }; -static const char *const l488[] = { ": TEST13 5 0 DO I . LOOP ; TEST13 CR" }; -static const char *const l489[] = { ": TEST14 -1 -5 DO I . LOOP ; TEST14 CR" }; -static const char *const l490[] = { ": TEST15 0 0 DO LOOP ;" }; -static const char *const l491[] = { ": TEST16 3 0 DO 3 0 DO J I + . LOOP LOOP ; TEST16 CR" }; -static const char *const l492[] = { ": TEST20 5 0 DO I . LOOP ; TEST20 CR" }; -static const char *const l493[] = { "LOOP" }; -static const char *const l494[] = { ": TEST21 10 0 DO I . 2 +LOOP ; TEST21 CR" }; -static const char *const l495[] = { ": TEST22 0 10 DO I . -1 +LOOP ; TEST22 CR" }; -static const char *const l496[] = { ": TEST23 10 0 DO I . DUP +LOOP ; 3 TEST23 CR" }; -static const long long s496[] = { 3LL }; -static const char *const l497[] = { ": TI 4 0 DO I . LOOP CR ; TI" }; -static const char *const l498[] = { ": TI1 1 0 DO I . LOOP CR ; TI1" }; -static const char *const l499[] = { ": TI2 5 3 DO I . LOOP CR ; TI2" }; -static const char *const l500[] = { ": TI3 3 0 DO I 2 * . LOOP CR ; TI3" }; -static const char *const l501[] = { ": TJ 2 0 DO 3 0 DO J . LOOP LOOP CR ; TJ" }; -static const char *const l502[] = { ": TJ2 2 0 DO 2 0 DO J I + . LOOP LOOP CR ; TJ2" }; -static const char *const l503[] = { ": TEX 5 EXIT 99 ; TEX . CR" }; -static const char *const l504[] = { ": TEX2 DUP 0> IF EXIT THEN NEGATE ; 3 TEX2 . CR" }; -static const char *const l505[] = { ": TEX2 DUP 0> IF EXIT THEN NEGATE ; -4 TEX2 . CR" }; -static const char *const l506[] = { ": TEX3 1 2 EXIT 3 ; TEX3 . . CR" }; -static const char *const l507[] = { ": TLV 0 5 0 DO I 3 = IF LEAVE THEN 1+ LOOP ; TLV . CR" }; -static const char *const l508[] = { ": TLV2 0 5 0 DO LEAVE 1+ LOOP ; TLV2 . CR" }; -static const char *const l509[] = { ": TLV3 0 5 0 \077DO I 2 = IF LEAVE THEN 1+ LOOP ; TLV3 . CR" }; -static const char *const l510[] = { "3 4 U* . . CR" }; -static const char *const l511[] = { "0 5 U* . . CR" }; -static const char *const l512[] = { "-1 -1 U* 2+ . 1 = . CR" }; -static const char *const l513[] = { "7 0 2 U/MOD . . CR" }; -static const char *const l514[] = { "12 0 4 U/MOD . . CR" }; -static const char *const l515[] = { "0 1 2 U/MOD 2* . . CR" }; -static const char *const l516[] = { "-1 -1 U* -1 U/MOD 1+ . . CR" }; -static const char *const l517[] = { "-1 -2 -1 U/MOD 1+ . 2+ . CR" }; -static const char *const l518[] = { "1 0 0 U/MOD" }; -static const char *const l519[] = { "VARIABLE Q1 42 Q1 ! Q1 \077 CR" }; -static const char *const l520[] = { ": E1 7 ; FIND E1 EXECUTE . CR" }; -static const char *const l521[] = { "42 U. CR" }; -static const char *const l522[] = { "-1 U. CR" }; -static const char *const l523[] = { ": C1 0 0 BL WORD CONVERT DROP ; C1 123 . . CR" }; -static const char *const l524[] = { "' DUP 0= . CR" }; -static const char *const l525[] = { ": Q3 .\042 hi there\042 ; Q3 CR" }; -static const char *const l526[] = { ": Q4 [ 5 ] LITERAL ; Q4 . CR" }; -static const char *const l527[] = { "STATE @ . CR" }; -static const char *const l528[] = { ": Q5 STATE @ 0= . ; IMMEDIATE : Q6 Q5 ; CR" }; -static const char *const l529[] = { ": Q7 COMPILE DUP ; IMMEDIATE : Q8 Q7 ; 3 Q8 . . CR" }; -static const char *const l530[] = { ": Q9 [COMPILE] IF ; IMMEDIATE : Q10 Q9 1 ELSE 2 THEN ; 0 Q10", ". -1 Q10 . CR" }; -static const char *const l531[] = { "1 ( 2 ) 3 . . CR" }; -static const char *const l532[] = { "BLK @ . CR" }; -static const char *const l533[] = { "79-STANDARD" }; -static const char *const l534[] = { ": W1 BL WORD COUNT TYPE ; W1 HELLO" }; -static const char *const l535[] = { ": W2 44 WORD COUNT TYPE ; W2 A B," }; -static const char *const l536[] = { ": W3 BL WORD C@ . ; W3 ABC" }; -static const char *const l537[] = { ": W4 BL WORD COUNT TYPE ; W4 X" }; +static const char *const l388[] = { "1 LOAD 0 0 /" }; +static const char *const l389[] = { "1 LIST" }; +static const char *const l390[] = { "0 LIST" }; +static const char *const l391[] = { "9999 LIST" }; +static const char *const l392[] = { "LIST" }; +static const char *const l393[] = { "SCR @ . CR" }; +static const char *const l394[] = { "1 LIST SCR @ . CR" }; +static const char *const l395[] = { "1 LOAD SCR @ . CR" }; +static const char *const l396[] = { "HERE HERE = . CR" }; +static const char *const l397[] = { "HERE 42 , HERE SWAP - 1 CELLS = 0 SWAP /" }; +static const long long s397[] = { 0LL }; +static const char *const l398[] = { "HERE 65 C, HERE SWAP - . CR" }; +static const char *const l399[] = { "HERE 10 ALLOT HERE SWAP - . CR" }; +static const char *const l400[] = { "HERE DUP HERE = . CR" }; +static const char *const l401[] = { "HERE 10 ALLOT HERE SWAP - . CR" }; +static const char *const l402[] = { "HERE 0 ALLOT HERE SWAP - . CR" }; +static const char *const l403[] = { "HERE -4 ALLOT HERE SWAP - . CR" }; +static const char *const l404[] = { "HERE 100 ALLOT HERE SWAP - . CR" }; +static const char *const l405[] = { "ALIGN HERE 10 ALLOT 42 OVER ! @ . CR" }; +static const char *const l406[] = { "ALLOT" }; +static const char *const l407[] = { "42 , HERE 1 CELLS - @ . CR" }; +static const char *const l408[] = { "-999 , HERE 1 CELLS - @ . CR" }; +static const char *const l409[] = { "0 , HERE 1 CELLS - @ . CR" }; +static const char *const l410[] = { "2147483647 , HERE 1 CELLS - @ . CR" }; +static const char *const l411[] = { "-2147483648 , HERE 1 CELLS - @ . CR" }; +static const char *const l412[] = { "10 , 20 , HERE 1 CELLS - @ . HERE 1 CELLS - @ . CR" }; +static const char *const l413[] = { "," }; +static const char *const l414[] = { "PAD PAD = . CR" }; +static const char *const l415[] = { "PAD HERE = . CR" }; +static const char *const l416[] = { "PAD DUP PAD = . CR" }; +static const char *const l417[] = { "CREATE test1 42 , test1 @ . CR" }; +static const char *const l418[] = { "CREATE" }; +static const char *const l419[] = { "CREATE T 1 , CREATE T 2 , T @ . CR" }; +static const char *const l420[] = { "CREATE test2 CREATE test2" }; +static const char *const l421[] = { "CREATE abcdefghijklmnopqrstuvwxyz" }; +static const char *const l422[] = { "CREATE temp1 FORGET temp1" }; +static const char *const l423[] = { ": test3 42 ; IMMEDIATE test3 . CR" }; +static const char *const l424[] = { ": test4 43 ; IMMEDIATE IMMEDIATE" }; +static const char *const l425[] = { "FIND DUP . CR" }; +static const char *const l426[] = { ": test5 44 ; FIND test5 . CR" }; +static const char *const l427[] = { "FIND nonexistent . CR" }; +static const char *const l428[] = { "FIND" }; +static const long long s428[] = { 0LL }; +static const char *const l429[] = { "FORTH DEFINITIONS" }; +static const char *const l430[] = { "FORTH DEFINITIONS DEFINITIONS" }; +static const char *const l431[] = { "VOCABULARY TEST-VOC1 TEST-VOC1 DEFINITIONS" }; +static const char *const l432[] = { "VOCABULARY MYVOC MYVOC DEFINITIONS CONTEXT @ . CR" }; +static const char *const l433[] = { "VOCABULARY ISOLATED ISOLATED DEFINITIONS : ISOWORD 99 ; FORTH", "DEFINITIONS" }; +static const char *const l434[] = { "VOCABULARY V1 V1 DEFINITIONS : V1WORD 11 ; FORTH V1WORD . CR" }; +static const char *const l435[] = { "VOCABULARY VA VOCABULARY VB VOCABULARY VC VA DEFINITIONS" }; +static const char *const l436[] = { "VOCABULARY TESTVOC VOCABULARY TESTVOC" }; +static const char *const l437[] = { "VOCABULARY" }; +static const char *const l438[] = { "FORTH DEFINITIONS" }; +static const char *const l439[] = { "FORTH : TEST1 42 ; TEST1 . CR" }; +static const char *const l440[] = { "VOCABULARY OTHER-VOC OTHER-VOC FORTH" }; +static const char *const l441[] = { "FORTH DEFINITIONS" }; +static const char *const l442[] = { "VOCABULARY TEST-VOC6 TEST-VOC6 DEFINITIONS" }; +static const char *const l443[] = { "VOCABULARY TEST-VOC7 TEST-VOC7 DEFINITIONS : TEST2 43 ;" }; +static const char *const l444[] = { "CONTEXT @ . CR" }; +static const char *const l445[] = { "FORTH CONTEXT @ . CR" }; +static const char *const l446[] = { "CURRENT @ . CR" }; +static const char *const l447[] = { "VOCABULARY TEST-VOC8 TEST-VOC8 DEFINITIONS CURRENT @ . CR" }; +static const char *const l448[] = { "ABORT" }; +static const char *const l449[] = { "1 2 3 ABORT DEPTH . CR" }; +static const char *const l450[] = { ": BAD-WORD ABORT ; 123 BAD-WORD DEPTH . CR" }; +static const char *const l451[] = { ": TEST1 42 ; TEST1 . CR" }; +static const char *const l452[] = { ":" }; +static const char *const l453[] = { ";" }; +static const char *const l454[] = { ": TEST4 42 ; IMMEDIATE TEST4 . CR" }; +static const char *const l455[] = { "42 CONSTANT MEANING MEANING . CR" }; +static const char *const l456[] = { "0 CONSTANT ZERO ZERO . CR" }; +static const char *const l457[] = { "-1 CONSTANT MINUS MINUS . CR" }; +static const char *const l458[] = { "CONSTANT" }; +static const char *const l459[] = { "VARIABLE VAR1 42 VAR1 ! VAR1 @ . CR" }; +static const char *const l460[] = { "VARIABLE VAR2 VARIABLE VAR3" }; +static const char *const l461[] = { "VARIABLE VAR4 -99 VAR4 ! VAR4 @ . CR" }; +static const char *const l462[] = { "CREATE OBJ1" }; +static const char *const l463[] = { "CREATE OBJ2 42 , OBJ2 @ . CR" }; +static const char *const l464[] = { "CREATE" }; +static const char *const l465[] = { ": CONST CREATE , DOES> @ ; 42 CONST MEANING MEANING . CR" }; +static const char *const l466[] = { ": ARRAY CREATE DOES> SWAP CELLS + ; CREATE ARR 10 CELLS ALLOT" }; +static const char *const l467[] = { "DOES>" }; +static const char *const l468[] = { ": TEST5 [ 42 ] LITERAL ; TEST5 . CR" }; +static const char *const l469[] = { "[" }; +static const char *const l470[] = { ": TEST6 [ ] 42 ; TEST6 . CR" }; +static const char *const l471[] = { ": TEST1 IF 42 ELSE 24 THEN ; -1 TEST1 . CR" }; +static const char *const l472[] = { ": TEST2 IF 42 ELSE 24 THEN ; 0 TEST2 . CR" }; +static const char *const l473[] = { ": TEST3 IF IF 1 ELSE 2 THEN ELSE 3 THEN ; -1 -1 TEST3 . CR" }; +static const char *const l474[] = { ": TEST4 IF 42 THEN ; -1 TEST4 . CR" }; +static const char *const l475[] = { "IF" }; +static const char *const l476[] = { "ELSE" }; +static const char *const l477[] = { "THEN" }; +static const char *const l478[] = { ": TEST5 0 BEGIN 1+ DUP 5 = UNTIL ; TEST5 . CR" }; +static const char *const l479[] = { ": TEST6 0 BEGIN DUP 5 < WHILE 1+ REPEAT ; TEST6 . CR" }; +static const char *const l480[] = { "BEGIN" }; +static const char *const l481[] = { ": TEST8 BEGIN DUP 1- DUP 0= UNTIL ; 5 TEST8 . CR" }; +static const long long s481[] = { 5LL, 4LL, 3LL, 2LL, 1LL }; +static const char *const l482[] = { ": TEST9 BEGIN 1 UNTIL ; IMMEDIATE" }; +static const char *const l483[] = { "UNTIL" }; +static const char *const l484[] = { ": TEST10 BEGIN DUP 5 < WHILE 1+ REPEAT ; 0 TEST10 . CR" }; +static const char *const l485[] = { ": TEST11 BEGIN DUP 0< WHILE 1+ REPEAT ; 0 TEST11 . CR" }; +static const char *const l486[] = { "WHILE" }; +static const char *const l487[] = { ": TEST12 BEGIN DUP 5 < WHILE 1+ REPEAT ; 0 TEST12 . CR" }; +static const char *const l488[] = { "REPEAT" }; +static const char *const l489[] = { ": TEST13 5 0 DO I . LOOP ; TEST13 CR" }; +static const char *const l490[] = { ": TEST14 -1 -5 DO I . LOOP ; TEST14 CR" }; +static const char *const l491[] = { ": TEST15 0 0 DO LOOP ;" }; +static const char *const l492[] = { ": TEST16 3 0 DO 3 0 DO J I + . LOOP LOOP ; TEST16 CR" }; +static const char *const l493[] = { ": TEST20 5 0 DO I . LOOP ; TEST20 CR" }; +static const char *const l494[] = { "LOOP" }; +static const char *const l495[] = { ": TEST21 10 0 DO I . 2 +LOOP ; TEST21 CR" }; +static const char *const l496[] = { ": TEST22 0 10 DO I . -1 +LOOP ; TEST22 CR" }; +static const char *const l497[] = { ": TEST23 10 0 DO I . DUP +LOOP ; 3 TEST23 CR" }; +static const long long s497[] = { 3LL }; +static const char *const l498[] = { ": TI 4 0 DO I . LOOP CR ; TI" }; +static const char *const l499[] = { ": TI1 1 0 DO I . LOOP CR ; TI1" }; +static const char *const l500[] = { ": TI2 5 3 DO I . LOOP CR ; TI2" }; +static const char *const l501[] = { ": TI3 3 0 DO I 2 * . LOOP CR ; TI3" }; +static const char *const l502[] = { ": TJ 2 0 DO 3 0 DO J . LOOP LOOP CR ; TJ" }; +static const char *const l503[] = { ": TJ2 2 0 DO 2 0 DO J I + . LOOP LOOP CR ; TJ2" }; +static const char *const l504[] = { ": TEX 5 EXIT 99 ; TEX . CR" }; +static const char *const l505[] = { ": TEX2 DUP 0> IF EXIT THEN NEGATE ; 3 TEX2 . CR" }; +static const char *const l506[] = { ": TEX2 DUP 0> IF EXIT THEN NEGATE ; -4 TEX2 . CR" }; +static const char *const l507[] = { ": TEX3 1 2 EXIT 3 ; TEX3 . . CR" }; +static const char *const l508[] = { ": TLV 0 5 0 DO I 3 = IF LEAVE THEN 1+ LOOP ; TLV . CR" }; +static const char *const l509[] = { ": TLV2 0 5 0 DO LEAVE 1+ LOOP ; TLV2 . CR" }; +static const char *const l510[] = { ": TLV3 0 5 0 \077DO I 2 = IF LEAVE THEN 1+ LOOP ; TLV3 . CR" }; +static const char *const l511[] = { "3 4 U* . . CR" }; +static const char *const l512[] = { "0 5 U* . . CR" }; +static const char *const l513[] = { "-1 -1 U* 2+ . 1 = . CR" }; +static const char *const l514[] = { "7 0 2 U/MOD . . CR" }; +static const char *const l515[] = { "12 0 4 U/MOD . . CR" }; +static const char *const l516[] = { "0 1 2 U/MOD 2* . . CR" }; +static const char *const l517[] = { "-1 -1 U* -1 U/MOD 1+ . . CR" }; +static const char *const l518[] = { "-1 -2 -1 U/MOD 1+ . 2+ . CR" }; +static const char *const l519[] = { "1 0 0 U/MOD" }; +static const char *const l520[] = { "VARIABLE Q1 42 Q1 ! Q1 \077 CR" }; +static const char *const l521[] = { ": E1 7 ; FIND E1 EXECUTE . CR" }; +static const char *const l522[] = { "42 U. CR" }; +static const char *const l523[] = { "-1 U. CR" }; +static const char *const l524[] = { ": C1 0 0 BL WORD CONVERT DROP ; C1 123 . . CR" }; +static const char *const l525[] = { "' DUP 0= . CR" }; +static const char *const l526[] = { ": Q3 .\042 hi there\042 ; Q3 CR" }; +static const char *const l527[] = { ": Q4 [ 5 ] LITERAL ; Q4 . CR" }; +static const char *const l528[] = { "STATE @ . CR" }; +static const char *const l529[] = { ": Q5 STATE @ 0= . ; IMMEDIATE : Q6 Q5 ; CR" }; +static const char *const l530[] = { ": Q7 COMPILE DUP ; IMMEDIATE : Q8 Q7 ; 3 Q8 . . CR" }; +static const char *const l531[] = { ": Q9 [COMPILE] IF ; IMMEDIATE : Q10 Q9 1 ELSE 2 THEN ; 0 Q10", ". -1 Q10 . CR" }; +static const char *const l532[] = { "1 ( 2 ) 3 . . CR" }; +static const char *const l533[] = { "BLK @ . CR" }; +static const char *const l534[] = { "79-STANDARD" }; +static const char *const l535[] = { ": W1 BL WORD COUNT TYPE ; W1 HELLO" }; +static const char *const l536[] = { ": W2 44 WORD COUNT TYPE ; W2 A B," }; +static const char *const l537[] = { ": W3 BL WORD C@ . ; W3 ABC" }; +static const char *const l538[] = { ": W4 BL WORD COUNT TYPE ; W4 X" }; const v4_post_case v4_post_cases[] = { { "DUP.basic", l0, 1u, V4_POST_STACK, 0, 0u, "5 5 \012", 5u }, @@ -944,156 +945,157 @@ const v4_post_case v4_post_cases[] = { { "LOAD.zero_block", l385, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, { "LOAD.nonexistent", l386, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, { "LOAD.empty_stack", l387, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "LIST.basic", l388, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "LIST.zero_block", l389, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "LIST.nonexistent", l390, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "LIST.empty_stack", l391, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "SCR.basic", l392, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, - { "SCR.after_list", l393, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "SCR.after_load", l394, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, - { "HERE.basic~2", l395, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, - { "HERE.after_comma~2", l396, 1u, V4_POST_STACK, s396, 1u, "", 0u }, - { "HERE.after_c_comma", l397, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, - { "HERE.after_allot", l398, 1u, V4_POST_STACK, 0, 0u, "10 \012", 4u }, - { "HERE.stability", l399, 1u, V4_POST_DEPTH_OUTPUT, 0, 1u, "-1 \012", 4u }, - { "ALLOT.basic~2", l400, 1u, V4_POST_STACK, 0, 0u, "10 \012", 4u }, - { "ALLOT.zero~2", l401, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "ALLOT.negative~2", l402, 1u, V4_POST_STACK, 0, 0u, "-4 \012", 4u }, - { "ALLOT.large", l403, 1u, V4_POST_STACK, 0, 0u, "100 \012", 5u }, - { "ALLOT.after_use", l404, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "ALLOT.empty_stack", l405, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { ",.basic~2", l406, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { ",.negative~2", l407, 1u, V4_POST_STACK, 0, 0u, "-999 \012", 6u }, - { ",.zero", l408, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { ",.max_int", l409, 1u, V4_POST_STACK, 0, 0u, "2147483647 \012", 12u }, - { ",.min_int", l410, 1u, V4_POST_STACK, 0, 0u, "-2147483648 \012", 13u }, - { ",.multiple", l411, 1u, V4_POST_STACK, 0, 0u, "20 20 \012", 7u }, - { ",.empty_stack", l412, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "PAD.basic~2", l413, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, - { "PAD.different_from_here~2", l414, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "PAD.stability", l415, 1u, V4_POST_DEPTH_OUTPUT, 0, 1u, "-1 \012", 4u }, - { "CREATE.basic", l416, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "CREATE.empty_name", l417, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "CREATE.redefine_shadows", l418, 1u, V4_POST_STACK, 0, 0u, "2 \012", 3u }, - { "CREATE.duplicate", l419, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "CREATE.long_name", l420, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "FORGET.basic", l421, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "IMMEDIATE.basic", l422, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "IMMEDIATE.already_immediate", l423, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "FIND.existing", l424, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "FIND.user_word", l425, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "FIND.nonexistent", l426, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "FIND.empty", l427, 1u, V4_POST_STACK, s427, 1u, "", 0u }, - { "DEFINITIONS.basic", l428, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DEFINITIONS.multiple", l429, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VOCABULARY.basic", l430, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VOCABULARY.create_and_switch", l431, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "VOCABULARY.word_isolation", l432, 2u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VOCABULARY.cross_vocab_access", l433, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "VOCABULARY.multiple_vocabs", l434, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VOCABULARY.duplicate", l435, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VOCABULARY.empty_name", l436, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "FORTH.basic", l437, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "FORTH.persistence", l438, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "FORTH.from_other", l439, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DEFINITIONS.basic~2", l440, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DEFINITIONS.new_vocab", l441, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DEFINITIONS.word_creation", l442, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "CONTEXT.basic", l443, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "CONTEXT.initial", l444, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "CURRENT.basic", l445, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "CURRENT.after_def", l446, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, - { "ABORT.basic", l447, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "ABORT.with_data", l448, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "ABORT.in_definition_runtime", l449, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { ":.basic", l450, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { ":.empty_name", l451, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { ";.alone", l452, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { ";.immediate", l453, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "CONSTANT.basic", l454, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "CONSTANT.zero", l455, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "CONSTANT.negative", l456, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, - { "CONSTANT.empty_stack", l457, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "VARIABLE.basic", l458, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "VARIABLE.multiple", l459, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "VARIABLE.store_fetch", l460, 1u, V4_POST_STACK, 0, 0u, "-99 \012", 5u }, - { "CREATE.basic~2", l461, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "CREATE.with_data", l462, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "CREATE.empty_name~2", l463, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "DOES>.basic", l464, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "DOES>.multiple", l465, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DOES>.outside", l466, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "[.basic", l467, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "[.outside", l468, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "].nested", l469, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "IF.true", l470, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "IF.false", l471, 1u, V4_POST_STACK, 0, 0u, "24 \012", 4u }, - { "IF.nested", l472, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, - { "IF.no_else", l473, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "IF.empty_stack", l474, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "ELSE.alone", l475, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "THEN.alone", l476, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "BEGIN.until", l477, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "BEGIN.while", l478, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "BEGIN.alone", l479, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "UNTIL.basic", l480, 1u, V4_POST_STACK, s480, 5u, "0 \012", 3u }, - { "UNTIL.immediate", l481, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "UNTIL.no_begin", l482, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "WHILE.basic", l483, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "WHILE.zero_times", l484, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "WHILE.no_begin", l485, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "REPEAT.basic", l486, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "REPEAT.no_while", l487, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "DO.basic", l488, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 4 \012", 11u }, - { "DO.negative", l489, 1u, V4_POST_STACK, 0, 0u, "-5 -4 -3 -2 \012", 13u }, - { "DO.empty", l490, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "DO.nested", l491, 1u, V4_POST_STACK, 0, 0u, "0 1 2 1 2 3 2 3 4 \012", 19u }, - { "LOOP.basic", l492, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 4 \012", 11u }, - { "LOOP.no_do", l493, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "+LOOP.basic", l494, 1u, V4_POST_STACK, 0, 0u, "0 2 4 6 8 \012", 11u }, - { "+LOOP.negative", l495, 1u, V4_POST_STACK, 0, 0u, "10 9 8 7 6 5 4 3 2 1 0 \012", 24u }, - { "+LOOP.variable", l496, 1u, V4_POST_STACK, s496, 1u, "0 3 6 9 \012", 9u }, - { "I.basic", l497, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 \012", 9u }, - { "I.single", l498, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "I.offset", l499, 1u, V4_POST_STACK, 0, 0u, "3 4 \012", 5u }, - { "I.in_expr", l500, 1u, V4_POST_STACK, 0, 0u, "0 2 4 \012", 7u }, - { "J.basic", l501, 1u, V4_POST_STACK, 0, 0u, "0 0 0 1 1 1 \012", 13u }, - { "J.paired", l502, 1u, V4_POST_STACK, 0, 0u, "0 1 1 2 \012", 9u }, - { "EXIT.early_return", l503, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "EXIT.cond_exit_pos", l504, 1u, V4_POST_STACK, 0, 0u, "3 \012", 3u }, - { "EXIT.cond_exit_neg", l505, 1u, V4_POST_STACK, 0, 0u, "4 \012", 3u }, - { "EXIT.no_skipped", l506, 1u, V4_POST_STACK, 0, 0u, "2 1 \012", 5u }, - { "LEAVE.basic", l507, 1u, V4_POST_STACK, 0, 0u, "4 \012", 3u }, - { "LEAVE.at_start", l508, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, - { "LEAVE.qdloop", l509, 1u, V4_POST_STACK, 0, 0u, "3 \012", 3u }, - { "U*.small", l510, 1u, V4_POST_STACK, 0, 0u, "0 12 \012", 6u }, - { "U*.zero", l511, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, - { "U*.full", l512, 1u, V4_POST_STACK, 0, 0u, "0 -1 \012", 6u }, - { "U/MOD.small", l513, 1u, V4_POST_STACK, 0, 0u, "3 1 \012", 5u }, - { "U/MOD.exact", l514, 1u, V4_POST_STACK, 0, 0u, "3 0 \012", 5u }, - { "U/MOD.double", l515, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, - { "U/MOD.inverse", l516, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, - { "U/MOD.carry", l517, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, - { "U/MOD.by_zero", l518, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, - { "\077.basic", l519, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "EXECUTE.found", l520, 1u, V4_POST_STACK, 0, 0u, "7 \012", 3u }, - { "U..small", l521, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, - { "U..unsigned", l522, 1u, V4_POST_STACK, 0, 0u, "18446744073709551615 \012", 22u }, - { "CONVERT.digits", l523, 1u, V4_POST_STACK, 0, 0u, "0 123 \012", 7u }, - { "'.found", l524, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { ".\042.in_definition", l525, 1u, V4_POST_STACK, 0, 0u, "hi there\012", 9u }, - { "LITERAL.basic", l526, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, - { "STATE.interpreting", l527, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "STATE.compiling", l528, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "COMPILE.basic", l529, 1u, V4_POST_STACK, 0, 0u, "3 3 \012", 5u }, - { "[COMPILE].basic", l530, 2u, V4_POST_STACK, 0, 0u, "2 1 \012", 5u }, - { "(.comment", l531, 1u, V4_POST_STACK, 0, 0u, "3 1 \012", 5u }, - { "BLK.terminal", l532, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, - { "79-STANDARD.present", l533, 1u, V4_POST_STACK, 0, 0u, "", 0u }, - { "WORD.next_word", l534, 1u, V4_POST_STACK, 0, 0u, "HELLO", 5u }, - { "WORD.delimiter", l535, 1u, V4_POST_STACK, 0, 0u, "A B", 3u }, - { "WORD.count", l536, 1u, V4_POST_STACK, 0, 0u, "3 ", 2u }, - { "WORD.skips_leading", l537, 1u, V4_POST_STACK, 0, 0u, "X", 1u }, + { "LOAD.rest_of_line", l388, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "LIST.basic", l389, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "LIST.zero_block", l390, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "LIST.nonexistent", l391, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "LIST.empty_stack", l392, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "SCR.basic", l393, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, + { "SCR.after_list", l394, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "SCR.after_load", l395, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, + { "HERE.basic~2", l396, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, + { "HERE.after_comma~2", l397, 1u, V4_POST_STACK, s397, 1u, "", 0u }, + { "HERE.after_c_comma", l398, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, + { "HERE.after_allot", l399, 1u, V4_POST_STACK, 0, 0u, "10 \012", 4u }, + { "HERE.stability", l400, 1u, V4_POST_DEPTH_OUTPUT, 0, 1u, "-1 \012", 4u }, + { "ALLOT.basic~2", l401, 1u, V4_POST_STACK, 0, 0u, "10 \012", 4u }, + { "ALLOT.zero~2", l402, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "ALLOT.negative~2", l403, 1u, V4_POST_STACK, 0, 0u, "-4 \012", 4u }, + { "ALLOT.large", l404, 1u, V4_POST_STACK, 0, 0u, "100 \012", 5u }, + { "ALLOT.after_use", l405, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "ALLOT.empty_stack", l406, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { ",.basic~2", l407, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { ",.negative~2", l408, 1u, V4_POST_STACK, 0, 0u, "-999 \012", 6u }, + { ",.zero", l409, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { ",.max_int", l410, 1u, V4_POST_STACK, 0, 0u, "2147483647 \012", 12u }, + { ",.min_int", l411, 1u, V4_POST_STACK, 0, 0u, "-2147483648 \012", 13u }, + { ",.multiple", l412, 1u, V4_POST_STACK, 0, 0u, "20 20 \012", 7u }, + { ",.empty_stack", l413, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "PAD.basic~2", l414, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, + { "PAD.different_from_here~2", l415, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "PAD.stability", l416, 1u, V4_POST_DEPTH_OUTPUT, 0, 1u, "-1 \012", 4u }, + { "CREATE.basic", l417, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "CREATE.empty_name", l418, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "CREATE.redefine_shadows", l419, 1u, V4_POST_STACK, 0, 0u, "2 \012", 3u }, + { "CREATE.duplicate", l420, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "CREATE.long_name", l421, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "FORGET.basic", l422, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "IMMEDIATE.basic", l423, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "IMMEDIATE.already_immediate", l424, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "FIND.existing", l425, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "FIND.user_word", l426, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "FIND.nonexistent", l427, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "FIND.empty", l428, 1u, V4_POST_STACK, s428, 1u, "", 0u }, + { "DEFINITIONS.basic", l429, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DEFINITIONS.multiple", l430, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VOCABULARY.basic", l431, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VOCABULARY.create_and_switch", l432, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "VOCABULARY.word_isolation", l433, 2u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VOCABULARY.cross_vocab_access", l434, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "VOCABULARY.multiple_vocabs", l435, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VOCABULARY.duplicate", l436, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VOCABULARY.empty_name", l437, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "FORTH.basic", l438, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "FORTH.persistence", l439, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "FORTH.from_other", l440, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DEFINITIONS.basic~2", l441, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DEFINITIONS.new_vocab", l442, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DEFINITIONS.word_creation", l443, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "CONTEXT.basic", l444, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "CONTEXT.initial", l445, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "CURRENT.basic", l446, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "CURRENT.after_def", l447, 1u, V4_POST_DEPTH, 0, 0u, "", 0u }, + { "ABORT.basic", l448, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "ABORT.with_data", l449, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "ABORT.in_definition_runtime", l450, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { ":.basic", l451, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { ":.empty_name", l452, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { ";.alone", l453, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { ";.immediate", l454, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "CONSTANT.basic", l455, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "CONSTANT.zero", l456, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "CONSTANT.negative", l457, 1u, V4_POST_STACK, 0, 0u, "-1 \012", 4u }, + { "CONSTANT.empty_stack", l458, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "VARIABLE.basic", l459, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "VARIABLE.multiple", l460, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "VARIABLE.store_fetch", l461, 1u, V4_POST_STACK, 0, 0u, "-99 \012", 5u }, + { "CREATE.basic~2", l462, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "CREATE.with_data", l463, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "CREATE.empty_name~2", l464, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "DOES>.basic", l465, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "DOES>.multiple", l466, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DOES>.outside", l467, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "[.basic", l468, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "[.outside", l469, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "].nested", l470, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "IF.true", l471, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "IF.false", l472, 1u, V4_POST_STACK, 0, 0u, "24 \012", 4u }, + { "IF.nested", l473, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, + { "IF.no_else", l474, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "IF.empty_stack", l475, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "ELSE.alone", l476, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "THEN.alone", l477, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "BEGIN.until", l478, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "BEGIN.while", l479, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "BEGIN.alone", l480, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "UNTIL.basic", l481, 1u, V4_POST_STACK, s481, 5u, "0 \012", 3u }, + { "UNTIL.immediate", l482, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "UNTIL.no_begin", l483, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "WHILE.basic", l484, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "WHILE.zero_times", l485, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "WHILE.no_begin", l486, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "REPEAT.basic", l487, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "REPEAT.no_while", l488, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "DO.basic", l489, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 4 \012", 11u }, + { "DO.negative", l490, 1u, V4_POST_STACK, 0, 0u, "-5 -4 -3 -2 \012", 13u }, + { "DO.empty", l491, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "DO.nested", l492, 1u, V4_POST_STACK, 0, 0u, "0 1 2 1 2 3 2 3 4 \012", 19u }, + { "LOOP.basic", l493, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 4 \012", 11u }, + { "LOOP.no_do", l494, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "+LOOP.basic", l495, 1u, V4_POST_STACK, 0, 0u, "0 2 4 6 8 \012", 11u }, + { "+LOOP.negative", l496, 1u, V4_POST_STACK, 0, 0u, "10 9 8 7 6 5 4 3 2 1 0 \012", 24u }, + { "+LOOP.variable", l497, 1u, V4_POST_STACK, s497, 1u, "0 3 6 9 \012", 9u }, + { "I.basic", l498, 1u, V4_POST_STACK, 0, 0u, "0 1 2 3 \012", 9u }, + { "I.single", l499, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "I.offset", l500, 1u, V4_POST_STACK, 0, 0u, "3 4 \012", 5u }, + { "I.in_expr", l501, 1u, V4_POST_STACK, 0, 0u, "0 2 4 \012", 7u }, + { "J.basic", l502, 1u, V4_POST_STACK, 0, 0u, "0 0 0 1 1 1 \012", 13u }, + { "J.paired", l503, 1u, V4_POST_STACK, 0, 0u, "0 1 1 2 \012", 9u }, + { "EXIT.early_return", l504, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "EXIT.cond_exit_pos", l505, 1u, V4_POST_STACK, 0, 0u, "3 \012", 3u }, + { "EXIT.cond_exit_neg", l506, 1u, V4_POST_STACK, 0, 0u, "4 \012", 3u }, + { "EXIT.no_skipped", l507, 1u, V4_POST_STACK, 0, 0u, "2 1 \012", 5u }, + { "LEAVE.basic", l508, 1u, V4_POST_STACK, 0, 0u, "4 \012", 3u }, + { "LEAVE.at_start", l509, 1u, V4_POST_STACK, 0, 0u, "1 \012", 3u }, + { "LEAVE.qdloop", l510, 1u, V4_POST_STACK, 0, 0u, "3 \012", 3u }, + { "U*.small", l511, 1u, V4_POST_STACK, 0, 0u, "0 12 \012", 6u }, + { "U*.zero", l512, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, + { "U*.full", l513, 1u, V4_POST_STACK, 0, 0u, "0 -1 \012", 6u }, + { "U/MOD.small", l514, 1u, V4_POST_STACK, 0, 0u, "3 1 \012", 5u }, + { "U/MOD.exact", l515, 1u, V4_POST_STACK, 0, 0u, "3 0 \012", 5u }, + { "U/MOD.double", l516, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, + { "U/MOD.inverse", l517, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, + { "U/MOD.carry", l518, 1u, V4_POST_STACK, 0, 0u, "0 0 \012", 5u }, + { "U/MOD.by_zero", l519, 1u, V4_POST_ERROR, 0, 0u, "", 0u }, + { "\077.basic", l520, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "EXECUTE.found", l521, 1u, V4_POST_STACK, 0, 0u, "7 \012", 3u }, + { "U..small", l522, 1u, V4_POST_STACK, 0, 0u, "42 \012", 4u }, + { "U..unsigned", l523, 1u, V4_POST_STACK, 0, 0u, "18446744073709551615 \012", 22u }, + { "CONVERT.digits", l524, 1u, V4_POST_STACK, 0, 0u, "0 123 \012", 7u }, + { "'.found", l525, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { ".\042.in_definition", l526, 1u, V4_POST_STACK, 0, 0u, "hi there\012", 9u }, + { "LITERAL.basic", l527, 1u, V4_POST_STACK, 0, 0u, "5 \012", 3u }, + { "STATE.interpreting", l528, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "STATE.compiling", l529, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "COMPILE.basic", l530, 1u, V4_POST_STACK, 0, 0u, "3 3 \012", 5u }, + { "[COMPILE].basic", l531, 2u, V4_POST_STACK, 0, 0u, "2 1 \012", 5u }, + { "(.comment", l532, 1u, V4_POST_STACK, 0, 0u, "3 1 \012", 5u }, + { "BLK.terminal", l533, 1u, V4_POST_STACK, 0, 0u, "0 \012", 3u }, + { "79-STANDARD.present", l534, 1u, V4_POST_STACK, 0, 0u, "", 0u }, + { "WORD.next_word", l535, 1u, V4_POST_STACK, 0, 0u, "HELLO", 5u }, + { "WORD.delimiter", l536, 1u, V4_POST_STACK, 0, 0u, "A B", 3u }, + { "WORD.count", l537, 1u, V4_POST_STACK, 0, 0u, "3 ", 2u }, + { "WORD.skips_leading", l538, 1u, V4_POST_STACK, 0, 0u, "X", 1u }, }; -const unsigned v4_post_case_count = 538u; +const unsigned v4_post_case_count = 539u; diff --git a/v4/tests/test_host_unit.c b/v4/tests/test_host_unit.c index f09dc000..13657900 100644 --- a/v4/tests/test_host_unit.c +++ b/v4/tests/test_host_unit.c @@ -439,8 +439,11 @@ int main(void) uint64_t hash = v4_image_dict_hash(hera, &im); memcpy(before, hera->mem, sizeof before); host.self = 0; host.n = hera; host.line = post_line; host.say = post_say; - CHECK(v4_post_run(&host, v4_post_cases, v4_post_case_count, &tally) && tally.tests == 538 && tally.pass == 538 && tally.fail == 0 - && strstr(post_said, "PARITY:V4_POST tests=538 pass=538 fail=0\n") != NULL && strstr(post_said, "POST FAIL") == NULL, + char want_line[64]; /* the table's own count, not a number typed here: it was 538, POST grew (#190) */ + snprintf(want_line, sizeof want_line, "PARITY:V4_POST tests=%u pass=%u fail=0\n", v4_post_case_count, v4_post_case_count); + CHECK(v4_post_run(&host, v4_post_cases, v4_post_case_count, &tally) && tally.tests == v4_post_case_count + && tally.pass == v4_post_case_count && tally.fail == 0 + && strstr(post_said, want_line) != NULL && strstr(post_said, "POST FAIL") == NULL, "and passes POST, which the kernel runs on her: %u of %u, %u failed; \"%s\"", tally.pass, tally.tests, tally.fail, post_said); CHECK(strcmp(tell(10, "RS1"), "42 42 \n") == 0, "while POST runs, what its cases define is on her: \"%s\"", printed); CHECK(strstr(tell(10, "COLD"), "Cold Start") != NULL, "the kernel puts her back to the system as it was sealed"); diff --git a/v4/tools/mkpost.py b/v4/tools/mkpost.py index 025cfb27..02b57a8a 100755 --- a/v4/tools/mkpost.py +++ b/v4/tools/mkpost.py @@ -29,7 +29,9 @@ and the same lines.) """ import argparse import os +import platform import re +import shutil import subprocess import sys @@ -252,7 +254,13 @@ def run_v3(v3, cases): script.extend(line[3:] for line in case["lines"]) script.append('." [[E%d]]" BASE @ DECIMAL .S BASE ! ." [[S%d]]"' % (n, n)) script.append("BYE") - done = subprocess.run([v3, "--log-none"], input=("\n".join(script) + "\n").encode("latin-1"), + # With the address space randomised, what v3 prints for an address (>IN, FIND) is different on + # every run, so the report (POST79.md) could never be written twice the same (#190): v3 is run + # with randomisation off (setarch -R), and its addresses are the same each time. + cmd = [v3, "--log-none"] + if shutil.which("setarch"): + cmd = ["setarch", platform.machine(), "-R"] + cmd + done = subprocess.run(cmd, input=("\n".join(script) + "\n").encode("latin-1"), capture_output=True, timeout=600) text = ANSI.sub("", done.stdout.decode("latin-1")) # a byte is a character results = []