v4: the host placer, and a small train placed on Hera at her HERE (ADR step 3, task 4)

place.c places a train's artifact as ABI.md section 5 has it, the
code split at each export with its entry before it. test_mesh_boot
places tests/train-place, built by mkf18a with an import from the
nucleus: its words run by name, the nucleus's ABS is reached, the
kernel records each export, and six refusals leave Hera unchanged.
mkf18a refuses a word that runs on into an export. Failed first;
gates pass, POST 990/990. Plan section 13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-20 12:44:50 +00:00
parent cf2a321807
commit f7769c0e93
16 changed files with 2246 additions and 10 deletions
@@ -346,3 +346,53 @@ and placing them on a node are the ADR's steps 4 and 6 (§3).
4. **The import's name: "import nucleus NAME".** `nucleus` is a reserved train name: the import has hash
0, its effect from the nucleus, and placement resolves it by name in the dictionary. Asked: that, or a
directive of its own.
## 13. Task 4 built (2026-11-20): the small train placed
**What changed.**
- `tools/f18a.c`, `mkf18a.c`: `import nucleus NAME` (ruling 4). Given `nucleus=SYSDIR`, the tool assembles
the nucleus as the ROM does and looks NAME up by its dictionary name. The import has hash 0 and the effect
derived there. A word in line there, or one with no fixed effect, is refused (ruling 3). The tool also
refuses a word that runs on into the next export (2a, as corrected).
- `include/v4/place.h`, `src/place.c`: the host placer, `v4_train_place` (rulings 1, 2, 2a). It checks
everything before it writes anything. Then it places the code at HERE, split at each export with the
export's entry laid before its code, fixes each relocation at its moved address, enters each export into
CURRENT's vocabulary, moves DP, and tells the kernel of each xt.
- `tests/train-place/`: the small train, two files. `DIST` calls the nucleus's `ABS`; `DIST2` calls `DIST`;
`CLAMP0` has a forward branch; `ADDR` holds `&DIST`. The Makefile builds its `.f18a` with `mkf18a-64`
itself.
- `tests/test_mesh_boot.c`: the system is booted, and the train is placed on Hera at her HERE (9782).
- `Makefile`: the train's rule. The mesh boot's four builds link the placer. `test_mkf18a` is built with the
host node's size, as the tool is: the nucleus did not fit a mesh node's.
**Test first, seen to fail.**
- `test_mkf18a`, nucleus imports: 3 of 88 checks failed against a stub (`logs/20261120-place/nucleus-before-64.txt`).
93 passed after.
- The run-on refusal failed first (`runon-before-64.txt`). Now 95 pass at both widths.
- `test_mesh_boot`: 16 new checks failed against a stub placer (`place-before.txt`). Now 141 pass (`place-after.txt`).
What the placement checks:
- the words run by name: `7 3 DIST .` and `3 7 DIST .` give 4, `DIST2` 8, `CLAMP0` 0 and 5;
- `ADDR` equals `' DIST`;
- a word compiled at the prompt calls a placed one;
- the kernel keeps a record of each export;
- six refusals each leave Hera unchanged: a wrong magic, another node size, a name the dictionary lacks, an
effect not the one expected, an import from a train, and no room below DLIMIT.
**The test's own error.** Its `defined` callback first only kept the xts, and did not tell the kernel. The
test was corrected to run the word in `(WORD-DEFINED)` with each xt, as `(DEFINED)` does. The placer was
not changed.
**Choices made in building, for ruling:**
1. An import from the nucleus declares no capabilities: the nucleus declares none.
2. The placer looks an import up in FORTH, from `(LATEST)`, skipping hidden entries, and enters the exports
into CURRENT's vocabulary.
3. An import from an artifact train (a hash that is not 0) is refused for now, "not placed yet".
4. The run-on check walks the word before each export with its range ending at that export. A word that
has no fixed effect for another reason, found first, is not seen to run on.
**Verified** (`logs/20261120-place/v4-gates.txt`, exit 0):
- `make -C v4 test`: the mesh boots at POST 990/990, the placement among them, and `mkf18a` at 95 checks
at both widths.
- `make -C v4 test-32` passes.
- `make -C v4 sanitize` passes, the mesh boot with the placement included.
+10
View File
@@ -0,0 +1,10 @@
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -D_POSIX_C_SOURCE=200809L -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/v3/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DTRAIN_F18A='"/home/user/LithosAnanke/v4/build/train-place-64.f18a"' -c /home/user/LithosAnanke/v4/tests/test_mesh_boot.c -o /home/user/LithosAnanke/v4/build/test_mesh_boot.o
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v4/system/mesh.c -o /home/user/LithosAnanke/v4/build/mesh-64.o
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v4/system/inference.c -o /home/user/LithosAnanke/v4/build/inference-64.o
cd /home/user/LithosAnanke/v4/build/v3o-mesh && cc -std=gnu99 -Wall -O2 -g -I/home/user/LithosAnanke/v3/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v4/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v3/src/block_subsystem.c /home/user/LithosAnanke/v3/src/blkio_ram.c /home/user/LithosAnanke/v3/src/blkio_file.c /home/user/LithosAnanke/v3/src/log.c /home/user/LithosAnanke/v3/src/platform/platform_init.c /home/user/LithosAnanke/v3/src/platform/linux/time.c /home/user/LithosAnanke/v4/system/blocks.c
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 /home/user/LithosAnanke/v4/build/test_mesh_boot.o /home/user/LithosAnanke/v4/build/mesh-64.o /home/user/LithosAnanke/v4/build/inference-64.o /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/build/mesh-rom-64.c /home/user/LithosAnanke/v4/build/rom-64.c /home/user/LithosAnanke/v4/build/v4_map_64.c /home/user/LithosAnanke/v4/build/capsule_generated.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/wire.c /home/user/LithosAnanke/v4/system/boot.c /home/user/LithosAnanke/v4/system/post.c /home/user/LithosAnanke/v4/system/post_cases.c /home/user/LithosAnanke/kernel/src/capsule/capsule_find.c /home/user/LithosAnanke/kernel/src/capsule/capsule_validate.c /home/user/LithosAnanke/kernel/src/capsule/capsule_sig.c /home/user/LithosAnanke/kernel/src/capsule/capsule_blocks.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/kernel/src/crypto/x509_ed25519.c /home/user/LithosAnanke/kernel/src/crypto/ed25519.c /home/user/LithosAnanke/kernel/src/crypto/fe25519.c /home/user/LithosAnanke/kernel/src/crypto/scalar25519.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/v4/build/v3o-mesh/*.o -o /home/user/LithosAnanke/v4/build/test_mesh_boot
[mesh boot, V4_CELL_BITS=64]
v4 mesh boot: V4_CELL_BITS=64
PARITY:V4_POST tests=990 pass=990 fail=0
141 checks, 0 failures
exit 0
+133
View File
@@ -0,0 +1,133 @@
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=36864 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DROM_ORIGIN=32768 -DROM_RANGE=4096 /home/user/LithosAnanke/v4/tools/mkrom.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/mkrom-64
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DV4_CAPSULE_DIR='"/home/user/LithosAnanke/v4/capsule"' -DV4_SYS_DIR='"/home/user/LithosAnanke/capsules/v4/sys"' /home/user/LithosAnanke/v4/tools/mkmap.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/mkmap-64
/home/user/LithosAnanke/v4/build/mkmap-64 > /home/user/LithosAnanke/v4/build/rom-map-64.f18
/home/user/LithosAnanke/v4/build/mkrom-64 mesh_rom /home/user/LithosAnanke/v4/build/mesh-rom-64.c /home/user/LithosAnanke/v4/build/mesh-rom-64.sym /home/user/LithosAnanke/v4/build/rom-map-64.f18 /home/user/LithosAnanke/capsules/v4/rom/mesh.f18 /home/user/LithosAnanke/capsules/v4/rom/math.f18
mkrom: mesh_rom, 265 words, 64-bit cells -> /home/user/LithosAnanke/v4/build/mesh-rom-64.c
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DV4_ROOT='"/home/user/LithosAnanke/v4"' /home/user/LithosAnanke/v4/tools/mkf18a.c /home/user/LithosAnanke/v4/tools/f18a.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/mkf18a-64
/home/user/LithosAnanke/v4/build/mkmap-64 sys > /home/user/LithosAnanke/capsules/v4/sys/map-64.f18
/home/user/LithosAnanke/v4/build/mkrom-64 rom /home/user/LithosAnanke/v4/build/rom-64.c /home/user/LithosAnanke/v4/build/rom-64.sym /home/user/LithosAnanke/v4/build/rom-map-64.f18 /home/user/LithosAnanke/capsules/v4/rom/main.f18 /home/user/LithosAnanke/capsules/v4/rom/in.f18 /home/user/LithosAnanke/capsules/v4/rom/num.f18 /home/user/LithosAnanke/capsules/v4/rom/sym.f18 /home/user/LithosAnanke/capsules/v4/rom/pack.f18 /home/user/LithosAnanke/capsules/v4/rom/word.f18 /home/user/LithosAnanke/capsules/v4/rom/dir.f18 /home/user/LithosAnanke/capsules/v4/rom/math.f18
mkrom: rom, 2383 words, 64-bit cells -> /home/user/LithosAnanke/v4/build/rom-64.c
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -DV4_CELL_BITS=32 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DV4_CAPSULE_DIR='"/home/user/LithosAnanke/v4/capsule"' -DV4_SYS_DIR='"/home/user/LithosAnanke/capsules/v4/sys"' /home/user/LithosAnanke/v4/tools/mkmap.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/mkmap-32
/home/user/LithosAnanke/v4/build/mkmap-32 sys > /home/user/LithosAnanke/capsules/v4/sys/map-32.f18
/home/user/LithosAnanke/v4/build/mkf18a-64 /home/user/LithosAnanke/v4/build/train-place-64.f18a /home/user/LithosAnanke/capsules/v4/sys/map-64.f18 /home/user/LithosAnanke/v4/build/rom-64.c /home/user/LithosAnanke/v4/tests/train-place nucleus=/home/user/LithosAnanke/capsules/v4/sys
/home/user/LithosAnanke/v4/build/mkmap-64 image > /home/user/LithosAnanke/v4/build/v4_map_64.c
/home/user/LithosAnanke/v4/build/mkcapsule /home/user/LithosAnanke/capsules /home/user/LithosAnanke/v4/build/capsule_generated.c
mkcapsule: scanning /home/user/LithosAnanke/capsules
[p] zuse.4th (1684 bytes, hash=0x490ded9be257a90b)
[p] font.4th (17688 bytes, hash=0x3f305911500c78f6)
[p] MANIFEST_AUTO.md (11687 bytes, hash=0xe022545a0755960f)
[p] multiuser-doe.4th (3942 bytes, hash=0x22140588ee7c39e6)
[p] hestia:init.4th (891 bytes, hash=0x64e111990fbc45ff)
[p] contrib:README.md (1855 bytes, hash=0x4212e52b927793e7)
[p] ACL.4th (4318 bytes, hash=0xf8890c05c0d8f921)
[p] workload-3.4th (2189 bytes, hash=0x62b7a71576ad1041)
[p] init-l8-diverse.4th (430 bytes, hash=0xaa293201a6c91838)
[p] user-font-demo.4th (1674 bytes, hash=0xce1fd7d1b581a56d)
[p] workload-9.4th (1321 bytes, hash=0x3f2bec73142aa424)
[p] lib.4th (619 bytes, hash=0x4b216635c359ef73)
[p] workload-calib1.4th (304 bytes, hash=0x3b9f2d17b554fabc)
[m] init.4th (669 bytes, hash=0xd09db9461b336431)
[p] workload-1-lite.4th (540 bytes, hash=0x44a7a7e3176dcc8d)
[p] init-l8-stable.4th (278 bytes, hash=0xdc3830f189063a9a)
[p] v4:physics.4th (2953 bytes, hash=0x5b0195fc30828bde)
[p] v4:forth79.4th (1216 bytes, hash=0x4609d6ef54166ef8)
[p] v4:ACL.4th (2103 bytes, hash=0xdba5690fb0ee12a4)
[p] v4:init.4th (756 bytes, hash=0x13fe8932fa4d2934)
[p] v4:sys:log.f18 (4535 bytes, hash=0x544cd004233dff62)
[p] v4:sys:qmath.f18 (8607 bytes, hash=0xa93783c2c8f9b7db)
[p] v4:sys:map-32.f18 (3215 bytes, hash=0x17ad313814d028ff)
[p] v4:sys:blocks.f18 (6112 bytes, hash=0x09d361dbe6174236)
[p] v4:sys:input.f18 (10692 bytes, hash=0x0f13c3f9d5fd07fc)
[p] v4:sys:dict.f18 (13816 bytes, hash=0xe3453808afd5a0af)
[p] v4:sys:forth.f18 (12617 bytes, hash=0xc4c0ad315c95eda4)
[p] v4:sys:quit.f18 (32141 bytes, hash=0x7fa7a7668b6bf1ed)
[p] v4:sys:map-64.f18 (3254 bytes, hash=0x81bda2bfcf496f6a)
[p] v4:sys:codegen.f18 (4999 bytes, hash=0x36d2ae84d2911b90)
[p] v4:sys:acl.f18 (5303 bytes, hash=0x5ceb5b43b0c5fbb1)
[p] v4:sys:core.f18 (24370 bytes, hash=0x0f415502fccc3fba)
[p] v4:sys:system.f18 (10189 bytes, hash=0xfe257eb084c43a5d)
[p] v4:sys:numout.f18 (6641 bytes, hash=0xca0fb0f9c1589e20)
[p] v4:sys:words.f18 (9642 bytes, hash=0x2f4e5f7f3e7f736f)
[p] v4:sys:compile.f18 (23381 bytes, hash=0xbef95acf00cb404a)
[p] v4:sys:end.f18 (1604 bytes, hash=0x22eea18b132f8faf)
[p] v4:starshipos.4th (706 bytes, hash=0x1734a8f4fe7483a5)
[p] v4:hera.4th (1376 bytes, hash=0x78730b1d6effe892)
[p] v4:rom:sym.f18 (5610 bytes, hash=0xbbad5748f5bbf863)
[p] v4:rom:main.f18 (2284 bytes, hash=0x6994f1f1d567e163)
[p] v4:rom:math.f18 (5108 bytes, hash=0x9be63ad87934622f)
[p] v4:rom:dir.f18 (5112 bytes, hash=0x51b069f0623ded16)
[p] v4:rom:num.f18 (2634 bytes, hash=0x08b76f1b058cac17)
[p] v4:rom:pack.f18 (4583 bytes, hash=0x65a944d8eb7de7f2)
[p] v4:rom:word.f18 (12966 bytes, hash=0x9210d6c2ac424d11)
[p] v4:rom:in.f18 (4230 bytes, hash=0x65798bed38a09f0f)
[p] v4:rom:mesh.f18 (449 bytes, hash=0x83723d76b9620c2c)
[p] v4:centre.4th (4140 bytes, hash=0x53b1e3df644e8e25)
[p] README.md (2305 bytes, hash=0x09a684ebdfbeb01c)
[p] block-acl.4th (980 bytes, hash=0xf6cc2a59e3a6734e)
[p] sdk.4th (2295 bytes, hash=0x008fdbbb62c94a3a)
[p] pki:starshipos-intermediate.der (408 bytes, hash=0xb40aab540c19f877)
[p] init-l8-omni.4th (1986 bytes, hash=0x5979e314d6452045)
[p] acl-std79.4th (5040 bytes, hash=0x773bf9209df191d1)
[p] doe-campaign.4th (2369 bytes, hash=0x26fb485e5c9dc6ff)
[p] init-l8-volatile.4th (718 bytes, hash=0x98caabbbd92abac4)
[p] doe.4th (3244 bytes, hash=0xf154616d248e861f)
[p] fabric.4th (10359 bytes, hash=0x9d9489cbeca4099b)
[p] workload-4.4th (469 bytes, hash=0x099619264e650b1c)
[p] init-l8-temporal.4th (363 bytes, hash=0x51abd4c138246651)
[p] workload-5.4th (480 bytes, hash=0x526964c7c9506a11)
[p] fonts:README.md (1846 bytes, hash=0xf628c2b7a49f4d46)
[p] fonts:JetBrainsMono-Regular.ttf (270224 bytes, hash=0xf4b7077dab274e6b)
[p] init-l8-transition.4th (529 bytes, hash=0xbcc1a81976f0a4c9)
[p] workload-2.4th (1321 bytes, hash=0xf113b3d0bcccae47)
[p] workload-1.4th (1041 bytes, hash=0x63e251adb0a03613)
[p] workload-5-lite.4th (468 bytes, hash=0xea0303f38824f254)
[p] workload-0.4th (290 bytes, hash=0x93f86f60aeba8feb)
[p] artemis:init.4th (16782 bytes, hash=0x7ba120e2a6aab239)
[p] MANIFEST.md (35813 bytes, hash=0x9d3a6fdb7415d224)
[p] workload-7.4th (206 bytes, hash=0x02862291387eb7ac)
[p] BLOCK_MAP.md (22886 bytes, hash=0x86df913cdae857c6)
[p] turtle.4th (3254 bytes, hash=0x4d470418ca543365)
[p] workload-8.4th (172 bytes, hash=0x56b7f2f0efa000df)
[p] workload-6.4th (1986 bytes, hash=0x06fc0ce1e369ef5a)
mkcapsule: 76 capsule(s) collected
mkcapsule: wrote /home/user/LithosAnanke/v4/build/capsule_generated.c
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -D_POSIX_C_SOURCE=200809L -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/v3/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DTRAIN_F18A='"/home/user/LithosAnanke/v4/build/train-place-64.f18a"' -c /home/user/LithosAnanke/v4/tests/test_mesh_boot.c -o /home/user/LithosAnanke/v4/build/test_mesh_boot.o
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v4/system/mesh.c -o /home/user/LithosAnanke/v4/build/mesh-64.o
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v4/system/inference.c -o /home/user/LithosAnanke/v4/build/inference-64.o
cd /home/user/LithosAnanke/v4/build/v3o-mesh && cc -std=gnu99 -Wall -O2 -g -I/home/user/LithosAnanke/v3/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v4/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -c /home/user/LithosAnanke/v3/src/block_subsystem.c /home/user/LithosAnanke/v3/src/blkio_ram.c /home/user/LithosAnanke/v3/src/blkio_file.c /home/user/LithosAnanke/v3/src/log.c /home/user/LithosAnanke/v3/src/platform/platform_init.c /home/user/LithosAnanke/v3/src/platform/linux/time.c /home/user/LithosAnanke/v4/system/blocks.c
cc -std=c99 -Wall -Wextra -O2 -g -I/home/user/LithosAnanke/v4/include -I/home/user/LithosAnanke/kernel/include -I/home/user/LithosAnanke/v3/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 /home/user/LithosAnanke/v4/build/test_mesh_boot.o /home/user/LithosAnanke/v4/build/mesh-64.o /home/user/LithosAnanke/v4/build/inference-64.o /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/build/mesh-rom-64.c /home/user/LithosAnanke/v4/build/rom-64.c /home/user/LithosAnanke/v4/build/v4_map_64.c /home/user/LithosAnanke/v4/build/capsule_generated.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/wire.c /home/user/LithosAnanke/v4/system/boot.c /home/user/LithosAnanke/v4/system/post.c /home/user/LithosAnanke/v4/system/post_cases.c /home/user/LithosAnanke/kernel/src/capsule/capsule_find.c /home/user/LithosAnanke/kernel/src/capsule/capsule_validate.c /home/user/LithosAnanke/kernel/src/capsule/capsule_sig.c /home/user/LithosAnanke/kernel/src/capsule/capsule_blocks.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/kernel/src/crypto/x509_ed25519.c /home/user/LithosAnanke/kernel/src/crypto/ed25519.c /home/user/LithosAnanke/kernel/src/crypto/fe25519.c /home/user/LithosAnanke/kernel/src/crypto/scalar25519.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/v4/build/v3o-mesh/*.o -o /home/user/LithosAnanke/v4/build/test_mesh_boot
[mesh boot, V4_CELL_BITS=64]
v4 mesh boot: V4_CELL_BITS=64
PARITY:V4_POST tests=990 pass=990 fail=0
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:716: an artifact the checker refuses
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:718: an artifact for another node size
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:720: an import the dictionary lacks: ABX
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:722: an import whose effect is not the one expected
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:724: an import from a train, not the nucleus: not placed yet
refused: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:728: no room for it below DLIMIT
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:734: placed on Hera: not built
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:735: four exports entered, and the kernel told of each (0, 0)
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:737: HERE moved past it, from 9782: "9782 "
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:739: DIST is found by its name, at 300: "UNKNOWN WORD: 'DIST'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:745: DIST, through the nucleus's ABS: "UNKNOWN WORD: 'DIST'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:747: DIST2 calls DIST, moved: "UNKNOWN WORD: 'DIST2'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:749: CLAMP0's forward branch, moved: "UNKNOWN WORD: 'CLAMP0'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:751: ADDR's address literal is DIST's xt: "UNKNOWN WORD: 'ADDR'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:753: a word compiled at the prompt calls a placed one: "UNKNOWN WORD: 'DIST2'
"
FAIL /home/user/LithosAnanke/v4/tests/test_mesh_boot.c:755: and the prompt goes on: "UNKNOWN WORD: 'PLACED-USE'
"
137 checks, 16 failures
make: *** [Makefile:387: mesh-boot] Error 1
exit 2
+4
View File
@@ -0,0 +1,4 @@
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=32 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DSCRATCH='"/home/user/LithosAnanke/v4/build/scratch-mkf18a-32"' -DV4_ROOT='"/home/user/LithosAnanke/v4"' -DV4_SYS_DIR='"/home/user/LithosAnanke/capsules/v4/sys"' /home/user/LithosAnanke/v4/tests/test_mkf18a.c /home/user/LithosAnanke/v4/tools/f18a.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/32-test_mkf18a
[V4_CELL_BITS=32 mkf18a]
v4 mkf18a: V4_CELL_BITS=32
95 checks, 0 failures
+4
View File
@@ -0,0 +1,4 @@
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DSCRATCH='"/home/user/LithosAnanke/v4/build/scratch-mkf18a-64"' -DV4_ROOT='"/home/user/LithosAnanke/v4"' -DV4_SYS_DIR='"/home/user/LithosAnanke/capsules/v4/sys"' /home/user/LithosAnanke/v4/tests/test_mkf18a.c /home/user/LithosAnanke/v4/tools/f18a.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/64-test_mkf18a
[V4_CELL_BITS=64 mkf18a]
v4 mkf18a: V4_CELL_BITS=64
95 checks, 0 failures
+7
View File
@@ -0,0 +1,7 @@
cc -std=c99 -Wall -Wextra -Wpedantic -Werror -O2 -g -I/home/user/LithosAnanke/v4/include -isystem /home/user/LithosAnanke/kernel/include -DV4_CELL_BITS=64 -DV4_NODE_WORDS=32768 -DV4_DATA_RING=1022 -DV4_RET_RING=31 -DV4_ROM_WORDS=4096 -DSCRATCH='"/home/user/LithosAnanke/v4/build/scratch-mkf18a-64"' -DV4_ROOT='"/home/user/LithosAnanke/v4"' -DV4_SYS_DIR='"/home/user/LithosAnanke/capsules/v4/sys"' /home/user/LithosAnanke/v4/tests/test_mkf18a.c /home/user/LithosAnanke/v4/tools/f18a.c /home/user/LithosAnanke/kernel/src/crypto/sha512.c /home/user/LithosAnanke/kernel/src/hash/xxhash64.c /home/user/LithosAnanke/v4/src/artifact.c /home/user/LithosAnanke/v4/src/asm.c /home/user/LithosAnanke/v4/src/capsule.c /home/user/LithosAnanke/v4/src/effect.c /home/user/LithosAnanke/v4/src/exec.c /home/user/LithosAnanke/v4/src/fabric.c /home/user/LithosAnanke/v4/src/guard.c /home/user/LithosAnanke/v4/src/heat.c /home/user/LithosAnanke/v4/src/image.c /home/user/LithosAnanke/v4/src/iword.c /home/user/LithosAnanke/v4/src/manage.c /home/user/LithosAnanke/v4/src/message.c /home/user/LithosAnanke/v4/src/node.c /home/user/LithosAnanke/v4/src/place.c /home/user/LithosAnanke/v4/src/stack.c /home/user/LithosAnanke/v4/src/testcode.c /home/user/LithosAnanke/v4/src/text.c /home/user/LithosAnanke/v4/src/umul.c /home/user/LithosAnanke/v4/src/wire.c -o /home/user/LithosAnanke/v4/build/64-test_mkf18a
[V4_CELL_BITS=64 mkf18a]
v4 mkf18a: V4_CELL_BITS=64
built, not refused
FAIL /home/user/LithosAnanke/v4/tests/test_mkf18a.c:331: a word that runs on into the next export
95 checks, 1 failures
make: *** [Makefile:469: mkf18a-64] Error 1
File diff suppressed because it is too large Load Diff
+16 -9
View File
@@ -366,13 +366,20 @@ sanitize: $(foreach w,$(WIDTHS),$(foreach t,$(TESTS),san-$(w)-$(notdir $(t)))) s
# fabric, tested on the host with tests/test_mesh_boot.c as its owner. Linked as the hosted product
# is, with the registry (src/manage.c) and a mesh node's ROM; 64-bit cells, as the capsules are.
MESH_BOOT_SRCS := $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(BINDIR)/mesh-rom-64.c
$(BINDIR)/test_mesh_boot: $(HERE)/tests/test_mesh_boot.c $(MESH_BOOT_SRCS) $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BLOCKS_SRC) $(V3_BLOCK_SRCS) $(wildcard $(HERE)/include/v4/*.h) $(HERE)/Makefile
$(CC) $(CFLAGS) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot.o
# The small train it places (plan 2026-11-19-f18-artifact-build section 12, task 4): built by mkf18a itself,
# against the nucleus's map and the host ROM, importing from the nucleus; placed by the host placer.
PLACE_SRCS := $(HERE)/src/place.c $(HERE)/src/artifact.c $(HERE)/src/effect.c
TRAIN_PLACE := $(BINDIR)/train-place-64.f18a
$(TRAIN_PLACE): $(BINDIR)/mkf18a-64 $(wildcard $(HERE)/tests/train-place/*.f18) $(SYS_DIR)/map-64.f18 $(BINDIR)/rom-64.c $(CAPSULES)
$(BINDIR)/mkf18a-64 $@ $(SYS_DIR)/map-64.f18 $(BINDIR)/rom-64.c $(HERE)/tests/train-place nucleus=$(SYS_DIR)
MESH_PLACE := -DTRAIN_F18A='"$(TRAIN_PLACE)"'
$(BINDIR)/test_mesh_boot: $(HERE)/tests/test_mesh_boot.c $(MESH_BOOT_SRCS) $(PLACE_SRCS) $(TRAIN_PLACE) $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BLOCKS_SRC) $(V3_BLOCK_SRCS) $(wildcard $(HERE)/include/v4/*.h) $(HERE)/Makefile
$(CC) $(CFLAGS) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) $(MESH_PLACE) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot.o
$(CC) $(SYSTEM_CFLAGS) -c $(HERE)/system/mesh.c -o $(BINDIR)/mesh-64.o
$(CC) $(SYSTEM_CFLAGS) -c $(HERE)/system/inference.c -o $(BINDIR)/inference-64.o
@rm -rf $(BINDIR)/v3o-mesh && mkdir -p $(BINDIR)/v3o-mesh
cd $(BINDIR)/v3o-mesh && $(CC) $(V3_CFLAGS) -I$(HERE)/include -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(V3_BLOCK_SRCS) $(BLOCKS_SRC)
$(CC) $(SYSTEM_CFLAGS) $(BINDIR)/test_mesh_boot.o $(BINDIR)/mesh-64.o $(BINDIR)/inference-64.o $(HERE)/src/manage.c $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
$(CC) $(SYSTEM_CFLAGS) $(BINDIR)/test_mesh_boot.o $(BINDIR)/mesh-64.o $(BINDIR)/inference-64.o $(HERE)/src/manage.c $(PLACE_SRCS) $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
.PHONY: mesh-boot
mesh-boot: $(BINDIR)/test_mesh_boot
@@ -382,8 +389,8 @@ mesh-boot: $(BINDIR)/test_mesh_boot
# The same with pipelining and the hot-words cache on (#189 Phase 7; built, off as v3 by default).
MESH_ON := -DENABLE_PIPELINING=1 -DENABLE_HOTWORDS_CACHE=1
$(BINDIR)/test_mesh_boot_on: $(BINDIR)/test_mesh_boot
$(CC) $(CFLAGS) $(MESH_ON) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot_on.o
$(CC) $(SYSTEM_CFLAGS) $(MESH_ON) $(BINDIR)/test_mesh_boot_on.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
$(CC) $(CFLAGS) $(MESH_ON) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) $(MESH_PLACE) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot_on.o
$(CC) $(SYSTEM_CFLAGS) $(MESH_ON) $(BINDIR)/test_mesh_boot_on.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(PLACE_SRCS) $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
.PHONY: mesh-boot-on
mesh-boot-on: $(BINDIR)/test_mesh_boot_on
@@ -392,8 +399,8 @@ mesh-boot-on: $(BINDIR)/test_mesh_boot_on
# And without compudynamics on the opcodes: OPCODE_PHYSICS 0, the revert (#189 Phase 7, ruling 7).
$(BINDIR)/test_mesh_boot_noop: $(BINDIR)/test_mesh_boot
$(CC) $(CFLAGS) -DOPCODE_PHYSICS=0 -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot_noop.o
$(CC) $(SYSTEM_CFLAGS) -DOPCODE_PHYSICS=0 $(BINDIR)/test_mesh_boot_noop.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
$(CC) $(CFLAGS) -DOPCODE_PHYSICS=0 -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) $(MESH_PLACE) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/test_mesh_boot_noop.o
$(CC) $(SYSTEM_CFLAGS) -DOPCODE_PHYSICS=0 $(BINDIR)/test_mesh_boot_noop.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(PLACE_SRCS) $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/v3o-mesh/*.o -o $@
.PHONY: mesh-boot-noop
mesh-boot-noop: $(BINDIR)/test_mesh_boot_noop
@@ -403,10 +410,10 @@ mesh-boot-noop: $(BINDIR)/test_mesh_boot_noop
# The same, under ASan+UBSan (Captain Bob, 2026-11-13: "Yes, add it to v4-checks"): run by `sanitize`.
MESH_SAN := -O1 -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all
$(BINDIR)/san-test_mesh_boot: $(BINDIR)/test_mesh_boot
$(CC) $(CFLAGS) $(MESH_SAN) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/san-test_mesh_boot.o
$(CC) $(CFLAGS) $(MESH_SAN) -D_POSIX_C_SOURCE=200809L -I$(HERE)/include $(V3_INC) -DV4_CELL_BITS=64 $(HOST_DEFS) $(MESH_PLACE) -c $(HERE)/tests/test_mesh_boot.c -o $(BINDIR)/san-test_mesh_boot.o
@rm -rf $(BINDIR)/san-v3o-mesh && mkdir -p $(BINDIR)/san-v3o-mesh
cd $(BINDIR)/san-v3o-mesh && $(CC) $(V3_CFLAGS) $(MESH_SAN) -I$(HERE)/include -DV4_CELL_BITS=64 $(HOST_DEFS) -c $(V3_BLOCK_SRCS) $(BLOCKS_SRC)
$(CC) $(SYSTEM_CFLAGS) $(MESH_SAN) $(BINDIR)/san-test_mesh_boot.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/san-v3o-mesh/*.o -o $@
$(CC) $(SYSTEM_CFLAGS) $(MESH_SAN) $(BINDIR)/san-test_mesh_boot.o $(HERE)/system/mesh.c $(HERE)/system/inference.c $(HERE)/src/manage.c $(PLACE_SRCS) $(BINDIR)/mesh-rom-64.c $(MACHINE_64) $(CAPSULE_DIR_C) $(ENGINE_SRCS) $(SYSTEM_SRCS) $(BINDIR)/san-v3o-mesh/*.o -o $@
.PHONY: san-mesh-boot
san-mesh-boot: $(BINDIR)/san-test_mesh_boot
+43
View File
@@ -0,0 +1,43 @@
/* SPDX-License-Identifier: LicenseRef-Starship-1.0
* Copyright (c) 2023-2026 Robert A. James
*/
/* place.h -- place a train's F18 artifact on a node: resolution without a linker (ABI.md section 5).
*
* docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md section 12, task 4. The host placer, in C: the
* oracle for the loader on the node (the ADR's step 6), not part of the engine. One pass, in order:
* 1. CHECK, before anything is written (fail closed): the artifact is valid (artifact.h), for this
* node's cell width and size; every import is from the nucleus (hash 0: section 10, ruling 4), its
* name is in the FORTH vocabulary, not in line, and the effect derived for it there (effect.c) is
* the one the artifact expects; the train and its entries fit below DLIMIT.
* 2. PLACE, at HERE, the base. The code is split at each export (ruling 2a): the code before the first
* export goes first, with no entry; then each export's entry, laid as (HEADER) lays one (dict.f18:
* the name, then the word ID, the flags, the name's word address and the link), then its code up to
* the next export's. So every cell of the code moves by the entries laid before it.
* 3. FIX each relocation: a branch field or a whole cell given the moved address of its target, or the
* import's xt. A branch whose target its slot cannot reach from its new place is refused, in step 1.
* 4. ENTER: each entry goes into the vocabulary whose head cell is given (CURRENT's), the next word ID
* is taken from (NEXT-ID), DP is moved past the train, and the kernel is told of each xt, as
* (WORD-DEFINED) is told of an entry (HEADER) makes.
*/
#ifndef V4_PLACE_H
#define V4_PLACE_H
#include "v4/node.h"
#include <stddef.h>
typedef struct {
v4_cell dp; /* word address of DP: the next free byte */
v4_cell dlimit; /* the byte address dictionary space ends at */
v4_cell head; /* the head cell of the vocabulary the entries go into */
v4_cell forth; /* FORTH's head cell, (LATEST): where an import's name is looked up */
v4_cell next_id; /* word address of (NEXT-ID) */
void (*defined)(void *ctx, v4_cell xt); /* the kernel told of an entry made, or NULL */
void *ctx;
} v4_train_env;
/* Place the artifact `a` of `len` bytes on node `n`. 1, with the exports' xts in xts[0 .. *count)
* in the artifact's order, or 0 with why in *why and the node unchanged. */
int v4_train_place(v4_node *n, const unsigned char *a, size_t len, const v4_train_env *env,
v4_cell *xts, unsigned max, unsigned *count, const char **why);
#endif /* V4_PLACE_H */
+190
View File
@@ -0,0 +1,190 @@
/* SPDX-License-Identifier: LicenseRef-Starship-1.0
* Copyright (c) 2023-2026 Robert A. James
*/
/* place.c -- place a train's F18 artifact on a node (place.h). */
#include "v4/place.h"
#include "v4/artifact.h"
#include "v4/effect.h"
#include "v4/iword.h"
#include "v4/opcode.h"
#include <stdlib.h>
#include <string.h>
#define CELL_BYTES (V4_CELL_BITS / 8u)
typedef struct { /* an export, in entry order */
unsigned index; /* its place in the artifact */
uint32_t entry, name, flags; /* its entry's offset in the code; its name's pool offset; its flags */
unsigned cells; /* its entry's cells: the name's, then four */
} exp_t;
static int refuse(const char **why, const char *what) { *why = what; return 0; }
static v4_cell code_cell(const unsigned char *a, const v4_f18a_layout *l, uint32_t i)
{
const unsigned char *p = a + l->code * 4u + (size_t)i * CELL_BYTES;
v4_ucell v = 0;
unsigned k;
for (k = 0; k < CELL_BYTES; k++) v |= (v4_ucell)p[k] << (8u * k);
return (v4_cell)v;
}
/* the counted string at pool offset `off` */
static const unsigned char *pool_str(const unsigned char *a, const v4_f18a_layout *l, uint32_t off)
{
return a + (l->pool + off) * 4u;
}
/* the xt of the entry named by the counted string `s`, from the head cell `head`, skipping hidden ones; or -1 */
static v4_cell lookup(const v4_node *n, v4_cell head, const unsigned char *s)
{
v4_cell xt = n->mem[head];
unsigned k, guard = 0;
while (xt > 4 && xt < (v4_cell)V4_NODE_WORDS && guard++ < V4_NODE_WORDS) {
v4_cell nfa = n->mem[xt - 2];
if (!(n->mem[xt - 3] & 2) && nfa >= 0 && nfa < (v4_cell)V4_NODE_WORDS && (n->mem[nfa] & 255) == s[0]) {
for (k = 1; k <= s[0]; k++)
if (((n->mem[nfa + (v4_cell)(k / 4u)] >> (8u * (k % 4u))) & 255) != s[k]) break;
if (k > s[0]) return xt;
}
xt = n->mem[xt - 1];
}
return -1;
}
/* the moved address of code offset `off` (0 .. c): the base, the offset, and every entry laid at or before it */
static v4_cell moved(const exp_t *e, unsigned ne, v4_cell base, uint32_t off)
{
v4_cell shift = 0;
unsigned j;
for (j = 0; j < ne && e[j].entry <= off; j++) shift += (v4_cell)e[j].cells;
return base + (v4_cell)off + shift;
}
static int by_entry(const void *x, const void *y)
{
const exp_t *p = x, *q = y;
return p->entry < q->entry ? -1 : p->entry > q->entry;
}
int v4_train_place(v4_node *n, const unsigned char *a, size_t len, const v4_train_env *env,
v4_cell *xts, unsigned max, unsigned *count, const char **why)
{
v4_f18a_layout l;
exp_t *e = NULL;
v4_cell *code = NULL, *imp = NULL;
v4_cell base, end, here, head;
v4_effects *fx = NULL;
unsigned j, k;
int ok = 0;
*count = 0;
*why = NULL;
/* 1. CHECK: nothing is written until all of it has passed */
if (!v4_f18a_check(a, len, V4_CELL_BITS, &l, why)) return 0;
if (l.node_words != V4_NODE_WORDS) return refuse(why, "built for another node size");
if (l.e > max) return refuse(why, "more exports than the caller can be told of");
here = (n->mem[env->dp] + 3) / 4;
base = here;
e = calloc(l.e + 1u, sizeof *e);
code = calloc(l.c + 1u, sizeof *code);
imp = calloc(l.i + 1u, sizeof *imp);
if (!e || !code || !imp) { refuse(why, "out of memory"); goto out; }
/* the imports: each from the nucleus, by name in FORTH, called, with the effect expected */
for (k = 0; k < l.i; k++) {
size_t x = l.imports + (size_t)V4_F18A_IMPORT * k;
v4_effect ef;
v4_cell xt;
if (v4_f18a_unit(a, x) != 0 || v4_f18a_unit(a, x + 1) != 0) { refuse(why, "an import from a train, not the nucleus: not placed yet"); goto out; }
xt = lookup(n, env->forth, pool_str(a, &l, v4_f18a_unit(a, x + 2)));
if (xt < 0) {
static char msg[64];
const unsigned char *s = pool_str(a, &l, v4_f18a_unit(a, x + 2));
strcpy(msg, "the dictionary does not have ");
memcpy(msg + strlen(msg), s + 1, s[0]);
msg[29 + s[0]] = 0;
refuse(why, msg);
goto out;
}
if (n->mem[xt - 3] & 8) { refuse(why, "an import in line in the dictionary: it cannot be called"); goto out; }
if (!fx && !(fx = v4_effects_new(n, 0, here, NULL, NULL))) { refuse(why, "out of memory"); goto out; }
ef = v4_effect_of(fx, xt, V4_EFFECT_CALLED);
if (!ef.fixed || v4_f18a_unit(a, x + 3) != (ef.d_taken | (ef.d_left << 16))
|| v4_f18a_unit(a, x + 4) != (ef.r_taken | (ef.r_left << 16))) {
refuse(why, "an import's effect in the dictionary is not the one expected");
goto out;
}
imp[k] = xt;
}
/* the exports, in entry order, and the room they take */
for (j = 0; j < l.e; j++) {
size_t x = l.exports + (size_t)V4_F18A_EXPORT * j;
e[j].index = j;
e[j].name = v4_f18a_unit(a, x);
e[j].entry = v4_f18a_unit(a, x + 1);
e[j].flags = v4_f18a_unit(a, x + 2);
e[j].cells = (1u + pool_str(a, &l, e[j].name)[0] + 3u) / 4u + 4u;
}
qsort(e, l.e, sizeof *e, by_entry);
for (j = 1; j < l.e; j++) if (e[j].entry == e[j - 1].entry) { refuse(why, "two exports at one entry"); goto out; }
end = moved(e, l.e, base, l.c);
if (end * 4 > env->dlimit || end > (v4_cell)V4_NODE_WORDS) { refuse(why, "no room for the train below DLIMIT"); goto out; }
/* 3. FIX, into a copy: each relocation given its target's moved address, or the import's xt */
for (j = 0; j < l.c; j++) code[j] = code_cell(a, &l, j);
for (k = 0; k < l.r; k++) {
size_t x = l.relocs + (size_t)V4_F18A_RELOC * k;
uint32_t u0 = v4_f18a_unit(a, x), to = v4_f18a_unit(a, x + 1);
uint32_t cell = u0 & 0x1FFFFFFFu, slot = u0 >> 29;
v4_cell target, at = moved(e, l.e, base, cell);
if (slot == V4_F18A_WHOLE) {
if (to == V4_F18A_INTERNAL) {
if (code_cell(a, &l, cell) < 0 || code_cell(a, &l, cell) > (v4_cell)l.c) { refuse(why, "an address outside the code"); goto out; }
target = moved(e, l.e, base, (uint32_t)code_cell(a, &l, cell));
} else target = imp[to];
code[cell] = target;
} else {
v4_iword w = (v4_iword)((v4_ucell)code[cell] & 0xFFFFFFFFu);
uint32_t mask = v4_iword_slot_mask(slot);
if (to == V4_F18A_INTERNAL) {
v4_cell old = v4_iword_branch((v4_cell)cell + 1, (v4_iword)((v4_ucell)code_cell(a, &l, cell) & 0xFFFFFFFFu), slot);
if (old < 0 || old > (v4_cell)l.c) { refuse(why, "a branch outside the code"); goto out; }
target = moved(e, l.e, base, (uint32_t)old);
} else target = imp[to];
w = (v4_iword)((w & ~mask) | ((uint32_t)target & mask));
if (v4_iword_branch(at + 1, w, slot) != target) { refuse(why, "a branch whose slot cannot reach its target from where it is placed"); goto out; }
code[cell] = (v4_cell)(((v4_ucell)code[cell] & ~(v4_ucell)0xFFFFFFFFu) | (v4_ucell)w);
}
}
/* 2. PLACE and 4. ENTER: the code, split at each export, its entry before it */
for (j = 0; j < l.c; j++) n->mem[moved(e, l.e, base, j)] = code[j];
head = env->head;
for (j = 0; j < l.e; j++) {
const unsigned char *s = pool_str(a, &l, e[j].name);
v4_cell xt = moved(e, l.e, base, e[j].entry), nfa = xt - (v4_cell)e[j].cells;
unsigned c, ncells = e[j].cells - 4u;
for (c = 0; c < ncells; c++) n->mem[nfa + (v4_cell)c] = 0;
for (c = 0; c <= s[0]; c++) n->mem[nfa + (v4_cell)(c / 4u)] |= (v4_cell)s[c] << (8u * (c % 4u));
n->mem[xt - 4] = n->mem[env->next_id];
n->mem[env->next_id] = n->mem[env->next_id] + 1;
n->mem[xt - 3] = (v4_cell)e[j].flags;
n->mem[xt - 2] = nfa;
n->mem[xt - 1] = n->mem[head];
n->mem[head] = xt;
xts[e[j].index] = xt;
}
n->mem[env->dp] = end * 4;
*count = l.e;
for (j = 0; j < l.e; j++) if (env->defined) env->defined(env->ctx, moved(e, l.e, base, e[j].entry));
ok = 1;
out:
if (fx) v4_effects_free(fx);
free(e);
free(code);
free(imp);
return ok;
}
+116
View File
@@ -15,6 +15,8 @@
#include "v4/mesh.h"
#include "v4/message.h"
#include "v4/post.h"
#include "v4/place.h"
#include "v4/artifact.h"
#include "block_subsystem.h"
#include <stdio.h>
#include <string.h>
@@ -102,6 +104,50 @@ static const char *line(v4_cell node, const char *text, int *how)
/* the tick set for a check (v4_mesh_set_tick), and the heartbeat's clock with it, so no catch-up follows */
static void set_tick(uint64_t t) { v4_mesh_set_tick(&ms, t); heart = t; }
/* ---- the placed train (docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md section 12, task 4) ---- */
static v4_cell told[16];
static unsigned ntold;
/* the kernel told of an entry, as (DEFINED) tells it (dict.f18): the word in (WORD-DEFINED) run with the xt */
static void tell(void *ctx, v4_cell xt)
{
char cmd[96];
int how_;
v4_cell w = v4_mesh_node(&ms, V4_MESH_HERA)->n.mem[im.word_defined];
(void)ctx;
if (ntold < 16u) told[ntold++] = xt;
if (w == 0) return;
snprintf(cmd, sizeof cmd, "%ld %ld EXECUTE", (long)xt, (long)w);
(void)line(V4_MESH_HERA, cmd, &how_);
}
static unsigned char *slurp(const char *path, size_t *len)
{
FILE *f = fopen(path, "rb");
unsigned char *b;
long n;
if (!f) return 0;
fseek(f, 0, SEEK_END); n = ftell(f); fseek(f, 0, SEEK_SET);
b = malloc(n > 0 ? (size_t)n : 1u);
if (b && fread(b, 1, (size_t)n, f) != (size_t)n) { free(b); b = 0; }
fclose(f);
*len = (size_t)n;
return b;
}
static v4_cell mem_before[V4_NODE_WORDS];
/* a refusal leaves Hera as she was */
static int refused_unchanged(v4_node *hn, const unsigned char *a, size_t len, const v4_train_env *env, const char *what)
{
v4_cell xts[8];
unsigned cnt = 99;
const char *why = 0;
int ok;
memcpy(mem_before, hn->mem, sizeof mem_before);
ntold = 0;
ok = v4_train_place(hn, a, len, env, xts, 8, &cnt, &why);
if (ok) { printf(" placed, not refused\n"); return 0; }
if (!why || !strstr(why, what)) { printf(" refused: %s\n", why ? why : "(no reason)"); return 0; }
return memcmp(mem_before, hn->mem, sizeof mem_before) == 0 && ntold == 0 && cnt == 0;
}
int main(void)
{
int how;
@@ -650,6 +696,76 @@ int main(void)
}
#endif
/* A TRAIN PLACED (plan 2026-11-19-f18-artifact-build section 12, task 4; ABI.md section 5): the small
* train tests/train-place, built by mkf18a with one import from the nucleus, placed on Hera at her HERE
* by the host placer. Its words run by name, its calls into the nucleus reach the nucleus, and the
* kernel has a record of each. Then what placement refuses, each leaving Hera unchanged. */
{
size_t alen = 0;
unsigned char *art = slurp(TRAIN_F18A, &alen);
v4_fabric_node *hf = v4_mesh_node(&ms, V4_MESH_HERA);
v4_node *hn = &hf->n;
v4_train_env env;
v4_cell xts[8], here0, cur;
unsigned cnt = 0, k;
const char *why = 0;
char *end;
v4_f18a_layout lay;
CHECK(art != 0 && v4_f18a_check(art, alen, 64, &lay, &why), "the train's artifact, built by mkf18a: %s", why ? why : TRAIN_F18A);
if (art) {
r = line(V4_MESH_HERA, "CURRENT @ . HERE .", &how);
cur = (v4_cell)strtol(r, &end, 10);
here0 = (v4_cell)strtol(end, 0, 10);
env.dp = im.dp; env.dlimit = im.dict_hi * 4; env.head = cur; env.forth = im.latest; env.next_id = im.next_id;
env.defined = tell; env.ctx = 0;
/* what it refuses first, Hera unchanged by each */
{
unsigned char *c = malloc(alen);
size_t nameu = lay.pool + v4_f18a_unit(art, lay.imports + 2);
memcpy(c, art, alen); c[0] ^= 1;
CHECK(refused_unchanged(hn, c, alen, &env, "magic"), "an artifact the checker refuses");
memcpy(c, art, alen); c[3 * 4] ^= 1;
CHECK(refused_unchanged(hn, c, alen, &env, "node"), "an artifact for another node size");
memcpy(c, art, alen); c[nameu * 4 + 3] = 'X';
CHECK(refused_unchanged(hn, c, alen, &env, "ABX"), "an import the dictionary lacks: ABX");
memcpy(c, art, alen); c[(lay.imports + 3) * 4] = 2;
CHECK(refused_unchanged(hn, c, alen, &env, "effect"), "an import whose effect is not the one expected");
memcpy(c, art, alen); c[lay.imports * 4] = 1;
CHECK(refused_unchanged(hn, c, alen, &env, "train"), "an import from a train, not the nucleus: not placed yet");
{
v4_train_env small = env;
small.dlimit = (here0 + 4) * 4;
CHECK(refused_unchanged(hn, art, alen, &small, "room"), "no room for it below DLIMIT");
}
free(c);
}
ntold = 0;
CHECK(v4_train_place(hn, art, alen, &env, xts, 8, &cnt, &why), "placed on Hera: %s", why ? why : "");
CHECK(cnt == lay.e && cnt == 4 && ntold == cnt, "four exports entered, and the kernel told of each (%u, %u)", cnt, ntold);
r = line(V4_MESH_HERA, "HERE .", &how);
CHECK((v4_cell)strtol(r, 0, 10) > here0 && here0 != 0, "HERE moved past it, from %ld: \"%s\"", (long)here0, r);
r = line(V4_MESH_HERA, "' DIST .", &how);
CHECK((v4_cell)strtol(r, 0, 10) == xts[0] && xts[0] > here0, "DIST is found by its name, at %ld: \"%s\"", (long)xts[0], r);
for (k = 0; k < cnt && k < 8; k++)
CHECK(v4_mesh_account_at(&ms, 0, xts[k]) != 0, "the kernel keeps a record of export %u", k);
r = line(V4_MESH_HERA, "7 3 DIST . 3 7 DIST .", &how);
CHECK(strcmp(r, "4 4 ") == 0, "DIST, through the nucleus's ABS: \"%s\"", r);
r = line(V4_MESH_HERA, "3 7 DIST2 .", &how);
CHECK(strcmp(r, "8 ") == 0, "DIST2 calls DIST, moved: \"%s\"", r);
r = line(V4_MESH_HERA, "-5 CLAMP0 . 5 CLAMP0 .", &how);
CHECK(strcmp(r, "0 5 ") == 0, "CLAMP0's forward branch, moved: \"%s\"", r);
r = line(V4_MESH_HERA, "ADDR ' DIST = .", &how);
CHECK(strcmp(r, "-1 ") == 0, "ADDR's address literal is DIST's xt: \"%s\"", r);
r = line(V4_MESH_HERA, ": PLACED-USE 3 7 DIST2 ; PLACED-USE .", &how);
CHECK(strcmp(r, "8 ") == 0, "a word compiled at the prompt calls a placed one: \"%s\"", r);
r = line(V4_MESH_HERA, "FORGET PLACED-USE 3 4 + .", &how);
CHECK(strcmp(r, "7 ") == 0, "and the prompt goes on: \"%s\"", r);
}
free(art);
}
printf(" %d checks, %d failures\n", checks, failures);
return failures ? 1 : 0;
}
+12
View File
@@ -325,6 +325,18 @@ int main(void)
free(c);
}
/* a word that runs on into an export (section 12, 2a as corrected): placement splits the code at each
* export, so the tool refuses it; one that runs on into a word that is not an export is not split */
put(SCRATCH "/r11", "00.f18", ": A dup\n: B drop ;\n");
CHECK(refused(SCRATCH "/r11", NULL, 0, "runs on"), "a word that runs on into the next export");
put(SCRATCH "/r12", "00.f18", ": X dup\n: L FOR dup NEXT ;\n");
{
size_t l12;
unsigned char *c = build(SCRATCH "/r12", NULL, 0, &l12);
CHECK(c != NULL, "one that runs on into a word that is not exported builds: %s", err);
free(c);
}
/* imports from the nucleus (section 12, rulings 3 and 4): hash 0, the effect derived from the nucleus
* as the tool assembles it, by its dictionary name */
put(SCRATCH "/n1", "00.f18", "import nucleus ABS\n: DIST inv 1 + + ABS ;\n");
+4
View File
@@ -0,0 +1,4 @@
\ the small train placed by test_mesh_boot (docs/v4.0.0/plans/2026-11-19-f18-artifact-build.md section 12)
\ ( a b -- |a-b| ), calling the nucleus's ABS
import nucleus ABS
: DIST inv 1 + + ABS ;
+4
View File
@@ -0,0 +1,4 @@
\ calls within the train, a forward branch, and an address literal
: DIST2 DIST dup + ;
: CLAMP0 -if K drop 0 K: ;
: ADDR &DIST ;
+30
View File
@@ -175,6 +175,16 @@ static int import_effect(void *ctx, v4_cell addr, v4_effect *out)
return 0;
}
/* For the run-on check: a word walked with its range ending at the next word, and every other address of
* the train known through the whole train's walk, as a call or a tail call. */
typedef struct { build_t *b; v4_effects *whole; v4_cell end; } run_on_t;
static int run_on_effect(void *ctx, v4_cell addr, v4_effect *out)
{
run_on_t *ro = ctx;
if (addr >= 0 && addr < ro->end) { *out = v4_effect_of(ro->whole, addr, V4_EFFECT_CALLED); return 1; }
return import_effect(ro->b, addr, out);
}
/* the nucleus assembled, and its effects: 1, or 0 having failed */
static v4_effects *nfx;
static int nucleus_ready(build_t *b, const char *dir)
@@ -489,6 +499,26 @@ int f18a_build(const f18a_args *a, unsigned char **out, size_t *len, char *err,
e++;
}
/* a word that runs on into an export (plan section 12, 2a as corrected): placement splits the code at
* each export, putting its entry there, so the word before it must not reach it but by a call or a jump */
for (k = 0; k + 1u < nwords && !b.failed; k++) {
v4_text_word_info nx;
v4_effect ef;
v4_effects *one;
run_on_t ro;
v4_text_word_at(&tx, k, &wi);
v4_text_word_at(&tx, k + 1u, &nx);
if (nx.addr <= wi.addr) continue;
if (!v4_effect_of(fx, nx.addr, (nx.flags & 8) ? V4_EFFECT_INLINE : V4_EFFECT_CALLED).fixed) continue;
ro.b = &b; ro.whole = fx; ro.end = code_end;
one = v4_effects_new(&n, wi.addr, nx.addr, run_on_effect, &ro);
if (!one) { fail(&b, "out of memory"); break; }
ef = v4_effect_of(one, wi.addr, (wi.flags & 8) ? V4_EFFECT_INLINE : V4_EFFECT_CALLED);
v4_effects_free(one);
if (!ef.fixed && ef.why && strcmp(ef.why, "it runs outside the code") == 0 && ef.at == nx.addr)
fail(&b, "%s runs on into %s, an export: placement splits the code there", wi.name, nx.name);
}
/* the relocations: every branch can reach every word of a node */
for (k = 0; k < v4_text_addresses(&tx) && !b.failed; k++) {
const v4_text_addr *r = &b.rec[k];
+2 -1
View File
@@ -21,7 +21,8 @@
* V4_ROM_WORDS=..", framed as "config", then the map. The ROM: the ROM's file as given.
* It refuses what the ABI cannot carry: a header, a store or a start in the source; an export's name
* over 31 characters; a port or a request it can see that the word does not declare, or one declared by
* a word it calls.
* a word it calls; a word that runs on into the next export with no call or jump, since placement splits
* the code at each export (plan section 12, 2a).
*/
#ifndef V4_TOOLS_F18A_H
#define V4_TOOLS_F18A_H