Skip to content

Commit

Permalink
Only check for local registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamrhay committed Jan 22, 2024
1 parent 3648c3c commit c21e84b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion syn.tla
Expand Up @@ -34,6 +34,9 @@ AllRegisteredNames(nodes, locals, registrations) ==
RegisteredElsewhere(node) ==
AllRegisteredNames(AllOtherNodes(node), locally_registered, {})

RegisteredOnThisNode(node) ==
AllRegisteredNames({node}, locally_registered, {})

Init ==
/\ inbox = [n \in Nodes |-> <<>>]
/\ registered = [n \in Names |-> 0]
Expand Down Expand Up @@ -122,7 +125,7 @@ UnregisterOnNode(n) ==
/\ Head(inbox[n]).action = "unregister_on_node"
/\ LET message == Head(inbox[n])
l == [r \in (DOMAIN locally_registered[n][n] \ {message.name}) |-> locally_registered[n][n][r]]
already_removed == message.name \notin AllRegisteredForNode(locally_registered[n])
already_removed == message.name \notin RegisteredOnThisNode(n)
IN
(IF already_removed THEN
\* {error, undefined}
Expand Down

0 comments on commit c21e84b

Please sign in to comment.