Browse Source

Made it possible to disable hierarchical priority. Added more priority tests, including tests that fail because of detected nondeterminism.

Joeri Exelmans 4 years ago
parent
commit
e1826ed316

+ 4 - 2
examples/semantics/statechart_semantics.xml

@@ -7,8 +7,10 @@
     internal_event_lifeline="next_small_step, next_combo_step, remainder, queue"
     enabledness_memory_protocol="small_step, combo_step, big_step"
     assignment_memory_protocol="small_step, combo_step, big_step"
-    concurrency="single"
-    priority="source_child, source_parent"/>
+    same_source_priority="explicit"
+    hierarchical_priority="source_child, source_parent"
+    orthogonal_priority="explicit"
+    concurrency="single"/>
 
   <datamodel>
     x = 0;

+ 2 - 1
src/sccd/statechart/dynamic/statechart_instance.py

@@ -40,11 +40,12 @@ class StatechartInstance(Instance):
 
         with timer.Context("priority"):
             hierarchical = {
+                HierarchicalPriority.NONE: priority.none,
                 HierarchicalPriority.SOURCE_PARENT: priority.source_parent,
                 HierarchicalPriority.SOURCE_CHILD: priority.source_child,
                 HierarchicalPriority.ARENA_PARENT: priority.arena_parent,
                 HierarchicalPriority.ARENA_CHILD: priority.arena_child,
-            }[semantics.priority]
+            }[semantics.hierarchical_priority]
 
             same_state = {
                 SameSourcePriority.NONE: priority.none,

+ 14 - 10
src/sccd/statechart/static/priority.py

@@ -48,18 +48,19 @@ def explicit(tree: StateTree) -> EdgeList:
 # hierarchical Source-Parent ordering
 def source_parent(tree: StateTree) -> EdgeList:
     edges: EdgeList = []
-    def visit_state(s: State, parent_transitions: List[Transition] = []) -> List[Transition]:
-        edges.extend(itertools.product(parent_transitions, s.transitions))
-        return s.transitions
+    def visit_state(s: State, ancestor_transitions: List[Transition] = []) -> List[Transition]:
+        edges.extend(itertools.product(ancestor_transitions, s.transitions))
+        return ancestor_transitions + s.transitions
     visit_tree(tree.root, lambda s: s.children, before_children=[visit_state])
     return edges
 
 # hierarchical Source-Child ordering
 def source_child(tree: StateTree) -> EdgeList:
     edges: EdgeList = []
-    def visit_state(s: State, children_transitions: List[List[Transition]]) -> List[Transition]:
-        edges.extend(itertools.product(itertools.chain.from_iterable(children_transitions), s.transitions))
-        return s.transitions
+    def visit_state(s: State, ts: List[List[Transition]]) -> List[Transition]:
+        descendant_transitions = list(itertools.chain.from_iterable(ts))
+        edges.extend(itertools.product(descendant_transitions, s.transitions))
+        return s.transitions + descendant_transitions
     visit_tree(tree.root, lambda s: s.children, after_children=[visit_state])
     return edges
 
@@ -120,10 +121,13 @@ def get_total_ordering(tree: StateTree, *priorities: Callable[[StateTree], EdgeL
             lca = tree.state_list[lca_id]
             # Transitions are orthogonal to each other (LCA is And-state):
             if isinstance(lca, ParallelState):
-                raise Exception("Nondeterminism! No priority between orthogonal transitions: " + str(highest_priority))
-            # Their source states are the same state or ancestors of one another:
-            if lca_id == t1.source.opt.state_id or lca_id == t2.source.opt.state_id:
-                raise Exception("Nondeterminism! No priority between ancestral transitions: " + str(highest_priority))
+                raise Exception("Nondeterminism! No priority between orthogonal transitions: " + str(transitions))
+            # They have the same source:
+            if t1.source is t2.source:
+                raise Exception("Nondeterminism! No priority between outgoing transitions of same state: %s, %s" % (t1, t2))
+            # Their source states are ancestors of one another:
+            if bm_has(t1.source.opt.ancestors, t2.source.opt.state_id) or bm_has(t2.source.opt.ancestors, t1.source.opt.state_id):
+                raise Exception("Nondeterminism! No priority between ancestral transitions: %s, %s" % (t1, t2))
 
     remaining_transitions = set(tree.transition_list)
     remaining_edges = edges

+ 3 - 1
src/sccd/statechart/static/semantic_configuration.py

@@ -55,6 +55,8 @@ class MemoryProtocol(SemanticAspect, Enum):
   # NONE = auto()
 
 class HierarchicalPriority(SemanticAspect, Enum):
+  NONE = auto()
+  
   SOURCE_PARENT = auto()
   SOURCE_CHILD = auto()
 
@@ -91,7 +93,7 @@ class SemanticConfiguration:
   enabledness_memory_protocol: SemanticChoice[MemoryProtocol] = MemoryProtocol.COMBO_STEP
   assignment_memory_protocol: SemanticChoice[MemoryProtocol] = MemoryProtocol.COMBO_STEP
 
-  priority: SemanticChoice[HierarchicalPriority] = HierarchicalPriority.SOURCE_PARENT
+  hierarchical_priority: SemanticChoice[HierarchicalPriority] = HierarchicalPriority.SOURCE_PARENT
   orthogonal_priority: SemanticChoice[OrthogonalPriority] = OrthogonalPriority.EXPLICIT
   same_source_priority: SemanticChoice[SameSourcePriority] = SameSourcePriority.EXPLICIT
   

+ 6 - 0
test/test_files/semantics/priority/fail_nondeterm_arena_parent.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<test>
+  <statechart src="statechart_hierarchical.xml">
+    <override_semantics hierarchical_priority="arena_parent"/>
+  </statechart>
+</test>

+ 6 - 0
test/test_files/semantics/priority/fail_nondeterm_flat.xml

@@ -0,0 +1,6 @@
+<test>
+  <!-- attempting to instantiate the statechart with semantics below should raise an error -->
+  <statechart src="statechart_flat.xml">
+    <override_semantics same_source_priority="none"/>
+  </statechart>
+</test>

+ 5 - 0
test/test_files/semantics/priority/fail_nondeterm_hierarchical.xml

@@ -0,0 +1,5 @@
+<test>
+  <statechart src="statechart_hierarchical.xml">
+    <override_semantics hierarchical_priority="none"/>
+  </statechart>
+</test>

+ 5 - 0
test/test_files/semantics/priority/fail_nondeterm_ortho.xml

@@ -0,0 +1,5 @@
+<test>
+  <statechart src="statechart_ortho.xml">
+    <override_semantics orthogonal_priority="none"/>
+  </statechart>
+</test>

+ 29 - 0
test/test_files/semantics/priority/statechart_flat.xml

@@ -0,0 +1,29 @@
+<statechart>
+  <inport name="in">
+    <event name="start"/>
+  </inport>
+
+  <outport name="out">
+    <event name="in_B"/>
+    <event name="in_C"/>
+  </outport>
+
+  <root initial="A">
+    <state id="A">
+      <transition target="../B"/>
+      <transition target="../C"/>
+    </state>
+
+    <state id="B">
+      <onentry>
+        <raise event="in_B"/>
+      </onentry>
+    </state>
+
+    <state id="C">
+      <onentry>
+        <raise event="in_C"/>
+      </onentry>
+    </state>
+  </root>
+</statechart>

+ 28 - 0
test/test_files/semantics/priority/statechart_hierarchical.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<statechart>
+
+  <inport name="in">
+    <event name="start"/>
+  </inport>
+
+  <outport name="out">
+    <event name="source_parent"/>
+    <event name="source_child"/>
+  </outport>
+
+  <root initial="A">
+    <state id="A">
+      <transition target="/C">
+        <raise event="source_parent"/>
+      </transition>
+      <state id="B">
+        <transition target="/C">
+          <raise event="source_child"/>
+        </transition>
+      </state>
+    </state>
+
+    <state id="C"/>
+  </root>
+
+</statechart>

+ 33 - 0
test/test_files/semantics/priority/statechart_ortho.xml

@@ -0,0 +1,33 @@
+<statechart>
+  <inport name="in">
+    <event name="start"/>
+  </inport>
+  
+  <outport name="out">
+    <event name="t1"/>
+    <event name="t2"/>
+  </outport>
+
+  <root>
+    <parallel id="P">
+      <state id="R1" initial="A">
+        <state id="A">
+          <transition target="../B">
+            <raise event="t1"/>
+          </transition>
+        </state>
+        <state id="B">
+        </state>
+      </state>
+      <state id="R2" initial="C">
+        <state id="C">
+          <transition target="../D">
+            <raise event="t2"/>
+          </transition>
+        </state>
+        <state id="D">
+        </state>
+      </state>
+    </parallel>
+  </root>
+</statechart>

+ 0 - 135
test/test_files/semantics/priority/statechart_priority_hierarchical.svg

@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Generated by graphviz version 2.40.1 (20161225.0304)
- -->
-<!-- Title: state transitions Pages: 1 -->
-<svg width="346pt" height="578pt"
- viewBox="0.00 0.00 346.00 577.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 573.5)">
-<title>state transitions</title>
-<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-573.5 342,-573.5 342,4 -4,4"/>
-<g id="clust1" class="cluster">
-<title>cluster__s6</title>
-<path fill="none" stroke="#000000" stroke-width="2" d="M270,-148C270,-148 318,-148 318,-148 324,-148 330,-154 330,-160 330,-160 330,-310.5 330,-310.5 330,-316.5 324,-322.5 318,-322.5 318,-322.5 270,-322.5 270,-322.5 264,-322.5 258,-316.5 258,-310.5 258,-310.5 258,-160 258,-160 258,-154 264,-148 270,-148"/>
-<text text-anchor="start" x="287.6646" y="-303.7" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s6</text>
-</g>
-<g id="clust2" class="cluster">
-<title>cluster__s1</title>
-<path fill="none" stroke="#000000" stroke-width="2" d="M20,-8C20,-8 201,-8 201,-8 207,-8 213,-14 213,-20 213,-20 213,-518.5 213,-518.5 213,-524.5 207,-530.5 201,-530.5 201,-530.5 20,-530.5 20,-530.5 14,-530.5 8,-524.5 8,-518.5 8,-518.5 8,-20 8,-20 8,-14 14,-8 20,-8"/>
-<text text-anchor="start" x="104.1646" y="-511.7" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s1</text>
-</g>
-<g id="clust3" class="cluster">
-<title>cluster__s1_s2</title>
-<path fill="none" stroke="#000000" stroke-width="2" d="M98,-16C98,-16 193,-16 193,-16 199,-16 205,-22 205,-28 205,-28 205,-423.5 205,-423.5 205,-429.5 199,-435.5 193,-435.5 193,-435.5 98,-435.5 98,-435.5 92,-435.5 86,-429.5 86,-423.5 86,-423.5 86,-28 86,-28 86,-22 92,-16 98,-16"/>
-<text text-anchor="start" x="139.1646" y="-416.7" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s2</text>
-</g>
-<!-- __initial -->
-<g id="node1" class="node">
-<title>__initial</title>
-<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="163" cy="-564" rx="5.5" ry="5.5"/>
-</g>
-<!-- _s1 -->
-<!-- __initial&#45;&gt;_s1 -->
-<g id="edge1" class="edge">
-<title>__initial&#45;&gt;_s1</title>
-<path fill="none" stroke="#000000" d="M163,-558.4623C163,-554.2143 163,-547.8733 163,-540.6925"/>
-<polygon fill="#000000" stroke="#000000" points="166.5001,-540.4976 163,-530.4976 159.5001,-540.4976 166.5001,-540.4976"/>
-<text text-anchor="middle" x="164.3895" y="-541.5" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
-</g>
-<!-- _s6 -->
-<!-- _s6_initial -->
-<g id="node3" class="node">
-<title>_s6_initial</title>
-<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="294" cy="-279" rx="5.5" ry="5.5"/>
-</g>
-<!-- _s6_s7 -->
-<g id="node4" class="node">
-<title>_s6_s7</title>
-<polygon fill="transparent" stroke="transparent" stroke-width="2" points="322,-192 266,-192 266,-156 322,-156 322,-192"/>
-<text text-anchor="start" x="287.6646" y="-170.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s7</text>
-<path fill="none" stroke="#000000" stroke-width="2" d="M278.3333,-157C278.3333,-157 309.6667,-157 309.6667,-157 315.3333,-157 321,-162.6667 321,-168.3333 321,-168.3333 321,-179.6667 321,-179.6667 321,-185.3333 315.3333,-191 309.6667,-191 309.6667,-191 278.3333,-191 278.3333,-191 272.6667,-191 267,-185.3333 267,-179.6667 267,-179.6667 267,-168.3333 267,-168.3333 267,-162.6667 272.6667,-157 278.3333,-157"/>
-</g>
-<!-- _s6_initial&#45;&gt;_s6_s7 -->
-<g id="edge2" class="edge">
-<title>_s6_initial&#45;&gt;_s6_s7</title>
-<path fill="none" stroke="#000000" d="M294,-273.3547C294,-260.2193 294,-226.8662 294,-202.4137"/>
-<polygon fill="#000000" stroke="#000000" points="297.5001,-202.2371 294,-192.2371 290.5001,-202.2372 297.5001,-202.2371"/>
-<text text-anchor="middle" x="295.3895" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
-</g>
-<!-- _s1_initial -->
-<g id="node6" class="node">
-<title>_s1_initial</title>
-<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="94" cy="-487" rx="5.5" ry="5.5"/>
-</g>
-<!-- _s1_s2 -->
-<!-- _s1_initial&#45;&gt;_s1_s2 -->
-<g id="edge3" class="edge">
-<title>_s1_initial&#45;&gt;_s1_s2</title>
-<path fill="none" stroke="#000000" d="M94,-481.3418C94,-473.9327 94,-460.1666 94,-445.6217"/>
-<polygon fill="#000000" stroke="#000000" points="97.5001,-445.4962 94,-435.4963 90.5001,-445.4963 97.5001,-445.4962"/>
-<text text-anchor="middle" x="95.3895" y="-455.5" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
-</g>
-<!-- _s1_s5 -->
-<g id="node7" class="node">
-<title>_s1_s5</title>
-<polygon fill="transparent" stroke="transparent" stroke-width="2" points="72,-131 16,-131 16,-95 72,-95 72,-131"/>
-<text text-anchor="start" x="37.6646" y="-109.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s5</text>
-<path fill="none" stroke="#000000" stroke-width="2" d="M28.3333,-96C28.3333,-96 59.6667,-96 59.6667,-96 65.3333,-96 71,-101.6667 71,-107.3333 71,-107.3333 71,-118.6667 71,-118.6667 71,-124.3333 65.3333,-130 59.6667,-130 59.6667,-130 28.3333,-130 28.3333,-130 22.6667,-130 17,-124.3333 17,-118.6667 17,-118.6667 17,-107.3333 17,-107.3333 17,-101.6667 22.6667,-96 28.3333,-96"/>
-</g>
-<!-- _s1_s2&#45;&gt;_s1_s5 -->
-<g id="edge8" class="edge">
-<title>_s1_s2&#45;&gt;_s1_s5</title>
-<path fill="none" stroke="#000000" d="M86.0033,-390.4557C70.5295,-387.2377 38,-379.2534 38,-369 38,-369 38,-369 38,-331 38,-262.8788 40.9637,-182.8291 42.7253,-141.2669"/>
-<polygon fill="#000000" stroke="#000000" points="46.2303,-141.2247 43.1657,-131.0828 39.2368,-140.9222 46.2303,-141.2247"/>
-<text text-anchor="start" x="39" y="-276" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.source_parent &#160;&#160;</text>
-</g>
-<!-- _s1_s2_initial -->
-<g id="node9" class="node">
-<title>_s1_s2_initial</title>
-<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="169" cy="-392" rx="5.5" ry="5.5"/>
-</g>
-<!-- _s1_s2_s3 -->
-<g id="node11" class="node">
-<title>_s1_s2_s3</title>
-<polygon fill="transparent" stroke="transparent" stroke-width="2" points="197,-256 141,-256 141,-220 197,-220 197,-256"/>
-<text text-anchor="start" x="162.6646" y="-234.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s3</text>
-<path fill="none" stroke="#000000" stroke-width="2" d="M153.3333,-221C153.3333,-221 184.6667,-221 184.6667,-221 190.3333,-221 196,-226.6667 196,-232.3333 196,-232.3333 196,-243.6667 196,-243.6667 196,-249.3333 190.3333,-255 184.6667,-255 184.6667,-255 153.3333,-255 153.3333,-255 147.6667,-255 142,-249.3333 142,-243.6667 142,-243.6667 142,-232.3333 142,-232.3333 142,-226.6667 147.6667,-221 153.3333,-221"/>
-</g>
-<!-- _s1_s2_initial&#45;&gt;_s1_s2_s3 -->
-<g id="edge4" class="edge">
-<title>_s1_s2_initial&#45;&gt;_s1_s2_s3</title>
-<path fill="none" stroke="#000000" d="M169,-386.3288C169,-381.6736 169,-374.9097 169,-369 169,-369 169,-369 169,-279 169,-274.9516 169,-270.6784 169,-266.48"/>
-<polygon fill="#000000" stroke="#000000" points="172.5001,-266.3687 169,-256.3688 165.5001,-266.3688 172.5001,-266.3687"/>
-<text text-anchor="middle" x="170.3895" y="-342.5" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
-</g>
-<!-- _s1_s2_s4 -->
-<g id="node10" class="node">
-<title>_s1_s2_s4</title>
-<polygon fill="transparent" stroke="transparent" stroke-width="2" points="150,-60 94,-60 94,-24 150,-24 150,-60"/>
-<text text-anchor="start" x="115.6646" y="-38.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s4</text>
-<path fill="none" stroke="#000000" stroke-width="2" d="M106.3333,-25C106.3333,-25 137.6667,-25 137.6667,-25 143.3333,-25 149,-30.6667 149,-36.3333 149,-36.3333 149,-47.6667 149,-47.6667 149,-53.3333 143.3333,-59 137.6667,-59 137.6667,-59 106.3333,-59 106.3333,-59 100.6667,-59 95,-53.3333 95,-47.6667 95,-47.6667 95,-36.3333 95,-36.3333 95,-30.6667 100.6667,-25 106.3333,-25"/>
-</g>
-<!-- _s1_s2_s3&#45;&gt;_s6_s7 -->
-<g id="edge7" class="edge">
-<title>_s1_s2_s3&#45;&gt;_s6_s7</title>
-<path fill="none" stroke="#000000" d="M179.54,-219.997C184.5548,-212.8355 191.1433,-205.102 198.83,-200 215.729,-188.7834 237.3577,-182.3804 255.7245,-178.7379"/>
-<polygon fill="#000000" stroke="#000000" points="256.5888,-182.1392 265.8208,-176.9409 255.3622,-175.2475 256.5888,-182.1392"/>
-<text text-anchor="start" x="198" y="-203" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.arena_parent &#160;&#160;</text>
-</g>
-<!-- _s1_s2_s3&#45;&gt;_s1_s5 -->
-<g id="edge5" class="edge">
-<title>_s1_s2_s3&#45;&gt;_s1_s5</title>
-<path fill="none" stroke="#000000" d="M140.7834,-222.0043C139.5082,-221.3206 138.2428,-220.6496 137,-220 111.6952,-206.7722 99.0415,-212.5113 79.177,-192 65.4242,-177.7994 56.5127,-157.3074 51.1006,-140.7526"/>
-<polygon fill="#000000" stroke="#000000" points="54.411,-139.6075 48.171,-131.0452 47.7095,-141.63 54.411,-139.6075"/>
-<text text-anchor="start" x="80" y="-171" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.source_child &#160;&#160;</text>
-</g>
-<!-- _s1_s2_s3&#45;&gt;_s1_s2_s4 -->
-<g id="edge6" class="edge">
-<title>_s1_s2_s3&#45;&gt;_s1_s2_s4</title>
-<path fill="none" stroke="#000000" d="M170.2855,-219.8368C171.1448,-201.4912 171.2972,-172.4466 166,-148 159.9258,-119.9676 146.77,-89.9441 136.4175,-69.0327"/>
-<polygon fill="#000000" stroke="#000000" points="139.5361,-67.4437 131.8938,-60.1058 133.2921,-70.608 139.5361,-67.4437"/>
-<text text-anchor="start" x="161" y="-110" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.arena_child &#160;&#160;</text>
-</g>
-</g>
-</svg>

+ 0 - 42
test/test_files/semantics/priority/statechart_priority_hierarchical.xml

@@ -1,42 +0,0 @@
-<?xml version="1.0" ?>
-<statechart>
-
-  <inport name="in">
-    <event name="start"/>
-  </inport>
-
-  <outport name="out">
-    <event name="source_parent"/>
-    <event name="source_child"/>
-    <event name="arena_parent"/>
-    <event name="arena_child"/>
-  </outport>
-
-  <root initial="s1">
-    <state id="s1" initial="s2">
-      <state id="s2" initial="s3">
-        <state id="s3">
-          <transition target="/s1/s5">
-            <!-- with source-child, and same-source-priority 'explicit'  this transition is preferred above the other
-                 outgoing ones, because this one occurs first in the document -->
-            <raise event="source_child"/>
-          </transition>
-          <transition target="../s4">
-            <raise event="arena_child"/>
-          </transition>
-          <transition target="/s6/s7">
-            <raise event="arena_parent"/>
-          </transition>
-        </state>
-        <state id="s4"/>
-        <transition target="../s5">
-          <raise event="source_parent"/>
-        </transition>
-      </state>
-      <state id="s5"/>
-    </state>
-    <state id="s6">
-      <state id="s7"/>
-    </state>
-  </root>
-</statechart>

+ 0 - 17
test/test_files/semantics/priority/test_arena_child.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<test>
-  <statechart src="statechart_priority_hierarchical.xml">
-    <override_semantics
-      big_step_maximality="take_one"
-      priority="arena_child"
-      same_source_priority="none"/>
-  </statechart>
-  <input>
-      <event name="start" port="in" time="0 d"/>
-  </input>
-  <output>
-    <big_step>
-      <event name="arena_child" port="out"/>
-    </big_step>
-  </output>
-</test>

+ 0 - 17
test/test_files/semantics/priority/test_arena_parent.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<test>
-  <statechart src="statechart_priority_hierarchical.xml">
-    <override_semantics
-      big_step_maximality="take_one"
-      priority="arena_parent"
-      same_source_priority="none"/>
-  </statechart>
-  <input>
-      <event name="start" port="in" time="0 d"/>
-  </input>
-  <output>
-    <big_step>
-      <event name="arena_parent" port="out"/>
-    </big_step>
-  </output>
-</test>

+ 18 - 0
test/test_files/semantics/priority/test_explicit_flat.xml

@@ -0,0 +1,18 @@
+<test>
+  <statechart src="statechart_flat.xml">
+    <override_semantics
+      hierarchical_priority="none"
+      same_source_priority="explicit"
+      orthogonal_priority="none"/>
+  </statechart>
+
+  <input>
+    <event port="in" name="start" time="0 d"/>
+  </input>
+
+  <output>
+    <big_step>
+      <event port="out" name="in_B" time="0 d"/>
+    </big_step>
+  </output>
+</test>

+ 19 - 0
test/test_files/semantics/priority/test_explicit_ortho.xml

@@ -0,0 +1,19 @@
+<test>
+  <statechart src="statechart_ortho.xml">
+    <override_semantics
+      hierarchical_priority="none"
+      same_source_priority="none"
+      orthogonal_priority="explicit"/>
+  </statechart>
+
+  <input>
+    <event port="in" name="start" time="0 d"/>
+  </input>
+
+  <output>
+    <big_step>
+      <event port="out" name="t1" time="0 d"/>
+      <event port="out" name="t2" time="0 d"/>
+    </big_step>
+  </output>
+</test>

+ 4 - 3
test/test_files/semantics/priority/test_source_child.xml

@@ -1,9 +1,10 @@
 <?xml version="1.0" ?>
 <test>
-  <statechart src="statechart_priority_hierarchical.xml">
+  <statechart src="statechart_hierarchical.xml">
     <override_semantics
-      big_step_maximality="take_one"
-      priority="source_child"/>
+      orthogonal_priority="none"
+      same_source_priority="none"
+      hierarchical_priority="source_child"/>
   </statechart>
   <input>
       <event name="start" port="in" time="0 d"/>

+ 4 - 3
test/test_files/semantics/priority/test_source_parent.xml

@@ -1,9 +1,10 @@
 <?xml version="1.0" ?>
 <test>
-  <statechart src="statechart_priority_hierarchical.xml">
+  <statechart src="statechart_hierarchical.xml">
     <override_semantics
-      big_step_maximality="take_one"
-      priority="source_parent"/>
+      orthogonal_priority="none"
+      same_source_priority="none"
+      hierarchical_priority="source_parent"/>
   </statechart>
   <input>
       <event name="start" port="in" time="0 d"/>