-
-
Save fernandezpablo85/b927f342e6b93b94f8491df6be1d6f12 to your computer and use it in GitHub Desktop.
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 first_number ---------------------------- | |
EXTENDS Integers | |
VARIABLES i, pc | |
Init == (pc = "start" /\ i = 0) | |
Pick == /\ pc = "start" | |
/\ i = 0 | |
/\ pc' = "middle" | |
/\ i' \in 0..1000 | |
Add == /\ pc = "middle" | |
/\ pc' = "done" | |
/\ i' = i + 1 | |
\* /\ i \in 0..1000 -- this line is not part of the exercise solution | |
Next == Pick \/ Add | |
============================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment