Browse Source

Extend readme. Add some comments.

Joeri Exelmans 4 years ago
parent
commit
b3d7175114

+ 4 - 2
README.md

@@ -29,12 +29,14 @@ Assuming you followed the installation instructions above, run:
 python3 -m sccd.test.run test/test_files
 ```
 
+It will recursively visit the directory tree of `test_files` and look for XML files starting with with `test_` (tests that should succeed) or `fail_` (for tests that should fail), and execute them. The tree also contains XML files starting with `statechart_`: these are individual statechart models that are not directly executable, but are used by test files. The tree also contains SVG files: these contain automatically rendered images of statechart models.
+
 ## Runtime environment variables
 
 The following environment variables can be set to change the behavior of the runtime. These options can be set while running the tests, or while running one of the examples.
 
-* `SCCDDEBUG`: When set, additional debug information is printed, such as the individual transitions taken.
-* `SCCDTIMINGS`: When set, at exit, the runtime will print information about how much time in total was spent during various parts of its execution, such as loading the model (if model was loaded from a file), generating transition candidates, executing transitions, executing actions, and more.
+* `SCCDDEBUG`: When set, additional debug information is printed, such as a trace of the individual transitions taken.
+* `SCCDTIMINGS`: When set, at exit, the runtime will print information about how much time in total was spent during various parts of its execution, such as loading the model, generating transition candidates, executing transitions, executing actions, and more.
 
 ## Included tools
 

+ 5 - 4
examples/semantics/run.py

@@ -15,6 +15,7 @@ if __name__ == "__main__":
 
   print("Total variants:", len(variants))
   
+  # These rules perfectly partition the set of variants into "valid" and "invalid":
   def is_valid(semantics):
     # Combo-steps should be smaller (or equal to) big-steps, obviously.
     if semantics.combo_step_maximality > semantics.big_step_maximality:
@@ -31,7 +32,7 @@ if __name__ == "__main__":
           semantics.enabledness_memory_protocol == MemoryProtocol.COMBO_STEP)
 
     # "Combo Take One" is the default combo-step maximality option in SCCD, and is also the option
-    # that is chosen when no combo-steps are being defined. Options different from "Combo Take One"
+    # that is chosen when no combo-steps are being defined. Therefore, options different from "Combo Take One"
     # are only allowed when combo-step semantics are being used.
     if not must_have_combo_steps and semantics.combo_step_maximality > Maximality.TAKE_ONE:
       return False
@@ -86,7 +87,7 @@ if __name__ == "__main__":
   }
 
 
-  # Some mock callbacks that we have pass to the StatechartInstance
+  # Some mock callbacks that we have to pass to the StatechartInstance
   def on_output(e: OutputEvent):
     pass
 
@@ -100,7 +101,7 @@ if __name__ == "__main__":
   input0_id = globals.events.get_id("input0")
   input_events = [InternalEvent(id=input0_id, name="", params=[])]
 
-  # Here we will accumulate our wrongly-inferred semantic configurations
+
   def check_variants(variants):
     correct = []
     incorrect = []
@@ -123,7 +124,6 @@ if __name__ == "__main__":
           setattr(inferred_semantics, aspect_name, aspect_val)
       inferred_semantics.assignment_memory_protocol = inferred_semantics.enabledness_memory_protocol
 
-
       # print("\nActual semantics:")
       # print(v.semantics)
 
@@ -138,6 +138,7 @@ if __name__ == "__main__":
 
     return (correct, incorrect)
 
+
   correct, incorrect = check_variants(valid_variants)
   print("\nOf the valid variants, corrently inferred %d, incorrectly inferred %d." % (len(correct), len(incorrect)))
   correct, incorrect = check_variants(invalid_variants)

+ 2 - 2
src/sccd/statechart/static/priority.py

@@ -142,8 +142,8 @@ def get_total_ordering(tree: StateTree, *priorities: Callable[[StateTree], EdgeL
     while len(remaining_edges) > 0:
         # 1. Find set of highest-priority transitions (= the ones that have no incoming edges)
         # Such a set must exist, because we've already assured that are no cycles in the graph.
-        highs = set()
-        lows = set()
+        highs = set() # all transitions that have outgoing edges ("higher priority")
+        lows = set() # all transitions that have incoming edges ("lower priority")
         for high, low in remaining_edges:
             highs.add(high)
             lows.add(low)

+ 55 - 0
test/test_files/features/action_lang/test_guard_readonly.svg

@@ -0,0 +1,55 @@
+<?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="194pt" height="157pt"
+ viewBox="0.00 0.00 194.11 157.00" 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 153)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-153 190.109,-153 190.109,4 -4,4"/>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="40" cy="-143.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _s1 -->
+<g id="node3" class="node">
+<title>_s1</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="68,-110 12,-110 12,-74 68,-74 68,-110"/>
+<text text-anchor="start" x="33.6646" y="-88.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s1</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M24.3333,-75C24.3333,-75 55.6667,-75 55.6667,-75 61.3333,-75 67,-80.6667 67,-86.3333 67,-86.3333 67,-97.6667 67,-97.6667 67,-103.3333 61.3333,-109 55.6667,-109 55.6667,-109 24.3333,-109 24.3333,-109 18.6667,-109 13,-103.3333 13,-97.6667 13,-97.6667 13,-86.3333 13,-86.3333 13,-80.6667 18.6667,-75 24.3333,-75"/>
+</g>
+<!-- __initial&#45;&gt;_s1 -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_s1</title>
+<path fill="none" stroke="#000000" d="M40,-137.9886C40,-133.6293 40,-127.1793 40,-120.4801"/>
+<polygon fill="#000000" stroke="#000000" points="43.5001,-120.0122 40,-110.0122 36.5001,-120.0122 43.5001,-120.0122"/>
+<text text-anchor="middle" x="41.3895" y="-121" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _s2 -->
+<g id="node2" class="node">
+<title>_s2</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="80,-46 0,-46 0,0 80,0 80,-46"/>
+<text text-anchor="start" x="33.6646" y="-29.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">s2</text>
+<text text-anchor="start" x="5.5072" y="-9.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">enter ^out.ok</text>
+<polygon fill="#000000" stroke="#000000" points="0,-23 0,-23 80,-23 80,-23 0,-23"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M13,-1C13,-1 67,-1 67,-1 73,-1 79,-7 79,-13 79,-13 79,-33 79,-33 79,-39 73,-45 67,-45 67,-45 13,-45 13,-45 7,-45 1,-39 1,-33 1,-33 1,-13 1,-13 1,-7 7,-1 13,-1"/>
+</g>
+<!-- _s1&#45;&gt;_s2 -->
+<g id="edge3" class="edge">
+<title>_s1&#45;&gt;_s2</title>
+<path fill="none" stroke="#000000" d="M40,-73.8711C40,-68.4482 40,-62.3229 40,-56.2494"/>
+<polygon fill="#000000" stroke="#000000" points="43.5001,-56.21 40,-46.21 36.5001,-56.21 43.5001,-56.21"/>
+<text text-anchor="start" x="40" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">start(x:int) [x == 42] &#160;&#160;</text>
+</g>
+<!-- _s1&#45;&gt;_s1 -->
+<g id="edge2" class="edge">
+<title>_s1&#45;&gt;_s1</title>
+<path fill="none" stroke="#000000" d="M68.0183,-97.9381C79.888,-98.3856 90,-96.4063 90,-92 90,-88.9707 85.2205,-87.0885 78.3762,-86.3533"/>
+<polygon fill="#000000" stroke="#000000" points="78.1128,-82.8446 68.0183,-86.0619 77.9158,-89.8419 78.1128,-82.8446"/>
+<text text-anchor="start" x="90" y="-89" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">start(x:int) [inc_x(x)] &#160;&#160;</text>
+</g>
+</g>
+</svg>

+ 46 - 0
test/test_files/features/action_lang/test_import.svg

@@ -0,0 +1,46 @@
+<?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="115pt" height="147pt"
+ viewBox="0.00 0.00 114.60 147.00" 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 143)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-143 110.603,-143 110.603,4 -4,4"/>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="28" cy="-133.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _ready -->
+<g id="node3" class="node">
+<title>_ready</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="56,-100 0,-100 0,-64 56,-64 56,-100"/>
+<text text-anchor="start" x="12.9964" y="-78.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">ready</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M12.3333,-65C12.3333,-65 43.6667,-65 43.6667,-65 49.3333,-65 55,-70.6667 55,-76.3333 55,-76.3333 55,-87.6667 55,-87.6667 55,-93.3333 49.3333,-99 43.6667,-99 43.6667,-99 12.3333,-99 12.3333,-99 6.6667,-99 1,-93.3333 1,-87.6667 1,-87.6667 1,-76.3333 1,-76.3333 1,-70.6667 6.6667,-65 12.3333,-65"/>
+</g>
+<!-- __initial&#45;&gt;_ready -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_ready</title>
+<path fill="none" stroke="#000000" d="M28,-127.9886C28,-123.6293 28,-117.1793 28,-110.4801"/>
+<polygon fill="#000000" stroke="#000000" points="31.5001,-110.0122 28,-100.0122 24.5001,-110.0122 31.5001,-110.0122"/>
+<text text-anchor="middle" x="29.3895" y="-111" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _final -->
+<g id="node2" class="node">
+<title>_final</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="56,-36 0,-36 0,0 56,0 56,-36"/>
+<text text-anchor="start" x="16.999" y="-14.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">final</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M12.3333,-1C12.3333,-1 43.6667,-1 43.6667,-1 49.3333,-1 55,-6.6667 55,-12.3333 55,-12.3333 55,-23.6667 55,-23.6667 55,-29.3333 49.3333,-35 43.6667,-35 43.6667,-35 12.3333,-35 12.3333,-35 6.6667,-35 1,-29.3333 1,-23.6667 1,-23.6667 1,-12.3333 1,-12.3333 1,-6.6667 6.6667,-1 12.3333,-1"/>
+</g>
+<!-- _ready&#45;&gt;_final -->
+<g id="edge2" class="edge">
+<title>_ready&#45;&gt;_final</title>
+<path fill="none" stroke="#000000" d="M28,-63.8314C28,-58.4728 28,-52.4735 28,-46.6262"/>
+<polygon fill="#000000" stroke="#000000" points="31.5001,-46.4363 28,-36.4363 24.5001,-46.4363 31.5001,-46.4363"/>
+<text text-anchor="start" x="28" y="-47" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">start [ok]^out.ok &#160;&#160;</text>
+</g>
+</g>
+</svg>

+ 64 - 0
test/test_files/semantics/priority/statechart_flat.svg

@@ -0,0 +1,64 @@
+<?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="214pt" height="157pt"
+ viewBox="0.00 0.00 214.00 157.00" 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 153)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-153 210,-153 210,4 -4,4"/>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="103" cy="-143.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _A -->
+<g id="node4" class="node">
+<title>_A</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="131,-110 75,-110 75,-74 131,-74 131,-110"/>
+<text text-anchor="start" x="98.9986" y="-88.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">A</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M87.3333,-75C87.3333,-75 118.6667,-75 118.6667,-75 124.3333,-75 130,-80.6667 130,-86.3333 130,-86.3333 130,-97.6667 130,-97.6667 130,-103.3333 124.3333,-109 118.6667,-109 118.6667,-109 87.3333,-109 87.3333,-109 81.6667,-109 76,-103.3333 76,-97.6667 76,-97.6667 76,-86.3333 76,-86.3333 76,-80.6667 81.6667,-75 87.3333,-75"/>
+</g>
+<!-- __initial&#45;&gt;_A -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_A</title>
+<path fill="none" stroke="#000000" d="M103,-137.9886C103,-133.6293 103,-127.1793 103,-120.4801"/>
+<polygon fill="#000000" stroke="#000000" points="106.5001,-120.0122 103,-110.0122 99.5001,-120.0122 106.5001,-120.0122"/>
+<text text-anchor="middle" x="104.3895" y="-121" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _C -->
+<g id="node2" class="node">
+<title>_C</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="206,-46 114,-46 114,0 206,0 206,-46"/>
+<text text-anchor="start" x="155.6686" y="-29.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">C</text>
+<text text-anchor="start" x="119.509" y="-9.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">enter ^out.in_C</text>
+<polygon fill="#000000" stroke="#000000" points="114,-23 114,-23 206,-23 206,-23 114,-23"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M127,-1C127,-1 193,-1 193,-1 199,-1 205,-7 205,-13 205,-13 205,-33 205,-33 205,-39 199,-45 193,-45 193,-45 127,-45 127,-45 121,-45 115,-39 115,-33 115,-33 115,-13 115,-13 115,-7 121,-1 127,-1"/>
+</g>
+<!-- _B -->
+<g id="node3" class="node">
+<title>_B</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="92,-46 0,-46 0,0 92,0 92,-46"/>
+<text text-anchor="start" x="41.9986" y="-29.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">B</text>
+<text text-anchor="start" x="5.839" y="-9.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">enter ^out.in_B</text>
+<polygon fill="#000000" stroke="#000000" points="0,-23 0,-23 92,-23 92,-23 0,-23"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M13,-1C13,-1 79,-1 79,-1 85,-1 91,-7 91,-13 91,-13 91,-33 91,-33 91,-39 85,-45 79,-45 79,-45 13,-45 13,-45 7,-45 1,-39 1,-33 1,-33 1,-13 1,-13 1,-7 7,-1 13,-1"/>
+</g>
+<!-- _A&#45;&gt;_C -->
+<g id="edge3" class="edge">
+<title>_A&#45;&gt;_C</title>
+<path fill="none" stroke="#000000" d="M117.9761,-73.8711C123.0021,-67.7869 128.7586,-60.8185 134.3657,-54.031"/>
+<polygon fill="#000000" stroke="#000000" points="137.1561,-56.1487 140.8265,-46.21 131.7593,-51.6905 137.1561,-56.1487"/>
+<text text-anchor="middle" x="134.3895" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _A&#45;&gt;_B -->
+<g id="edge2" class="edge">
+<title>_A&#45;&gt;_B</title>
+<path fill="none" stroke="#000000" d="M88.0239,-73.8711C82.9979,-67.7869 77.2414,-60.8185 71.6343,-54.031"/>
+<polygon fill="#000000" stroke="#000000" points="74.2407,-51.6905 65.1735,-46.21 68.8439,-56.1487 74.2407,-51.6905"/>
+<text text-anchor="middle" x="82.3895" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+</g>
+</svg>

+ 71 - 0
test/test_files/semantics/priority/statechart_hierarchical.svg

@@ -0,0 +1,71 @@
+<?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="196pt" height="261pt"
+ viewBox="0.00 0.00 195.61 261.00" 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 257)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-257 191.611,-257 191.611,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster__A</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M20,-64C20,-64 68,-64 68,-64 74,-64 80,-70 80,-76 80,-76 80,-202 80,-202 80,-208 74,-214 68,-214 68,-214 20,-214 20,-214 14,-214 8,-208 8,-202 8,-202 8,-76 8,-76 8,-70 14,-64 20,-64"/>
+<text text-anchor="start" x="39.9986" y="-195.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">A</text>
+</g>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="72" cy="-247.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _A -->
+<!-- __initial&#45;&gt;_A -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_A</title>
+<path fill="none" stroke="#000000" d="M72,-241.9623C72,-237.7143 72,-231.3733 72,-224.1925"/>
+<polygon fill="#000000" stroke="#000000" points="75.5001,-223.9976 72,-213.9976 68.5001,-223.9976 75.5001,-223.9976"/>
+<text text-anchor="middle" x="73.3895" y="-225" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _C -->
+<g id="node2" class="node">
+<title>_C</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="103,-36 47,-36 47,0 103,0 103,-36"/>
+<text text-anchor="start" x="70.6686" y="-14.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">C</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M59.3333,-1C59.3333,-1 90.6667,-1 90.6667,-1 96.3333,-1 102,-6.6667 102,-12.3333 102,-12.3333 102,-23.6667 102,-23.6667 102,-29.3333 96.3333,-35 90.6667,-35 90.6667,-35 59.3333,-35 59.3333,-35 53.6667,-35 48,-29.3333 48,-23.6667 48,-23.6667 48,-12.3333 48,-12.3333 48,-6.6667 53.6667,-1 59.3333,-1"/>
+</g>
+<!-- _A&#45;&gt;_C -->
+<g id="edge4" class="edge">
+<title>_A&#45;&gt;_C</title>
+<path fill="none" stroke="#000000" d="M79.9986,-152.9702C89.5903,-130.8978 105.1108,-91.5556 111,-56 111.8715,-50.7384 113.428,-48.7486 111,-44 110.6446,-43.305 110.2611,-42.6243 109.8521,-41.9578"/>
+<polygon fill="#000000" stroke="#000000" points="112.408,-39.5569 103.3302,-34.0938 107.0198,-44.0255 112.408,-39.5569"/>
+<text text-anchor="start" x="94" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.source_parent &#160;&#160;</text>
+</g>
+<!-- _A_initial -->
+<g id="node4" class="node">
+<title>_A_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="44" cy="-170.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _A_B -->
+<g id="node5" class="node">
+<title>_A_B</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="72,-108 16,-108 16,-72 72,-72 72,-108"/>
+<text text-anchor="start" x="39.9986" y="-86.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">B</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M28.3333,-73C28.3333,-73 59.6667,-73 59.6667,-73 65.3333,-73 71,-78.6667 71,-84.3333 71,-84.3333 71,-95.6667 71,-95.6667 71,-101.3333 65.3333,-107 59.6667,-107 59.6667,-107 28.3333,-107 28.3333,-107 22.6667,-107 17,-101.3333 17,-95.6667 17,-95.6667 17,-84.3333 17,-84.3333 17,-78.6667 22.6667,-73 28.3333,-73"/>
+</g>
+<!-- _A_initial&#45;&gt;_A_B -->
+<g id="edge2" class="edge">
+<title>_A_initial&#45;&gt;_A_B</title>
+<path fill="none" stroke="#000000" d="M44,-164.9669C44,-155.4359 44,-135.3065 44,-118.3042"/>
+<polygon fill="#000000" stroke="#000000" points="47.5001,-118.2447 44,-108.2447 40.5001,-118.2447 47.5001,-118.2447"/>
+<text text-anchor="middle" x="45.3895" y="-139" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _A_B&#45;&gt;_C -->
+<g id="edge3" class="edge">
+<title>_A_B&#45;&gt;_C</title>
+<path fill="none" stroke="#000000" d="M28.2616,-71.9413C22.6159,-63.2108 18.8226,-52.7536 24.177,-44 27.5369,-38.5071 32.4648,-34.1276 37.9484,-30.6502"/>
+<polygon fill="#000000" stroke="#000000" points="39.6942,-33.686 46.8773,-25.8979 36.4053,-27.5067 39.6942,-33.686"/>
+<text text-anchor="start" x="25" y="-47" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.source_child &#160;&#160;</text>
+</g>
+</g>
+</svg>

+ 109 - 0
test/test_files/semantics/priority/statechart_ortho.svg

@@ -0,0 +1,109 @@
+<?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="208pt" height="394pt"
+ viewBox="0.00 0.00 208.00 394.00" 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 390)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-390 204,-390 204,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster__P</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M20,-8C20,-8 180,-8 180,-8 186,-8 192,-14 192,-20 192,-20 192,-335 192,-335 192,-341 186,-347 180,-347 180,-347 20,-347 20,-347 14,-347 8,-341 8,-335 8,-335 8,-20 8,-20 8,-14 14,-8 20,-8"/>
+<text text-anchor="start" x="95.9986" y="-328.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">P</text>
+</g>
+<g id="clust2" class="cluster">
+<title>cluster__P_R2</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="108,-16 108,-309 184,-309 184,-16 108,-16"/>
+<text text-anchor="start" x="138.8332" y="-290.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">R2</text>
+</g>
+<g id="clust3" class="cluster">
+<title>cluster__P_R1</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="24,-16 24,-309 100,-309 100,-16 24,-16"/>
+<text text-anchor="start" x="54.8332" y="-290.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">R1</text>
+</g>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="16" cy="-380.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P -->
+<!-- __initial&#45;&gt;_P -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_P</title>
+<path fill="none" stroke="#000000" d="M16,-374.9533C16,-370.7779 16,-364.5043 16,-357.0332"/>
+<polygon fill="#000000" stroke="#000000" points="19.5001,-356.9971 16,-346.9971 12.5001,-356.9972 19.5001,-356.9971"/>
+<text text-anchor="middle" x="17.3895" y="-358" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_R2 -->
+<!-- _P_R2_initial -->
+<g id="node4" class="node">
+<title>_P_R2_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="144" cy="-265.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_R2_C -->
+<g id="node6" class="node">
+<title>_P_R2_C</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="172,-178 116,-178 116,-142 172,-142 172,-178"/>
+<text text-anchor="start" x="139.6686" y="-156.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">C</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M128.3333,-143C128.3333,-143 159.6667,-143 159.6667,-143 165.3333,-143 171,-148.6667 171,-154.3333 171,-154.3333 171,-165.6667 171,-165.6667 171,-171.3333 165.3333,-177 159.6667,-177 159.6667,-177 128.3333,-177 128.3333,-177 122.6667,-177 117,-171.3333 117,-165.6667 117,-165.6667 117,-154.3333 117,-154.3333 117,-148.6667 122.6667,-143 128.3333,-143"/>
+</g>
+<!-- _P_R2_initial&#45;&gt;_P_R2_C -->
+<g id="edge2" class="edge">
+<title>_P_R2_initial&#45;&gt;_P_R2_C</title>
+<path fill="none" stroke="#000000" d="M144,-259.8288C144,-255.1736 144,-248.4097 144,-242.5 144,-242.5 144,-242.5 144,-195.5 144,-193.1079 144,-190.6252 144,-188.1342"/>
+<polygon fill="#000000" stroke="#000000" points="147.5001,-188.0597 144,-178.0598 140.5001,-188.0598 147.5001,-188.0597"/>
+<text text-anchor="middle" x="145.3895" y="-216" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_R2_D -->
+<g id="node5" class="node">
+<title>_P_R2_D</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="172,-60 116,-60 116,-24 172,-24 172,-60"/>
+<text text-anchor="start" x="139.6686" y="-38.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">D</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M128.3333,-25C128.3333,-25 159.6667,-25 159.6667,-25 165.3333,-25 171,-30.6667 171,-36.3333 171,-36.3333 171,-47.6667 171,-47.6667 171,-53.3333 165.3333,-59 159.6667,-59 159.6667,-59 128.3333,-59 128.3333,-59 122.6667,-59 117,-53.3333 117,-47.6667 117,-47.6667 117,-36.3333 117,-36.3333 117,-30.6667 122.6667,-25 128.3333,-25"/>
+</g>
+<!-- _P_R2_C&#45;&gt;_P_R2_D -->
+<g id="edge3" class="edge">
+<title>_P_R2_C&#45;&gt;_P_R2_D</title>
+<path fill="none" stroke="#000000" d="M139.7033,-141.6741C138.7416,-136.1833 138,-130.1255 138,-124.5 138,-124.5 138,-124.5 138,-77.5 138,-75.2146 138.1224,-72.8579 138.3322,-70.4969"/>
+<polygon fill="#000000" stroke="#000000" points="141.8359,-70.7039 139.7033,-60.3259 134.8986,-69.7687 141.8359,-70.7039"/>
+<text text-anchor="start" x="138" y="-98" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.t2 &#160;&#160;</text>
+</g>
+<!-- _P_R1 -->
+<!-- _P_R1_initial -->
+<g id="node8" class="node">
+<title>_P_R1_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="60" cy="-265.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_R1_A -->
+<g id="node10" class="node">
+<title>_P_R1_A</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="88,-178 32,-178 32,-142 88,-142 88,-178"/>
+<text text-anchor="start" x="55.9986" y="-156.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">A</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M44.3333,-143C44.3333,-143 75.6667,-143 75.6667,-143 81.3333,-143 87,-148.6667 87,-154.3333 87,-154.3333 87,-165.6667 87,-165.6667 87,-171.3333 81.3333,-177 75.6667,-177 75.6667,-177 44.3333,-177 44.3333,-177 38.6667,-177 33,-171.3333 33,-165.6667 33,-165.6667 33,-154.3333 33,-154.3333 33,-148.6667 38.6667,-143 44.3333,-143"/>
+</g>
+<!-- _P_R1_initial&#45;&gt;_P_R1_A -->
+<g id="edge4" class="edge">
+<title>_P_R1_initial&#45;&gt;_P_R1_A</title>
+<path fill="none" stroke="#000000" d="M60,-259.8288C60,-255.1736 60,-248.4097 60,-242.5 60,-242.5 60,-242.5 60,-195.5 60,-193.1079 60,-190.6252 60,-188.1342"/>
+<polygon fill="#000000" stroke="#000000" points="63.5001,-188.0597 60,-178.0598 56.5001,-188.0598 63.5001,-188.0597"/>
+<text text-anchor="middle" x="61.3895" y="-216" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_R1_B -->
+<g id="node9" class="node">
+<title>_P_R1_B</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="88,-60 32,-60 32,-24 88,-24 88,-60"/>
+<text text-anchor="start" x="55.9986" y="-38.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">B</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M44.3333,-25C44.3333,-25 75.6667,-25 75.6667,-25 81.3333,-25 87,-30.6667 87,-36.3333 87,-36.3333 87,-47.6667 87,-47.6667 87,-53.3333 81.3333,-59 75.6667,-59 75.6667,-59 44.3333,-59 44.3333,-59 38.6667,-59 33,-53.3333 33,-47.6667 33,-47.6667 33,-36.3333 33,-36.3333 33,-30.6667 38.6667,-25 44.3333,-25"/>
+</g>
+<!-- _P_R1_A&#45;&gt;_P_R1_B -->
+<g id="edge5" class="edge">
+<title>_P_R1_A&#45;&gt;_P_R1_B</title>
+<path fill="none" stroke="#000000" d="M55.7033,-141.6741C54.7416,-136.1833 54,-130.1255 54,-124.5 54,-124.5 54,-124.5 54,-77.5 54,-75.2146 54.1224,-72.8579 54.3322,-70.4969"/>
+<polygon fill="#000000" stroke="#000000" points="57.8359,-70.7039 55.7033,-60.3259 50.8986,-69.7687 57.8359,-70.7039"/>
+<text text-anchor="start" x="54" y="-98" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">^out.t1 &#160;&#160;</text>
+</g>
+</g>
+</svg>