Created
June 3, 2021 08:23
-
-
Save Vanlightly/06415729c113301ceb435d7918c667a8 to your computer and use it in GitHub Desktop.
Example TLA+ specification
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
---------------------------- MODULE TwoCounters ---------------------------- | |
EXTENDS Integers | |
CONSTANT C, Limit | |
VARIABLES counter | |
Init == | |
counter = [c \in C |-> 0] | |
Next == | |
\E c \in C : | |
/\ counter[c] < Limit | |
/\ counter' = [counter EXCEPT ![c] = counter[c] + 1] | |
AlwaysNonNegative == | |
\A c \in C : counter[c] > -1 | |
AllAtLimit == | |
\A c \in C : counter[c] = Limit | |
EventuallyAllAtLimit == | |
<>[]AllAtLimit | |
============================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment