fix(v4.0.0): step 6e review round 2 -- only the message looked at is taken, moved or dropped; the kernel's port has no queue in a fabric; an answer nobody awaits is not a loss
- Engine: a wire keeps whether the message at its mark is the one last looked at; a node's take, move and drop of any other answer 3 and write nothing (MESH.md 7d.3). A wire cut and made again between a look and a take no longer has a NACK done as text, or 256 cells written where one was looked for. - Engine: v4_fabric_wire_kernel wires a kernel to a port with no queues; a message for it is refused at once, error 18, on a mesh as on the products. - The result of a drop is looked at; a take that does not take has the message dropped, or gone past: nothing goes round. - An answer nobody waits for is let go uncounted; (LOST) counts what should have been delivered or acted on and was not. The flood's account is exact. - Error 18 from under a word that was printing empties the data stack, as a fault does: that word's own values are not left there. - Tests: the take and drop windows cut at every step, with and without another message put; a refusal owed to a stuck node whose wire is full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6a7d0aa27f
commit
f1419e739c
+17
-11
@@ -107,12 +107,15 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
\ the answer has gone.
|
||||
\ a NACK is taken and counted in (REFUSED)
|
||||
\ a GONE is taken, and believed if this node's centre sent it
|
||||
\ any other is dropped, and counted in (LOST): an answer no one waits
|
||||
\ for, what a node printed that came here, or what is not as
|
||||
\ long as its type says.
|
||||
\ an answer no one is waiting for is dropped: a SEND that is not waited
|
||||
\ on is ordinary use, and its answer is not a loss.
|
||||
\ any other is dropped, and counted in (LOST): what a node printed
|
||||
\ that came here, a type there is none of, or a NACK or GONE
|
||||
\ that is not as long as one is. (LOST) counts what should
|
||||
\ have been delivered or acted on and was not.
|
||||
\ A TAKE THAT DOES NOT TAKE -- the wire was cut after the message was
|
||||
\ looked at -- leaves nothing to act on: no text is done and nothing is
|
||||
\ counted or believed for it.
|
||||
\ believed for it, (UNTAKEN). The same for a drop that does not drop.
|
||||
\ With nothing to begin it sleeps, executing nothing, until a message
|
||||
\ comes; or, if text is waiting for room for its answer, or (SERVE) left a
|
||||
\ message for want of room, until there is room on any wire that leads
|
||||
@@ -129,12 +132,15 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
(SERVE) (MINE0)
|
||||
M: (MINE) if REST
|
||||
drop (IN)+2 a! @ -1 + if TEXT -3 + if NACK -1 + if GONE
|
||||
OTHER: drop 4 (DO) drop (LOST) a! @ 1 + ! jump M \ let go, and counted
|
||||
OTHER: drop 4 (DO) if LETGO drop (SKIP) jump M \ it was not there to drop: nothing is counted
|
||||
LETGO: drop (IN)+2 a! @ -3 + if ANSWER \ let go. An answer no one waits for is ordinary:
|
||||
drop (LOST) a! @ 1 + ! jump M \ anything else should not have come here, and is counted
|
||||
ANSWER: drop jump M
|
||||
NACK: drop (IN)+6 a! @ -4 + if N1 jump OTHER
|
||||
N1: drop (TAKE1) if N2 drop jump M \ not taken: nothing is done for it
|
||||
N1: drop (TAKE1) if N2 drop (UNTAKEN) jump M \ not taken: nothing is done for it
|
||||
N2: drop (REFUSED) a! @ 1 + ! jump M \ a message of this node's was refused: counted
|
||||
GONE: drop (IN)+6 a! @ -4 + if G1 jump OTHER
|
||||
G1: drop (TAKE1) if G2 drop jump M
|
||||
G1: drop (TAKE1) if G2 drop (UNTAKEN) jump M
|
||||
G2: drop (GONE?) drop jump M
|
||||
TEXT: drop
|
||||
(IN)+1 a! @ (WAY) -if T1 drop (S-WIRE) a! @ \ the way back; with none known, the wire it came on
|
||||
@@ -150,7 +156,7 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
START: drop
|
||||
(S-WIRE) a! @ dup (REPLY) a! ! (WIRE!)
|
||||
(MSG) (WIRE-A) b! !b TIB 2/ 2/ (WIRE-B) b! !b 2 (DO) \ its seven words, and its text
|
||||
if TAKEN drop jump L \ not taken: the wire was cut since it was looked at
|
||||
if TAKEN drop (UNTAKEN) jump M \ not taken: the wire was cut since it was looked at
|
||||
TAKEN: drop
|
||||
0 (MSG)+6 a! @ TIB + C! \ a zero after the text
|
||||
(MSG)+6 a! @ SPAN a! !
|
||||
@@ -353,15 +359,15 @@ header AWAIT
|
||||
BREAK: drop 4 jump (A-END)
|
||||
ANSWER: drop (IN)+1 a! @ (AWAIT-FROM) a! @ xor if A1 jump KEEP
|
||||
A1: drop (IN)+6 a! @ -4 + if A2 jump KEEP
|
||||
A2: drop (TAKE1) if A3 drop jump M \ not taken: nothing is done for it
|
||||
A2: drop (TAKE1) if A3 drop (UNTAKEN) jump M \ not taken: nothing is done for it
|
||||
A3: drop 1 jump (A-END)
|
||||
NACK: drop (IN)+6 a! @ -4 + if N1 jump KEEP
|
||||
N1: drop (TAKE1) if N0 drop jump M
|
||||
N1: drop (TAKE1) if N0 drop (UNTAKEN) jump M
|
||||
N0: drop (ONE) a! @ (AWAIT-FROM) a! @ xor if N2 \ about the node waited for?
|
||||
drop (REFUSED) a! @ 1 + ! jump M \ another: counted
|
||||
N2: drop 2 jump (A-END)
|
||||
GONE: drop (IN)+6 a! @ -4 + if G1 jump KEEP
|
||||
G1: drop (TAKE1) if G0 drop jump M
|
||||
G1: drop (TAKE1) if G0 drop (UNTAKEN) jump M
|
||||
G0: drop (GONE?) if M0 \ only its centre is believed
|
||||
drop (ONE) a! @ (AWAIT-FROM) a! @ xor if G2 drop jump M
|
||||
G2: drop 3 jump (A-END)
|
||||
|
||||
Reference in New Issue
Block a user