forked from Walnoot/SMC-Check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjobberlittlebad.xml
159 lines (159 loc) · 4.67 KB
/
jobberlittlebad.xml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_2.dtd'>
<nta>
<declaration>// Place global declarations here.
chan get_hammer, put_hammer, get_mallet, put_mallet;
chan lol;</declaration>
<template>
<name>Tool</name>
<parameter>chan &get, chan &put</parameter>
<location id="id0" x="-59" y="-127">
<name x="-69" y="-161">taken</name>
</location>
<location id="id1" x="-204" y="-127">
<name x="-214" y="-161">free</name>
</location>
<init ref="id1"/>
<transition>
<source ref="id0"/>
<target ref="id1"/>
<label kind="synchronisation" x="-144" y="-76">put?</label>
<nail x="-59" y="-59"/>
<nail x="-204" y="-59"/>
</transition>
<transition>
<source ref="id1"/>
<target ref="id0"/>
<label kind="synchronisation" x="-153" y="-153">get?</label>
</transition>
</template>
<template>
<name x="5" y="5">Worker</name>
<declaration>// Place local declarations here.
clock x;</declaration>
<location id="id2" x="263" y="51">
<name x="272" y="25">work_av_hammer</name>
<label kind="invariant" x="212" y="59">x<=-12</label>
</location>
<location id="id3" x="263" y="110">
<name x="280" y="85">work_hard</name>
<label kind="invariant" x="238" y="127">x<=22</label>
</location>
<location id="id4" x="136" y="110">
<name x="110" y="136">hard</name>
</location>
<location id="id5" x="263" y="-59">
<name x="272" y="-85">work_av_mallet</name>
<label kind="invariant" x="170" y="-76">x <= 17</label>
</location>
<location id="id6" x="263" y="-119">
<name x="280" y="-144">work_easy</name>
<label kind="invariant" x="212" y="-153">x<=7</label>
</location>
<location id="id7" x="136" y="-119">
<name x="126" y="-153">easy</name>
<urgent/>
</location>
<location id="id8" x="136" y="0">
<name x="93" y="-34">average</name>
</location>
<location id="id9" x="0" y="0">
<name x="-59" y="-17">begin</name>
</location>
<init ref="id9"/>
<transition>
<source ref="id3"/>
<target ref="id9"/>
<label kind="guard" x="314" y="127">x>=20</label>
<label kind="synchronisation" x="280" y="110">put_hammer!</label>
<nail x="391" y="110"/>
<nail x="391" y="-170"/>
<nail x="0" y="-170"/>
</transition>
<transition color="#ff0000">
<source ref="id2"/>
<target ref="id9"/>
<label kind="guard" x="297" y="68">x>=10</label>
<label kind="synchronisation" x="280" y="51">put_hammer!</label>
<nail x="390" y="51"/>
<nail x="390" y="-170"/>
<nail x="-1" y="-170"/>
</transition>
<transition>
<source ref="id5"/>
<target ref="id9"/>
<label kind="guard" x="289" y="-42">x>=15</label>
<label kind="synchronisation" x="289" y="-59">put_mallet!</label>
<nail x="390" y="-59"/>
<nail x="390" y="-170"/>
<nail x="-1" y="-170"/>
</transition>
<transition>
<source ref="id6"/>
<target ref="id9"/>
<label kind="guard" x="272" y="-161">x>=5</label>
<nail x="263" y="-170"/>
<nail x="0" y="-170"/>
</transition>
<transition>
<source ref="id4"/>
<target ref="id3"/>
<label kind="synchronisation" x="153" y="110">get_hammer!</label>
<label kind="assignment" x="178" y="85">x:=0</label>
</transition>
<transition>
<source ref="id8"/>
<target ref="id2"/>
<label kind="synchronisation" x="136" y="34">get_hammer!</label>
<label kind="assignment" x="195" y="8">x:=0</label>
</transition>
<transition>
<source ref="id8"/>
<target ref="id5"/>
<label kind="synchronisation" x="144" y="-59">get_mallet!</label>
<label kind="assignment" x="204" y="-34">x:=0</label>
</transition>
<transition>
<source ref="id7"/>
<target ref="id6"/>
<label kind="assignment" x="204" y="-119">x:=0</label>
</transition>
<transition>
<source ref="id9"/>
<target ref="id7"/>
</transition>
<transition>
<source ref="id9"/>
<target ref="id8"/>
</transition>
<transition>
<source ref="id9"/>
<target ref="id4"/>
</transition>
</template>
<system>// Place template instantiations here.
worker1 = Worker();
worker2 = Worker();
hammer = Tool(get_hammer, put_hammer);
mallet = Tool(get_mallet, put_mallet);
// List one or more processes to be composed into a system.
system worker1, worker2, hammer, mallet;</system>
<queries>
<query>
<formula>A[](belt.start imply A<> belt.end)
</formula>
<comment>
</comment>
</query>
<query>
<formula>E<> (belt.end && jobber1.begin && jobber2.begin && now >= 100)
</formula>
<comment>
</comment>
</query>
<query>
<formula>A[](!deadlock)</formula>
<comment></comment>
</query>
</queries>
</nta>