feat(v4.0.0): a node looks before it writes; two neighbours no longer stop each other
MESH.md step 4, the fault found there, as ruled (section 7a): a node writes only to a neighbour that is reading, keeps what it takes in meanwhile, and loses and counts what it has no room for. Engine: two more addresses after a node's ports -- which ports have a neighbour waiting to write to it, which to read from it. Nucleus: (GATE) before every message; the messages waiting, a ring of 400 cells, dealt with when the node is idle. Of two neighbours the lower number may wait to write (ruled after it was built); NEIGHBOUR tells a node who is on each port. test_host_mesh.c, 44 checks: the case that stopped the nodes passes; six messages from each node to each at once all arrive; 800 at once, the nodes come to rest and every message arrived or was counted (287 arrived, 714 of all kinds let go). test_fabric.c: the two looks. Both widths, ASan+UBSan. POST: twelve cases handed HERE, a cell address on v4, to words that take a byte address, and so wrote into or read from the nucleus's code at cell HERE/4. Ruled: left out, marked OPEN, until HERE and the byte words are made to agree as its own step. POST is 538 cases. hosted-check on three ISAs, 538/538. Bare metal: logs/20261006-134817 (amd64), -135044 (aarch64), -135440 (riscv64). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
630d03fa4e
commit
f9c034cadd
+1
-1
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
|
||||
if (!v4_node_guards_intact(&n)) die("the node's guards are damaged", NULL);
|
||||
|
||||
n.mem[LINE_STATUS] = 1; /* nothing has ended badly */
|
||||
n.mem[OUT_PTR] = OUT_W; /* nothing has been printed */
|
||||
HOST_MESSAGES_EMPTY(&n); /* nothing has been printed, no message waits */
|
||||
|
||||
/* the nucleus as a capsule of F18 code: the words a neighbour writes to
|
||||
* an empty node's port, each in V4_CELL_BITS / 8 bytes, low byte first */
|
||||
|
||||
@@ -67,6 +67,19 @@ STANDARD = {
|
||||
"MOVE.basic": dict(text="65 HERE ! 66 HERE 1+ ! HERE HERE 16 + 2 MOVE HERE 16 + @ . HERE 17 + @ . CR",
|
||||
out="65 66 \n", why="FORTH-79: MOVE moves cells; and " + D1),
|
||||
"PAD.usable": None, # see OPEN below
|
||||
# see OPEN below: HERE handed to a word that takes a byte address
|
||||
"C!.basic": None,
|
||||
"C!.zero": None,
|
||||
"C!.high_byte": None,
|
||||
"C!.truncation": None,
|
||||
"C@.after_cstore": None,
|
||||
"C@.zero_byte": None,
|
||||
"FILL.basic": None,
|
||||
"FILL.zero_byte": None,
|
||||
"CMOVE.overlap": None,
|
||||
"TYPE.single_char": None,
|
||||
"COUNT.string_bounds": None,
|
||||
"COUNT.zero_addr_plus_one": None,
|
||||
|
||||
"BASE.base_store": dict(out="255 \n", why="255 read in base 16 and printed in base 16 is 255; v3 printed 467"),
|
||||
|
||||
@@ -123,9 +136,29 @@ STANDARD = {
|
||||
"LEAVE.qdloop": dict(out="3 \n", why=LEAVE),
|
||||
}
|
||||
|
||||
# Found 2026-10-06 (docs/v4.0.0/MESH.md section 10, step 4): on v4 HERE is a
|
||||
# cell address and C! C@ FILL CMOVE COUNT TYPE take byte addresses, so these
|
||||
# cases wrote into, or read from, the nucleus's own code at cell HERE/4 --
|
||||
# and passed, reading back what they had written there. Ruled: left out
|
||||
# until how HERE and the byte words agree is settled, as its own step.
|
||||
HERE_BYTE = ("OPEN: HERE is a cell address on v4 and this word takes a byte address (D-1): "
|
||||
"the case wrote to or read from the nucleus's code at cell HERE/4")
|
||||
|
||||
# Dropped, and why. mkpost.py prints these with the cases it leaves out.
|
||||
DROPPED = {
|
||||
"PAD.usable": "OPEN: PAD 42 OVER ! faults on v4 -- PAD is a byte address and ! takes a cell address (D-1)",
|
||||
"C!.basic": HERE_BYTE,
|
||||
"C!.zero": HERE_BYTE,
|
||||
"C!.high_byte": HERE_BYTE,
|
||||
"C!.truncation": HERE_BYTE,
|
||||
"C@.after_cstore": HERE_BYTE,
|
||||
"C@.zero_byte": HERE_BYTE,
|
||||
"FILL.basic": HERE_BYTE,
|
||||
"FILL.zero_byte": HERE_BYTE,
|
||||
"CMOVE.overlap": HERE_BYTE,
|
||||
"TYPE.single_char": HERE_BYTE,
|
||||
"COUNT.string_bounds": HERE_BYTE,
|
||||
"COUNT.zero_addr_plus_one": HERE_BYTE,
|
||||
"CMOVE.bounds": "moves 1000 bytes over the system; v3 refuses by a bounds rule FORTH-79 has not got",
|
||||
}
|
||||
for _name in [k for k, v in STANDARD.items() if v is None and k.startswith("WORD.")]:
|
||||
|
||||
Reference in New Issue
Block a user