summaryrefslogtreecommitdiff
path: root/chapter06/docs
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/docs')
-rw-r--r--chapter06/docs/06-grammar.md83
-rw-r--r--chapter06/docs/06-graph1-post.gv29
-rw-r--r--chapter06/docs/06-graph1-post.svg67
-rw-r--r--chapter06/docs/06-graph1-pre.gv52
-rw-r--r--chapter06/docs/06-graph1-pre.svg160
-rw-r--r--chapter06/docs/06-graph2-post.gv33
-rw-r--r--chapter06/docs/06-graph2-post.svg67
-rw-r--r--chapter06/docs/06-graph2-pre.gv55
-rw-r--r--chapter06/docs/06-graph2-pre.svg154
-rw-r--r--chapter06/docs/06-graph3-false.gv35
-rw-r--r--chapter06/docs/06-graph3-false.svg67
-rw-r--r--chapter06/docs/06-graph3-nonconst.gv86
-rw-r--r--chapter06/docs/06-graph3-nonconst.svg290
-rw-r--r--chapter06/docs/06-graph3-true.gv35
-rw-r--r--chapter06/docs/06-graph3-true.svg67
-rw-r--r--chapter06/docs/06-graph4-arg2.gv37
-rw-r--r--chapter06/docs/06-graph4-arg2.svg67
-rw-r--r--chapter06/docs/06-graph4-nonconst.gv122
-rw-r--r--chapter06/docs/06-graph4-nonconst.svg456
-rw-r--r--chapter06/docs/06-graph4-true.gv37
-rw-r--r--chapter06/docs/06-graph4-true.svg67
-rw-r--r--chapter06/docs/build-graphs.sh10
22 files changed, 2076 insertions, 0 deletions
diff --git a/chapter06/docs/06-grammar.md b/chapter06/docs/06-grammar.md
new file mode 100644
index 00000000..ea779a5a
--- /dev/null
+++ b/chapter06/docs/06-grammar.md
@@ -0,0 +1,83 @@
+# Grammar for Chapter 6
+
+```antlrv4
+grammar SimpleLanguage;
+
+program
+ : statement+ EOF
+ ;
+
+statement
+ : returnStatement
+ | declStatement
+ | blockStatment
+ | expressionStatement
+ | ifStatement
+ | metaStatement
+ ;
+
+ifStatement
+ : 'if' '(' expression ')' statement ('else' statement)?
+ ;
+
+metaStatement
+ : '#showGraph' ';'
+ ;
+
+expressionStatement
+ : IDENTIFIER '=' expression ';'
+ ;
+
+blockStatement
+ : '{' statement+ '}'
+ ;
+
+declStatement
+ : 'int' IDENTIFIER '=' expression ';'
+ ;
+
+returnStatement
+ : 'return' expression ';'
+ ;
+
+expression
+ : comparisonExpression
+ ;
+
+comparisonExpression
+ : additiveExpression (('==' | '!='| '>'| '<'| '>='| '<=') additiveExpression)*
+ ;
+
+additiveExpression
+ : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
+ ;
+
+multiplicativeExpression
+ : unaryExpression (('*' | '/') unaryExpression)*
+ ;
+
+unaryExpression
+ : ('-') unaryExpression
+ | primaryExpression
+ ;
+
+primaryExpression
+ : IDENTIFIER
+ | INTEGER_LITERAL
+ | 'true'
+ | 'false'
+ | '(' expression ')'
+ ;
+
+INTEGER_LITERAL
+ : [1-9][0-9]*
+ | [0]
+ ;
+
+IDENTIFIER
+ : NON_DIGIT (NON_DIGIT | DIGIT)*
+ ;
+
+NON_DIGIT: [a-zA-Z_];
+DEC_DIGIT: [0-9];
+``` \ No newline at end of file
diff --git a/chapter06/docs/06-graph1-post.gv b/chapter06/docs/06-graph1-post.gv
new file mode 100644
index 00000000..59214346
--- /dev/null
+++ b/chapter06/docs/06-graph1-post.gv
@@ -0,0 +1,29 @@
+digraph chapter06 {
+/*
+if( true ) return 2;
+return 1;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_12 [ label="#2" ];
+ Return13 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return13[taillabel=0 color=red];
+ Return13 -> Start2:p0[taillabel=0 color=red];
+ Return13 -> Con_12[taillabel=1];
+} \ No newline at end of file
diff --git a/chapter06/docs/06-graph1-post.svg b/chapter06/docs/06-graph1-post.svg
new file mode 100644
index 00000000..faabcd8c
--- /dev/null
+++ b/chapter06/docs/06-graph1-post.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return13 -->
+<g id="node4" class="node">
+<title>Return13</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return13 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return13</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_12 -->
+<g id="node3" class="node">
+<title>Con_12</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Return13&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>Return13&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return13&#45;&gt;Con_12 -->
+<g id="edge3" class="edge">
+<title>Return13&#45;&gt;Con_12</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph1-pre.gv b/chapter06/docs/06-graph1-pre.gv
new file mode 100644
index 00000000..b04fa2f9
--- /dev/null
+++ b/chapter06/docs/06-graph1-pre.gv
@@ -0,0 +1,52 @@
+digraph chapter06 {
+/*
+if( true ) return 2;
+return 1;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_6 [ label="#1" ];
+ If7 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_11 [ label="#2" ];
+ Return12 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ Con_13 [ label="#~CONTROL" ];
+ Region14 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Con_15 [ label="#1" ];
+ Return16 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ { rank=same; Region14;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return12[taillabel=0 color=red];
+ Stop3 -> Return16[taillabel=1 color=red];
+ If7 -> Start2:p0[taillabel=0 color=red];
+ If7 -> Con_6[taillabel=1];
+ Return12 -> If7:p0[taillabel=0 color=red];
+ Return12 -> Con_11[taillabel=1];
+ Region14 -> Con_13[taillabel=1];
+ Region14 -> If7:p1[taillabel=2 color=red];
+ Return16 -> Region14[taillabel=0 color=red];
+ Return16 -> Con_15[taillabel=1];
+} \ No newline at end of file
diff --git a/chapter06/docs/06-graph1-pre.svg b/chapter06/docs/06-graph1-pre.svg
new file mode 100644
index 00000000..f80edcfc
--- /dev/null
+++ b/chapter06/docs/06-graph1-pre.svg
@@ -0,0 +1,160 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="316pt" height="420pt"
+ viewBox="0.00 0.00 316.00 420.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 416)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-416 312,-416 312,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-404 300,-404 300,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="35,-367 35,-392 85,-392 85,-367 35,-367"/>
+<polygon fill="none" stroke="black" points="35,-367 35,-392 85,-392 85,-367 35,-367"/>
+<text text-anchor="start" x="41.5" y="-375.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="35,-336 35,-367 85,-367 85,-336 35,-336"/>
+<polygon fill="yellow" stroke="transparent" points="40,-341 40,-362 80,-362 80,-341 40,-341"/>
+<polygon fill="none" stroke="black" points="40,-341 40,-362 80,-362 80,-341 40,-341"/>
+<text text-anchor="start" x="43" y="-347.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="150,-52 96,-52 96,-16 150,-16 150,-52"/>
+<text text-anchor="middle" x="123" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return12 -->
+<g id="node6" class="node">
+<title>Return12</title>
+<polygon fill="yellow" stroke="black" points="114,-124 48,-124 48,-88 114,-88 114,-124"/>
+<text text-anchor="middle" x="81" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return12 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return12</title>
+<path fill="none" stroke="red" d="M112.62,-52.3C107.74,-60.44 101.81,-70.31 96.42,-79.3"/>
+<polygon fill="red" stroke="red" points="93.41,-77.52 91.26,-87.9 99.41,-81.12 93.41,-77.52"/>
+<text text-anchor="middle" x="109.62" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return16 -->
+<g id="node10" class="node">
+<title>Return16</title>
+<polygon fill="yellow" stroke="black" points="198,-124 132,-124 132,-88 198,-88 198,-124"/>
+<text text-anchor="middle" x="165" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return16 -->
+<g id="edge2" class="edge">
+<title>Stop3&#45;&gt;Return16</title>
+<path fill="none" stroke="red" d="M133.38,-52.3C138.26,-60.44 144.19,-70.31 149.58,-79.3"/>
+<polygon fill="red" stroke="red" points="146.59,-81.12 154.74,-87.9 152.59,-77.52 146.59,-81.12"/>
+<text text-anchor="middle" x="130.38" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_6 -->
+<g id="node3" class="node">
+<title>Con_6</title>
+<ellipse fill="none" stroke="black" cx="138" cy="-364" rx="27" ry="18"/>
+<text text-anchor="middle" x="138" y="-360.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- If7 -->
+<g id="node4" class="node">
+<title>If7</title>
+<polygon fill="yellow" stroke="transparent" points="24,-267 24,-292 118,-292 118,-267 24,-267"/>
+<polygon fill="none" stroke="black" points="24,-267 24,-292 118,-292 118,-267 24,-267"/>
+<text text-anchor="start" x="65.5" y="-275.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="24,-236 24,-267 118,-267 118,-236 24,-236"/>
+<polygon fill="yellow" stroke="transparent" points="29,-241 29,-262 69,-262 69,-241 29,-241"/>
+<polygon fill="none" stroke="black" points="29,-241 29,-262 69,-262 69,-241 29,-241"/>
+<text text-anchor="start" x="32" y="-247.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="69,-241 69,-262 113,-262 113,-241 69,-241"/>
+<polygon fill="none" stroke="black" points="69,-241 69,-262 113,-262 113,-241 69,-241"/>
+<text text-anchor="start" x="72" y="-247.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If7&#45;&gt;Start2 -->
+<g id="edge3" class="edge">
+<title>If7&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M64.35,-296.23C62.56,-306.6 60.93,-318.45 60.29,-329.99"/>
+<polygon fill="red" stroke="red" points="56.79,-329.9 60,-340 63.79,-330.11 56.79,-329.9"/>
+<text text-anchor="middle" x="61.35" y="-298.83" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If7&#45;&gt;Con_6 -->
+<g id="edge4" class="edge">
+<title>If7&#45;&gt;Con_6</title>
+<path fill="none" stroke="black" d="M92.2,-296.01C101.67,-309.86 112.66,-325.94 121.5,-338.87"/>
+<polygon fill="black" stroke="black" points="118.7,-340.97 127.24,-347.25 124.48,-337.02 118.7,-340.97"/>
+<text text-anchor="middle" x="89.2" y="-298.61" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_11 -->
+<g id="node5" class="node">
+<title>Con_11</title>
+<ellipse fill="none" stroke="black" cx="43" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="43" y="-174.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Return12&#45;&gt;If7 -->
+<g id="edge5" class="edge">
+<title>Return12&#45;&gt;If7:p0</title>
+<path fill="none" stroke="red" d="M83.45,-124.21C85.4,-142.49 86.7,-172.01 79,-196 73.01,-214.66 56.37,-216.36 50.82,-229.83"/>
+<polygon fill="red" stroke="red" points="47.32,-229.54 49,-240 54.21,-230.77 47.32,-229.54"/>
+<text text-anchor="middle" x="80.45" y="-126.81" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return12&#45;&gt;Con_11 -->
+<g id="edge6" class="edge">
+<title>Return12&#45;&gt;Con_11</title>
+<path fill="none" stroke="black" d="M71.61,-124.3C67.1,-132.6 61.63,-142.69 56.67,-151.81"/>
+<polygon fill="black" stroke="black" points="53.46,-150.4 51.76,-160.86 59.61,-153.74 53.46,-150.4"/>
+<text text-anchor="middle" x="68.61" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_13 -->
+<g id="node7" class="node">
+<title>Con_13</title>
+<ellipse fill="none" stroke="black" cx="218" cy="-264" rx="74.19" ry="18"/>
+<text text-anchor="middle" x="218" y="-260.3" font-family="Times,serif" font-size="14.00">#~CONTROL</text>
+</g>
+<!-- Region14 -->
+<g id="node8" class="node">
+<title>Region14</title>
+<polygon fill="yellow" stroke="black" points="190,-196 124,-196 124,-160 190,-160 190,-196"/>
+<text text-anchor="middle" x="157" y="-174.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region14&#45;&gt;If7 -->
+<g id="edge8" class="edge">
+<title>Region14&#45;&gt;If7:p1</title>
+<path fill="none" stroke="red" d="M150.64,-196.06C144.08,-212.53 133.37,-236.39 122.96,-246.35"/>
+<polygon fill="red" stroke="red" points="121.27,-243.29 114,-251 124.49,-249.5 121.27,-243.29"/>
+<text text-anchor="middle" x="147.64" y="-198.66" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Region14&#45;&gt;Con_13 -->
+<g id="edge7" class="edge">
+<title>Region14&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M169.64,-196.4C178.34,-208.39 190.04,-224.5 199.75,-237.87"/>
+<polygon fill="black" stroke="black" points="197.09,-240.16 205.79,-246.19 202.75,-236.04 197.09,-240.16"/>
+<text text-anchor="middle" x="166.64" y="-199" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_15 -->
+<g id="node9" class="node">
+<title>Con_15</title>
+<ellipse fill="none" stroke="black" cx="235" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="235" y="-174.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Return16&#45;&gt;Region14 -->
+<g id="edge9" class="edge">
+<title>Return16&#45;&gt;Region14</title>
+<path fill="none" stroke="red" d="M163.02,-124.3C162.14,-132.02 161.08,-141.29 160.1,-149.89"/>
+<polygon fill="red" stroke="red" points="156.61,-149.56 158.95,-159.9 163.57,-150.36 156.61,-149.56"/>
+<text text-anchor="middle" x="160.02" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return16&#45;&gt;Con_15 -->
+<g id="edge10" class="edge">
+<title>Return16&#45;&gt;Con_15</title>
+<path fill="none" stroke="black" d="M182.3,-124.3C191.72,-133.72 203.47,-145.47 213.47,-155.47"/>
+<polygon fill="black" stroke="black" points="211.18,-158.12 220.72,-162.72 216.12,-153.18 211.18,-158.12"/>
+<text text-anchor="middle" x="179.3" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph2-post.gv b/chapter06/docs/06-graph2-post.gv
new file mode 100644
index 00000000..dacd80fd
--- /dev/null
+++ b/chapter06/docs/06-graph2-post.gv
@@ -0,0 +1,33 @@
+digraph chapter06 {
+/*
+int a=1;
+if( true )
+ a=2;
+else
+ a=3;
+return a;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Return17 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_13 [ label="#2" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Return17 -> Start2:p0[taillabel=0 color=red];
+ Return17 -> Con_13[taillabel=1];
+ Stop3 -> Return17[taillabel=0 color=red];
+} \ No newline at end of file
diff --git a/chapter06/docs/06-graph2-post.svg b/chapter06/docs/06-graph2-post.svg
new file mode 100644
index 00000000..269eb15c
--- /dev/null
+++ b/chapter06/docs/06-graph2-post.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Return17 -->
+<g id="node1" class="node">
+<title>Return17</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Start2 -->
+<g id="node2" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Return17&#45;&gt;Start2 -->
+<g id="edge1" class="edge">
+<title>Return17&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_13 -->
+<g id="node4" class="node">
+<title>Con_13</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Return17&#45;&gt;Con_13 -->
+<g id="edge2" class="edge">
+<title>Return17&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Stop3 -->
+<g id="node3" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Stop3&#45;&gt;Return17 -->
+<g id="edge3" class="edge">
+<title>Stop3&#45;&gt;Return17</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph2-pre.gv b/chapter06/docs/06-graph2-pre.gv
new file mode 100644
index 00000000..d183b4c4
--- /dev/null
+++ b/chapter06/docs/06-graph2-pre.gv
@@ -0,0 +1,55 @@
+digraph chapter06 {
+/*
+int a=1;
+if( true )
+ a=2;
+else
+ a=3;
+return a;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Return16 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_7 [ label="#1" ];
+ If8 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_12 [ label="#2" ];
+ Con_13 [ label="#3" ];
+ Region14 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_a15 [ style=filled fillcolor=lightyellow label="&phi;_a" ];
+ { rank=same; Region14;Phi_a15;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Return16 -> Region14[taillabel=0 color=red];
+ Return16 -> Phi_a15[taillabel=1];
+ Stop3 -> Return16[taillabel=0 color=red];
+ If8 -> Start2:p0[taillabel=0 color=red];
+ If8 -> Con_7[taillabel=1];
+ Region14 -> If8:p0[taillabel=1 color=red];
+ Region14 -> If8:p1[taillabel=2 color=red];
+ Phi_a15 -> Region14 [style=dotted taillabel=0];
+ Phi_a15 -> Con_12[taillabel=1];
+ Phi_a15 -> Con_13[taillabel=2];
+}
diff --git a/chapter06/docs/06-graph2-pre.svg b/chapter06/docs/06-graph2-pre.svg
new file mode 100644
index 00000000..e9a4dd55
--- /dev/null
+++ b/chapter06/docs/06-graph2-pre.svg
@@ -0,0 +1,154 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="294pt" height="420pt"
+ viewBox="0.00 0.00 294.00 420.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 416)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-416 290,-416 290,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-404 278,-404 278,-8 8,-8"/>
+</g>
+<!-- Return16 -->
+<g id="node1" class="node">
+<title>Return16</title>
+<polygon fill="yellow" stroke="black" points="187,-124 121,-124 121,-88 187,-88 187,-124"/>
+<text text-anchor="middle" x="154" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Region14 -->
+<g id="node8" class="node">
+<title>Region14</title>
+<polygon fill="yellow" stroke="black" points="226,-196 160,-196 160,-160 226,-160 226,-196"/>
+<text text-anchor="middle" x="193" y="-174.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Return16&#45;&gt;Region14 -->
+<g id="edge1" class="edge">
+<title>Return16&#45;&gt;Region14</title>
+<path fill="none" stroke="red" d="M163.64,-124.3C168.13,-132.36 173.56,-142.11 178.52,-151.02"/>
+<polygon fill="red" stroke="red" points="175.55,-152.86 183.47,-159.9 181.66,-149.46 175.55,-152.86"/>
+<text text-anchor="middle" x="160.64" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Phi_a15 -->
+<g id="node9" class="node">
+<title>Phi_a15</title>
+<ellipse fill="lightyellow" stroke="black" cx="115" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="115" y="-174.3" font-family="Times,serif" font-size="14.00">φ_a</text>
+</g>
+<!-- Return16&#45;&gt;Phi_a15 -->
+<g id="edge2" class="edge">
+<title>Return16&#45;&gt;Phi_a15</title>
+<path fill="none" stroke="black" d="M144.36,-124.3C139.69,-132.68 134,-142.9 128.87,-152.1"/>
+<polygon fill="black" stroke="black" points="125.8,-150.42 123.99,-160.86 131.92,-153.82 125.8,-150.42"/>
+<text text-anchor="middle" x="141.36" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Start2 -->
+<g id="node2" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="126,-367 126,-392 176,-392 176,-367 126,-367"/>
+<polygon fill="none" stroke="black" points="126,-367 126,-392 176,-392 176,-367 126,-367"/>
+<text text-anchor="start" x="132.5" y="-375.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="126,-336 126,-367 176,-367 176,-336 126,-336"/>
+<polygon fill="yellow" stroke="transparent" points="131,-341 131,-362 171,-362 171,-341 131,-341"/>
+<polygon fill="none" stroke="black" points="131,-341 131,-362 171,-362 171,-341 131,-341"/>
+<text text-anchor="start" x="134" y="-347.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node3" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="181,-52 127,-52 127,-16 181,-16 181,-52"/>
+<text text-anchor="middle" x="154" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Stop3&#45;&gt;Return16 -->
+<g id="edge3" class="edge">
+<title>Stop3&#45;&gt;Return16</title>
+<path fill="none" stroke="red" d="M154,-52.3C154,-60.02 154,-69.29 154,-77.89"/>
+<polygon fill="red" stroke="red" points="150.5,-77.9 154,-87.9 157.5,-77.9 150.5,-77.9"/>
+<text text-anchor="middle" x="151" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_7 -->
+<g id="node4" class="node">
+<title>Con_7</title>
+<ellipse fill="none" stroke="black" cx="229" cy="-364" rx="27" ry="18"/>
+<text text-anchor="middle" x="229" y="-360.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- If8 -->
+<g id="node5" class="node">
+<title>If8</title>
+<polygon fill="yellow" stroke="transparent" points="168,-267 168,-292 262,-292 262,-267 168,-267"/>
+<polygon fill="none" stroke="black" points="168,-267 168,-292 262,-292 262,-267 168,-267"/>
+<text text-anchor="start" x="209.5" y="-275.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="168,-236 168,-267 262,-267 262,-236 168,-236"/>
+<polygon fill="yellow" stroke="transparent" points="173,-241 173,-262 213,-262 213,-241 173,-241"/>
+<polygon fill="none" stroke="black" points="173,-241 173,-262 213,-262 213,-241 173,-241"/>
+<text text-anchor="start" x="176" y="-247.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="213,-241 213,-262 257,-262 257,-241 213,-241"/>
+<polygon fill="none" stroke="black" points="213,-241 213,-262 257,-262 257,-241 213,-241"/>
+<text text-anchor="start" x="216" y="-247.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If8&#45;&gt;Start2 -->
+<g id="edge4" class="edge">
+<title>If8&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M205.76,-296.05C199.47,-314.72 190.61,-336.65 181.17,-346.18"/>
+<polygon fill="red" stroke="red" points="179.22,-343.25 172,-351 182.48,-349.44 179.22,-343.25"/>
+<text text-anchor="middle" x="202.76" y="-298.65" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If8&#45;&gt;Con_7 -->
+<g id="edge5" class="edge">
+<title>If8&#45;&gt;Con_7</title>
+<path fill="none" stroke="black" d="M219.43,-296.01C221.25,-308.76 223.34,-323.4 225.1,-335.73"/>
+<polygon fill="black" stroke="black" points="221.67,-336.47 226.55,-345.87 228.6,-335.48 221.67,-336.47"/>
+<text text-anchor="middle" x="216.43" y="-298.61" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_12 -->
+<g id="node6" class="node">
+<title>Con_12</title>
+<ellipse fill="none" stroke="black" cx="43" cy="-264" rx="27" ry="18"/>
+<text text-anchor="middle" x="43" y="-260.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Con_13 -->
+<g id="node7" class="node">
+<title>Con_13</title>
+<ellipse fill="none" stroke="black" cx="115" cy="-264" rx="27" ry="18"/>
+<text text-anchor="middle" x="115" y="-260.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Region14&#45;&gt;If8 -->
+<g id="edge6" class="edge">
+<title>Region14&#45;&gt;If8:p0</title>
+<path fill="none" stroke="red" d="M193,-196.09C193,-205.55 193,-217.77 193,-229.69"/>
+<polygon fill="red" stroke="red" points="189.5,-230 193,-240 196.5,-230 189.5,-230"/>
+<text text-anchor="middle" x="190" y="-198.69" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region14&#45;&gt;If8 -->
+<g id="edge7" class="edge">
+<title>Region14&#45;&gt;If8:p1</title>
+<path fill="none" stroke="red" d="M213.02,-196.12C221.64,-205.06 230.48,-216.84 233.71,-229.84"/>
+<polygon fill="red" stroke="red" points="230.27,-230.52 235,-240 237.22,-229.64 230.27,-230.52"/>
+<text text-anchor="middle" x="210.02" y="-198.72" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_a15&#45;&gt;Con_12 -->
+<g id="edge9" class="edge">
+<title>Phi_a15&#45;&gt;Con_12</title>
+<path fill="none" stroke="black" d="M102.13,-194.02C91.07,-206.92 74.96,-225.71 62.35,-240.42"/>
+<polygon fill="black" stroke="black" points="59.61,-238.24 55.76,-248.11 64.93,-242.8 59.61,-238.24"/>
+<text text-anchor="middle" x="99.13" y="-196.62" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_a15&#45;&gt;Con_13 -->
+<g id="edge10" class="edge">
+<title>Phi_a15&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M115,-196.4C115,-207.74 115,-222.77 115,-235.68"/>
+<polygon fill="black" stroke="black" points="111.5,-235.9 115,-245.9 118.5,-235.9 111.5,-235.9"/>
+<text text-anchor="middle" x="112" y="-199" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_a15&#45;&gt;Region14 -->
+<g id="edge8" class="edge">
+<title>Phi_a15&#45;&gt;Region14</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M142.12,-178C144.58,-178 147.04,-178 149.5,-178"/>
+<polygon fill="black" stroke="black" points="149.61,-181.5 159.61,-178 149.61,-174.5 149.61,-181.5"/>
+<text text-anchor="middle" x="145.12" y="-171.6" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph3-false.gv b/chapter06/docs/06-graph3-false.gv
new file mode 100644
index 00000000..28f741fa
--- /dev/null
+++ b/chapter06/docs/06-graph3-false.gv
@@ -0,0 +1,35 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+if( arg ) {
+ a = 2;
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_30 [ label="#1" ];
+ Return31 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return31[taillabel=0 color=red];
+ Return31 -> Start2:p0[taillabel=0 color=red];
+ Return31 -> Con_30[taillabel=1];
+}
diff --git a/chapter06/docs/06-graph3-false.svg b/chapter06/docs/06-graph3-false.svg
new file mode 100644
index 00000000..49b04f09
--- /dev/null
+++ b/chapter06/docs/06-graph3-false.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return31 -->
+<g id="node4" class="node">
+<title>Return31</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return31 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return31</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_30 -->
+<g id="node3" class="node">
+<title>Con_30</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Return31&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>Return31&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return31&#45;&gt;Con_30 -->
+<g id="edge3" class="edge">
+<title>Return31&#45;&gt;Con_30</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph3-nonconst.gv b/chapter06/docs/06-graph3-nonconst.gv
new file mode 100644
index 00000000..0746be85
--- /dev/null
+++ b/chapter06/docs/06-graph3-nonconst.gv
@@ -0,0 +1,86 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+if( arg ) {
+ a = 2;
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD><TD PORT="p1">arg</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_6 [ label="#0" ];
+ Con_7 [ label="#1" ];
+ If8 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_12 [ label="#2" ];
+ If13 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_17 [ label="#2" ];
+ Con_18 [ label="#3" ];
+ Region19 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_b20 [ style=filled fillcolor=lightyellow label="&phi;_b" ];
+ Region21 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_a22 [ style=filled fillcolor=lightyellow label="&phi;_a" ];
+ Phi_b23 [ style=filled fillcolor=lightyellow label="&phi;_b" ];
+ Add24 [ label="+" ];
+ Return25 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ { rank=same; Region19;Phi_b20;}
+ { rank=same; Region21;Phi_b23;Phi_a22;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return25[taillabel=0 color=red];
+ If8 -> Start2:p0[taillabel=0 color=red];
+ If8 -> Start2:p1[taillabel=1];
+ If13 -> If8:p0[taillabel=0 color=red];
+ If13 -> Start2:p1[taillabel=1];
+ Region19 -> If13:p0[taillabel=1 color=red];
+ Region19 -> If13:p1[taillabel=2 color=red];
+ Phi_b20 -> Region19 [style=dotted taillabel=0];
+ Phi_b20 -> Con_17[taillabel=1];
+ Phi_b20 -> Con_18[taillabel=2];
+ Region21 -> Region19[taillabel=1 color=red];
+ Region21 -> If8:p1[taillabel=2 color=red];
+ Phi_a22 -> Region21 [style=dotted taillabel=0];
+ Phi_a22 -> Con_12[taillabel=1];
+ Phi_a22 -> Con_6[taillabel=2];
+ Phi_b23 -> Region21 [style=dotted taillabel=0];
+ Phi_b23 -> Phi_b20[taillabel=1];
+ Phi_b23 -> Con_7[taillabel=2];
+ Add24 -> Phi_b23[taillabel=1];
+ Add24 -> Phi_a22[taillabel=2];
+ Return25 -> Region21[taillabel=0 color=red];
+ Return25 -> Add24[taillabel=1];
+} \ No newline at end of file
diff --git a/chapter06/docs/06-graph3-nonconst.svg b/chapter06/docs/06-graph3-nonconst.svg
new file mode 100644
index 00000000..dee852e4
--- /dev/null
+++ b/chapter06/docs/06-graph3-nonconst.svg
@@ -0,0 +1,290 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="414pt" height="664pt"
+ viewBox="0.00 0.00 414.00 664.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 660)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-660 410,-660 410,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-648 398,-648 398,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="274,-611 274,-636 355,-636 355,-611 274,-611"/>
+<polygon fill="none" stroke="black" points="274,-611 274,-636 355,-636 355,-611 274,-611"/>
+<text text-anchor="start" x="296" y="-619.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="274,-580 274,-611 355,-611 355,-580 274,-580"/>
+<polygon fill="yellow" stroke="transparent" points="279,-585 279,-606 319,-606 319,-585 279,-585"/>
+<polygon fill="none" stroke="black" points="279,-585 279,-606 319,-606 319,-585 279,-585"/>
+<text text-anchor="start" x="282" y="-591.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="319,-585 319,-606 350,-606 350,-585 319,-585"/>
+<text text-anchor="start" x="322" y="-591.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="299,-52 245,-52 245,-16 299,-16 299,-52"/>
+<text text-anchor="middle" x="272" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return25 -->
+<g id="node16" class="node">
+<title>Return25</title>
+<polygon fill="yellow" stroke="black" points="305,-124 239,-124 239,-88 305,-88 305,-124"/>
+<text text-anchor="middle" x="272" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return25 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return25</title>
+<path fill="none" stroke="red" d="M272,-52.3C272,-60.02 272,-69.29 272,-77.89"/>
+<polygon fill="red" stroke="red" points="268.5,-77.9 272,-87.9 275.5,-77.9 268.5,-77.9"/>
+<text text-anchor="middle" x="269" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_6 -->
+<g id="node3" class="node">
+<title>Con_6</title>
+<ellipse fill="none" stroke="black" cx="259" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="259" y="-318.3" font-family="Times,serif" font-size="14.00">#0</text>
+</g>
+<!-- Con_7 -->
+<g id="node4" class="node">
+<title>Con_7</title>
+<ellipse fill="none" stroke="black" cx="115" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="115" y="-318.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- If8 -->
+<g id="node5" class="node">
+<title>If8</title>
+<polygon fill="yellow" stroke="transparent" points="288,-511 288,-536 382,-536 382,-511 288,-511"/>
+<polygon fill="none" stroke="black" points="288,-511 288,-536 382,-536 382,-511 288,-511"/>
+<text text-anchor="start" x="329.5" y="-519.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="288,-480 288,-511 382,-511 382,-480 288,-480"/>
+<polygon fill="yellow" stroke="transparent" points="293,-485 293,-506 333,-506 333,-485 293,-485"/>
+<polygon fill="none" stroke="black" points="293,-485 293,-506 333,-506 333,-485 293,-485"/>
+<text text-anchor="start" x="296" y="-491.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="333,-485 333,-506 377,-506 377,-485 333,-485"/>
+<polygon fill="none" stroke="black" points="333,-485 333,-506 377,-506 377,-485 333,-485"/>
+<text text-anchor="start" x="336" y="-491.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If8&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>If8&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M312.41,-540.3C306.75,-550.38 301.75,-562.04 299.83,-573.96"/>
+<polygon fill="red" stroke="red" points="296.34,-573.75 299,-584 303.31,-574.32 296.34,-573.75"/>
+<text text-anchor="middle" x="309.41" y="-542.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If8&#45;&gt;Start2 -->
+<g id="edge3" class="edge">
+<title>If8&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M335,-540.02C335,-550.47 335,-562.42 335,-573.98"/>
+<polygon fill="black" stroke="black" points="331.5,-574 335,-584 338.5,-574 331.5,-574"/>
+<text text-anchor="middle" x="332" y="-542.62" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_12 -->
+<g id="node6" class="node">
+<title>Con_12</title>
+<ellipse fill="none" stroke="black" cx="187" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="187" y="-318.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- If13 -->
+<g id="node7" class="node">
+<title>If13</title>
+<polygon fill="yellow" stroke="transparent" points="267,-411 267,-436 361,-436 361,-411 267,-411"/>
+<polygon fill="none" stroke="black" points="267,-411 267,-436 361,-436 361,-411 267,-411"/>
+<text text-anchor="start" x="308.5" y="-419.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="267,-380 267,-411 361,-411 361,-380 267,-380"/>
+<polygon fill="yellow" stroke="transparent" points="272,-385 272,-406 312,-406 312,-385 272,-385"/>
+<polygon fill="none" stroke="black" points="272,-385 272,-406 312,-406 312,-385 272,-385"/>
+<text text-anchor="start" x="275" y="-391.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="312,-385 312,-406 356,-406 356,-385 312,-385"/>
+<polygon fill="none" stroke="black" points="312,-385 312,-406 356,-406 356,-385 312,-385"/>
+<text text-anchor="start" x="315" y="-391.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If13&#45;&gt;Start2 -->
+<g id="edge5" class="edge">
+<title>If13&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M288.75,-440.22C281.57,-450.93 274.7,-463.4 271,-476 262.99,-503.29 257.76,-514.83 271,-540 285.19,-566.97 324.2,-553.71 333.15,-573.98"/>
+<polygon fill="black" stroke="black" points="329.75,-574.8 335,-584 336.63,-573.53 329.75,-574.8"/>
+<text text-anchor="middle" x="285.75" y="-442.82" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- If13&#45;&gt;If8 -->
+<g id="edge4" class="edge">
+<title>If13&#45;&gt;If8:p0</title>
+<path fill="none" stroke="red" d="M313.4,-440.02C313.24,-450.46 313.09,-462.42 313.03,-473.98"/>
+<polygon fill="red" stroke="red" points="309.53,-473.99 313,-484 316.53,-474.01 309.53,-473.99"/>
+<text text-anchor="middle" x="310.4" y="-442.62" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_17 -->
+<g id="node8" class="node">
+<title>Con_17</title>
+<ellipse fill="none" stroke="black" cx="43" cy="-408" rx="27" ry="18"/>
+<text text-anchor="middle" x="43" y="-404.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Con_18 -->
+<g id="node9" class="node">
+<title>Con_18</title>
+<ellipse fill="none" stroke="black" cx="115" cy="-408" rx="27" ry="18"/>
+<text text-anchor="middle" x="115" y="-404.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Region19 -->
+<g id="node10" class="node">
+<title>Region19</title>
+<polygon fill="yellow" stroke="black" points="370,-340 304,-340 304,-304 370,-304 370,-340"/>
+<text text-anchor="middle" x="337" y="-318.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region19&#45;&gt;If13 -->
+<g id="edge6" class="edge">
+<title>Region19&#45;&gt;If13:p0</title>
+<path fill="none" stroke="red" d="M315.29,-340.1C306.12,-348.94 296.78,-360.62 293.36,-373.72"/>
+<polygon fill="red" stroke="red" points="289.84,-373.63 292,-384 296.78,-374.54 289.84,-373.63"/>
+<text text-anchor="middle" x="312.29" y="-342.7" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region19&#45;&gt;If13 -->
+<g id="edge7" class="edge">
+<title>Region19&#45;&gt;If13:p1</title>
+<path fill="none" stroke="red" d="M335.71,-340.08C335.08,-349.53 334.4,-361.76 334.13,-373.68"/>
+<polygon fill="red" stroke="red" points="330.62,-373.96 334,-384 337.62,-374.04 330.62,-373.96"/>
+<text text-anchor="middle" x="332.71" y="-342.68" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b20 -->
+<g id="node11" class="node">
+<title>Phi_b20</title>
+<ellipse fill="lightyellow" stroke="black" cx="43" cy="-322" rx="27.1" ry="18"/>
+<text text-anchor="middle" x="43" y="-318.3" font-family="Times,serif" font-size="14.00">φ_b</text>
+</g>
+<!-- Phi_b20&#45;&gt;Con_17 -->
+<g id="edge9" class="edge">
+<title>Phi_b20&#45;&gt;Con_17</title>
+<path fill="none" stroke="black" d="M43,-340.4C43,-351.74 43,-366.77 43,-379.68"/>
+<polygon fill="black" stroke="black" points="39.5,-379.9 43,-389.9 46.5,-379.9 39.5,-379.9"/>
+<text text-anchor="middle" x="40" y="-343" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_b20&#45;&gt;Con_18 -->
+<g id="edge10" class="edge">
+<title>Phi_b20&#45;&gt;Con_18</title>
+<path fill="none" stroke="black" d="M55.87,-338.02C66.93,-350.92 83.04,-369.71 95.65,-384.42"/>
+<polygon fill="black" stroke="black" points="93.07,-386.8 102.24,-392.11 98.39,-382.24 93.07,-386.8"/>
+<text text-anchor="middle" x="52.87" y="-340.62" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b20&#45;&gt;Region19 -->
+<g id="edge8" class="edge">
+<title>Phi_b20&#45;&gt;Region19</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M57.22,-306.43C65.37,-298.68 76.29,-290.11 88,-286 129.52,-271.44 244.06,-272.69 286,-286 293.99,-288.54 301.81,-292.83 308.83,-297.58"/>
+<polygon fill="black" stroke="black" points="307.11,-300.66 317.24,-303.75 311.25,-295.01 307.11,-300.66"/>
+<text text-anchor="middle" x="54.22" y="-300.03" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Region21 -->
+<g id="node12" class="node">
+<title>Region21</title>
+<polygon fill="yellow" stroke="black" points="352,-268 286,-268 286,-232 352,-232 352,-268"/>
+<text text-anchor="middle" x="319" y="-246.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region21&#45;&gt;If8 -->
+<g id="edge12" class="edge">
+<title>Region21&#45;&gt;If8:p1</title>
+<path fill="none" stroke="red" d="M347.26,-268.03C359.43,-277.04 372.37,-289.3 379,-304 385.58,-318.6 394.79,-373.07 378,-440 373.59,-457.56 360.94,-461.07 356.53,-473.94"/>
+<polygon fill="red" stroke="red" points="353.05,-473.59 355,-484 359.97,-474.64 353.05,-473.59"/>
+<text text-anchor="middle" x="344.26" y="-270.63" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Region21&#45;&gt;Region19 -->
+<g id="edge11" class="edge">
+<title>Region21&#45;&gt;Region19</title>
+<path fill="none" stroke="red" d="M323.45,-268.3C325.45,-276.1 327.87,-285.49 330.1,-294.17"/>
+<polygon fill="red" stroke="red" points="326.72,-295.08 332.6,-303.9 333.5,-293.34 326.72,-295.08"/>
+<text text-anchor="middle" x="320.45" y="-270.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_a22 -->
+<g id="node13" class="node">
+<title>Phi_a22</title>
+<ellipse fill="lightyellow" stroke="black" cx="241" cy="-250" rx="27" ry="18"/>
+<text text-anchor="middle" x="241" y="-246.3" font-family="Times,serif" font-size="14.00">φ_a</text>
+</g>
+<!-- Phi_a22&#45;&gt;Con_6 -->
+<g id="edge15" class="edge">
+<title>Phi_a22&#45;&gt;Con_6</title>
+<path fill="none" stroke="black" d="M245.36,-267.95C247.39,-275.86 249.86,-285.46 252.14,-294.31"/>
+<polygon fill="black" stroke="black" points="248.8,-295.4 254.68,-304.21 255.58,-293.65 248.8,-295.4"/>
+<text text-anchor="middle" x="242.36" y="-270.55" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_a22&#45;&gt;Con_12 -->
+<g id="edge14" class="edge">
+<title>Phi_a22&#45;&gt;Con_12</title>
+<path fill="none" stroke="black" d="M229.02,-266.54C222.02,-275.6 213.06,-287.21 205.21,-297.39"/>
+<polygon fill="black" stroke="black" points="202.29,-295.45 198.95,-305.51 207.83,-299.73 202.29,-295.45"/>
+<text text-anchor="middle" x="226.02" y="-269.14" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_a22&#45;&gt;Region21 -->
+<g id="edge13" class="edge">
+<title>Phi_a22&#45;&gt;Region21</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M268.12,-250C270.58,-250 273.04,-250 275.5,-250"/>
+<polygon fill="black" stroke="black" points="275.61,-253.5 285.61,-250 275.61,-246.5 275.61,-253.5"/>
+<text text-anchor="middle" x="271.12" y="-243.6" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Phi_b23 -->
+<g id="node14" class="node">
+<title>Phi_b23</title>
+<ellipse fill="lightyellow" stroke="black" cx="133" cy="-250" rx="27.1" ry="18"/>
+<text text-anchor="middle" x="133" y="-246.3" font-family="Times,serif" font-size="14.00">φ_b</text>
+</g>
+<!-- Phi_b23&#45;&gt;Con_7 -->
+<g id="edge18" class="edge">
+<title>Phi_b23&#45;&gt;Con_7</title>
+<path fill="none" stroke="black" d="M128.64,-267.95C126.61,-275.86 124.14,-285.46 121.86,-294.31"/>
+<polygon fill="black" stroke="black" points="118.42,-293.65 119.32,-304.21 125.2,-295.4 118.42,-293.65"/>
+<text text-anchor="middle" x="125.64" y="-270.55" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b23&#45;&gt;Phi_b20 -->
+<g id="edge17" class="edge">
+<title>Phi_b23&#45;&gt;Phi_b20</title>
+<path fill="none" stroke="black" d="M116.07,-264.17C102.58,-274.66 83.49,-289.51 68.2,-301.4"/>
+<polygon fill="black" stroke="black" points="65.9,-298.75 60.16,-307.65 70.2,-304.28 65.9,-298.75"/>
+<text text-anchor="middle" x="113.07" y="-266.77" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_b23&#45;&gt;Region21 -->
+<g id="edge16" class="edge">
+<title>Phi_b23&#45;&gt;Region21</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M152.84,-237.61C179.31,-222.7 227.54,-201.16 268,-214 275.99,-216.54 283.81,-220.83 290.83,-225.58"/>
+<polygon fill="black" stroke="black" points="289.11,-228.66 299.24,-231.75 293.25,-223.01 289.11,-228.66"/>
+<text text-anchor="middle" x="149.84" y="-231.21" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Add24 -->
+<g id="node15" class="node">
+<title>Add24</title>
+<ellipse fill="none" stroke="black" cx="241" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="241" y="-174.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add24&#45;&gt;Phi_a22 -->
+<g id="edge20" class="edge">
+<title>Add24&#45;&gt;Phi_a22</title>
+<path fill="none" stroke="black" d="M241,-196.3C241,-204.02 241,-213.29 241,-221.89"/>
+<polygon fill="black" stroke="black" points="237.5,-221.9 241,-231.9 244.5,-221.9 237.5,-221.9"/>
+<text text-anchor="middle" x="238" y="-198.9" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Add24&#45;&gt;Phi_b23 -->
+<g id="edge19" class="edge">
+<title>Add24&#45;&gt;Phi_b23</title>
+<path fill="none" stroke="black" d="M222.19,-191.19C205.1,-202.27 179.69,-218.74 160.36,-231.27"/>
+<polygon fill="black" stroke="black" points="158.45,-228.34 151.96,-236.71 162.25,-234.21 158.45,-228.34"/>
+<text text-anchor="middle" x="219.19" y="-193.79" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Return25&#45;&gt;Region21 -->
+<g id="edge21" class="edge">
+<title>Return25&#45;&gt;Region21</title>
+<path fill="none" stroke="red" d="M277.67,-124.13C285.71,-148.44 300.52,-193.18 310.06,-221.99"/>
+<polygon fill="red" stroke="red" points="306.85,-223.42 313.31,-231.81 313.49,-221.22 306.85,-223.42"/>
+<text text-anchor="middle" x="274.67" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return25&#45;&gt;Add24 -->
+<g id="edge22" class="edge">
+<title>Return25&#45;&gt;Add24</title>
+<path fill="none" stroke="black" d="M264.34,-124.3C260.76,-132.39 256.42,-142.19 252.46,-151.13"/>
+<polygon fill="black" stroke="black" points="249.21,-149.82 248.36,-160.38 255.61,-152.65 249.21,-149.82"/>
+<text text-anchor="middle" x="261.34" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph3-true.gv b/chapter06/docs/06-graph3-true.gv
new file mode 100644
index 00000000..8fdcc5df
--- /dev/null
+++ b/chapter06/docs/06-graph3-true.gv
@@ -0,0 +1,35 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+if( arg ) {
+ a = 2;
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_28 [ label="#4" ];
+ Return29 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return29[taillabel=0 color=red];
+ Return29 -> Start2:p0[taillabel=0 color=red];
+ Return29 -> Con_28[taillabel=1];
+} \ No newline at end of file
diff --git a/chapter06/docs/06-graph3-true.svg b/chapter06/docs/06-graph3-true.svg
new file mode 100644
index 00000000..7e573cc6
--- /dev/null
+++ b/chapter06/docs/06-graph3-true.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return29 -->
+<g id="node4" class="node">
+<title>Return29</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return29 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return29</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_28 -->
+<g id="node3" class="node">
+<title>Con_28</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#4</text>
+</g>
+<!-- Return29&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>Return29&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return29&#45;&gt;Con_28 -->
+<g id="edge3" class="edge">
+<title>Return29&#45;&gt;Con_28</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph4-arg2.gv b/chapter06/docs/06-graph4-arg2.gv
new file mode 100644
index 00000000..7d6913e2
--- /dev/null
+++ b/chapter06/docs/06-graph4-arg2.gv
@@ -0,0 +1,37 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+int c = 0;
+if( arg ) {
+ a = 1;
+ if( arg==2 ) { c=2; } else { c=3; }
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b+c;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_44 [ label="#5" ];
+ Return45 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return45[taillabel=0 color=red];
+ Return45 -> Start2:p0[taillabel=0 color=red];
+ Return45 -> Con_44[taillabel=1];
+}
diff --git a/chapter06/docs/06-graph4-arg2.svg b/chapter06/docs/06-graph4-arg2.svg
new file mode 100644
index 00000000..8ec80be4
--- /dev/null
+++ b/chapter06/docs/06-graph4-arg2.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return45 -->
+<g id="node4" class="node">
+<title>Return45</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return45 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return45</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_44 -->
+<g id="node3" class="node">
+<title>Con_44</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#5</text>
+</g>
+<!-- Return45&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>Return45&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return45&#45;&gt;Con_44 -->
+<g id="edge3" class="edge">
+<title>Return45&#45;&gt;Con_44</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph4-nonconst.gv b/chapter06/docs/06-graph4-nonconst.gv
new file mode 100644
index 00000000..b8899b48
--- /dev/null
+++ b/chapter06/docs/06-graph4-nonconst.gv
@@ -0,0 +1,122 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+int c = 0;
+if( arg ) {
+ a = 1;
+ if( arg==2 ) { c=2; } else { c=3; }
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b+c;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD><TD PORT="p1">arg</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_6 [ label="#0" ];
+ Con_7 [ label="#1" ];
+ Con_8 [ label="#0" ];
+ If9 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_13 [ label="#1" ];
+ Con_14 [ label="#2" ];
+ EQNode15 [ label="==" ];
+ If16 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_20 [ label="#2" ];
+ Con_21 [ label="#3" ];
+ Region22 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_c23 [ style=filled fillcolor=lightyellow label="&phi;_c" ];
+ If24 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_28 [ label="#2" ];
+ Con_29 [ label="#3" ];
+ Region30 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_b31 [ style=filled fillcolor=lightyellow label="&phi;_b" ];
+ Region32 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_a33 [ style=filled fillcolor=lightyellow label="&phi;_a" ];
+ Phi_b34 [ style=filled fillcolor=lightyellow label="&phi;_b" ];
+ Phi_c35 [ style=filled fillcolor=lightyellow label="&phi;_c" ];
+ Add36 [ label="+" ];
+ Add37 [ label="+" ];
+ Return38 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ { rank=same; Region22;Phi_c23;}
+ { rank=same; Region30;Phi_b31;}
+ { rank=same; Region32;Phi_c35;Phi_a33;Phi_b34;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return38[taillabel=0 color=red];
+ If9 -> Start2:p0[taillabel=0 color=red];
+ If9 -> Start2:p1[taillabel=1];
+ EQNode15 -> Start2:p1[taillabel=1];
+ EQNode15 -> Con_14[taillabel=2];
+ If16 -> If9:p0[taillabel=0 color=red];
+ If16 -> EQNode15[taillabel=1];
+ Region22 -> If16:p0[taillabel=1 color=red];
+ Region22 -> If16:p1[taillabel=2 color=red];
+ Phi_c23 -> Region22 [style=dotted taillabel=0];
+ Phi_c23 -> Con_20[taillabel=1];
+ Phi_c23 -> Con_21[taillabel=2];
+ If24 -> Region22[taillabel=0 color=red];
+ If24 -> Start2:p1[taillabel=1];
+ Region30 -> If24:p0[taillabel=1 color=red];
+ Region30 -> If24:p1[taillabel=2 color=red];
+ Phi_b31 -> Region30 [style=dotted taillabel=0];
+ Phi_b31 -> Con_28[taillabel=1];
+ Phi_b31 -> Con_29[taillabel=2];
+ Region32 -> Region30[taillabel=1 color=red];
+ Region32 -> If9:p1[taillabel=2 color=red];
+ Phi_a33 -> Region32 [style=dotted taillabel=0];
+ Phi_a33 -> Con_13[taillabel=1];
+ Phi_a33 -> Con_6[taillabel=2];
+ Phi_b34 -> Region32 [style=dotted taillabel=0];
+ Phi_b34 -> Phi_b31[taillabel=1];
+ Phi_b34 -> Con_7[taillabel=2];
+ Phi_c35 -> Region32 [style=dotted taillabel=0];
+ Phi_c35 -> Phi_c23[taillabel=1];
+ Phi_c35 -> Con_8[taillabel=2];
+ Add36 -> Phi_c35[taillabel=1];
+ Add36 -> Phi_b34[taillabel=2];
+ Add37 -> Add36[taillabel=1];
+ Add37 -> Phi_a33[taillabel=2];
+ Return38 -> Region32[taillabel=0 color=red];
+ Return38 -> Add37[taillabel=1];
+}
diff --git a/chapter06/docs/06-graph4-nonconst.svg b/chapter06/docs/06-graph4-nonconst.svg
new file mode 100644
index 00000000..d38c3636
--- /dev/null
+++ b/chapter06/docs/06-graph4-nonconst.svg
@@ -0,0 +1,456 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="506pt" height="908pt"
+ viewBox="0.00 0.00 506.00 908.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 904)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-904 502,-904 502,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-892 490,-892 490,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="266,-855 266,-880 347,-880 347,-855 266,-855"/>
+<polygon fill="none" stroke="black" points="266,-855 266,-880 347,-880 347,-855 266,-855"/>
+<text text-anchor="start" x="288" y="-863.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="266,-824 266,-855 347,-855 347,-824 266,-824"/>
+<polygon fill="yellow" stroke="transparent" points="271,-829 271,-850 311,-850 311,-829 271,-829"/>
+<polygon fill="none" stroke="black" points="271,-829 271,-850 311,-850 311,-829 271,-829"/>
+<text text-anchor="start" x="274" y="-835.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="311,-829 311,-850 342,-850 342,-829 311,-829"/>
+<text text-anchor="start" x="314" y="-835.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="329,-52 275,-52 275,-16 329,-16 329,-52"/>
+<text text-anchor="middle" x="302" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return38 -->
+<g id="node26" class="node">
+<title>Return38</title>
+<polygon fill="yellow" stroke="black" points="335,-124 269,-124 269,-88 335,-88 335,-124"/>
+<text text-anchor="middle" x="302" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return38 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return38</title>
+<path fill="none" stroke="red" d="M302,-52.3C302,-60.02 302,-69.29 302,-77.89"/>
+<polygon fill="red" stroke="red" points="298.5,-77.9 302,-87.9 305.5,-77.9 298.5,-77.9"/>
+<text text-anchor="middle" x="299" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_6 -->
+<g id="node3" class="node">
+<title>Con_6</title>
+<ellipse fill="none" stroke="black" cx="351" cy="-394" rx="27" ry="18"/>
+<text text-anchor="middle" x="351" y="-390.3" font-family="Times,serif" font-size="14.00">#0</text>
+</g>
+<!-- Con_7 -->
+<g id="node4" class="node">
+<title>Con_7</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-394" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-390.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Con_8 -->
+<g id="node5" class="node">
+<title>Con_8</title>
+<ellipse fill="none" stroke="black" cx="43" cy="-394" rx="27" ry="18"/>
+<text text-anchor="middle" x="43" y="-390.3" font-family="Times,serif" font-size="14.00">#0</text>
+</g>
+<!-- If9 -->
+<g id="node6" class="node">
+<title>If9</title>
+<polygon fill="yellow" stroke="transparent" points="232,-755 232,-780 326,-780 326,-755 232,-755"/>
+<polygon fill="none" stroke="black" points="232,-755 232,-780 326,-780 326,-755 232,-755"/>
+<text text-anchor="start" x="273.5" y="-763.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="232,-724 232,-755 326,-755 326,-724 232,-724"/>
+<polygon fill="yellow" stroke="transparent" points="237,-729 237,-750 277,-750 277,-729 237,-729"/>
+<polygon fill="none" stroke="black" points="237,-729 237,-750 277,-750 277,-729 237,-729"/>
+<text text-anchor="start" x="240" y="-735.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="277,-729 277,-750 321,-750 321,-729 277,-729"/>
+<polygon fill="none" stroke="black" points="277,-729 277,-750 321,-750 321,-729 277,-729"/>
+<text text-anchor="start" x="280" y="-735.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If9&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>If9&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M286.26,-784.2C288.21,-794.57 289.98,-806.42 290.68,-817.97"/>
+<polygon fill="red" stroke="red" points="287.18,-818.12 291,-828 294.18,-817.89 287.18,-818.12"/>
+<text text-anchor="middle" x="283.26" y="-786.8" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If9&#45;&gt;Start2 -->
+<g id="edge3" class="edge">
+<title>If9&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M309.94,-784.28C317.27,-794.18 323.65,-805.76 326.02,-818.03"/>
+<polygon fill="black" stroke="black" points="322.54,-818.39 327,-828 329.51,-817.71 322.54,-818.39"/>
+<text text-anchor="middle" x="306.94" y="-786.88" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_13 -->
+<g id="node7" class="node">
+<title>Con_13</title>
+<ellipse fill="none" stroke="black" cx="279" cy="-394" rx="27" ry="18"/>
+<text text-anchor="middle" x="279" y="-390.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Con_14 -->
+<g id="node8" class="node">
+<title>Con_14</title>
+<ellipse fill="none" stroke="black" cx="413" cy="-852" rx="27" ry="18"/>
+<text text-anchor="middle" x="413" y="-848.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- EQNode15 -->
+<g id="node9" class="node">
+<title>EQNode15</title>
+<ellipse fill="none" stroke="black" cx="413" cy="-752" rx="27" ry="18"/>
+<text text-anchor="middle" x="413" y="-748.3" font-family="Times,serif" font-size="14.00">==</text>
+</g>
+<!-- EQNode15&#45;&gt;Start2 -->
+<g id="edge4" class="edge">
+<title>EQNode15&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M403.94,-769.18C391.81,-790 369.82,-824.8 352.53,-835.66"/>
+<polygon fill="black" stroke="black" points="351.28,-832.39 343,-839 353.59,-838.99 351.28,-832.39"/>
+<text text-anchor="middle" x="400.94" y="-771.78" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- EQNode15&#45;&gt;Con_14 -->
+<g id="edge5" class="edge">
+<title>EQNode15&#45;&gt;Con_14</title>
+<path fill="none" stroke="black" d="M413,-770.07C413,-784.88 413,-806.57 413,-823.77"/>
+<polygon fill="black" stroke="black" points="409.5,-823.8 413,-833.8 416.5,-823.8 409.5,-823.8"/>
+<text text-anchor="middle" x="410" y="-772.67" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- If16 -->
+<g id="node10" class="node">
+<title>If16</title>
+<polygon fill="yellow" stroke="transparent" points="380,-655 380,-680 474,-680 474,-655 380,-655"/>
+<polygon fill="none" stroke="black" points="380,-655 380,-680 474,-680 474,-655 380,-655"/>
+<text text-anchor="start" x="421.5" y="-663.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="380,-624 380,-655 474,-655 474,-624 380,-624"/>
+<polygon fill="yellow" stroke="transparent" points="385,-629 385,-650 425,-650 425,-629 385,-629"/>
+<polygon fill="none" stroke="black" points="385,-629 385,-650 425,-650 425,-629 385,-629"/>
+<text text-anchor="start" x="388" y="-635.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="425,-629 425,-650 469,-650 469,-629 425,-629"/>
+<polygon fill="none" stroke="black" points="425,-629 425,-650 469,-650 469,-629 425,-629"/>
+<text text-anchor="start" x="428" y="-635.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If16&#45;&gt;If9 -->
+<g id="edge6" class="edge">
+<title>If16&#45;&gt;If9:p0</title>
+<path fill="none" stroke="red" d="M371.81,-671.79C331.47,-686.19 280.89,-705.86 263.34,-719.58"/>
+<polygon fill="red" stroke="red" points="260.22,-717.91 257,-728 265.81,-722.12 260.22,-717.91"/>
+<text text-anchor="middle" x="368.81" y="-665.39" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If16&#45;&gt;EQNode15 -->
+<g id="edge7" class="edge">
+<title>If16&#45;&gt;EQNode15</title>
+<path fill="none" stroke="black" d="M422.57,-684.01C420.75,-696.76 418.66,-711.4 416.9,-723.73"/>
+<polygon fill="black" stroke="black" points="413.4,-723.48 415.45,-733.87 420.33,-724.47 413.4,-723.48"/>
+<text text-anchor="middle" x="419.57" y="-686.61" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Con_20 -->
+<g id="node11" class="node">
+<title>Con_20</title>
+<ellipse fill="none" stroke="black" cx="134" cy="-652" rx="27" ry="18"/>
+<text text-anchor="middle" x="134" y="-648.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Con_21 -->
+<g id="node12" class="node">
+<title>Con_21</title>
+<ellipse fill="none" stroke="black" cx="206" cy="-652" rx="27" ry="18"/>
+<text text-anchor="middle" x="206" y="-648.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Region22 -->
+<g id="node13" class="node">
+<title>Region22</title>
+<polygon fill="yellow" stroke="black" points="446,-584 380,-584 380,-548 446,-548 446,-584"/>
+<text text-anchor="middle" x="413" y="-562.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region22&#45;&gt;If16 -->
+<g id="edge8" class="edge">
+<title>Region22&#45;&gt;If16:p0</title>
+<path fill="none" stroke="red" d="M409.56,-584.01C407.87,-593.54 406.04,-605.9 405.32,-617.98"/>
+<polygon fill="red" stroke="red" points="401.82,-617.89 405,-628 408.81,-618.12 401.82,-617.89"/>
+<text text-anchor="middle" x="406.56" y="-586.61" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region22&#45;&gt;If16 -->
+<g id="edge9" class="edge">
+<title>Region22&#45;&gt;If16:p1</title>
+<path fill="none" stroke="red" d="M428.61,-584.03C435.66,-593.13 443.03,-605.06 445.83,-617.72"/>
+<polygon fill="red" stroke="red" points="442.39,-618.46 447,-628 449.35,-617.67 442.39,-618.46"/>
+<text text-anchor="middle" x="425.61" y="-586.63" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_c23 -->
+<g id="node14" class="node">
+<title>Phi_c23</title>
+<ellipse fill="lightyellow" stroke="black" cx="170" cy="-566" rx="27" ry="18"/>
+<text text-anchor="middle" x="170" y="-562.3" font-family="Times,serif" font-size="14.00">φ_c</text>
+</g>
+<!-- Phi_c23&#45;&gt;Con_20 -->
+<g id="edge11" class="edge">
+<title>Phi_c23&#45;&gt;Con_20</title>
+<path fill="none" stroke="black" d="M162.89,-583.6C157.81,-595.45 150.88,-611.62 145.08,-625.15"/>
+<polygon fill="black" stroke="black" points="141.82,-623.87 141.1,-634.44 148.25,-626.63 141.82,-623.87"/>
+<text text-anchor="middle" x="159.89" y="-586.2" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_c23&#45;&gt;Con_21 -->
+<g id="edge12" class="edge">
+<title>Phi_c23&#45;&gt;Con_21</title>
+<path fill="none" stroke="black" d="M177.11,-583.6C182.19,-595.45 189.12,-611.62 194.92,-625.15"/>
+<polygon fill="black" stroke="black" points="191.75,-626.63 198.9,-634.44 198.18,-623.87 191.75,-626.63"/>
+<text text-anchor="middle" x="174.11" y="-586.2" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_c23&#45;&gt;Region22 -->
+<g id="edge10" class="edge">
+<title>Phi_c23&#45;&gt;Region22</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M197.05,-566C254.48,-566 311.91,-566 369.34,-566"/>
+<polygon fill="black" stroke="black" points="369.68,-569.5 379.68,-566 369.68,-562.5 369.68,-569.5"/>
+<text text-anchor="middle" x="200.05" y="-559.6" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- If24 -->
+<g id="node15" class="node">
+<title>If24</title>
+<polygon fill="yellow" stroke="transparent" points="375,-483 375,-508 469,-508 469,-483 375,-483"/>
+<polygon fill="none" stroke="black" points="375,-483 375,-508 469,-508 469,-483 375,-483"/>
+<text text-anchor="start" x="416.5" y="-491.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="375,-452 375,-483 469,-483 469,-452 375,-452"/>
+<polygon fill="yellow" stroke="transparent" points="380,-457 380,-478 420,-478 420,-457 380,-457"/>
+<polygon fill="none" stroke="black" points="380,-457 380,-478 420,-478 420,-457 380,-457"/>
+<text text-anchor="start" x="383" y="-463.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="420,-457 420,-478 464,-478 464,-457 420,-457"/>
+<polygon fill="none" stroke="black" points="420,-457 420,-478 464,-478 464,-457 420,-457"/>
+<text text-anchor="start" x="423" y="-463.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If24&#45;&gt;Start2 -->
+<g id="edge14" class="edge">
+<title>If24&#45;&gt;Start2:p1</title>
+<path fill="none" stroke="black" d="M392.77,-512.23C384.4,-522.84 376.15,-535.26 371,-548 331.39,-645.92 367.43,-681.24 343,-784 339.09,-800.45 330.97,-805.48 328.06,-817.95"/>
+<polygon fill="black" stroke="black" points="324.57,-817.69 327,-828 331.53,-818.42 324.57,-817.69"/>
+<text text-anchor="middle" x="389.77" y="-514.83" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- If24&#45;&gt;Region22 -->
+<g id="edge13" class="edge">
+<title>If24&#45;&gt;Region22</title>
+<path fill="none" stroke="red" d="M418.65,-512.28C417.76,-520.58 416.81,-529.48 415.94,-537.56"/>
+<polygon fill="red" stroke="red" points="412.45,-537.28 414.86,-547.6 419.41,-538.02 412.45,-537.28"/>
+<text text-anchor="middle" x="415.65" y="-514.88" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_28 -->
+<g id="node16" class="node">
+<title>Con_28</title>
+<ellipse fill="none" stroke="black" cx="135" cy="-480" rx="27" ry="18"/>
+<text text-anchor="middle" x="135" y="-476.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Con_29 -->
+<g id="node17" class="node">
+<title>Con_29</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-480" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-476.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Region30 -->
+<g id="node18" class="node">
+<title>Region30</title>
+<polygon fill="yellow" stroke="black" points="482,-412 416,-412 416,-376 482,-376 482,-412"/>
+<text text-anchor="middle" x="449" y="-390.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region30&#45;&gt;If24 -->
+<g id="edge15" class="edge">
+<title>Region30&#45;&gt;If24:p0</title>
+<path fill="none" stroke="red" d="M424.79,-412.2C414.85,-420.99 404.86,-432.65 401.33,-446"/>
+<polygon fill="red" stroke="red" points="397.85,-445.63 400,-456 404.79,-446.55 397.85,-445.63"/>
+<text text-anchor="middle" x="421.79" y="-414.8" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Region30&#45;&gt;If24 -->
+<g id="edge16" class="edge">
+<title>Region30&#45;&gt;If24:p1</title>
+<path fill="none" stroke="red" d="M445.99,-412.03C444.51,-421.56 442.91,-433.93 442.28,-446"/>
+<polygon fill="red" stroke="red" points="438.78,-445.91 442,-456 445.78,-446.1 438.78,-445.91"/>
+<text text-anchor="middle" x="442.99" y="-414.63" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b31 -->
+<g id="node19" class="node">
+<title>Phi_b31</title>
+<ellipse fill="lightyellow" stroke="black" cx="135" cy="-394" rx="27.1" ry="18"/>
+<text text-anchor="middle" x="135" y="-390.3" font-family="Times,serif" font-size="14.00">φ_b</text>
+</g>
+<!-- Phi_b31&#45;&gt;Con_28 -->
+<g id="edge18" class="edge">
+<title>Phi_b31&#45;&gt;Con_28</title>
+<path fill="none" stroke="black" d="M135,-412.4C135,-423.74 135,-438.77 135,-451.68"/>
+<polygon fill="black" stroke="black" points="131.5,-451.9 135,-461.9 138.5,-451.9 131.5,-451.9"/>
+<text text-anchor="middle" x="132" y="-415" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_b31&#45;&gt;Con_29 -->
+<g id="edge19" class="edge">
+<title>Phi_b31&#45;&gt;Con_29</title>
+<path fill="none" stroke="black" d="M147.87,-410.02C158.93,-422.92 175.04,-441.71 187.65,-456.42"/>
+<polygon fill="black" stroke="black" points="185.07,-458.8 194.24,-464.11 190.39,-454.24 185.07,-458.8"/>
+<text text-anchor="middle" x="144.87" y="-412.62" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b31&#45;&gt;Region30 -->
+<g id="edge17" class="edge">
+<title>Phi_b31&#45;&gt;Region30</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M149.22,-378.43C157.37,-370.68 168.29,-362.11 180,-358 224.67,-342.33 347.58,-344.66 393,-358 401.94,-360.63 410.81,-365.17 418.76,-370.16"/>
+<polygon fill="black" stroke="black" points="417.05,-373.23 427.3,-375.91 420.96,-367.43 417.05,-373.23"/>
+<text text-anchor="middle" x="146.22" y="-372.03" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Region32 -->
+<g id="node20" class="node">
+<title>Region32</title>
+<polygon fill="yellow" stroke="black" points="390,-340 324,-340 324,-304 390,-304 390,-340"/>
+<text text-anchor="middle" x="357" y="-318.3" font-family="Times,serif" font-size="14.00">Region</text>
+</g>
+<!-- Region32&#45;&gt;If9 -->
+<g id="edge21" class="edge">
+<title>Region32&#45;&gt;If9:p1</title>
+<path fill="none" stroke="red" d="M369.73,-340.15C376.29,-350.08 383.61,-363.12 387,-376 391.08,-391.47 392.32,-396.91 387,-412 380.17,-431.38 366.81,-429.44 358,-448 304.99,-559.76 299.28,-598.69 299.01,-717.76"/>
+<polygon fill="red" stroke="red" points="295.51,-718 299,-728 302.51,-718 295.51,-718"/>
+<text text-anchor="middle" x="366.73" y="-342.75" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Region32&#45;&gt;Region30 -->
+<g id="edge20" class="edge">
+<title>Region32&#45;&gt;Region30</title>
+<path fill="none" stroke="red" d="M379.74,-340.3C391.44,-349.2 405.86,-360.18 418.51,-369.8"/>
+<polygon fill="red" stroke="red" points="416.44,-372.63 426.52,-375.9 420.68,-367.06 416.44,-372.63"/>
+<text text-anchor="middle" x="376.74" y="-342.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_a33 -->
+<g id="node21" class="node">
+<title>Phi_a33</title>
+<ellipse fill="lightyellow" stroke="black" cx="279" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="279" y="-318.3" font-family="Times,serif" font-size="14.00">φ_a</text>
+</g>
+<!-- Phi_a33&#45;&gt;Con_6 -->
+<g id="edge24" class="edge">
+<title>Phi_a33&#45;&gt;Con_6</title>
+<path fill="none" stroke="black" d="M293.57,-337.17C303.75,-347.06 317.52,-360.45 329.03,-371.64"/>
+<polygon fill="black" stroke="black" points="326.59,-374.15 336.2,-378.62 331.47,-369.13 326.59,-374.15"/>
+<text text-anchor="middle" x="290.57" y="-339.77" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_a33&#45;&gt;Con_13 -->
+<g id="edge23" class="edge">
+<title>Phi_a33&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M279,-340.3C279,-348.02 279,-357.29 279,-365.89"/>
+<polygon fill="black" stroke="black" points="275.5,-365.9 279,-375.9 282.5,-365.9 275.5,-365.9"/>
+<text text-anchor="middle" x="276" y="-342.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_a33&#45;&gt;Region32 -->
+<g id="edge22" class="edge">
+<title>Phi_a33&#45;&gt;Region32</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M306.12,-322C308.58,-322 311.04,-322 313.5,-322"/>
+<polygon fill="black" stroke="black" points="313.61,-325.5 323.61,-322 313.61,-318.5 313.61,-325.5"/>
+<text text-anchor="middle" x="309.12" y="-315.6" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Phi_b34 -->
+<g id="node22" class="node">
+<title>Phi_b34</title>
+<ellipse fill="lightyellow" stroke="black" cx="207" cy="-322" rx="27.1" ry="18"/>
+<text text-anchor="middle" x="207" y="-318.3" font-family="Times,serif" font-size="14.00">φ_b</text>
+</g>
+<!-- Phi_b34&#45;&gt;Con_7 -->
+<g id="edge27" class="edge">
+<title>Phi_b34&#45;&gt;Con_7</title>
+<path fill="none" stroke="black" d="M207,-340.3C207,-348.02 207,-357.29 207,-365.89"/>
+<polygon fill="black" stroke="black" points="203.5,-365.9 207,-375.9 210.5,-365.9 203.5,-365.9"/>
+<text text-anchor="middle" x="204" y="-342.9" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_b34&#45;&gt;Phi_b31 -->
+<g id="edge26" class="edge">
+<title>Phi_b34&#45;&gt;Phi_b31</title>
+<path fill="none" stroke="black" d="M192.08,-337.5C182.04,-347.27 168.62,-360.31 157.32,-371.3"/>
+<polygon fill="black" stroke="black" points="154.63,-369.03 149.9,-378.51 159.51,-374.05 154.63,-369.03"/>
+<text text-anchor="middle" x="189.08" y="-340.1" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_b34&#45;&gt;Region32 -->
+<g id="edge25" class="edge">
+<title>Phi_b34&#45;&gt;Region32</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M221.22,-306.43C229.37,-298.68 240.29,-290.11 252,-286 274.65,-278.06 283.12,-278.74 306,-286 313.99,-288.54 321.81,-292.83 328.83,-297.58"/>
+<polygon fill="black" stroke="black" points="327.11,-300.66 337.24,-303.75 331.25,-295.01 327.11,-300.66"/>
+<text text-anchor="middle" x="218.22" y="-300.03" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Phi_c35 -->
+<g id="node23" class="node">
+<title>Phi_c35</title>
+<ellipse fill="lightyellow" stroke="black" cx="112" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="112" y="-318.3" font-family="Times,serif" font-size="14.00">φ_c</text>
+</g>
+<!-- Phi_c35&#45;&gt;Con_8 -->
+<g id="edge30" class="edge">
+<title>Phi_c35&#45;&gt;Con_8</title>
+<path fill="none" stroke="black" d="M97.7,-337.5C88.08,-347.27 75.22,-360.31 64.39,-371.3"/>
+<polygon fill="black" stroke="black" points="61.81,-368.94 57.28,-378.51 66.79,-373.85 61.81,-368.94"/>
+<text text-anchor="middle" x="94.7" y="-340.1" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Phi_c35&#45;&gt;Phi_c23 -->
+<g id="edge29" class="edge">
+<title>Phi_c35&#45;&gt;Phi_c23</title>
+<path fill="none" stroke="black" d="M105.53,-339.52C93.19,-373.79 70.03,-454.23 99,-512 107.39,-528.74 123.86,-541.54 138.82,-550.37"/>
+<polygon fill="black" stroke="black" points="137.41,-553.59 147.86,-555.35 140.79,-547.46 137.41,-553.59"/>
+<text text-anchor="middle" x="102.53" y="-342.12" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Phi_c35&#45;&gt;Region32 -->
+<g id="edge28" class="edge">
+<title>Phi_c35&#45;&gt;Region32</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M130.62,-308.94C143.75,-300.56 162.11,-290.44 180,-286 234.35,-272.5 252.62,-269.06 306,-286 313.99,-288.54 321.81,-292.83 328.83,-297.58"/>
+<polygon fill="black" stroke="black" points="327.11,-300.66 337.24,-303.75 331.25,-295.01 327.11,-300.66"/>
+<text text-anchor="middle" x="127.62" y="-302.54" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Add36 -->
+<g id="node24" class="node">
+<title>Add36</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-250" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-246.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add36&#45;&gt;Phi_b34 -->
+<g id="edge32" class="edge">
+<title>Add36&#45;&gt;Phi_b34</title>
+<path fill="none" stroke="black" d="M207,-268.3C207,-276.02 207,-285.29 207,-293.89"/>
+<polygon fill="black" stroke="black" points="203.5,-293.9 207,-303.9 210.5,-293.9 203.5,-293.9"/>
+<text text-anchor="middle" x="204" y="-270.9" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Add36&#45;&gt;Phi_c35 -->
+<g id="edge31" class="edge">
+<title>Add36&#45;&gt;Phi_c35</title>
+<path fill="none" stroke="black" d="M189.58,-263.84C175.07,-274.53 154.21,-289.9 137.77,-302.01"/>
+<polygon fill="black" stroke="black" points="135.61,-299.26 129.64,-308.01 139.76,-304.89 135.61,-299.26"/>
+<text text-anchor="middle" x="186.58" y="-266.44" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Add37 -->
+<g id="node25" class="node">
+<title>Add37</title>
+<ellipse fill="none" stroke="black" cx="279" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="279" y="-174.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add37&#45;&gt;Phi_a33 -->
+<g id="edge34" class="edge">
+<title>Add37&#45;&gt;Phi_a33</title>
+<path fill="none" stroke="black" d="M279,-196.13C279,-220.33 279,-264.79 279,-293.61"/>
+<polygon fill="black" stroke="black" points="275.5,-293.81 279,-303.81 282.5,-293.81 275.5,-293.81"/>
+<text text-anchor="middle" x="276" y="-198.73" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Add37&#45;&gt;Add36 -->
+<g id="edge33" class="edge">
+<title>Add37&#45;&gt;Add36</title>
+<path fill="none" stroke="black" d="M264.43,-193.17C254.25,-203.06 240.48,-216.45 228.97,-227.64"/>
+<polygon fill="black" stroke="black" points="226.53,-225.13 221.8,-234.62 231.41,-230.15 226.53,-225.13"/>
+<text text-anchor="middle" x="261.43" y="-195.77" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Return38&#45;&gt;Region32 -->
+<g id="edge35" class="edge">
+<title>Return38&#45;&gt;Region32</title>
+<path fill="none" stroke="red" d="M306.41,-124.15C315.94,-161.25 338.54,-249.19 350.03,-293.9"/>
+<polygon fill="red" stroke="red" points="346.69,-294.95 352.57,-303.77 353.47,-293.21 346.69,-294.95"/>
+<text text-anchor="middle" x="303.41" y="-126.75" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return38&#45;&gt;Add37 -->
+<g id="edge36" class="edge">
+<title>Return38&#45;&gt;Add37</title>
+<path fill="none" stroke="black" d="M296.31,-124.3C293.75,-132.1 290.67,-141.49 287.82,-150.17"/>
+<polygon fill="black" stroke="black" points="284.42,-149.3 284.62,-159.9 291.07,-151.49 284.42,-149.3"/>
+<text text-anchor="middle" x="293.31" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/06-graph4-true.gv b/chapter06/docs/06-graph4-true.gv
new file mode 100644
index 00000000..6e48ee7d
--- /dev/null
+++ b/chapter06/docs/06-graph4-true.gv
@@ -0,0 +1,37 @@
+digraph chapter06 {
+/*
+int a = 0;
+int b = 1;
+int c = 0;
+if( arg ) {
+ a = 1;
+ if( arg==2 ) { c=2; } else { c=3; }
+ if( arg ) { b = 2; }
+ else b = 3;
+}
+return a+b+c;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_44 [ label="#6" ];
+ Return45 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return45[taillabel=0 color=red];
+ Return45 -> Start2:p0[taillabel=0 color=red];
+ Return45 -> Con_44[taillabel=1];
+}
diff --git a/chapter06/docs/06-graph4-true.svg b/chapter06/docs/06-graph4-true.svg
new file mode 100644
index 00000000..a533ea21
--- /dev/null
+++ b/chapter06/docs/06-graph4-true.svg
@@ -0,0 +1,67 @@
+<?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: chapter06 Pages: 1 -->
+<svg width="178pt" height="248pt"
+ viewBox="0.00 0.00 178.00 248.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 244)">
+<title>chapter06</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-244 174,-244 174,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-232 162,-232 162,-8 8,-8"/>
+</g>
+<!-- Start2 -->
+<g id="node1" class="node">
+<title>Start2</title>
+<polygon fill="yellow" stroke="transparent" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<polygon fill="none" stroke="black" points="24,-195 24,-220 74,-220 74,-195 24,-195"/>
+<text text-anchor="start" x="30.5" y="-203.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="24,-164 24,-195 74,-195 74,-164 24,-164"/>
+<polygon fill="yellow" stroke="transparent" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<polygon fill="none" stroke="black" points="29,-169 29,-190 69,-190 69,-169 29,-169"/>
+<text text-anchor="start" x="32" y="-175.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+</g>
+<!-- Stop3 -->
+<g id="node2" class="node">
+<title>Stop3</title>
+<polygon fill="yellow" stroke="black" points="112,-52 58,-52 58,-16 112,-16 112,-52"/>
+<text text-anchor="middle" x="85" y="-30.3" font-family="Times,serif" font-size="14.00">Stop</text>
+</g>
+<!-- Return45 -->
+<g id="node4" class="node">
+<title>Return45</title>
+<polygon fill="yellow" stroke="black" points="118,-124 52,-124 52,-88 118,-88 118,-124"/>
+<text text-anchor="middle" x="85" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Stop3&#45;&gt;Return45 -->
+<g id="edge1" class="edge">
+<title>Stop3&#45;&gt;Return45</title>
+<path fill="none" stroke="red" d="M85,-52.3C85,-60.02 85,-69.29 85,-77.89"/>
+<polygon fill="red" stroke="red" points="81.5,-77.9 85,-87.9 88.5,-77.9 81.5,-77.9"/>
+<text text-anchor="middle" x="82" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_44 -->
+<g id="node3" class="node">
+<title>Con_44</title>
+<ellipse fill="none" stroke="black" cx="127" cy="-192" rx="27" ry="18"/>
+<text text-anchor="middle" x="127" y="-188.3" font-family="Times,serif" font-size="14.00">#6</text>
+</g>
+<!-- Return45&#45;&gt;Start2 -->
+<g id="edge2" class="edge">
+<title>Return45&#45;&gt;Start2:p0</title>
+<path fill="none" stroke="red" d="M68.26,-124.13C60.77,-133.26 52.99,-145.23 50.13,-158.06"/>
+<polygon fill="red" stroke="red" points="46.66,-157.67 49,-168 53.61,-158.46 46.66,-157.67"/>
+<text text-anchor="middle" x="65.26" y="-126.73" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return45&#45;&gt;Con_44 -->
+<g id="edge3" class="edge">
+<title>Return45&#45;&gt;Con_44</title>
+<path fill="none" stroke="black" d="M93.7,-124.4C99.66,-136.31 107.65,-152.3 114.31,-165.62"/>
+<polygon fill="black" stroke="black" points="111.28,-167.38 118.88,-174.76 117.54,-164.25 111.28,-167.38"/>
+<text text-anchor="middle" x="90.7" y="-127" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>
diff --git a/chapter06/docs/build-graphs.sh b/chapter06/docs/build-graphs.sh
new file mode 100644
index 00000000..d65826f4
--- /dev/null
+++ b/chapter06/docs/build-graphs.sh
@@ -0,0 +1,10 @@
+dot -Tsvg 06-graph1-pre.gv > 06-graph1-pre.svg
+dot -Tsvg 06-graph1-post.gv > 06-graph1-post.svg
+dot -Tsvg 06-graph2-pre.gv > 06-graph2-pre.svg
+dot -Tsvg 06-graph2-post.gv > 06-graph2-post.svg
+dot -Tsvg 06-graph3-nonconst.gv > 06-graph3-nonconst.svg
+dot -Tsvg 06-graph3-true.gv > 06-graph3-true.svg
+dot -Tsvg 06-graph3-false.gv > 06-graph3-false.svg
+dot -Tsvg 06-graph4-nonconst.gv > 06-graph4-nonconst.svg
+dot -Tsvg 06-graph4-true.gv > 06-graph4-true.svg
+dot -Tsvg 06-graph4-arg2.gv > 06-graph4-arg2.svg