summaryrefslogtreecommitdiff
path: root/chapter10/docs/example1.gv
diff options
context:
space:
mode:
Diffstat (limited to 'chapter10/docs/example1.gv')
-rw-r--r--chapter10/docs/example1.gv84
1 files changed, 84 insertions, 0 deletions
diff --git a/chapter10/docs/example1.gv b/chapter10/docs/example1.gv
new file mode 100644
index 00000000..fcc24154
--- /dev/null
+++ b/chapter10/docs/example1.gv
@@ -0,0 +1,84 @@
+digraph chapter10 {
+/*
+struct Vec2D { int x; int y; }
+
+Vec2D v = new Vec2D;
+v.x = 1;
+if (arg)
+ v.y = 2;
+else
+ v.y = 3;
+return v;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ compound="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><TD PORT="p2">$Vec2D_x</TD><TD PORT="p3">$Vec2D_y</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ New8 [ label="new Vec2D" ];
+ Con_9 [ label="#0" ];
+ Store10 [ label="Store" ];
+ Store11 [ label="Store" ];
+ Con_12 [ label="#1" ];
+ Store13 [ label="Store" ];
+ If14 [ 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_18 [ label="#2" ];
+ Store19 [ label="Store" ];
+ Con_20 [ label="#3" ];
+ Store21 [ label="Store" ];
+ Region22 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_Vec2D_y23 [ style=filled fillcolor=lightyellow label="&phi;_$Vec2D_y" ];
+ Return24 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ { rank=same; Region22;Phi_Vec2D_y23;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Stop3 -> Return24[taillabel=0 color=red];
+ New8 -> Start2:p0[taillabel=0 color=green];
+ Store10 -> Start2:p2[taillabel=1];
+ Store10 -> New8[taillabel=2];
+ Store10 -> Con_9[taillabel=3];
+ Store11 -> Start2:p3[taillabel=1];
+ Store11 -> New8[taillabel=2];
+ Store11 -> Con_9[taillabel=3];
+ Store13 -> Store10[taillabel=1];
+ Store13 -> New8[taillabel=2];
+ Store13 -> Con_12[taillabel=3];
+ If14 -> Start2:p0[taillabel=0 color=red];
+ If14 -> Start2:p1[taillabel=1];
+ Store19 -> Store11[taillabel=1];
+ Store19 -> New8[taillabel=2];
+ Store19 -> Con_18[taillabel=3];
+ Store21 -> Store11[taillabel=1];
+ Store21 -> New8[taillabel=2];
+ Store21 -> Con_20[taillabel=3];
+ Region22 -> If14:p0[taillabel=1 color=red];
+ Region22 -> If14:p1[taillabel=2 color=red];
+ Phi_Vec2D_y23 -> Region22 [style=dotted taillabel=0];
+ Phi_Vec2D_y23 -> Store19[taillabel=1];
+ Phi_Vec2D_y23 -> Store21[taillabel=2 constraint=false];
+ Return24 -> Region22[taillabel=0 color=red];
+ Return24 -> New8[taillabel=1];
+ Return24 -> Store13[taillabel=2];
+ Return24 -> Phi_Vec2D_y23[taillabel=3];
+}