-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFirstTry_Ex2_OutsideInput.scxml
68 lines (58 loc) · 2.32 KB
/
FirstTry_Ex2_OutsideInput.scxml
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
<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:iumlb="urn:xmlns:ac.soton.uk:iumlb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="root" version="1.0" initial="ROOT_Main_Environment">
<datamodel>
<data id="temp_high" expr="2"/>
<data id="temp_mid" expr="1"/>
<data id="temp_low" expr="0"/>
</datamodel>
<!-- <iumlb:invariant predicate="temperature \in {temp_high, temp_mid, temp_low}" name="typeof_temperature"/> -->
<parallel id="ROOT_Main_Environment">
<!-- this region tracks the Main -->
<state id="Main">
<state id="A">
<transition cond="temperature==temp_high" iumlb:label="alpha" target="B">
<iumlb:guard name="temp_high" predicate="temperature==temp_high"/>
</transition>
</state>
<state id="B">
<initial>
<transition target="D"/>
</initial>
<state id="D">
<transition cond="temperature==temp_high" iumlb:label="delta" target="E">
<iumlb:guard name="temp_high1" predicate="temperature==temp_high"/>
</transition>
<transition iumlb:label="gamma" target="C"/>
</state>
<state id="E">
<transition cond="temperature==temp_high" iumlb:label="epsilon" target="F">
<iumlb:guard name="temp_high2" predicate="temperature==temp_high"/>
</transition>
<transition cond="temperature==temp_mid" iumlb:label="eta" target="D">
<iumlb:guard name="temp_mid" predicate="temperature==temp_mid"/>
</transition>
<transition iumlb:label="gamma" target="C"/>
</state>
<state id="F">
<transition iumlb:label="zeta" target="E"/>
<transition cond="temperature==temp_mid" iumlb:label="theta" target="D">
<iumlb:guard name="temp_mid1" predicate="temperature==temp_mid"/>
</transition>
</state>
<transition cond="temperature==temp_low" iumlb:label="beta" target="A">
<iumlb:guard name="temp_low" predicate="temperature==temp_low"/>
</transition>
<transition iumlb:label="gamma" target="C"/>
</state>
<state id="C"/>
</state>
<!-- this region tracks the Environment -->
<state id="Environment">
<state id="NonDeterministic">
<transition iumlb:label="change_temperature" target="NonDeterministic">
<assign location="temperature" expr=":\in {temp_high, temp_mid, temp_low}"/>
</transition>
</state>
</state>
</parallel>
</scxml>