feat(v4.0.0): POST is the kernel's -- the boot feeds the cases, and nothing of the harness is on the node
The boot runs POST with the runner (v4/system/post.c) after the capsules:
it feeds the 538 cases to the node and judges them from outside. A
case's printing no longer reaches the console. What the cases define
stays in the dictionary, as in v3; the system is sealed after POST and
the boot prints PARITY:V4_SYSTEM word_count=N dict_hash=..., as v3 prints
its parity after POST.
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.
The generator runs v3 on the lines as the kernel sends them, without the
capsule's "T| ". One expected result follows from that: >IN.initial
prints 6, not 9.
make -C v4 test, sanitize and hosted-check pass; amd64, aarch64 and
riscv64 boot, POST 538 of 538, word_count=411, dict_hash
0x6fb1d09418b189ee on all six: logs/20261007-105118, -105335, -105651.
T{ is unknown at the prompt; RS1 prints 42 42 before and after COLD. A
scratch build with one expectation changed names the case and ends
PARITY:FAIL, POST: FAILED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2bf958ce3a
commit
4bdb210a99
+14
-10
@@ -159,21 +159,25 @@ a time with POST after each, is the next step (`NUCLEUS.md` section 8).
|
||||
|
||||
## POST
|
||||
|
||||
`capsules/v4/post79.4th`: 538 cases in blocks 7000 up, covering 126 of the
|
||||
130 words of the FORTH-79 Required Word Set. 443 are v3's cases with what
|
||||
the hosted v3 binary did as the expected result. The other 107, and the 27
|
||||
v3 cases left out, are listed with reasons in `docs/v4.0.0/POST79.md`.
|
||||
POST is the kernel's, as in v3 (`MESH.md` step 6b, `NUCLEUS.md` 6.3). The
|
||||
kernel holds the cases, `v4/system/post_cases.c`: 538 of them, covering 126
|
||||
of the 130 words of the FORTH-79 Required Word Set. 431 are v3's cases with
|
||||
what the hosted v3 binary did as the expected result; every other case,
|
||||
and the v3 cases left out, are listed with reasons in
|
||||
`docs/v4.0.0/POST79.md`.
|
||||
|
||||
- `make -C v4 post` boots the amd64 system: the quick check after a change.
|
||||
- `make -C v4 hosted-check` boots all three hosted ISAs and compares them.
|
||||
- `make -C v4 post79` writes the capsule again (`tools/mkpost.py`,
|
||||
- `make -C v4 post79` writes the cases again (`tools/mkpost.py`,
|
||||
`tools/post79_rules.py`); it needs the hosted v3 binary.
|
||||
|
||||
POST is FORTH: a harness of FORTH-79 words and two nucleus hooks, `(CATCH)`
|
||||
and `(EMIT-HOOK)`. It forgets itself when it has finished. The boot passes
|
||||
only on seeing POST's tally line with `fail=0` (`v4/system/boot.c`). A colon
|
||||
definition broken on purpose (`U/MOD` without its last `SWAP`) fails five
|
||||
cases and the boot stops with `POST: FAILED`.
|
||||
The runner, `v4/system/post.c`, feeds each case to the node a line at a
|
||||
time, keeps what the node prints, reads its data stack from outside, and
|
||||
judges: an error exactly if one is expected, and otherwise the stack and
|
||||
every character printed. Nothing of POST is in the node's dictionary. What
|
||||
the cases define stays there, as in v3, and the system is sealed after
|
||||
POST. The boot then prints `PARITY:V4_SYSTEM word_count=N dict_hash=0x...`,
|
||||
and passes only if no case failed (`v4/system/boot.c`).
|
||||
|
||||
Not tested: `KEY`, `EXPECT`, `QUERY` (the keyboard) and `QUIT` (it returns
|
||||
without ` ok`).
|
||||
|
||||
Reference in New Issue
Block a user