summaryrefslogtreecommitdiff
path: root/docs/chapter05/05-graph7.svg
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2023-10-27 20:35:04 +0100
committerCliff Click <cliffc@acm.org>2025-02-07 08:58:36 -0800
commite0dabd29347b2cccce4e8d0a075a0600d5fffdb2 (patch)
treec983597e1dbac7f6a4c68a8966f6c1ec084eb3d0 /docs/chapter05/05-graph7.svg
parent599fa3cf86f082676ca0d11099693df8b8c0a4db (diff)
downloadSimple-e0dabd29347b2cccce4e8d0a075a0600d5fffdb2.tar.gz
Simple-e0dabd29347b2cccce4e8d0a075a0600d5fffdb2.zip
Chapter 5: If Statement, Phi, and Region
Co-authored-by: Dibyendu Majumdar <mobile@majumdar.org.uk> Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Co-authored-by: Yichen Yan <oraluben@outlook.com> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Tamas Hadhazy <helsgithub15@gmail.com> Co-authored-by: tannal <tannal2409@gmail.com> Co-authored-by: hadha <helsgithub15@gmail.com> Co-authored-by: Tamás Hadházy <85063808+Hels15@users.noreply.github.com> Co-authored-by: David Rubin <87927264+Rexicon226@users.noreply.github.com>
Diffstat (limited to 'docs/chapter05/05-graph7.svg')
-rw-r--r--docs/chapter05/05-graph7.svg269
1 files changed, 269 insertions, 0 deletions
diff --git a/docs/chapter05/05-graph7.svg b/docs/chapter05/05-graph7.svg
new file mode 100644
index 00000000..8ba5ebd6
--- /dev/null
+++ b/docs/chapter05/05-graph7.svg
@@ -0,0 +1,269 @@
+<?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="386pt" height="636pt"
+ viewBox="0.00 0.00 386.00 636.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 632)">
+<title>chapter05</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-632 382,-632 382,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-620 370,-620 370,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="187,-583 187,-608 268,-608 268,-583 187,-583"/>
+<polygon fill="none" stroke="black" points="187,-583 187,-608 268,-608 268,-583 187,-583"/>
+<text text-anchor="start" x="209" y="-591.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="187,-552 187,-583 268,-583 268,-552 187,-552"/>
+<polygon fill="yellow" stroke="transparent" points="192,-557 192,-578 232,-578 232,-557 192,-557"/>
+<polygon fill="none" stroke="black" points="192,-557 192,-578 232,-578 232,-557 192,-557"/>
+<text text-anchor="start" x="195" y="-563.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="232,-557 232,-578 263,-578 263,-557 232,-557"/>
+<text text-anchor="start" x="235" y="-563.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="230,-52 176,-52 176,-16 230,-16 230,-52"/>
+<text text-anchor="middle" x="203" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return51 -->
+<g id="node13" class="node">
+<title>Return51</title>
+<polygon fill="yellow" stroke="black" points="236,-124 170,-124 170,-88 236,-88 236,-124"/>
+<text text-anchor="middle" x="203" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return51 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return51</title>
+<path fill="none" stroke="red" d="M203,-52.3C203,-60.02 203,-69.29 203,-77.89"/>
+<polygon fill="red" stroke="red" points="199.5,-77.9 203,-87.9 206.5,-77.9 199.5,-77.9"/>
+<text text-anchor="middle" x="200" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Phi_b37 -->
+<g id="node3" class="node">
+<title>Phi_b37</title>
+<ellipse fill="lightyellow" stroke="black" cx="63" cy="-322" rx="27.1" ry="18"/>
+<text text-anchor="middle" x="63" y="-318.3" font-family="Times,serif" font-size="14.00">φ_b</text>
+</g>
+<!-- Phi_b37&#45;&gt;Start2 -->
+<g id="edge4" class="edge">
+<title>Phi_b37&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M50.14,-338.15C37.78,-354.08 20.49,-380.46 17,-407"/>
+<text text-anchor="middle" x="47.14" y="-340.75" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Mul20 -->
+<g id="node14" class="node">
+<title>Mul20</title>
+<ellipse fill="none" stroke="black" cx="63" cy="-408" rx="27" ry="18"/>
+<text text-anchor="middle" x="63" y="-404.3" font-family="Times,serif" font-size="14.00">*</text>
+</g>
+<!-- Phi_b37&#45;&gt;Mul20 -->
+<g id="edge3" class="edge">
+<title>Phi_b37&#45;&gt;Mul20</title>
+<path fill="none" stroke="black" d="M63,-340.4C63,-351.74 63,-366.77 63,-379.68"/>
+<polygon fill="black" stroke="black" points="59.5,-379.9 63,-389.9 66.5,-379.9 59.5,-379.9"/>
+<text text-anchor="middle" x="60" y="-343" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region31 -->
+<g id="node15" class="node">
+<title>Region31</title>
+<polygon fill="yellow" stroke="black" points="287,-340 221,-340 221,-304 287,-304 287,-340"/>
+<text text-anchor="middle" x="254" y="-318.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Phi_b37&#45;&gt;Region31 -->
+<g id="edge2" class="edge">
+<title>Phi_b37&#45;&gt;Region31</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M83.07,-309.47C97.9,-300.98 118.92,-290.52 139,-286 166.75,-279.76 175.89,-277.4 203,-286 210.99,-288.54 218.81,-292.83 225.83,-297.58"/>
+<polygon fill="black" stroke="black" points="224.11,-300.66 234.24,-303.75 228.25,-295.01 224.11,-300.66"/>
+<text text-anchor="middle" x="80.07" y="-303.07" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_10 -->
+<g id="node4" class="node">
+<title>Con_10</title>
+<ellipse fill="none" stroke="black" cx="321" cy="-580" rx="27" ry="18"/>
+<text text-anchor="middle" x="321" y="-576.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Add42 -->
+<g id="node5" class="node">
+<title>Add42</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>
+</g>
+<!-- Add42&#45;&gt;Start2 -->
+<g id="edge6" class="edge">
+<title>Add42&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M49.72,-266.09C41.69,-276.12 32.07,-289.98 27,-304 11.37,-347.26 22.99,-361.4 17,-407"/>
+<path fill="none" stroke="black" d="M17,-409C11.54,-445.93 0.41,-459.55 17,-493"/>
+<path fill="none" stroke="black" d="M17,-495C20.89,-502.85 19.85,-506.92 27,-512 102.92,-565.95 228.75,-471 246.01,-537.97"/>
+<polygon fill="black" stroke="black" points="242.59,-538.7 247.67,-548 249.49,-537.56 242.59,-538.7"/>
+<text text-anchor="middle" x="46.72" y="-268.69" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Add42&#45;&gt;Phi_b37 -->
+<g id="edge5" class="edge">
+<title>Add42&#45;&gt;Phi_b37</title>
+<path fill="none" stroke="black" d="M63,-268.3C63,-276.02 63,-285.29 63,-293.89"/>
+<polygon fill="black" stroke="black" points="59.5,-293.9 63,-303.9 66.5,-293.9 59.5,-293.9"/>
+<text text-anchor="middle" x="60" y="-270.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- EQNode11 -->
+<g id="node6" class="node">
+<title>EQNode11</title>
+<ellipse fill="none" stroke="black" cx="307" cy="-494" rx="27" ry="18"/>
+<text text-anchor="middle" x="307" y="-490.3" font-family="Times,serif" font-size="14.00">==</text>
+</g>
+<!-- EQNode11&#45;&gt;Start2 -->
+<g id="edge7" class="edge">
+<title>EQNode11&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M300.78,-511.7C294.25,-528.15 283.48,-552.23 273.01,-562.3"/>
+<polygon fill="black" stroke="black" points="271.25,-559.27 264,-567 274.49,-565.48 271.25,-559.27"/>
+<text text-anchor="middle" x="297.78" y="-514.3" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- EQNode11&#45;&gt;Con_10 -->
+<g id="edge8" class="edge">
+<title>EQNode11&#45;&gt;Con_10</title>
+<path fill="none" stroke="black" d="M309.83,-512C311.75,-523.5 314.32,-538.93 316.51,-552.08"/>
+<polygon fill="black" stroke="black" points="313.07,-552.74 318.17,-562.03 319.98,-551.59 313.07,-552.74"/>
+<text text-anchor="middle" x="306.83" y="-514.6" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- If12 -->
+<g id="node7" class="node">
+<title>If12</title>
+<polygon fill="yellow" stroke="transparent" points="260,-411 260,-436 354,-436 354,-411 260,-411"/>
+<polygon fill="none" stroke="black" points="260,-411 260,-436 354,-436 354,-411 260,-411"/>
+<text text-anchor="start" x="301.5" y="-419.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="260,-380 260,-411 354,-411 354,-380 260,-380"/>
+<polygon fill="yellow" stroke="transparent" points="265,-385 265,-406 305,-406 305,-385 265,-385"/>
+<polygon fill="none" stroke="black" points="265,-385 265,-406 305,-406 305,-385 265,-385"/>
+<text text-anchor="start" x="268" y="-391.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="305,-385 305,-406 349,-406 349,-385 305,-385"/>
+<polygon fill="none" stroke="black" points="305,-385 305,-406 349,-406 349,-385 305,-385"/>
+<text text-anchor="start" x="308" y="-391.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If12&#45;&gt;Start2 -->
+<g id="edge9" class="edge">
+<title>If12&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M271.9,-440.02C246.84,-465.46 216.84,-504 212.53,-545.87"/>
+<polygon fill="red" stroke="red" points="209.02,-545.83 212,-556 216.01,-546.2 209.02,-545.83"/>
+<text text-anchor="middle" x="268.9" y="-442.62" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If12&#45;&gt;EQNode11 -->
+<g id="edge10" class="edge">
+<title>If12&#45;&gt;EQNode11</title>
+<path fill="none" stroke="black" d="M307,-440.28C307,-448.58 307,-457.48 307,-465.56"/>
+<polygon fill="black" stroke="black" points="303.5,-465.6 307,-475.6 310.5,-465.6 303.5,-465.6"/>
+<text text-anchor="middle" x="304" y="-442.88" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_46 -->
+<g id="node8" class="node">
+<title>Con_46</title>
+<ellipse fill="none" stroke="black" cx="135" cy="-408" rx="27" ry="18"/>
+<text text-anchor="middle" x="135" y="-404.3" font-family="Times,serif" font-size="14.00">#4</text>
+</g>
+<!-- Con_48 -->
+<g id="node9" class="node">
+<title>Con_48</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-408" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-404.3" font-family="Times,serif" font-size="14.00">#5</text>
+</g>
+<!-- Phi_ab49 -->
+<g id="node10" class="node">
+<title>Phi_ab49</title>
+<ellipse fill="lightyellow" stroke="black" cx="171" cy="-322" rx="32.49" ry="18"/>
+<text text-anchor="middle" x="171" y="-318.3" font-family="Times,serif" font-size="14.00">φ_ab</text>
+</g>
+<!-- Phi_ab49&#45;&gt;Con_46 -->
+<g id="edge12" class="edge">
+<title>Phi_ab49&#45;&gt;Con_46</title>
+<path fill="none" stroke="black" d="M163.89,-339.6C158.81,-351.45 151.88,-367.62 146.08,-381.15"/>
+<polygon fill="black" stroke="black" points="142.82,-379.87 142.1,-390.44 149.25,-382.63 142.82,-379.87"/>
+<text text-anchor="middle" x="160.89" y="-342.2" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_ab49&#45;&gt;Con_48 -->
+<g id="edge13" class="edge">
+<title>Phi_ab49&#45;&gt;Con_48</title>
+<path fill="none" stroke="black" d="M178.11,-339.6C183.19,-351.45 190.12,-367.62 195.92,-381.15"/>
+<polygon fill="black" stroke="black" points="192.75,-382.63 199.9,-390.44 199.18,-379.87 192.75,-382.63"/>
+<text text-anchor="middle" x="175.11" y="-342.2" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_ab49&#45;&gt;Region31 -->
+<g id="edge11" class="edge">
+<title>Phi_ab49&#45;&gt;Region31</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M203.75,-322C206.03,-322 208.32,-322 210.6,-322"/>
+<polygon fill="black" stroke="black" points="210.63,-325.5 220.63,-322 210.63,-318.5 210.63,-325.5"/>
+<text text-anchor="middle" x="206.75" y="-315.6" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Add50 -->
+<g id="node11" class="node">
+<title>Add50</title>
+<ellipse fill="none" stroke="black" cx="171" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="171" y="-174.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add50&#45;&gt;Add42 -->
+<g id="edge14" class="edge">
+<title>Add50&#45;&gt;Add42</title>
+<path fill="none" stroke="black" d="M152.19,-191.19C135,-202.33 109.38,-218.94 90.01,-231.5"/>
+<polygon fill="black" stroke="black" points="88.08,-228.57 81.6,-236.95 91.89,-234.44 88.08,-228.57"/>
+<text text-anchor="middle" x="149.19" y="-193.79" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Add50&#45;&gt;Phi_ab49 -->
+<g id="edge15" class="edge">
+<title>Add50&#45;&gt;Phi_ab49</title>
+<path fill="none" stroke="black" d="M171,-196.13C171,-220.33 171,-264.79 171,-293.61"/>
+<polygon fill="black" stroke="black" points="167.5,-293.81 171,-303.81 174.5,-293.81 167.5,-293.81"/>
+<text text-anchor="middle" x="168" y="-198.73" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Con_19 -->
+<g id="node12" class="node">
+<title>Con_19</title>
+<ellipse fill="none" stroke="black" cx="63" cy="-494" rx="27" ry="18"/>
+<text text-anchor="middle" x="63" y="-490.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Return51&#45;&gt;Add50 -->
+<g id="edge17" class="edge">
+<title>Return51&#45;&gt;Add50</title>
+<path fill="none" stroke="black" d="M195.09,-124.3C191.39,-132.39 186.91,-142.19 182.83,-151.13"/>
+<polygon fill="black" stroke="black" points="179.57,-149.83 178.6,-160.38 185.94,-152.74 179.57,-149.83"/>
+<text text-anchor="middle" x="192.09" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Return51&#45;&gt;Region31 -->
+<g id="edge16" class="edge">
+<title>Return51&#45;&gt;Region31</title>
+<path fill="none" stroke="red" d="M207.09,-124.15C215.93,-161.25 236.89,-249.19 247.54,-293.9"/>
+<polygon fill="red" stroke="red" points="244.17,-294.85 249.89,-303.77 250.98,-293.23 244.17,-294.85"/>
+<text text-anchor="middle" x="204.09" y="-126.75" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Mul20&#45;&gt;Start2 -->
+<g id="edge18" class="edge">
+<title>Mul20&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M46.66,-422.5C28.85,-438.94 4.44,-467.68 17,-493"/>
+<text text-anchor="middle" x="43.66" y="-425.1" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Mul20&#45;&gt;Con_19 -->
+<g id="edge19" class="edge">
+<title>Mul20&#45;&gt;Con_19</title>
+<path fill="none" stroke="black" d="M63,-426.4C63,-437.74 63,-452.77 63,-465.68"/>
+<polygon fill="black" stroke="black" points="59.5,-465.9 63,-475.9 66.5,-465.9 59.5,-465.9"/>
+<text text-anchor="middle" x="60" y="-429" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Region31&#45;&gt;If12 -->
+<g id="edge20" class="edge">
+<title>Region31&#45;&gt;If12:p0</title>
+<path fill="none" stroke="red" d="M268.23,-340.25C274.66,-349.42 281.38,-361.37 283.93,-373.89"/>
+<polygon fill="red" stroke="red" points="280.47,-374.42 285,-384 287.43,-373.69 280.47,-374.42"/>
+<text text-anchor="middle" x="265.23" y="-342.85" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region31&#45;&gt;If12 -->
+<g id="edge21" class="edge">
+<title>Region31&#45;&gt;If12:p1</title>
+<path fill="none" stroke="red" d="M287.08,-335.84C303.38,-344.18 320.59,-356.74 325.57,-373.96"/>
+<polygon fill="red" stroke="red" points="322.13,-374.59 327,-384 329.06,-373.61 322.13,-374.59"/>
+<text text-anchor="middle" x="290.08" y="-329.44" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+</g>
+</svg>