fix(v4.0.0): POST leaves nothing, as v3 really does; and what the review of step 6b found
Captain Bob was told that v3 leaves the words POST's cases define in the
dictionary, and ruled that v4 should. That was false: v3's run_test_suite
puts the dictionary back after each word's cases (test_common.c:333,
:365). Shown that, he ruled that POST leaves nothing. The boot now
seals the system, runs POST, and has the node do COLD, whose printing is
not shown; PARITY:V4_SYSTEM is the system as sealed.
A case the node does not come back from ends POST there, named, with how
many were not run: it would have stalled the boot for hours, where the
capsule had ended it. The runner's test of it now uses a word that
really never ends.
hosted-check also requires that RS1 and T{ are unknown after boot, and
boots a program whose POST has failing cases (tests/post_cases_fail.c):
PARITY:FAIL, POST: FAILED, no prompt, none of a case's printing shown.
Comments and documents that still named the POST capsule or its two
hooks are brought up to date; NUCLEUS.md 6.3 says what v3 does, with the
lines, and how the wrong ruling came about.
make -C v4 test, sanitize and hosted-check pass; amd64, aarch64 and
riscv64 boot, POST 538 of 538, word_count=314, dict_hash
0x220ab283a504a3b3 on all six: logs/20261007-112638, -112901, -113220.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
eda6577a53
commit
18adf59091
+28
-10
@@ -76,7 +76,7 @@ moved.
|
||||
| File | Capsule name | Contents |
|
||||
|---|---|---|
|
||||
| `capsules/v4/forth79.4th` | `v4:forth79.4th` | The Required Word Set as colon definitions |
|
||||
| `capsules/v4/post79.4th` | `v4:post79.4th` | The POST harness and its cases |
|
||||
| ~~`capsules/v4/post79.4th`~~ | | Gone 2026-10-07: POST is the kernel's (6.3); its cases are `v4/system/post_cases.c` |
|
||||
|
||||
Both are ordinary `.4th` capsules: `Block N` headers, lines of at most 64
|
||||
characters, at most 16 lines to a block. `tools/mkcapsule.c` bakes them into
|
||||
@@ -168,8 +168,10 @@ for the record.
|
||||
the interpreter, reads the VM's error flag, and puts the VM's stack
|
||||
pointers, error and mode back (`test_common.c`, `run_single_test`). It
|
||||
runs once at boot on the first VM, against block RAM of POST's own, and
|
||||
the parity line is taken afterwards. Whatever the cases define stays in
|
||||
the dictionary.
|
||||
the parity line is taken afterwards. What the cases define does not stay:
|
||||
`run_test_suite` saves the dictionary before each word's cases and puts it
|
||||
back after them, "to remove test-created words" (`test_common.c:333`,
|
||||
`:365`).
|
||||
|
||||
**v4.**
|
||||
|
||||
@@ -190,12 +192,28 @@ the dictionary.
|
||||
ended in an error if any of its lines did.
|
||||
- *What it prints.* For a failing case, `POST FAIL: name out<...>
|
||||
stack<...>`. Then `PARITY:V4_POST tests=N pass=N fail=N`.
|
||||
- *What is left.* What the cases define stays in the dictionary, as in
|
||||
v3 (ruled 2026-10-07, on being told that the capsule had ended with
|
||||
`FORGET` and left nothing). The system is sealed after POST, so `COLD`
|
||||
comes back to those words and `FORGET` will not go below them. Measured
|
||||
2026-10-07: they take about 1,290 cells of the 5,632 in the dictionary
|
||||
space.
|
||||
- *What is left: nothing*, as in v3. The system is sealed before POST,
|
||||
and after the last case the kernel has the node do `COLD`, which comes
|
||||
back to the system as sealed; what `COLD` prints is not shown. The
|
||||
dictionary is put back once, after all the cases, and not after each
|
||||
word's as v3 does: the expected results were taken from one v3 session
|
||||
in which nothing was put back between cases (6.4), and the capsule did
|
||||
the same with its one `FORGET` at the end.
|
||||
**How this came to be ruled twice.** On 2026-10-07 Captain Bob was told
|
||||
that v3 leaves the cases' definitions in the dictionary, and ruled "as
|
||||
v3: they stay". That was false: it was read from `run_single_test`,
|
||||
which puts back only the stacks, without reading `run_test_suite`. It
|
||||
was built so, and the review of the step found it; shown what v3 does,
|
||||
he ruled that POST leaves nothing.
|
||||
- *A case the node does not come back from* — it has stopped, or runs for
|
||||
ever — fails, and POST ends there: the runner names it and says how many
|
||||
cases were not run.
|
||||
- *What use still changes.* After POST and `COLD`, `HERE` and `LATEST` are
|
||||
where they were, but the dictionary hash is not what it was before POST:
|
||||
each word POST had interpreted has a different TTL in its entry, the
|
||||
count of uses left before its access is checked again
|
||||
(`v4/capsule/compile.v4`, `(ACL?)`). 138 cells, measured 2026-10-07. It
|
||||
is the same on every system, so the six still agree.
|
||||
- *Gone:* `capsules/v4/post79.4th` and its blocks 7000 up; the harness
|
||||
words; `(CATCH)` and `(EMIT-HOOK)`, with what `EMIT` and the prompt
|
||||
loop did for them.
|
||||
@@ -332,7 +350,7 @@ check for the FPGA gateway and is not part of this acceptance.
|
||||
| Hosted builds per ISA | `v4/Makefile` | Cross-compiler targets for aarch64 and riscv64 |
|
||||
|
||||
New: the shared v4 boot sequence (one file), the v4 dictionary hash, the
|
||||
case-extraction script, `forth79.4th` and `post79.4th`.
|
||||
case-extraction script, `forth79.4th` and `post79.4th` (the last gone since step 6b, 6.3).
|
||||
|
||||
The v3 boot is untouched: `STARFORTH_V4` defaults to off.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user