diff options
| author | dibyendumajumdar <mobile@majumdar.org.uk> | 2023-10-30 22:02:26 +0000 |
|---|---|---|
| committer | Dibyendu Majumdar <dibyendumajumdar@users.noreply.github.com> | 2023-11-01 18:56:50 +0000 |
| commit | eec5c6aca224b4cce1b649ad439b57ed06175037 (patch) | |
| tree | 144d273a3027ccb8364dbc69b7d9480e47b96599 /chapter05 | |
| parent | 1f675fd160ef331574b998ec9691673abcfb7c70 (diff) | |
| download | Simple-eec5c6aca224b4cce1b649ad439b57ed06175037.tar.gz Simple-eec5c6aca224b4cce1b649ad439b57ed06175037.zip | |
Update visual
Diffstat (limited to 'chapter05')
| -rw-r--r-- | chapter05/docs/05-graph2.gv | 23 | ||||
| -rw-r--r-- | chapter05/docs/05-graph2.svg | 244 | ||||
| -rw-r--r-- | chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java | 1 |
3 files changed, 149 insertions, 119 deletions
diff --git a/chapter05/docs/05-graph2.gv b/chapter05/docs/05-graph2.gv index 55702eea..ee2feeed 100644 --- a/chapter05/docs/05-graph2.gv +++ b/chapter05/docs/05-graph2.gv @@ -7,6 +7,7 @@ else { a = arg-3; #showGraph; } +#showGraph; return a; */ @@ -24,7 +25,6 @@ return a; </TD></TR> </TABLE>> ]; - Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_7 [ label="#1" ]; EQNode8 [ label="==" ]; If9 [ shape=plaintext label=< @@ -43,10 +43,21 @@ return a; Sub16 [ label="-" ]; Region17 [ shape=box style=filled fillcolor=yellow label="Region" ]; Phi_a18 [ style=filled fillcolor=lightyellow label="φ_a" ]; - Return19 [ shape=box style=filled fillcolor=yellow label="Return" ]; { rank=same; Phi_a18;} } - Stop3 -> Return19 [color=red]; + node [shape=plaintext]; + subgraph cluster_Scope1_0 { + Scope1_0 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope1_0_$ctrl">$ctrl</TD><TD PORT="Scope1_0_arg">arg</TD></TR> + </TABLE>>]; + subgraph cluster_Scope1_1 { + Scope1_1 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="cyan">1</TD><TD PORT="Scope1_1_a">a</TD></TR> + </TABLE>>]; + } + } EQNode8 -> Start2:p1; EQNode8 -> Con_7; If9 -> Start2:p0 [color=red]; @@ -60,6 +71,8 @@ return a; Phi_a18 -> Region17 [color=red]; Phi_a18 -> Add14; Phi_a18 -> Sub16; - Return19 -> Region17 [color=red]; - Return19 -> Phi_a18; + edge [style=dashed color=cornflowerblue]; + Scope1_0:"Scope1_0_$ctrl" -> Region17; + Scope1_0:"Scope1_0_arg" -> Start2:p1; + Scope1_1:"Scope1_1_a" -> Phi_a18; }
\ No newline at end of file diff --git a/chapter05/docs/05-graph2.svg b/chapter05/docs/05-graph2.svg index 07a07ced..5282b4c4 100644 --- a/chapter05/docs/05-graph2.svg +++ b/chapter05/docs/05-graph2.svg @@ -4,197 +4,213 @@ <!-- Generated by graphviz version 2.43.0 (0) --> <!-- Title: chapter05 Pages: 1 --> -<svg width="334pt" height="564pt" - viewBox="0.00 0.00 334.00 564.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 560)"> +<svg width="334pt" height="500pt" + viewBox="0.00 0.00 334.00 500.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 496)"> <title>chapter05</title> -<polygon fill="white" stroke="transparent" points="-4,4 -4,-560 330,-560 330,4 -4,4"/> +<polygon fill="white" stroke="transparent" points="-4,4 -4,-496 330,-496 330,4 -4,4"/> <g id="clust1" class="cluster"> <title>cluster_Nodes</title> -<polygon fill="none" stroke="black" points="8,-8 8,-548 318,-548 318,-8 8,-8"/> +<polygon fill="none" stroke="black" points="8,-88 8,-484 318,-484 318,-88 8,-88"/> +</g> +<g id="clust3" class="cluster"> +<title>cluster_Scope1_0</title> +<polygon fill="none" stroke="black" points="38,-8 38,-76 238,-76 238,-8 38,-8"/> +</g> +<g id="clust4" class="cluster"> +<title>cluster_Scope1_1</title> +<polygon fill="none" stroke="black" points="160,-16 160,-68 230,-68 230,-16 160,-16"/> </g> <!-- Start2 --> <g id="node1" class="node"> <title>Start2</title> -<polygon fill="yellow" stroke="transparent" points="135,-511 135,-536 216,-536 216,-511 135,-511"/> -<polygon fill="none" stroke="black" points="135,-511 135,-536 216,-536 216,-511 135,-511"/> -<text text-anchor="start" x="157" y="-519.8" font-family="Times,serif" font-size="14.00">Start</text> -<polygon fill="none" stroke="black" points="135,-480 135,-511 216,-511 216,-480 135,-480"/> -<polygon fill="yellow" stroke="transparent" points="140,-485 140,-506 180,-506 180,-485 140,-485"/> -<polygon fill="none" stroke="black" points="140,-485 140,-506 180,-506 180,-485 140,-485"/> -<text text-anchor="start" x="143" y="-491.8" font-family="Times,serif" font-size="14.00">$ctrl</text> -<polygon fill="none" stroke="black" points="180,-485 180,-506 211,-506 211,-485 180,-485"/> -<text text-anchor="start" x="183" y="-491.8" font-family="Times,serif" font-size="14.00">arg</text> -</g> -<!-- Stop3 --> -<g id="node2" class="node"> -<title>Stop3</title> -<polygon fill="yellow" stroke="black" points="221,-52 167,-52 167,-16 221,-16 221,-52"/> -<text text-anchor="middle" x="194" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text> -</g> -<!-- Return19 --> -<g id="node12" class="node"> -<title>Return19</title> -<polygon fill="yellow" stroke="black" points="227,-124 161,-124 161,-88 227,-88 227,-124"/> -<text text-anchor="middle" x="194" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text> -</g> -<!-- Stop3->Return19 --> -<g id="edge1" class="edge"> -<title>Stop3->Return19</title> -<path fill="none" stroke="red" d="M194,-52.3C194,-60.02 194,-69.29 194,-77.89"/> -<polygon fill="red" stroke="red" points="190.5,-77.9 194,-87.9 197.5,-77.9 190.5,-77.9"/> +<polygon fill="yellow" stroke="transparent" points="149,-447 149,-472 230,-472 230,-447 149,-447"/> +<polygon fill="none" stroke="black" points="149,-447 149,-472 230,-472 230,-447 149,-447"/> +<text text-anchor="start" x="171" y="-455.8" font-family="Times,serif" font-size="14.00">Start</text> +<polygon fill="none" stroke="black" points="149,-416 149,-447 230,-447 230,-416 149,-416"/> +<polygon fill="yellow" stroke="transparent" points="154,-421 154,-442 194,-442 194,-421 154,-421"/> +<polygon fill="none" stroke="black" points="154,-421 154,-442 194,-442 194,-421 154,-421"/> +<text text-anchor="start" x="157" y="-427.8" font-family="Times,serif" font-size="14.00">$ctrl</text> +<polygon fill="none" stroke="black" points="194,-421 194,-442 225,-442 225,-421 194,-421"/> +<text text-anchor="start" x="197" y="-427.8" font-family="Times,serif" font-size="14.00">arg</text> </g> <!-- Con_7 --> -<g id="node3" class="node"> +<g id="node2" class="node"> <title>Con_7</title> -<ellipse fill="none" stroke="black" cx="269" cy="-508" rx="27" ry="18"/> -<text text-anchor="middle" x="269" y="-504.3" font-family="Times,serif" font-size="14.00">#1</text> +<ellipse fill="none" stroke="black" cx="95" cy="-444" rx="27" ry="18"/> +<text text-anchor="middle" x="95" y="-440.3" font-family="Times,serif" font-size="14.00">#1</text> </g> <!-- EQNode8 --> -<g id="node4" class="node"> +<g id="node3" class="node"> <title>EQNode8</title> -<ellipse fill="none" stroke="black" cx="255" cy="-422" rx="27" ry="18"/> -<text text-anchor="middle" x="255" y="-418.3" font-family="Times,serif" font-size="14.00">==</text> +<ellipse fill="none" stroke="black" cx="117" cy="-358" rx="27" ry="18"/> +<text text-anchor="middle" x="117" y="-354.3" font-family="Times,serif" font-size="14.00">==</text> </g> <!-- EQNode8->Start2 --> -<g id="edge2" class="edge"> +<g id="edge1" class="edge"> <title>EQNode8->Start2:p1</title> -<path fill="none" stroke="black" d="M248.78,-439.7C242.25,-456.15 231.48,-480.23 221.01,-490.3"/> -<polygon fill="black" stroke="black" points="219.25,-487.27 212,-495 222.49,-493.48 219.25,-487.27"/> +<path fill="none" stroke="black" d="M142.41,-364.17C166.94,-370.63 201.39,-384.14 208.63,-409.93"/> +<polygon fill="black" stroke="black" points="205.18,-410.56 210,-420 212.12,-409.62 205.18,-410.56"/> </g> <!-- EQNode8->Con_7 --> -<g id="edge3" class="edge"> +<g id="edge2" class="edge"> <title>EQNode8->Con_7</title> -<path fill="none" stroke="black" d="M257.83,-440C259.75,-451.5 262.32,-466.93 264.51,-480.08"/> -<polygon fill="black" stroke="black" points="261.07,-480.74 266.17,-490.03 267.98,-479.59 261.07,-480.74"/> +<path fill="none" stroke="black" d="M112.55,-376C109.54,-387.5 105.49,-402.93 102.05,-416.08"/> +<polygon fill="black" stroke="black" points="98.59,-415.47 99.45,-426.03 105.36,-417.24 98.59,-415.47"/> </g> <!-- If9 --> -<g id="node5" class="node"> +<g id="node4" class="node"> <title>If9</title> -<polygon fill="yellow" stroke="transparent" points="208,-339 208,-364 302,-364 302,-339 208,-339"/> -<polygon fill="none" stroke="black" points="208,-339 208,-364 302,-364 302,-339 208,-339"/> -<text text-anchor="start" x="249.5" y="-347.8" font-family="Times,serif" font-size="14.00">If</text> -<polygon fill="none" stroke="black" points="208,-308 208,-339 302,-339 302,-308 208,-308"/> -<polygon fill="yellow" stroke="transparent" points="213,-313 213,-334 253,-334 253,-313 213,-313"/> -<polygon fill="none" stroke="black" points="213,-313 213,-334 253,-334 253,-313 213,-313"/> -<text text-anchor="start" x="216" y="-319.8" font-family="Times,serif" font-size="14.00">True</text> -<polygon fill="yellow" stroke="transparent" points="253,-313 253,-334 297,-334 297,-313 253,-313"/> -<polygon fill="none" stroke="black" points="253,-313 253,-334 297,-334 297,-313 253,-313"/> -<text text-anchor="start" x="256" y="-319.8" font-family="Times,serif" font-size="14.00">False</text> +<polygon fill="yellow" stroke="transparent" points="24,-275 24,-300 118,-300 118,-275 24,-275"/> +<polygon fill="none" stroke="black" points="24,-275 24,-300 118,-300 118,-275 24,-275"/> +<text text-anchor="start" x="65.5" y="-283.8" font-family="Times,serif" font-size="14.00">If</text> +<polygon fill="none" stroke="black" points="24,-244 24,-275 118,-275 118,-244 24,-244"/> +<polygon fill="yellow" stroke="transparent" points="29,-249 29,-270 69,-270 69,-249 29,-249"/> +<polygon fill="none" stroke="black" points="29,-249 29,-270 69,-270 69,-249 29,-249"/> +<text text-anchor="start" x="32" y="-255.8" font-family="Times,serif" font-size="14.00">True</text> +<polygon fill="yellow" stroke="transparent" points="69,-249 69,-270 113,-270 113,-249 69,-249"/> +<polygon fill="none" stroke="black" points="69,-249 69,-270 113,-270 113,-249 69,-249"/> +<text text-anchor="start" x="72" y="-255.8" font-family="Times,serif" font-size="14.00">False</text> </g> <!-- If9->Start2 --> -<g id="edge4" class="edge"> +<g id="edge3" class="edge"> <title>If9->Start2:p0</title> -<path fill="none" stroke="red" d="M234.15,-368.33C211.65,-402.25 177.35,-454.28 164.81,-475.08"/> -<polygon fill="red" stroke="red" points="161.66,-473.54 160,-484 167.82,-476.86 161.66,-473.54"/> +<path fill="none" stroke="red" d="M67.56,-304.31C66.67,-325.84 68.55,-354.35 81,-376 94.65,-399.74 109.51,-395.03 131,-412 137.5,-417.13 139.4,-423.48 143.32,-427.39"/> +<polygon fill="red" stroke="red" points="142.41,-430.78 153,-431 144.85,-424.23 142.41,-430.78"/> </g> <!-- If9->EQNode8 --> -<g id="edge5" class="edge"> +<g id="edge4" class="edge"> <title>If9->EQNode8</title> -<path fill="none" stroke="black" d="M255,-368.28C255,-376.58 255,-385.48 255,-393.56"/> -<polygon fill="black" stroke="black" points="251.5,-393.6 255,-403.6 258.5,-393.6 251.5,-393.6"/> +<path fill="none" stroke="black" d="M88.13,-304.28C93.08,-313.32 98.42,-323.08 103.15,-331.71"/> +<polygon fill="black" stroke="black" points="100.11,-333.45 107.99,-340.54 106.25,-330.09 100.11,-333.45"/> </g> <!-- Con_13 --> -<g id="node6" class="node"> +<g id="node5" class="node"> <title>Con_13</title> -<ellipse fill="none" stroke="black" cx="63" cy="-336" rx="27" ry="18"/> -<text text-anchor="middle" x="63" y="-332.3" font-family="Times,serif" font-size="14.00">#2</text> +<ellipse fill="none" stroke="black" cx="263" cy="-272" rx="27" ry="18"/> +<text text-anchor="middle" x="263" y="-268.3" font-family="Times,serif" font-size="14.00">#2</text> </g> <!-- Add14 --> -<g id="node7" class="node"> +<g id="node6" class="node"> <title>Add14</title> -<ellipse fill="none" stroke="black" cx="63" cy="-250" rx="27" ry="18"/> -<text text-anchor="middle" x="63" y="-246.3" font-family="Times,serif" font-size="14.00">+</text> +<ellipse fill="none" stroke="black" cx="254" cy="-186" rx="27" ry="18"/> +<text text-anchor="middle" x="254" y="-182.3" font-family="Times,serif" font-size="14.00">+</text> </g> <!-- Add14->Start2 --> -<g id="edge6" class="edge"> +<g id="edge5" class="edge"> <title>Add14->Start2:p1</title> -<path fill="none" stroke="black" d="M49.25,-265.93C41.04,-275.9 31.38,-289.75 27,-304 18.64,-331.19 10.48,-344.84 27,-368 69.04,-426.93 155.55,-353.24 181,-421"/> -<path fill="none" stroke="black" d="M181,-423C182.58,-427.33 188.61,-449.48 192.53,-466.05"/> -<polygon fill="black" stroke="black" points="189.13,-466.89 194.73,-475.88 195.96,-465.36 189.13,-466.89"/> +<path fill="none" stroke="black" d="M271.28,-200.03C289.35,-215.37 314.41,-242.4 309,-271"/> +<path fill="none" stroke="black" d="M309,-273C306.31,-287.22 306.93,-291.89 299,-304 279.51,-333.77 252.75,-324.18 239,-357"/> </g> <!-- Add14->Con_13 --> -<g id="edge7" class="edge"> +<g id="edge6" class="edge"> <title>Add14->Con_13</title> -<path fill="none" stroke="black" d="M63,-268.4C63,-279.74 63,-294.77 63,-307.68"/> -<polygon fill="black" stroke="black" points="59.5,-307.9 63,-317.9 66.5,-307.9 59.5,-307.9"/> +<path fill="none" stroke="black" d="M255.82,-204C257.04,-215.38 258.67,-230.62 260.07,-243.69"/> +<polygon fill="black" stroke="black" points="256.64,-244.46 261.18,-254.03 263.6,-243.71 256.64,-244.46"/> </g> <!-- Con_15 --> -<g id="node8" class="node"> +<g id="node7" class="node"> <title>Con_15</title> -<ellipse fill="none" stroke="black" cx="135" cy="-336" rx="27" ry="18"/> -<text text-anchor="middle" x="135" y="-332.3" font-family="Times,serif" font-size="14.00">#3</text> +<ellipse fill="none" stroke="black" cx="171" cy="-272" rx="27" ry="18"/> +<text text-anchor="middle" x="171" y="-268.3" font-family="Times,serif" font-size="14.00">#3</text> </g> <!-- Sub16 --> -<g id="node9" class="node"> +<g id="node8" class="node"> <title>Sub16</title> -<ellipse fill="none" stroke="black" cx="155" cy="-250" rx="27" ry="18"/> -<text text-anchor="middle" x="155" y="-246.3" font-family="Times,serif" font-size="14.00">-</text> +<ellipse fill="none" stroke="black" cx="182" cy="-186" rx="27" ry="18"/> +<text text-anchor="middle" x="182" y="-182.3" font-family="Times,serif" font-size="14.00">-</text> </g> <!-- Sub16->Start2 --> -<g id="edge8" class="edge"> +<g id="edge7" class="edge"> <title>Sub16->Start2:p1</title> -<path fill="none" stroke="black" d="M161.1,-267.96C164.56,-278.25 168.65,-291.73 171,-304 180.82,-355.26 163.3,-371.9 181,-421"/> +<path fill="none" stroke="black" d="M190.64,-203.39C195.85,-213.71 202.35,-227.4 207,-240 209.34,-246.32 241.62,-350.79 239,-357"/> +<path fill="none" stroke="black" d="M239,-359C230.25,-379.89 218.2,-386.89 212.81,-401.96"/> +<polygon fill="black" stroke="black" points="209.35,-401.39 210.48,-411.92 216.16,-402.98 209.35,-401.39"/> </g> <!-- Sub16->Con_15 --> -<g id="edge9" class="edge"> +<g id="edge8" class="edge"> <title>Sub16->Con_15</title> -<path fill="none" stroke="black" d="M150.95,-268C148.21,-279.5 144.54,-294.93 141.41,-308.08"/> -<polygon fill="black" stroke="black" points="137.95,-307.49 139.04,-318.03 144.76,-309.11 137.95,-307.49"/> +<path fill="none" stroke="black" d="M179.77,-204C178.27,-215.5 176.25,-230.93 174.52,-244.08"/> +<polygon fill="black" stroke="black" points="171.05,-243.66 173.22,-254.03 177.99,-244.57 171.05,-243.66"/> </g> <!-- Region17 --> -<g id="node10" class="node"> +<g id="node9" class="node"> <title>Region17</title> -<polygon fill="yellow" stroke="black" points="266,-268 200,-268 200,-232 266,-232 266,-268"/> -<text text-anchor="middle" x="233" y="-246.3" font-family="Times,serif" font-size="14.00">Region</text> +<polygon fill="yellow" stroke="black" points="124,-204 58,-204 58,-168 124,-168 124,-204"/> +<text text-anchor="middle" x="91" y="-182.3" font-family="Times,serif" font-size="14.00">Region</text> </g> <!-- Region17->If9 --> -<g id="edge10" class="edge"> +<g id="edge9" class="edge"> <title>Region17->If9:p0</title> -<path fill="none" stroke="red" d="M233,-268.09C233,-277.55 233,-289.77 233,-301.69"/> -<polygon fill="red" stroke="red" points="229.5,-302 233,-312 236.5,-302 229.5,-302"/> +<path fill="none" stroke="red" d="M70.98,-204.12C62.36,-213.06 53.52,-224.84 50.29,-237.84"/> +<polygon fill="red" stroke="red" points="46.78,-237.64 49,-248 53.73,-238.52 46.78,-237.64"/> </g> <!-- Region17->If9 --> -<g id="edge11" class="edge"> +<g id="edge10" class="edge"> <title>Region17->If9:p1</title> -<path fill="none" stroke="red" d="M253.02,-268.12C261.64,-277.06 270.48,-288.84 273.71,-301.84"/> -<polygon fill="red" stroke="red" points="270.27,-302.52 275,-312 277.22,-301.64 270.27,-302.52"/> +<path fill="none" stroke="red" d="M91,-204.09C91,-213.55 91,-225.77 91,-237.69"/> +<polygon fill="red" stroke="red" points="87.5,-238 91,-248 94.5,-238 87.5,-238"/> </g> <!-- Phi_a18 --> -<g id="node11" class="node"> +<g id="node10" class="node"> <title>Phi_a18</title> -<ellipse fill="lightyellow" stroke="black" cx="163" cy="-178" rx="27" ry="18"/> -<text text-anchor="middle" x="163" y="-174.3" font-family="Times,serif" font-size="14.00">φ_a</text> +<ellipse fill="lightyellow" stroke="black" cx="193" cy="-114" rx="27" ry="18"/> +<text text-anchor="middle" x="193" y="-110.3" font-family="Times,serif" font-size="14.00">φ_a</text> </g> <!-- Phi_a18->Add14 --> -<g id="edge13" class="edge"> +<g id="edge12" class="edge"> <title>Phi_a18->Add14</title> -<path fill="none" stroke="black" d="M145.12,-191.51C129.72,-202.3 107.26,-218.02 89.72,-230.3"/> -<polygon fill="black" stroke="black" points="87.25,-227.76 81.06,-236.36 91.26,-233.49 87.25,-227.76"/> +<path fill="none" stroke="black" d="M205.94,-129.85C214.19,-139.31 225.04,-151.76 234.34,-162.44"/> +<polygon fill="black" stroke="black" points="231.87,-164.94 241.08,-170.18 237.15,-160.34 231.87,-164.94"/> </g> <!-- Phi_a18->Sub16 --> -<g id="edge14" class="edge"> +<g id="edge13" class="edge"> <title>Phi_a18->Sub16</title> -<path fill="none" stroke="black" d="M161.02,-196.3C160.14,-204.02 159.08,-213.29 158.1,-221.89"/> -<polygon fill="black" stroke="black" points="154.61,-221.56 156.95,-231.9 161.57,-222.36 154.61,-221.56"/> +<path fill="none" stroke="black" d="M190.34,-131.95C189.13,-139.65 187.66,-148.97 186.3,-157.64"/> +<polygon fill="black" stroke="black" points="182.81,-157.3 184.71,-167.72 189.72,-158.39 182.81,-157.3"/> </g> <!-- Phi_a18->Region17 --> -<g id="edge12" class="edge"> +<g id="edge11" class="edge"> <title>Phi_a18->Region17</title> -<path fill="none" stroke="red" d="M177.5,-193.5C186.46,-202.46 198.19,-214.19 208.55,-224.55"/> -<polygon fill="red" stroke="red" points="206.25,-227.2 215.8,-231.8 211.2,-222.25 206.25,-227.2"/> +<path fill="none" stroke="red" d="M174.76,-127.51C160.81,-137.09 141.18,-150.57 124.43,-162.06"/> +<polygon fill="red" stroke="red" points="122.24,-159.32 115.97,-167.86 126.2,-165.09 122.24,-159.32"/> </g> -<!-- Return19->Region17 --> +<!-- Scope1_0 --> +<g id="node11" class="node"> +<title>Scope1_0</title> +<polygon fill="cyan" stroke="transparent" points="55,-31 55,-52 71,-52 71,-31 55,-31"/> +<polygon fill="none" stroke="black" points="55,-31 55,-52 71,-52 71,-31 55,-31"/> +<text text-anchor="start" x="58" y="-37.8" font-family="Times,serif" font-size="14.00">0</text> +<polygon fill="none" stroke="black" points="71,-31 71,-52 111,-52 111,-31 71,-31"/> +<text text-anchor="start" x="74" y="-37.8" font-family="Times,serif" font-size="14.00">$ctrl</text> +<polygon fill="none" stroke="black" points="111,-31 111,-52 142,-52 142,-31 111,-31"/> +<text text-anchor="start" x="114" y="-37.8" font-family="Times,serif" font-size="14.00">arg</text> +</g> +<!-- Scope1_0->Start2 --> <g id="edge15" class="edge"> -<title>Return19->Region17</title> -<path fill="none" stroke="red" d="M198.7,-124.13C205.38,-148.44 217.67,-193.18 225.58,-221.99"/> -<polygon fill="red" stroke="red" points="222.26,-223.09 228.28,-231.81 229.01,-221.24 222.26,-223.09"/> +<title>Scope1_0:Scope1_0_arg->Start2:p1</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M143,-41C159.59,-41 143.19,-65.45 156,-76 181.38,-96.9 200.5,-71.61 229,-88 268.96,-110.98 276.52,-125.77 295,-168 313.52,-210.32 317.58,-225.61 309,-271"/> </g> -<!-- Return19->Phi_a18 --> +<!-- Scope1_0->Region17 --> +<g id="edge14" class="edge"> +<title>Scope1_0:Scope1_0_$ctrl->Region17</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M91,-53C91,-89.25 91,-131.11 91,-157.8"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="87.5,-157.91 91,-167.91 94.5,-157.91 87.5,-157.91"/> +</g> +<!-- Scope1_1 --> +<g id="node12" class="node"> +<title>Scope1_1</title> +<polygon fill="cyan" stroke="transparent" points="180,-31 180,-52 196,-52 196,-31 180,-31"/> +<polygon fill="none" stroke="black" points="180,-31 180,-52 196,-52 196,-31 180,-31"/> +<text text-anchor="start" x="183" y="-37.8" font-family="Times,serif" font-size="14.00">1</text> +<polygon fill="none" stroke="black" points="196,-31 196,-52 211,-52 211,-31 196,-31"/> +<text text-anchor="start" x="199" y="-37.8" font-family="Times,serif" font-size="14.00">a</text> +</g> +<!-- Scope1_1->Phi_a18 --> <g id="edge16" class="edge"> -<title>Return19->Phi_a18</title> -<path fill="none" stroke="black" d="M186.34,-124.3C182.76,-132.39 178.42,-142.19 174.46,-151.13"/> -<polygon fill="black" stroke="black" points="171.21,-149.82 170.36,-160.38 177.61,-152.65 171.21,-149.82"/> +<title>Scope1_1:Scope1_1_a->Phi_a18</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M204,-53C204,-63.93 202.21,-75.79 200.08,-86.06"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="196.61,-85.55 197.79,-96.08 203.43,-87.11 196.61,-85.55"/> </g> </g> </svg> diff --git a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java index fe2a2382..981af93c 100644 --- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -20,6 +20,7 @@ else { a = arg-3; #showGraph; } +#showGraph; return a; """); StopNode ret = parser.parse(true); |
