summaryrefslogtreecommitdiff
path: root/chapter05/docs/05-graph1.gv
diff options
context:
space:
mode:
authordibyendumajumdar <mobile@majumdar.org.uk>2023-10-30 21:55:01 +0000
committerDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2023-11-01 18:56:50 +0000
commit1f675fd160ef331574b998ec9691673abcfb7c70 (patch)
tree1660c30a32aef71d2e711a260e30647304aea4e6 /chapter05/docs/05-graph1.gv
parent29aea4487d70dfc08eb3afb84481c5e419aec33c (diff)
downloadSimple-1f675fd160ef331574b998ec9691673abcfb7c70.tar.gz
Simple-1f675fd160ef331574b998ec9691673abcfb7c70.zip
Update the description of Region node
Update visuals Update chapter list
Diffstat (limited to 'chapter05/docs/05-graph1.gv')
-rw-r--r--chapter05/docs/05-graph1.gv77
1 files changed, 39 insertions, 38 deletions
diff --git a/chapter05/docs/05-graph1.gv b/chapter05/docs/05-graph1.gv
index 99993814..6b2a5788 100644
--- a/chapter05/docs/05-graph1.gv
+++ b/chapter05/docs/05-graph1.gv
@@ -2,18 +2,19 @@ digraph chapter05 {
/*
int a = 1;
if (arg == 1)
- a = arg+2;
+ a = arg+2;
else {
- a = arg-3;
- #showGraph;
+ a = arg-3;
+ #showGraph;
}
return a;
-#showGraph;
*/
rankdir=BT;
+ ordering="in";
+ concentrate="true";
subgraph cluster_Nodes {
- Start1 [ shape=plaintext label=<
+ Start2 [ shape=plaintext label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
<TR><TD BGCOLOR="yellow">Start</TD></TR>
<TR><TD>
@@ -23,9 +24,9 @@ return a;
</TD></TR>
</TABLE>>
];
- Con_5 [ label="#1" ];
- EQNode6 [ label="EQNode" ];
- If7 [ shape=plaintext label=<
+ Con_7 [ label="#1" ];
+ EQNode8 [ label="==" ];
+ If9 [ shape=plaintext label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
<TR><TD BGCOLOR="yellow">If</TD></TR>
<TR><TD>
@@ -35,51 +36,51 @@ return a;
</TD></TR>
</TABLE>>
];
- Con_11 [ label="#2" ];
- Add12 [ label="Add" ];
- Con_13 [ label="#3" ];
- Sub14 [ label="Sub" ];
+ Con_13 [ label="#2" ];
+ Add14 [ label="+" ];
+ Con_15 [ label="#3" ];
+ Sub16 [ label="-" ];
}
node [shape=plaintext];
- subgraph cluster_Scope20_0 {
- Scope20_0 [label=<
+ subgraph cluster_Scope1_0 {
+ Scope1_0 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
- <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope20_0_$ctrl">$ctrl</TD><TD PORT="Scope20_0_arg">arg</TD></TR>
+ <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope1_0_$ctrl">$ctrl</TD><TD PORT="Scope1_0_arg">arg</TD></TR>
</TABLE>>];
- subgraph cluster_Scope20_1 {
- Scope20_1 [label=<
+ subgraph cluster_Scope1_1 {
+ Scope1_1 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
- <TR><TD BGCOLOR="cyan">1</TD><TD PORT="Scope20_1_a">a</TD></TR>
+ <TR><TD BGCOLOR="cyan">1</TD><TD PORT="Scope1_1_a">a</TD></TR>
</TABLE>>];
}
}
node [shape=plaintext];
- subgraph cluster_Scope21_0 {
- Scope21_0 [label=<
+ subgraph cluster_Scope12_0 {
+ Scope12_0 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
- <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope21_0_$ctrl">$ctrl</TD><TD PORT="Scope21_0_arg">arg</TD></TR>
+ <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope12_0_$ctrl">$ctrl</TD><TD PORT="Scope12_0_arg">arg</TD></TR>
</TABLE>>];
- subgraph cluster_Scope21_1 {
- Scope21_1 [label=<
+ subgraph cluster_Scope12_1 {
+ Scope12_1 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
- <TR><TD BGCOLOR="cyan">1</TD><TD PORT="Scope21_1_a">a</TD></TR>
+ <TR><TD BGCOLOR="cyan">1</TD><TD PORT="Scope12_1_a">a</TD></TR>
</TABLE>>];
}
}
- EQNode6 -> Start1:p1;
- EQNode6 -> Con_5;
- If7 -> Start1:p0 [color=red];
- If7 -> EQNode6;
- Add12 -> Start1:p1;
- Add12 -> Con_11;
- Sub14 -> Start1:p1;
- Sub14 -> Con_13;
+ EQNode8 -> Start2:p1;
+ EQNode8 -> Con_7;
+ If9 -> Start2:p0 [color=red];
+ If9 -> EQNode8;
+ Add14 -> Start2:p1;
+ Add14 -> Con_13;
+ Sub16 -> Start2:p1;
+ Sub16 -> Con_15;
edge [style=dashed color=cornflowerblue];
- Scope20_0:"Scope20_0_$ctrl" -> If7:p1;
- Scope20_0:"Scope20_0_arg" -> Start1:p1;
- Scope20_1:"Scope20_1_a" -> Sub14;
+ Scope1_0:"Scope1_0_$ctrl" -> If9:p0;
+ Scope1_0:"Scope1_0_arg" -> Start2:p1;
+ Scope1_1:"Scope1_1_a" -> Add14;
edge [style=dashed color=cornflowerblue];
- Scope21_0:"Scope21_0_$ctrl" -> If7:p0;
- Scope21_0:"Scope21_0_arg" -> Start1:p1;
- Scope21_1:"Scope21_1_a" -> Add12;
+ Scope12_0:"Scope12_0_$ctrl" -> If9:p1;
+ Scope12_0:"Scope12_0_arg" -> Start2:p1;
+ Scope12_1:"Scope12_1_a" -> Sub16;
} \ No newline at end of file