-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YoYo leader election algorithm (#124)
Signed-off-by: Stephan Merz <[email protected]>
- Loading branch information
1 parent
b7d2d8c
commit bbd3768
Showing
10 changed files
with
925 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SPECIFICATION Spec | ||
|
||
INVARIANTS | ||
TypeOK | ||
NeighborInv | ||
|
||
PROPERTIES | ||
NoNewSource | ||
Liveness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--------------------------- MODULE MCYoYoNoPruning --------------------------- | ||
EXTENDS Integers | ||
|
||
Nodes == 1 .. 5 | ||
Edges == {{1,2}, {1,5}, {3,4}, {3,5}, {4,5}} | ||
|
||
(* | ||
Nodes == {2,3,4,5,7,11,12,14,20,31,41} | ||
Edges == {{2,31}, {3,11}, {3,12}, {3,14}, {4,14}, {4,20}, | ||
{5,11}, {5,12}, {5,20}, {7,20}, {7,31}, | ||
{11,12}, {12,20}, {20,41}} | ||
*) | ||
|
||
VARIABLES phase, incoming, outgoing, mailbox | ||
|
||
INSTANCE YoYoNoPruning | ||
|
||
============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SPECIFICATION Spec | ||
|
||
INVARIANTS | ||
TypeOK | ||
NeighborInv | ||
FinishIffTerminated | ||
|
||
PROPERTIES | ||
\* NoNewSource -- fails for the small example graph | ||
Liveness | ||
|
||
CHECK_DEADLOCK FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
---------------------------- MODULE MCYoYoPruning ---------------------------- | ||
EXTENDS Integers | ||
|
||
Nodes == 1 .. 5 | ||
Edges == {{1,2}, {1,5}, {3,4}, {3,5}, {4,5}} | ||
|
||
(* | ||
Nodes == {2,3,4,5,7,11,12,14,20,31,41} | ||
Edges == {{2,31}, {3,11}, {3,12}, {3,14}, {4,14}, {4,20}, | ||
{5,11}, {5,12}, {5,20}, {7,20}, {7,31}, | ||
{11,12}, {12,20}, {20,41}} | ||
*) | ||
|
||
VARIABLES active, phase, incoming, outgoing, mailbox | ||
|
||
INSTANCE YoYoPruning | ||
|
||
============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CONSTANT N = 5 | ||
SPECIFICATION Spec | ||
|
||
INVARIANTS | ||
TypeOK | ||
NeighborInv | ||
FinishIffTerminated | ||
|
||
PROPERTIES | ||
Liveness | ||
|
||
CHECK_DEADLOCK FALSE |
Oops, something went wrong.