forked from cubicle-model-checker/cubicle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxerox_dragon.cub
116 lines (99 loc) · 2.17 KB
/
xerox_dragon.cub
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
(* from "Regular Model Checking without Transducers
(on efficient verification of parameterized systems)"
Adulla et. al.
Tech report 2006-052 Uppsala Universitet
*)
type t = Invalid | SClean | SDirty | Exclusive | Dirty
array A[proc] : t
init (z) { A[z] = Invalid }
unsafe (z1 z2) { A[z1] = Dirty && A[z2] = SClean }
unsafe (z1 z2) { A[z1] = Dirty && A[z2] = SDirty }
unsafe (z1 z2) { A[z1] = Dirty && A[z2] = Exclusive }
unsafe (z1 z2) { A[z1] = Dirty && A[z2] = Dirty }
unsafe (z1 z2) { A[z1] = Exclusive && A[z2] = Exclusive }
transition t1 (x)
requires { A[x] = SDirty &&
forall_other j. (A[j] <> SClean && A[j] <> SDirty) }
{
A[j] := case
| j = x : Dirty
| _ : A[j]
}
transition t2 (x)
requires { A[x] = Invalid && forall_other j. A[j] = Invalid }
{
A[j] := case
| j = x : Exclusive
| _ : A[j]
}
transition t3 (x)
requires { A[x] = SClean &&
forall_other j. ( A[j] <> SClean && A[j] <> SDirty) }
{
A[j] := case
| j = x : Dirty
| _ : A[j]
}
transition t4 (x)
requires { A[x] = Invalid && forall_other j. A[j] = Invalid }
{
A[j] := case
| j = x : Dirty
| _ : A[j]
}
transition t5_1 (x y)
requires { A[x] = SDirty && A[y] = SClean }
{
A[j] := case
| j = x : SDirty
| A[j] = SDirty : SClean
| _ : A[j]
}
transition t5_2 (x y)
requires { A[x] = SDirty && A[y] = SDirty }
{
A[j] := case
| j = x : SDirty
| A[j] = SDirty : SClean
| _ : A[j]
}
transition t6 (x)
requires { A[x] = Exclusive }
{
A[j] := case
| j = x : Dirty
| _ : A[j]
}
transition t7_1 (x y)
requires { A[x] = SClean && A[y] = SClean }
{
A[j] := case
| j = x : SDirty
| A[j] = SDirty : SClean
| _ : A[j]
}
transition t7_2 (x y)
requires { A[x] = SClean && A[y] = SDirty }
{
A[j] := case
| j = x : SDirty
| A[j] = SDirty : SClean
| _ : A[j]
}
transition t8 (x y)
requires { A[x] = Invalid && A[y] <> Invalid }
{
A[j] := case
| j = x : SClean
| A[j] = Dirty : SDirty
| A[j] = Exclusive : SClean
| _ : A[j]
}
transition t9 (x y)
requires { A[x] = Invalid && A[y] <> Invalid }
{
A[j] := case
| j = x : SDirty
| A[j] <> Invalid : SClean
| _ : A[j]
}