瀏覽代碼

Add SVG-rendered statecharts

Joeri Exelmans 5 年之前
父節點
當前提交
6b090ad362

+ 4 - 4
test/test_files/features/datamodel/test_cond.svg

@@ -4,11 +4,11 @@
 <!-- Generated by graphviz version 2.40.1 (20161225.0304)
  -->
 <!-- Title: state transitions Pages: 1 -->
-<svg width="140pt" height="147pt"
- viewBox="0.00 0.00 140.19 147.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<svg width="146pt" height="147pt"
+ viewBox="0.00 0.00 145.74 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 136.186,-143 136.186,4 -4,4"/>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-143 141.745,-143 141.745,4 -4,4"/>
 <!-- __initial -->
 <g id="node1" class="node">
 <title>__initial</title>
@@ -40,7 +40,7 @@
 <title>_start&#45;&gt;_done</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">in.e [y == 0]^out.done &#160;&#160;</text>
+<text text-anchor="start" x="28" y="-47" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">in.e [x == 42]^out.done &#160;&#160;</text>
 </g>
 </g>
 </svg>

+ 104 - 0
test/test_files/semantics/memory_protocol/statechart_enabledness.svg

@@ -0,0 +1,104 @@
+<?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="479pt" height="412pt"
+ viewBox="0.00 0.00 479.00 412.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 408)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-408 475,-408 475,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster__p</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M20,-8C20,-8 451,-8 451,-8 457,-8 463,-14 463,-20 463,-20 463,-353 463,-353 463,-359 457,-365 451,-365 451,-365 20,-365 20,-365 14,-365 8,-359 8,-353 8,-353 8,-20 8,-20 8,-14 14,-8 20,-8"/>
+<text text-anchor="start" x="232.1646" y="-346.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">p</text>
+</g>
+<g id="clust2" class="cluster">
+<title>cluster__p_increment</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="158,-152 158,-327 455,-327 455,-152 158,-152"/>
+<text text-anchor="start" x="280.1648" y="-308.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">increment</text>
+</g>
+<g id="clust3" class="cluster">
+<title>cluster__p_status</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="24,-16 24,-327 150,-327 150,-16 24,-16"/>
+<text text-anchor="start" x="70.9944" y="-308.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">status</text>
+</g>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="16" cy="-398.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,-392.9533C16,-388.7779 16,-382.5043 16,-375.0332"/>
+<polygon fill="#000000" stroke="#000000" points="19.5001,-374.9971 16,-364.9971 12.5001,-374.9972 19.5001,-374.9971"/>
+<text text-anchor="middle" x="17.3895" y="-376" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _p_increment -->
+<!-- _p_increment_initial -->
+<g id="node4" class="node">
+<title>_p_increment_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="194" cy="-283.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _p_increment_a -->
+<g id="node5" class="node">
+<title>_p_increment_a</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="222,-196 166,-196 166,-160 222,-160 222,-196"/>
+<text text-anchor="start" x="190.6646" y="-174.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">a</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M178.3333,-161C178.3333,-161 209.6667,-161 209.6667,-161 215.3333,-161 221,-166.6667 221,-172.3333 221,-172.3333 221,-183.6667 221,-183.6667 221,-189.3333 215.3333,-195 209.6667,-195 209.6667,-195 178.3333,-195 178.3333,-195 172.6667,-195 167,-189.3333 167,-183.6667 167,-183.6667 167,-172.3333 167,-172.3333 167,-166.6667 172.6667,-161 178.3333,-161"/>
+</g>
+<!-- _p_increment_initial&#45;&gt;_p_increment_a -->
+<g id="edge2" class="edge">
+<title>_p_increment_initial&#45;&gt;_p_increment_a</title>
+<path fill="none" stroke="#000000" d="M194,-277.8288C194,-273.1736 194,-266.4097 194,-260.5 194,-260.5 194,-260.5 194,-213.5 194,-211.1079 194,-208.6252 194,-206.1342"/>
+<polygon fill="#000000" stroke="#000000" points="197.5001,-206.0597 194,-196.0598 190.5001,-206.0598 197.5001,-206.0597"/>
+<text text-anchor="middle" x="195.3895" y="-234" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _p_increment_a&#45;&gt;_p_increment_a -->
+<g id="edge3" class="edge">
+<title>_p_increment_a&#45;&gt;_p_increment_a</title>
+<path fill="none" stroke="#000000" d="M222.0183,-182.8247C233.888,-183.1883 244,-181.5801 244,-178 244,-175.5387 239.2205,-174.0094 232.3762,-173.4121"/>
+<polygon fill="#000000" stroke="#000000" points="232.0957,-169.9049 222.0183,-173.1753 231.9356,-176.903 232.0957,-169.9049"/>
+<text text-anchor="start" x="244" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">in.e [not INSTATE([&quot;/p/status/done&quot;])]^out.inc &#160;&#160;</text>
+</g>
+<!-- _p_status -->
+<!-- _p_status_initial -->
+<g id="node7" class="node">
+<title>_p_status_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="87" cy="-283.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _p_status_counting -->
+<g id="node8" class="node">
+<title>_p_status_counting</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="120.5,-196 53.5,-196 53.5,-160 120.5,-160 120.5,-196"/>
+<text text-anchor="start" x="64.8242" y="-174.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">counting</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M65.8333,-161C65.8333,-161 108.1667,-161 108.1667,-161 113.8333,-161 119.5,-166.6667 119.5,-172.3333 119.5,-172.3333 119.5,-183.6667 119.5,-183.6667 119.5,-189.3333 113.8333,-195 108.1667,-195 108.1667,-195 65.8333,-195 65.8333,-195 60.1667,-195 54.5,-189.3333 54.5,-183.6667 54.5,-183.6667 54.5,-172.3333 54.5,-172.3333 54.5,-166.6667 60.1667,-161 65.8333,-161"/>
+</g>
+<!-- _p_status_initial&#45;&gt;_p_status_counting -->
+<g id="edge4" class="edge">
+<title>_p_status_initial&#45;&gt;_p_status_counting</title>
+<path fill="none" stroke="#000000" d="M87,-277.8288C87,-273.1736 87,-266.4097 87,-260.5 87,-260.5 87,-260.5 87,-213.5 87,-211.1079 87,-208.6252 87,-206.1342"/>
+<polygon fill="#000000" stroke="#000000" points="90.5001,-206.0597 87,-196.0598 83.5001,-206.0598 90.5001,-206.0597"/>
+<text text-anchor="middle" x="88.3895" y="-234" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _p_status_done -->
+<g id="node9" class="node">
+<title>_p_status_done</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="142.5,-70 31.5,-70 31.5,-24 142.5,-24 142.5,-70"/>
+<text text-anchor="start" x="74.1584" y="-53.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">done</text>
+<text text-anchor="start" x="37.9982" y="-33.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ ^out.done</text>
+<polygon fill="#000000" stroke="#000000" points="32,-47 32,-47 143,-47 143,-47 32,-47"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M44.5,-25C44.5,-25 129.5,-25 129.5,-25 135.5,-25 141.5,-31 141.5,-37 141.5,-37 141.5,-57 141.5,-57 141.5,-63 135.5,-69 129.5,-69 129.5,-69 44.5,-69 44.5,-69 38.5,-69 32.5,-63 32.5,-57 32.5,-57 32.5,-37 32.5,-37 32.5,-31 38.5,-25 44.5,-25"/>
+</g>
+<!-- _p_status_counting&#45;&gt;_p_status_done -->
+<g id="edge5" class="edge">
+<title>_p_status_counting&#45;&gt;_p_status_done</title>
+<path fill="none" stroke="#000000" d="M87,-159.7983C87,-152.007 87,-142.8073 87,-134.5 87,-134.5 87,-134.5 87,-87.5 87,-85.127 87,-82.6757 87,-80.2081"/>
+<polygon fill="#000000" stroke="#000000" points="90.5001,-80.1306 87,-70.1306 83.5001,-80.1306 90.5001,-80.1306"/>
+<text text-anchor="start" x="87" y="-108" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">[i == 2] &#160;&#160;</text>
+</g>
+</g>
+</svg>