-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathTemporalLogic.tla
51 lines (39 loc) · 951 Bytes
/
TemporalLogic.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
51
--------------------------- MODULE TemporalLogic --------------------------------
EXTENDS Naturals, Sequences
F == FALSE
T == TRUE
VARIABLE p
seq ==
{
\* << F, T, 2 >>
\* ,<< T, F, 2 >>
\* ,<< T, 1 >>
\* ,<< T, F, 1 >>
\* ,<< F, T, T, T, F, 5 >>
\* ,<< T, F, T, T, F, T, 6 >>
\* ,<< F, T, T, T, F, 3 >>
}
Prop ==
/\ p = T
\* /\ []p
\* /\ <>p
\* /\ <>[]p
\* /\ []<>p
-------------------------------------------------------------------------------
\* Ignore the following!
VARIABLE c, b
vars == <<c, b, p>>
Init ==
/\ b \in seq
/\ c = 1
/\ p = b[c]
Next ==
/\ UNCHANGED b
/\ c' = IF c + 1 <= Len(b) - 1 THEN c + 1 ELSE b[Len(b)]
/\ p' = b[c']
Spec ==
Init /\ [][Next]_vars /\ WF_vars(Next)
Alias ==
\* Hide c and b variables.
[ p |-> p ]
==============================================================================