-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More termination detection algorithms #45
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
A first attempt showing refinement of AsyncTerminationDetecting by Huang. It is not a refinement because ATD doesn't allow pending decrement when an inactive Leader in Huang receives the last weight back. Node ==
0..Cardinality(Procs) - 1
M ==
CHOOSE f \in [ Node -> Procs ]: IsInjective(f)
ATD ==
INSTANCE AsyncTerminationDetection
WITH
terminationDetected <- TerminationDetected,
active <- [ n \in Node |-> active[M[n]] ],
pending <- [n \in Node |-> Len(msgs[M[n]]) ],
N <- Cardinality(Procs)
ATDSpec ==
ATD!Spec
THEOREM Spec => ATDSpec Action property line 63, col 20 to line 63, col 32 of module AsyncTerminationDetection is violated.
The behavior up to this point is:
1: <Initial predicate>
/\ active = {L}
/\ weights = (L :> "1")
/\ msgs = << >>
/\ Terminated = FALSE
/\ TerminationDetected = FALSE
2: <SendMsg line 48, col 5 to line 53, col 27 of module Huang>
/\ active = {L}
/\ weights = (L :> "1/2")
/\ msgs = (L :> <<"1/2">>)
/\ Terminated = FALSE
/\ TerminationDetected = FALSE
3: <IdleLdr line 72, col 5 to line 74, col 33 of module Huang>
/\ active = {}
/\ weights = (L :> "1/2")
/\ msgs = (L :> <<"1/2">>)
/\ Terminated = FALSE
/\ TerminationDetected = FALSE
4: <RcvLdr line 78, col 5 to line 81, col 27 of module Huang>
/\ active = {}
/\ weights = (L :> "1")
/\ msgs = << >>
/\ Terminated = TRUE
/\ TerminationDetected = TRUE |
The definition of Wakeup(i) in AsyncTerminationDetection could be changed to /\ pending[i] > 0 allowing an inactive receiver to either become active or remain passive. (It should then probably be renamed to Receive.) |
Ah, GitHub formatting ... maybe this works better: /\ pending[i] > 0
/\ \/ UNCHANGED active
\/ ~ active[i] /\ active' = [active EXCEPT ![i] = TRUE]
/\ pending' = [pending EXCEPT ![i] = @ - 1]
/\ UNCHANGED terminationDetected |
The text was updated successfully, but these errors were encountered: