From eec5c6aca224b4cce1b649ad439b57ed06175037 Mon Sep 17 00:00:00 2001 From: dibyendumajumdar Date: Mon, 30 Oct 2023 22:02:26 +0000 Subject: Update visual --- chapter05/docs/05-graph2.gv | 23 +- chapter05/docs/05-graph2.svg | 244 +++++++++++---------- .../java/com/seaofnodes/simple/Chapter05Test.java | 1 + 3 files changed, 149 insertions(+), 119 deletions(-) (limited to 'chapter05') diff --git a/chapter05/docs/05-graph2.gv b/chapter05/docs/05-graph2.gv index 55702eea..ee2feeed 100644 --- a/chapter05/docs/05-graph2.gv +++ b/chapter05/docs/05-graph2.gv @@ -7,6 +7,7 @@ else { a = arg-3; #showGraph; } +#showGraph; return a; */ @@ -24,7 +25,6 @@ return a; > ]; - Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_7 [ label="#1" ]; EQNode8 [ label="==" ]; If9 [ shape=plaintext label=< @@ -43,10 +43,21 @@ return a; Sub16 [ label="-" ]; Region17 [ shape=box style=filled fillcolor=yellow label="Region" ]; Phi_a18 [ style=filled fillcolor=lightyellow label="φ_a" ]; - Return19 [ shape=box style=filled fillcolor=yellow label="Return" ]; { rank=same; Phi_a18;} } - Stop3 -> Return19 [color=red]; + node [shape=plaintext]; + subgraph cluster_Scope1_0 { + Scope1_0 [label=< + + +
0$ctrlarg
>]; + subgraph cluster_Scope1_1 { + Scope1_1 [label=< + + +
1a
>]; + } + } EQNode8 -> Start2:p1; EQNode8 -> Con_7; If9 -> Start2:p0 [color=red]; @@ -60,6 +71,8 @@ return a; Phi_a18 -> Region17 [color=red]; Phi_a18 -> Add14; Phi_a18 -> Sub16; - Return19 -> Region17 [color=red]; - Return19 -> Phi_a18; + edge [style=dashed color=cornflowerblue]; + Scope1_0:"Scope1_0_$ctrl" -> Region17; + Scope1_0:"Scope1_0_arg" -> Start2:p1; + Scope1_1:"Scope1_1_a" -> Phi_a18; } \ No newline at end of file diff --git a/chapter05/docs/05-graph2.svg b/chapter05/docs/05-graph2.svg index 07a07ced..5282b4c4 100644 --- a/chapter05/docs/05-graph2.svg +++ b/chapter05/docs/05-graph2.svg @@ -4,197 +4,213 @@ - - + + chapter05 - + cluster_Nodes - + + + +cluster_Scope1_0 + + + +cluster_Scope1_1 + Start2 - - -Start - - - -$ctrl - -arg - - - -Stop3 - -Stop - - - -Return19 - -Return - - - -Stop3->Return19 - - + + +Start + + + +$ctrl + +arg - + Con_7 - -#1 + +#1 - + EQNode8 - -== + +== - + EQNode8->Start2:p1 - - + + - + EQNode8->Con_7 - - + + - + If9 - - -If - - - -True - - -False + + +If + + + +True + + +False - + If9->Start2:p0 - - + + - + If9->EQNode8 - - + + - + Con_13 - -#2 + +#2 - + Add14 - -+ + ++ - + Add14->Start2:p1 - - - + + - + Add14->Con_13 - - + + - + Con_15 - -#3 + +#3 - + Sub16 - -- + +- - + Sub16->Start2:p1 - + + + - + Sub16->Con_15 - - + + - + Region17 - -Region + +Region - + Region17->If9:p0 - - + + - + Region17->If9:p1 - - + + - + Phi_a18 - -φ_a + +φ_a - + Phi_a18->Add14 - - + + - + Phi_a18->Sub16 - - + + - + Phi_a18->Region17 - - + + - + + +Scope1_0 + + +0 + +$ctrl + +arg + + -Return19->Region17 - - +Scope1_0:Scope1_0_arg->Start2:p1 + - + + +Scope1_0:Scope1_0_$ctrl->Region17 + + + + + +Scope1_1 + + +1 + +a + + -Return19->Phi_a18 - - +Scope1_1:Scope1_1_a->Phi_a18 + + diff --git a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java index fe2a2382..981af93c 100644 --- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -20,6 +20,7 @@ else { a = arg-3; #showGraph; } +#showGraph; return a; """); StopNode ret = parser.parse(true); -- cgit v1.2.3