feat(v4): the system hands no GONE on; (GONE-HOOK) goes (MESH step 7, increment 2)
Ruling 7 as amended: the kernel tells a node's going, so the system's
hand-on is not used. (GONE-HOOK), (DOWN) and (RUN) go from quit.f18, and
COLD's hook-clearing from system.f18; the cell is free again. The tests of
the hand-on go with it (mesh: the hand-on checks and the fourth disturbed
exchange; depth sweep: path 10, as before 529ba0fc). A believed GONE going
no further is still checked. test_host_unit.c's message for GONE down the
graph now says the kernel tells. MESH.md: 9a.6 items 5 and 7, and step 7's
record of both increments.
Suite EXIT 0; depth sweep 230 runs, 0 failures; mkcapsule lint 0
violations. Hosted and bare metal, all three ISAs: word_count=317
dict_hash=0xfec8c47cfc6f437f.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9138ebd8bb
commit
6cb8f1285f
@@ -1096,23 +1096,14 @@ int main(void)
|
||||
CHECK(undone == 0 && wrong == 0, "whenever the room came, both texts were done, the first first: %u not done, %u in the wrong order, the first when it came at step %u", undone, wrong, first_wrong);
|
||||
}
|
||||
|
||||
/* ---- A BELIEVED GONE IS HANDED ON (MESH.md 9a.2, ruling 7; 9a.3) ----
|
||||
* The word in (GONE-HOOK) is given the number of the node that is gone, each time a GONE is believed:
|
||||
* centre.4th puts GONE-DOWN there, which tells the nodes the node birthed. Here node 11 has a word that
|
||||
* tells node 12; node 12 believes it, since node 11 is its centre, and forgets its way to 44. */
|
||||
/* ---- A BELIEVED GONE GOES NO FURTHER (MESH.md 9a.2, ruling 7) ----
|
||||
* The kernel tells each node a node's going; a node does not hand a GONE on. Node 11 believes one from its
|
||||
* centre and forgets its way to 44, and node 12, which also knows a way to 44, is told nothing. */
|
||||
CHECK(row() && told(12, "44 2 ROUTE") && told(11, "44 3 ROUTE"), "a row; nodes 11 and 12 each know a way to 44");
|
||||
{
|
||||
v4_cell ways11 = pool[mid].n.mem[ROUTE_COUNT], ways12 = pool[far].n.mem[ROUTE_COUNT];
|
||||
CHECK(told(10, "44 11 GONE") && pool[mid].n.mem[ROUTE_COUNT] == ways11 - 1 && pool[far].n.mem[ROUTE_COUNT] == ways12 && asleep(far),
|
||||
"with nothing in (GONE-HOOK) node 11 believes a GONE from its centre and tells no one");
|
||||
CHECK(told(11, "44 3 ROUTE : DOWN 12 GONE ; ' DOWN (GONE-HOOK) !"), "node 11 is given a word to hand a GONE on with");
|
||||
CHECK(told(10, "44 11 GONE") && pool[mid].n.mem[ROUTE_COUNT] == ways11 - 1 && pool[far].n.mem[ROUTE_COUNT] == ways12 - 1 && asleep(far) && asleep(mid),
|
||||
"now node 11 believes it and hands it on: node 12 believes it from its centre and forgets 44 too");
|
||||
CHECK(told(12, "44 2 ROUTE") && told(11, "44 3 ROUTE") && told(12, "44 12 GONE") && pool[mid].n.mem[ROUTE_COUNT] == ways11,
|
||||
"a GONE that is not believed -- node 12 is not node 11's centre -- is not handed on");
|
||||
CHECK(v4_fabric_wire_kernel(&f, mid, 0, &kernel_dev), "a kernel on node 11's port 0, for COLD's EMPTY-BUFFERS");
|
||||
CHECK(strstr(tell(11, "COLD"), "Cold Start") != NULL && strcmp(tell(11, "(GONE-HOOK) @ ."), "0 ") == 0,
|
||||
"COLD forgets DOWN, so (GONE-HOOK) no longer points at it: \"%s\"", printed);
|
||||
"node 11 believes a GONE from its centre and tells no one");
|
||||
CHECK(strcmp(tell(10, "1 2 + ."), "3 ") == 0 && strcmp(tell(11, "1 2 + ."), "3 ") == 0 && strcmp(tell(12, "1 2 + ."), "3 ") == 0, "and every node answers");
|
||||
}
|
||||
|
||||
@@ -1128,16 +1119,15 @@ int main(void)
|
||||
* (Hera's KILL does: test_host_unit.c). Its wait is ended by the line it is then typed, "Interrupted",
|
||||
* and it answers. */
|
||||
{
|
||||
static const struct { const char *what, *set10, *set11, *set12; v4_cell node; const char *text; } ex[4] = {
|
||||
static const struct { const char *what, *set10, *set11, *set12; v4_cell node; const char *text; } ex[3] = {
|
||||
{ "text from the console for node 12, what it prints and how it ended", "1 DROP", "1 DROP", ": A 7 8 * . ;", 12, "A" },
|
||||
{ "node 11 SENDs node 12 text and waits for its answer", "1 DROP", ": T S\" Q\" 12 SEND 12 AWAIT . ;", "1 DROP", 11, "T" },
|
||||
{ "a GONE node 10 sends node 11, which node 11 hands on to node 12", ": G 44 11 GONE ;", ": DOWN 12 GONE ; ' DOWN (GONE-HOOK) ! 44 3 ROUTE", "44 2 ROUTE", 10, "G" },
|
||||
{ "a message node 12 has no way for, and its NACK to node 10", "55 2 ROUTE : N S\" 1 DROP\" 55 SEND ;", "55 3 ROUTE", "NO-ROUTES 1 2 ROUTE 10 2 ROUTE 11 2 ROUTE", 10, "N" }
|
||||
};
|
||||
static const char *const how_name[4] = { "", "node 11 removed", "node 12 removed", "the wire between nodes 11 and 12 cut and made again" };
|
||||
unsigned e, g, whole, tried, wrong, first, all = 0;
|
||||
step_cap = 2000000;
|
||||
for (e = 0; e < 4; e++) {
|
||||
for (e = 0; e < 3; e++) {
|
||||
CHECK(row() && told(10, ex[e].set10) && told(11, ex[e].set11) && told(12, ex[e].set12) && told(10, ASK) && told(11, ASK) && told(12, ASK), "a row made afresh for: %s", ex[e].what);
|
||||
step_cap = 2000000;
|
||||
keep();
|
||||
|
||||
Reference in New Issue
Block a user