summaryrefslogtreecommitdiff
path: root/chapter05/docs/05-graph2.svg
diff options
context:
space:
mode:
authordibyendumajumdar <mobile@majumdar.org.uk>2023-10-28 12:13:35 +0100
committerDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2023-11-01 18:56:50 +0000
commitd438edc542ae524c69cd0a5259c76313cf3abc76 (patch)
tree580234f9759ea4d22907b00e1310fdd9d4a5de39 /chapter05/docs/05-graph2.svg
parent45f134cfdb467c2f8fe4b9c352902775ecc31547 (diff)
downloadSimple-d438edc542ae524c69cd0a5259c76313cf3abc76.tar.gz
Simple-d438edc542ae524c69cd0a5259c76313cf3abc76.zip
Add writeup of if statement parsing
Diffstat (limited to 'chapter05/docs/05-graph2.svg')
-rw-r--r--chapter05/docs/05-graph2.svg228
1 files changed, 228 insertions, 0 deletions
diff --git a/chapter05/docs/05-graph2.svg b/chapter05/docs/05-graph2.svg
new file mode 100644
index 00000000..70d1a8c5
--- /dev/null
+++ b/chapter05/docs/05-graph2.svg
@@ -0,0 +1,228 @@
+<?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.43.0 (0)
+ -->
+<!-- Title: chapter05 Pages: 1 -->
+<svg width="542pt" height="500pt"
+ viewBox="0.00 0.00 542.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,-496 538,-496 538,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-16 8,-484 318,-484 318,-16 8,-16"/>
+</g>
+<g id="clust2" class="cluster">
+<title>cluster_Scope20_0</title>
+<polygon fill="none" stroke="black" points="326,-8 326,-76 526,-76 526,-8 326,-8"/>
+</g>
+<g id="clust3" class="cluster">
+<title>cluster_Scope20_1</title>
+<polygon fill="none" stroke="black" points="334,-16 334,-68 404,-68 404,-16 334,-16"/>
+</g>
+<!-- Start1 -->
+<g id="node1" class="node">
+<title>Start1</title>
+<polygon fill="yellow" stroke="transparent" points="174,-447 174,-472 255,-472 255,-447 174,-447"/>
+<polygon fill="none" stroke="black" points="174,-447 174,-472 255,-472 255,-447 174,-447"/>
+<text text-anchor="start" x="196" y="-455.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="174,-416 174,-447 255,-447 255,-416 174,-416"/>
+<polygon fill="yellow" stroke="transparent" points="179,-421 179,-442 219,-442 219,-421 179,-421"/>
+<polygon fill="none" stroke="black" points="179,-421 179,-442 219,-442 219,-421 179,-421"/>
+<text text-anchor="start" x="182" y="-427.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="219,-421 219,-442 250,-442 250,-421 219,-421"/>
+<text text-anchor="start" x="222" y="-427.8" font-family="Times,serif" font-size="14.00">arg</text>
+</g>
+<!-- Con_5 -->
+<g id="node2" class="node">
+<title>Con_5</title>
+<ellipse fill="none" stroke="black" cx="120" cy="-444" rx="27" ry="18"/>
+<text text-anchor="middle" x="120" y="-440.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- EQNode6 -->
+<g id="node3" class="node">
+<title>EQNode6</title>
+<ellipse fill="none" stroke="black" cx="139" cy="-358" rx="49.29" ry="18"/>
+<text text-anchor="middle" x="139" y="-354.3" font-family="Times,serif" font-size="14.00">EQNode</text>
+</g>
+<!-- EQNode6&#45;&gt;Start1 -->
+<g id="edge1" class="edge">
+<title>EQNode6&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M179.99,-368.1C202.72,-375.5 227.59,-388.34 233.63,-409.86"/>
+<polygon fill="black" stroke="black" points="230.19,-410.56 235,-420 237.13,-409.62 230.19,-410.56"/>
+</g>
+<!-- EQNode6&#45;&gt;Con_5 -->
+<g id="edge2" class="edge">
+<title>EQNode6&#45;&gt;Con_5</title>
+<path fill="none" stroke="black" d="M135.16,-376C132.55,-387.5 129.06,-402.93 126.09,-416.08"/>
+<polygon fill="black" stroke="black" points="122.63,-415.5 123.84,-426.03 129.46,-417.05 122.63,-415.5"/>
+</g>
+<!-- If7 -->
+<g id="node4" class="node">
+<title>If7</title>
+<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>
+<!-- If7&#45;&gt;Start1 -->
+<g id="edge3" class="edge">
+<title>If7&#45;&gt;Start1:p0</title>
+<path fill="none" stroke="red" d="M66.46,-304.11C64.93,-326.1 66.49,-355.24 81,-376 102.18,-406.31 125.07,-391.74 156,-412 162.92,-416.54 164.7,-423.06 168.48,-427.16"/>
+<polygon fill="red" stroke="red" points="167.42,-430.5 178,-431 170.04,-424.01 167.42,-430.5"/>
+</g>
+<!-- If7&#45;&gt;EQNode6 -->
+<g id="edge4" class="edge">
+<title>If7&#45;&gt;EQNode6</title>
+<path fill="none" stroke="black" d="M96.32,-304.28C103.88,-313.61 112.04,-323.7 119.19,-332.53"/>
+<polygon fill="black" stroke="black" points="116.66,-334.97 125.68,-340.54 122.11,-330.57 116.66,-334.97"/>
+</g>
+<!-- Con_11 -->
+<g id="node5" class="node">
+<title>Con_11</title>
+<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>
+<!-- Add12 -->
+<g id="node6" class="node">
+<title>Add12</title>
+<ellipse fill="none" stroke="black" cx="263" cy="-186" rx="28.7" ry="18"/>
+<text text-anchor="middle" x="263" y="-182.3" font-family="Times,serif" font-size="14.00">Add</text>
+</g>
+<!-- Add12&#45;&gt;Start1 -->
+<g id="edge5" class="edge">
+<title>Add12&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M276.75,-201.93C284.96,-211.9 294.62,-225.75 299,-240 323.67,-320.23 337.38,-422.23 261.26,-430.47"/>
+<polygon fill="black" stroke="black" points="260.81,-426.99 251,-431 261.17,-433.98 260.81,-426.99"/>
+</g>
+<!-- Add12&#45;&gt;Con_11 -->
+<g id="edge6" class="edge">
+<title>Add12&#45;&gt;Con_11</title>
+<path fill="none" stroke="black" d="M263,-204.4C263,-215.74 263,-230.77 263,-243.68"/>
+<polygon fill="black" stroke="black" points="259.5,-243.9 263,-253.9 266.5,-243.9 259.5,-243.9"/>
+</g>
+<!-- Con_13 -->
+<g id="node7" class="node">
+<title>Con_13</title>
+<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>
+<!-- Sub14 -->
+<g id="node8" class="node">
+<title>Sub14</title>
+<ellipse fill="none" stroke="black" cx="180" cy="-186" rx="28.7" ry="18"/>
+<text text-anchor="middle" x="180" y="-182.3" font-family="Times,serif" font-size="14.00">Sub</text>
+</g>
+<!-- Sub14&#45;&gt;Start1 -->
+<g id="edge7" class="edge">
+<title>Sub14&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M189.92,-203.13C195.76,-213.34 202.81,-227.03 207,-240 230.84,-313.72 234.69,-337.05 234.98,-409.88"/>
+<polygon fill="black" stroke="black" points="231.48,-410.01 235,-420 238.48,-409.99 231.48,-410.01"/>
+</g>
+<!-- Sub14&#45;&gt;Con_13 -->
+<g id="edge8" class="edge">
+<title>Sub14&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M178.18,-204C176.96,-215.38 175.33,-230.62 173.93,-243.69"/>
+<polygon fill="black" stroke="black" points="170.4,-243.71 172.82,-254.03 177.36,-244.46 170.4,-243.71"/>
+</g>
+<!-- Region15 -->
+<g id="node9" class="node">
+<title>Region15</title>
+<polygon fill="yellow" stroke="black" points="128,-204 62,-204 62,-168 128,-168 128,-204"/>
+<text text-anchor="middle" x="95" y="-182.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region15&#45;&gt;If7 -->
+<g id="edge9" class="edge">
+<title>Region15&#45;&gt;If7:p0</title>
+<path fill="none" stroke="red" d="M72.54,-204.25C63.23,-213.05 53.81,-224.66 50.37,-237.74"/>
+<polygon fill="red" stroke="red" points="46.85,-237.63 49,-248 53.79,-238.55 46.85,-237.63"/>
+</g>
+<!-- Region15&#45;&gt;If7 -->
+<g id="edge10" class="edge">
+<title>Region15&#45;&gt;If7:p1</title>
+<path fill="none" stroke="red" d="M93.28,-204.07C92.44,-213.52 91.54,-225.74 91.17,-237.67"/>
+<polygon fill="red" stroke="red" points="87.66,-237.94 91,-248 94.66,-238.06 87.66,-237.94"/>
+</g>
+<!-- Phi16 -->
+<g id="node10" class="node">
+<title>Phi16</title>
+<ellipse fill="none" stroke="black" cx="180" cy="-114" rx="27" ry="18"/>
+<text text-anchor="middle" x="180" y="-110.3" font-family="Times,serif" font-size="14.00">Phi</text>
+</g>
+<!-- Phi16&#45;&gt;Add12 -->
+<g id="edge12" class="edge">
+<title>Phi16&#45;&gt;Add12</title>
+<path fill="none" stroke="black" d="M196.4,-128.83C208.45,-138.99 225.02,-152.97 238.62,-164.44"/>
+<polygon fill="black" stroke="black" points="236.74,-167.43 246.64,-171.2 241.25,-162.08 236.74,-167.43"/>
+</g>
+<!-- Phi16&#45;&gt;Sub14 -->
+<g id="edge13" class="edge">
+<title>Phi16&#45;&gt;Sub14</title>
+<path fill="none" stroke="black" d="M180,-132.3C180,-140.02 180,-149.29 180,-157.89"/>
+<polygon fill="black" stroke="black" points="176.5,-157.9 180,-167.9 183.5,-157.9 176.5,-157.9"/>
+</g>
+<!-- Phi16&#45;&gt;Region15 -->
+<g id="edge11" class="edge">
+<title>Phi16&#45;&gt;Region15</title>
+<path fill="none" stroke="red" d="M163.61,-128.5C152.35,-137.77 137.08,-150.34 123.81,-161.27"/>
+<polygon fill="red" stroke="red" points="121.36,-158.76 115.86,-167.82 125.81,-164.16 121.36,-158.76"/>
+</g>
+<!-- Return17 -->
+<g id="node11" class="node">
+<title>Return17</title>
+<polygon fill="yellow" stroke="black" points="183,-60 117,-60 117,-24 183,-24 183,-60"/>
+<text text-anchor="middle" x="150" y="-38.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Return17&#45;&gt;Region15 -->
+<g id="edge14" class="edge">
+<title>Return17&#45;&gt;Region15</title>
+<path fill="none" stroke="red" d="M143.37,-60.13C133.91,-84.54 116.47,-129.57 105.32,-158.36"/>
+<polygon fill="red" stroke="red" points="102.01,-157.22 101.66,-167.81 108.53,-159.75 102.01,-157.22"/>
+</g>
+<!-- Return17&#45;&gt;Phi16 -->
+<g id="edge15" class="edge">
+<title>Return17&#45;&gt;Phi16</title>
+<path fill="none" stroke="black" d="M157.42,-60.3C160.88,-68.39 165.08,-78.19 168.91,-87.13"/>
+<polygon fill="black" stroke="black" points="165.72,-88.56 172.88,-96.38 172.15,-85.81 165.72,-88.56"/>
+</g>
+<!-- Scope20_0 -->
+<g id="node12" class="node">
+<title>Scope20_0</title>
+<polygon fill="cyan" stroke="transparent" points="423,-31 423,-52 439,-52 439,-31 423,-31"/>
+<polygon fill="none" stroke="black" points="423,-31 423,-52 439,-52 439,-31 423,-31"/>
+<text text-anchor="start" x="426" y="-37.8" font-family="Times,serif" font-size="14.00">0</text>
+<polygon fill="none" stroke="black" points="439,-31 439,-52 479,-52 479,-31 439,-31"/>
+<text text-anchor="start" x="442" y="-37.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="479,-31 479,-52 510,-52 510,-31 479,-31"/>
+<text text-anchor="start" x="482" y="-37.8" font-family="Times,serif" font-size="14.00">arg</text>
+</g>
+<!-- Scope20_0&#45;&gt;Start1 -->
+<g id="edge16" class="edge">
+<title>Scope20_0:Scope20_0_arg&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M495,-53C495,-121.37 416,-116.63 416,-185 416,-185 416,-185 416,-273 416,-371.06 356.8,-427.09 261.28,-430.8"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="260.93,-427.31 251,-431 261.07,-434.31 260.93,-427.31"/>
+</g>
+<!-- Scope20_1 -->
+<g id="node13" class="node">
+<title>Scope20_1</title>
+<polygon fill="cyan" stroke="transparent" points="354,-31 354,-52 370,-52 370,-31 354,-31"/>
+<polygon fill="none" stroke="black" points="354,-31 354,-52 370,-52 370,-31 354,-31"/>
+<text text-anchor="start" x="357" y="-37.8" font-family="Times,serif" font-size="14.00">1</text>
+<polygon fill="none" stroke="black" points="370,-31 370,-52 385,-52 385,-31 370,-31"/>
+<text text-anchor="start" x="373" y="-37.8" font-family="Times,serif" font-size="14.00">a</text>
+</g>
+<!-- Scope20_1&#45;&gt;Phi16 -->
+<g id="edge17" class="edge">
+<title>Scope20_1:Scope20_1_a&#45;&gt;Phi16</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M378,-53C378,-86.31 274.09,-102.84 216.82,-109.43"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="216.26,-105.97 206.7,-110.55 217.03,-112.93 216.26,-105.97"/>
+</g>
+</g>
+</svg>