feat(v4): v3's whole POST is v4's POST -- 990 cases, all passed on Hera (#189)
Phase 7, Task 8: PARITY:V4_POST tests=990 pass=990 fail=0 on Hera (mesh-boot); the hosted
product 945 of them, all passed -- the 45 cases of physics.4th's words need the kernel.
- Enlarged, as ruled ("Enlarge v4 to fit"): a node is 32768 words, its data stack 1024
deep (v3's), host and kernel alike; the dictionary's end moves with them.
- POST's runner compares every value a case leaves (v3's leave 101); V4_POST_KERNEL marks
a case of the kernel's words, and a host without a kernel does not run it.
- mkpost.py --all is POST's table (make -C v4 post79), with docs/v4.0.0/POST.md; it reads a
module's #defines (v3's Mama cases are MAMA_IMPLEMENTED, 0: v3's own POST skips all 20);
it cuts no line between a word and the name it takes.
- Rules for the last of the table: the min/max and array-sum programs written as meant,
CREATE's 26-character name (FORTH-79: 31), many_defs.
- POST_FLOOR 990.
- Tests sized for a 32-deep stack and a 16384-word node made deep-stack-ready
(test_host_depth, test_host_quit, test_host_node, hosted-check, depthsweep.py).
make -C v4 test: all v4 tests passed. make -C kernel/tests test: all passed.
depthsweep at 1024: 230 runs, 0 failures. v4-checks running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
#include "v4/mesh.h"
|
||||
#include "v4/message.h"
|
||||
#include "v4/post.h"
|
||||
#include "block_subsystem.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -123,7 +124,12 @@ int main(void)
|
||||
CHECK(strstr(said, "PARITY:V4_ROM ") != 0, "the ROM assembled the nucleus, and said so");
|
||||
CHECK(strstr(said, "PARITY:V4_CAPSULE name=v4:forth79.4th ") && strstr(said, "PARITY:V4_CAPSULE name=v4:centre.4th ")
|
||||
&& strstr(said, "PARITY:V4_CAPSULE name=v4:hera.4th "), "FORTH-79 and the kernel's capsules, each with its parity line");
|
||||
CHECK(strstr(said, "PARITY:V4_POST tests=539 pass=539 fail=0") != 0, "POST passes on Hera, born in the fabric");
|
||||
{ /* every case, the kernel's too: Hera has its words (#189 Phase 7) */
|
||||
char want[64];
|
||||
const unsigned runs = v4_post_runs(v4_post_cases, v4_post_case_count, 1);
|
||||
snprintf(want, sizeof want, "PARITY:V4_POST tests=%u pass=%u fail=0", runs, runs);
|
||||
CHECK(runs == v4_post_case_count && strstr(said, want) != 0, "POST passes on Hera, born in the fabric: v3's whole POST, %u cases", runs);
|
||||
}
|
||||
CHECK(strstr(said, "PARITY:V4_SYSTEM word_count=") && strstr(said, "PARITY:OK\nPOST: PASSED\n"), "the system line, and POST: PASSED");
|
||||
if (failures) { printf(" %d checks, %d failures\n", checks, failures); return 1; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user