-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpluscal.tla
50 lines (39 loc) · 1.02 KB
/
pluscal.tla
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
------------------------------ MODULE pluscal ------------------------------
EXTENDS Integers, TLC
(* --algorithm pluscal
variables
x = 2;
y = TRUE;
begin
A:
x := x + 1;
B:
x := x + 1;
y := FALSE;
end algorithm; *)
\* BEGIN TRANSLATION (chksum(pcal) = "673e7138" /\ chksum(tla) = "1d801c1a")
VARIABLES x, y, pc
vars == << x, y, pc >>
Init == (* Global variables *)
/\ x = 2
/\ y = TRUE
/\ pc = "A"
A == /\ pc = "A"
/\ x' = x + 1
/\ pc' = "B"
/\ y' = y
B == /\ pc = "B"
/\ x' = x + 1
/\ y' = FALSE
/\ pc' = "Done"
(* Allow infinite stuttering to prevent deadlock on termination. *)
Terminating == pc = "Done" /\ UNCHANGED vars
Next == A \/ B
\/ Terminating
Spec == Init /\ [][Next]_vars
Termination == <>(pc = "Done")
\* END TRANSLATION
=============================================================================
\* Modification History
\* Last modified Thu Jul 21 20:38:57 CST 2022 by dannypsnl
\* Created Thu Jul 21 20:38:07 CST 2022 by dannypsnl