From 7422dc5319098d72c46a588a5bb15d42d948f4ae Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 03:44:41 +0000 Subject: [PATCH] plans: task 4, the small train placed -- design, for ruling Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm --- .../plans/2026-11-19-f18-artifact-build.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md b/docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md index 65f62b42..a24bbce3 100644 --- a/docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md +++ b/docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md @@ -294,3 +294,41 @@ only above `here`. - `make -C v4 test` passes, with the mesh boots at POST 990/990, and `mkf18a-64` and `mkf18a-32` at 83 checks. - `make -C v4 test-32` passes. - `make -C v4 sanitize` passes, `mkf18a` included at both widths. + +## 12. Task 4, the small train placed: design, for ruling + +Written 2026-11-20. Test 5 of §4: a few words of `.f18` with one import from the nucleus, built by `mkf18a` +into a `.f18a`, placed at a base other than 0. Its words run, and its call into the nucleus reaches the +nucleus. **Nothing here is built.** The kernel and the boot are unchanged: carrying artifacts in capsules +and placing them on a node are the ADR's steps 4 and 6 (§3). + +**What it needs that task 3 left out:** +- **Imports from the nucleus.** Ruling 4 (§10) names them with hash 0, resolved by name in the node's + dictionary. To check the import's effect at build time, the tool needs the nucleus's effects. Task 2 + derived them once, by the dictionary's names (`logs/20261119-effect/nucleus-dictionary.txt`); task 4 + makes that a part of the tool. +- **Placement**, `ABI.md` §5: check, place at the base, fix each relocation, enter each export. + +**The test, `test_place`, written first:** +1. A train of two files: `: SQ dup + ;` style words, one of them calling a nucleus word with a fixed + effect (`OVER` or the like, picked from the 214), one calling the other. +2. `mkf18a` builds it, with the nucleus import's hash 0 and its effect from the nucleus. +3. The host system is booted as `test_mesh_boot` boots it. The train is placed into Hera at her `HERE`, + which is not 0. `HERE` moves past it. +4. Console lines run the words and print their results. Each must be as the same source gives when + typed at the prompt. Each relocated cell must hold the base plus its offset, or the nucleus word's + address. +5. Refusals, each leaving the node unchanged: a nucleus import the dictionary lacks; an import whose + effect disagrees; an artifact the checker refuses; a relocation out of its slot's reach at that base. + +**For ruling, one at a time:** +1. **Where placement runs in task 4.** (a) A host placer in C, `v4/src/place.c`, writing the node's + memory. That is the oracle for the loader on the node, later. (b) The loader in FORTH on the node now, + pulled forward from step 6. +2. **How the exports are entered.** (a) The placer lays each entry as `(HEADER)` lays one (`ABI.md` §5, + step 4), and the kernel is told, as `(WORD-DEFINED)`. (b) No entries in task 4: the test calls the + words by address, and entering is left to step 6. +3. **How the tool knows the nucleus's effects.** (a) It assembles the nucleus itself, `capsules/v4/sys` + with its map, and derives each header's effect, as task 2's measurement did. A new argument names + the directory. (b) A file of the nucleus's effects is generated once per build and given to the tool. +4. **How an import names the nucleus.** `import nucleus NAME`, with `nucleus` a reserved train name.