From e4dc3273f201ae741637b626998637cce973546b Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 2 Oct 2026 13:04:34 -0700 Subject: First pass README updates --- chapter08/docs/08-graph1.json | 39 +++ chapter08/docs/08-graph1.svg | 533 +++++++++++++-------------------------- chapter08/docs/08-graph2.json | 39 +++ chapter08/docs/08-graph2.svg | 501 +++++++++++++------------------------ chapter08/docs/08-graph3.json | 40 +++ chapter08/docs/08-graph3.svg | 565 +++++++++++++----------------------------- chapter08/docs/Makefile | 13 +- 7 files changed, 641 insertions(+), 1089 deletions(-) create mode 100644 chapter08/docs/08-graph1.json create mode 100644 chapter08/docs/08-graph2.json create mode 100644 chapter08/docs/08-graph3.json (limited to 'chapter08/docs') diff --git a/chapter08/docs/08-graph1.json b/chapter08/docs/08-graph1.json new file mode 100644 index 00000000..130a79bd --- /dev/null +++ b/chapter08/docs/08-graph1.json @@ -0,0 +1,39 @@ +{ + "ver": 1, + "comp": "chapter08/docs/08-graph1.svg", + "step": 1, + "roots": [], + "scope": 0, + "nodes": [ + {"id": 1, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, + {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, + {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 40, "role": "CTRL", "label": null}], "proj": null}, + {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 1}}, + {"id": 5, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 0}}, + {"id": 6, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 1, "role": "CTRL", "label": null}, {"idx": 2, "def": 39, "role": "CTRL", "label": null}], "proj": null}, + {"id": 7, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 1}}, + {"id": 8, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 6, "role": "ASSOC", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 9, "label": "10", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 10, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 11, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 6, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "DATA", "label": null}], "proj": null}, + {"id": 12, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 0}}, + {"id": 13, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 1}}, + {"id": 14, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 28, "role": "CTRL", "label": null}], "proj": {"par": 28, "idx": 0}}, + {"id": 15, "label": "1", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 16, "label": "+", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 15, "role": "DATA", "label": null}], "proj": null}, + {"id": 17, "label": "5", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 18, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 17, "role": "DATA", "label": null}], "proj": null}, + {"id": 19, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 18, "role": "DATA", "label": null}], "proj": null}, + {"id": 20, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 28, "role": "CTRL", "label": null}], "proj": {"par": 28, "idx": 1}}, + {"id": 26, "label": "6", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 27, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 26, "role": "DATA", "label": null}], "proj": null}, + {"id": 28, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 13, "role": "CTRL", "label": null}, {"idx": 1, "def": 27, "role": "DATA", "label": null}], "proj": null}, + {"id": 34, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 7, "role": "CTRL", "label": null}, {"idx": 2, "def": 14, "role": "CTRL", "label": null}], "proj": null}, + {"id": 35, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 34, "role": "ASSOC", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 39, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 12, "role": "CTRL", "label": null}, {"idx": 2, "def": 20, "role": "CTRL", "label": null}], "proj": null}, + {"id": 40, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 34, "role": "CTRL", "label": null}, {"idx": 1, "def": 35, "role": "DATA", "label": null}], "proj": null} + ], + "groups": [ + {"id": 6, "par": 0, "nodes": [5, 6, 7, 8, 10, 11, 12, 13, 14, 18, 19, 20, 27, 28, 39]} + ] +} diff --git a/chapter08/docs/08-graph1.svg b/chapter08/docs/08-graph1.svg index 0f23a746..67630205 100644 --- a/chapter08/docs/08-graph1.svg +++ b/chapter08/docs/08-graph1.svg @@ -1,359 +1,174 @@ - - - - - - -chapter08 - - -cluster_Nodes - - - - -Start2 - - -Start - - - -$ctrl - -arg - - - -Stop3 - -Stop - - - -Return40 - -Return - - - -Stop3->Return40 - - -0 - - - -Loop6 - -Loop - - - -Loop6->Start2:p0 - - -1 - - - -Region39 - -Region - - - -Loop6->Region39 - - -2 - - - -Phi_arg8 - -φ_arg - - - -Phi_arg8->Start2:p1 - - -1 - - - -Phi_arg8->Loop6 - - -0 - - - -Add16 - -+ - - - -Con_9 - -10 - - - -LT10 - -< - - - -LT10->Phi_arg8 - - -1 - - - -LT10->Con_9 - - -2 - - - -If11 - - -If - - - -True - - -False - - - -If11->Loop6 - - -0 - - - -If11->LT10 - - -1 - - - -Con_15 - -1 - - - -Add16->Phi_arg8 - - - -1 - - - -Add16->Con_15 - - -2 - - - -Con_17 - -5 - - - -EQ18 - -== - - - -EQ18->Add16 - - -1 - - - -EQ18->Con_17 - - -2 - - - -If19 - - -If - - - -True - - -False - - - -If19->If11:p0 - - -0 - - - -If19->EQ18 - - -1 - - - -Con_26 - -6 - - - -EQ27 - -== - - - -EQ27->Add16 - - - -1 - - - -EQ27->Con_26 - - -2 - - - -If28 - - -If - - - -True - - -False - - - -If28->If19:p1 - - -0 - - - -If28->EQ27 - - -1 - - - -Region34 - -Region - - - -Region34->If11:p1 - - -1 - - - -Region34->If28:p0 - - -2 - - - -Phi_arg35 - -φ_arg - - - -Phi_arg35->Phi_arg8 - - -1 - - - -Phi_arg35->Add16 - -2 - - - -Phi_arg35->Region34 - - -0 - - - -Region39->If19:p0 - - -1 - - - -Region39->If28:p1 - - -2 - - - -Return40->Region34 - - -0 - - - -Return40->Phi_arg35 - - -1 - - - +#3[0] → #40 · CTRL#6[1] → #1 · CTRL#6[2] → #39 · CTRL#8[1] → #4 · DATA#8[2] → #16 · DATA#10[1] → #8 · DATA#10[2] → #9 · DATA#11[0] → #6 · CTRL#11[1] → #10 · DATA#16[1] → #8 · DATA#16[2] → #15 · DATA#18[1] → #16 · DATA#18[2] → #17 · DATA#19[0] → #5 · CTRL#19[1] → #18 · DATA#27[1] → #16 · DATA#27[2] → #26 · DATA#28[0] → #13 · CTRL#28[1] → #27 · DATA#34[1] → #7 · CTRL#34[2] → #14 · CTRL#35[1] → #8 · DATA#35[2] → #16 · DATA#39[1] → #12 · CTRL#39[2] → #20 · CTRL#40[0] → #34 · CTRL#40[1] → #35 · DATA$ctrl  #1/0#1 $ctrl +Projection 0 of #2 +Type not computed + +[0] → #2 CTRLStart  #2#2 Start +Type not computed + +Stop  #3#3 Stop +Type not computed + +[0] → #40 CTRL0arg  #4/1#4 arg +Projection 1 of #2 +Type not computed + +[0] → #2 DATATrue  #5/0#5 True +Projection 0 of #11 +Type not computed + +[0] → #11 CTRLLoop  #6#6 Loop +Type not computed + +[0] → — DATA +[1] → #1 CTRL +[2] → #39 CTRL012False  #7/1#7 False +Projection 1 of #11 +Type not computed + +[0] → #11 CTRLφ_arg  #8#8 φ_arg +Type not computed + +[0] → #6 ASSOC +[1] → #4 DATA +[2] → #16 DATA[0] → #601210  #9#9 10 +Type not computed + +<  #10#10 < +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #9 DATA012If  #11#11 If +Type not computed + +[0] → #6 CTRL +[1] → #10 DATA01True  #12/0#12 True +Projection 0 of #19 +Type not computed + +[0] → #19 CTRLFalse  #13/1#13 False +Projection 1 of #19 +Type not computed + +[0] → #19 CTRLTrue  #14/0#14 True +Projection 0 of #28 +Type not computed + +[0] → #28 CTRL1  #15#15 1 +Type not computed + ++  #16#16 + +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #15 DATA0125  #17#17 5 +Type not computed + +==  #18#18 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #17 DATA012If  #19#19 If +Type not computed + +[0] → #5 CTRL +[1] → #18 DATA01False  #20/1#20 False +Projection 1 of #28 +Type not computed + +[0] → #28 CTRL6  #26#26 6 +Type not computed + +==  #27#27 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #26 DATA012If  #28#28 If +Type not computed + +[0] → #13 CTRL +[1] → #27 DATA01Region  #34#34 Region +Type not computed + +[0] → — DATA +[1] → #7 CTRL +[2] → #14 CTRL012φ_arg  #35#35 φ_arg +Type not computed + +[0] → #34 ASSOC +[1] → #8 DATA +[2] → #16 DATA[0] → #34012Region  #39#39 Region +Type not computed + +[0] → — DATA +[1] → #12 CTRL +[2] → #20 CTRL012Return  #40#40 Return +Type not computed + +[0] → #34 CTRL +[1] → #35 DATA01Loop  #6Loop · 15 nodes−Fold region diff --git a/chapter08/docs/08-graph2.json b/chapter08/docs/08-graph2.json new file mode 100644 index 00000000..6f25aaad --- /dev/null +++ b/chapter08/docs/08-graph2.json @@ -0,0 +1,39 @@ +{ + "ver": 1, + "comp": "chapter08/docs/08-graph2.svg", + "step": 1, + "roots": [], + "scope": 0, + "nodes": [ + {"id": 1, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, + {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, + {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 39, "role": "CTRL", "label": null}], "proj": null}, + {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 1}}, + {"id": 5, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 0}}, + {"id": 6, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 1, "role": "CTRL", "label": null}, {"idx": 2, "def": 38, "role": "CTRL", "label": null}], "proj": null}, + {"id": 7, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 1}}, + {"id": 8, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 6, "role": "ASSOC", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 9, "label": "10", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 10, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 11, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 6, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "DATA", "label": null}], "proj": null}, + {"id": 12, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 0}}, + {"id": 13, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 1}}, + {"id": 14, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 28, "role": "CTRL", "label": null}], "proj": {"par": 28, "idx": 0}}, + {"id": 15, "label": "1", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 16, "label": "+", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 15, "role": "DATA", "label": null}], "proj": null}, + {"id": 17, "label": "5", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 18, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 17, "role": "DATA", "label": null}], "proj": null}, + {"id": 19, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 18, "role": "DATA", "label": null}], "proj": null}, + {"id": 20, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 28, "role": "CTRL", "label": null}], "proj": {"par": 28, "idx": 1}}, + {"id": 26, "label": "6", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 27, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 26, "role": "DATA", "label": null}], "proj": null}, + {"id": 28, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 13, "role": "CTRL", "label": null}, {"idx": 1, "def": 27, "role": "DATA", "label": null}], "proj": null}, + {"id": 34, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 12, "role": "CTRL", "label": null}, {"idx": 2, "def": 14, "role": "CTRL", "label": null}], "proj": null}, + {"id": 38, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 34, "role": "CTRL", "label": null}, {"idx": 2, "def": 20, "role": "CTRL", "label": null}], "proj": null}, + {"id": 39, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 7, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}], "proj": null} + ], + "groups": [ + {"id": 6, "par": 0, "nodes": [5, 6, 7, 8, 10, 11, 16]}, + {"id": 19, "par": 6, "nodes": [12, 13, 14, 18, 19, 20, 27, 28, 34, 38]} + ] +} diff --git a/chapter08/docs/08-graph2.svg b/chapter08/docs/08-graph2.svg index 1f497470..be8bd367 100644 --- a/chapter08/docs/08-graph2.svg +++ b/chapter08/docs/08-graph2.svg @@ -1,332 +1,169 @@ - - - - - - -chapter08 - - -cluster_Nodes - - - - -Start2 - - -Start - - - -$ctrl - -arg - - - -Stop3 - -Stop - - - -Return39 - -Return - - - -Stop3->Return39 - - -0 - - - -Loop6 - -Loop - - - -Loop6->Start2:p0 - - -1 - - - -Region38 - -Region - - - -Loop6->Region38 - - -2 - - - -Phi_arg8 - -φ_arg - - - -Phi_arg8->Start2:p1 - - -1 - - - -Phi_arg8->Loop6 - - -0 - - - -Add16 - -+ - - - -Con_9 - -10 - - - -LT10 - -< - - - -LT10->Phi_arg8 - - -1 - - - -LT10->Con_9 - - -2 - - - -If11 - - -If - - - -True - - -False - - - -If11->Loop6 - - -0 - - - -If11->LT10 - - -1 - - - -Con_15 - -1 - - - -Add16->Phi_arg8 - - - -1 - - - -Add16->Con_15 - - -2 - - - -Con_17 - -5 - - - -EQ18 - -== - - - -EQ18->Add16 - - -1 - - - -EQ18->Con_17 - - -2 - - - -If19 - - -If - - - -True - - -False - - - -If19->If11:p0 - - -0 - - - -If19->EQ18 - - -1 - - - -Con_26 - -6 - - - -EQ27 - -== - - - -EQ27->Add16 - - -1 - - - -EQ27->Con_26 - - -2 - - - -If28 - - -If - - - -True - - -False - - - -If28->If19:p1 - - -0 - - - -If28->EQ27 - - -1 - - - -Region34 - -Region - - - -Region34->If19:p0 - - -1 - - - -Region34->If28:p0 - - -2 - - - -Region38->If28:p1 - - -2 - - - -Region38->Region34 - - -1 - - - -Return39->Phi_arg8 - - -1 - - - -Return39->If11:p1 - - -0 - - - +#3[0] → #39 · CTRL#6[1] → #1 · CTRL#6[2] → #38 · CTRL#8[1] → #4 · DATA#8[2] → #16 · DATA#10[1] → #8 · DATA#10[2] → #9 · DATA#11[0] → #6 · CTRL#11[1] → #10 · DATA#16[1] → #8 · DATA#16[2] → #15 · DATA#18[1] → #16 · DATA#18[2] → #17 · DATA#19[0] → #5 · CTRL#19[1] → #18 · DATA#27[1] → #16 · DATA#27[2] → #26 · DATA#28[0] → #13 · CTRL#28[1] → #27 · DATA#34[1] → #12 · CTRL#34[2] → #14 · CTRL#38[1] → #34 · CTRL#38[2] → #20 · CTRL#39[0] → #7 · CTRL#39[1] → #8 · DATA$ctrl  #1/0#1 $ctrl +Projection 0 of #2 +Type not computed + +[0] → #2 CTRLStart  #2#2 Start +Type not computed + +Stop  #3#3 Stop +Type not computed + +[0] → #39 CTRL0arg  #4/1#4 arg +Projection 1 of #2 +Type not computed + +[0] → #2 DATATrue  #5/0#5 True +Projection 0 of #11 +Type not computed + +[0] → #11 CTRLLoop  #6#6 Loop +Type not computed + +[0] → — DATA +[1] → #1 CTRL +[2] → #38 CTRL012False  #7/1#7 False +Projection 1 of #11 +Type not computed + +[0] → #11 CTRLφ_arg  #8#8 φ_arg +Type not computed + +[0] → #6 ASSOC +[1] → #4 DATA +[2] → #16 DATA[0] → #601210  #9#9 10 +Type not computed + +<  #10#10 < +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #9 DATA012If  #11#11 If +Type not computed + +[0] → #6 CTRL +[1] → #10 DATA01True  #12/0#12 True +Projection 0 of #19 +Type not computed + +[0] → #19 CTRLFalse  #13/1#13 False +Projection 1 of #19 +Type not computed + +[0] → #19 CTRLTrue  #14/0#14 True +Projection 0 of #28 +Type not computed + +[0] → #28 CTRL1  #15#15 1 +Type not computed + ++  #16#16 + +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #15 DATA0125  #17#17 5 +Type not computed + +==  #18#18 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #17 DATA012If  #19#19 If +Type not computed + +[0] → #5 CTRL +[1] → #18 DATA01False  #20/1#20 False +Projection 1 of #28 +Type not computed + +[0] → #28 CTRL6  #26#26 6 +Type not computed + +==  #27#27 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #26 DATA012If  #28#28 If +Type not computed + +[0] → #13 CTRL +[1] → #27 DATA01Region  #34#34 Region +Type not computed + +[0] → — DATA +[1] → #12 CTRL +[2] → #14 CTRL012Region  #38#38 Region +Type not computed + +[0] → — DATA +[1] → #34 CTRL +[2] → #20 CTRL012Return  #39#39 Return +Type not computed + +[0] → #7 CTRL +[1] → #8 DATA01Loop  #6Loop · 17 nodes−Fold regionIf  #19If · 10 nodes−Fold region diff --git a/chapter08/docs/08-graph3.json b/chapter08/docs/08-graph3.json new file mode 100644 index 00000000..a795c51d --- /dev/null +++ b/chapter08/docs/08-graph3.json @@ -0,0 +1,40 @@ +{ + "ver": 1, + "comp": "chapter08/docs/08-graph3.svg", + "step": 1, + "roots": [], + "scope": 0, + "nodes": [ + {"id": 1, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, + {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, + {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 39, "role": "CTRL", "label": null}], "proj": null}, + {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 1}}, + {"id": 5, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 0}}, + {"id": 6, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 1, "role": "CTRL", "label": null}, {"idx": 2, "def": 20, "role": "CTRL", "label": null}], "proj": null}, + {"id": 7, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}], "proj": {"par": 11, "idx": 1}}, + {"id": 8, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 6, "role": "ASSOC", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 9, "label": "10", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 10, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 11, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 6, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "DATA", "label": null}], "proj": null}, + {"id": 12, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 0}}, + {"id": 13, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 19, "role": "CTRL", "label": null}], "proj": {"par": 19, "idx": 1}}, + {"id": 14, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 30, "role": "CTRL", "label": null}], "proj": {"par": 30, "idx": 0}}, + {"id": 15, "label": "1", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 16, "label": "+", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 15, "role": "DATA", "label": null}], "proj": null}, + {"id": 17, "label": "5", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 18, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 17, "role": "DATA", "label": null}], "proj": null}, + {"id": 19, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 18, "role": "DATA", "label": null}], "proj": null}, + {"id": 20, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 30, "role": "CTRL", "label": null}], "proj": {"par": 30, "idx": 1}}, + {"id": 25, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 7, "role": "CTRL", "label": null}, {"idx": 2, "def": 12, "role": "CTRL", "label": null}], "proj": null}, + {"id": 26, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 25, "role": "ASSOC", "label": null}, {"idx": 1, "def": 8, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 28, "label": "6", "type": null, "kind": "DATA", "edges": [], "proj": null}, + {"id": 29, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 16, "role": "DATA", "label": null}, {"idx": 2, "def": 28, "role": "DATA", "label": null}], "proj": null}, + {"id": 30, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 13, "role": "CTRL", "label": null}, {"idx": 1, "def": 29, "role": "DATA", "label": null}], "proj": null}, + {"id": 36, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 25, "role": "CTRL", "label": null}, {"idx": 2, "def": 14, "role": "CTRL", "label": null}], "proj": null}, + {"id": 37, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 36, "role": "ASSOC", "label": null}, {"idx": 1, "def": 26, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 39, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 36, "role": "CTRL", "label": null}, {"idx": 1, "def": 37, "role": "DATA", "label": null}], "proj": null} + ], + "groups": [ + {"id": 6, "par": 0, "nodes": [5, 6, 7, 8, 10, 11, 12, 13, 14, 18, 19, 20, 29, 30]} + ] +} diff --git a/chapter08/docs/08-graph3.svg b/chapter08/docs/08-graph3.svg index 12aafcc5..d2c78bc5 100644 --- a/chapter08/docs/08-graph3.svg +++ b/chapter08/docs/08-graph3.svg @@ -1,386 +1,179 @@ - - - - - - -chapter08 - - -cluster_Nodes - - - - -Start2 - - -Start - - - -$ctrl - -arg - - - -Stop3 - -Stop - - - -Return39 - -Return - - - -Stop3->Return39 - - -0 - - - -Loop6 - -Loop - - - -Loop6->Start2:p0 - - -1 - - - -If30 - - -If - - - -True - - -False - - - -Loop6->If30:p1 - - -2 - - - -Phi_arg8 - -φ_arg - - - -Phi_arg8->Start2:p1 - - -1 - - - -Phi_arg8->Loop6 - - -0 - - - -Add16 - -+ - - - -Con_9 - -10 - - - -LT10 - -< - - - -LT10->Phi_arg8 - - -1 - - - -LT10->Con_9 - - -2 - - - -If11 - - -If - - - -True - - -False - - - -If11->Loop6 - - -0 - - - -If11->LT10 - - -1 - - - -Con_15 - -1 - - - -Add16->Phi_arg8 - - - -1 - - - -Add16->Con_15 - - -2 - - - -Con_17 - -5 - - - -EQ18 - -== - - - -EQ18->Add16 - - -1 - - - -EQ18->Con_17 - - -2 - - - -If19 - - -If - - - -True - - -False - - - -If19->If11:p0 - - -0 - - - -If19->EQ18 - - -1 - - - -Region25 - -Region - - - -Region25->If11:p1 - - -1 - - - -Region25->If19:p0 - - -2 - - - -Phi_arg26 - -φ_arg - - - -Phi_arg26->Phi_arg8 - - -1 - - - -Phi_arg26->Add16 - - -2 - - - -Phi_arg26->Region25 - - -0 - - - -Con_28 - -6 - - - -EQ29 - -== - - - -EQ29->Add16 - - -1 - - - -EQ29->Con_28 - - -2 - - - -If30->If19:p1 - - -0 - - - -If30->EQ29 - - -1 - - - -Region36 - -Region - - - -Region36->Region25 - - -1 - - - -Region36->If30:p0 - - -2 - - - -Phi_arg37 - -φ_arg - - - -Phi_arg37->Add16 - - -2 - - - -Phi_arg37->Phi_arg26 - - -1 - - - -Phi_arg37->Region36 - - -0 - - - -Return39->Region36 - - -0 - - - -Return39->Phi_arg37 - - -1 - - - +#3[0] → #39 · CTRL#6[1] → #1 · CTRL#6[2] → #20 · CTRL#8[1] → #4 · DATA#8[2] → #16 · DATA#10[1] → #8 · DATA#10[2] → #9 · DATA#11[0] → #6 · CTRL#11[1] → #10 · DATA#16[1] → #8 · DATA#16[2] → #15 · DATA#18[1] → #16 · DATA#18[2] → #17 · DATA#19[0] → #5 · CTRL#19[1] → #18 · DATA#25[1] → #7 · CTRL#25[2] → #12 · CTRL#26[1] → #8 · DATA#26[2] → #16 · DATA#29[1] → #16 · DATA#29[2] → #28 · DATA#30[0] → #13 · CTRL#30[1] → #29 · DATA#36[1] → #25 · CTRL#36[2] → #14 · CTRL#37[1] → #26 · DATA#37[2] → #16 · DATA#39[0] → #36 · CTRL#39[1] → #37 · DATA$ctrl  #1/0#1 $ctrl +Projection 0 of #2 +Type not computed + +[0] → #2 CTRLStart  #2#2 Start +Type not computed + +Stop  #3#3 Stop +Type not computed + +[0] → #39 CTRL0arg  #4/1#4 arg +Projection 1 of #2 +Type not computed + +[0] → #2 DATATrue  #5/0#5 True +Projection 0 of #11 +Type not computed + +[0] → #11 CTRLLoop  #6#6 Loop +Type not computed + +[0] → — DATA +[1] → #1 CTRL +[2] → #20 CTRL012False  #7/1#7 False +Projection 1 of #11 +Type not computed + +[0] → #11 CTRLφ_arg  #8#8 φ_arg +Type not computed + +[0] → #6 ASSOC +[1] → #4 DATA +[2] → #16 DATA[0] → #601210  #9#9 10 +Type not computed + +<  #10#10 < +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #9 DATA012If  #11#11 If +Type not computed + +[0] → #6 CTRL +[1] → #10 DATA01True  #12/0#12 True +Projection 0 of #19 +Type not computed + +[0] → #19 CTRLFalse  #13/1#13 False +Projection 1 of #19 +Type not computed + +[0] → #19 CTRLTrue  #14/0#14 True +Projection 0 of #30 +Type not computed + +[0] → #30 CTRL1  #15#15 1 +Type not computed + ++  #16#16 + +Type not computed + +[0] → — DATA +[1] → #8 DATA +[2] → #15 DATA0125  #17#17 5 +Type not computed + +==  #18#18 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #17 DATA012If  #19#19 If +Type not computed + +[0] → #5 CTRL +[1] → #18 DATA01False  #20/1#20 False +Projection 1 of #30 +Type not computed + +[0] → #30 CTRLRegion  #25#25 Region +Type not computed + +[0] → — DATA +[1] → #7 CTRL +[2] → #12 CTRL012φ_arg  #26#26 φ_arg +Type not computed + +[0] → #25 ASSOC +[1] → #8 DATA +[2] → #16 DATA[0] → #250126  #28#28 6 +Type not computed + +==  #29#29 == +Type not computed + +[0] → — DATA +[1] → #16 DATA +[2] → #28 DATA012If  #30#30 If +Type not computed + +[0] → #13 CTRL +[1] → #29 DATA01Region  #36#36 Region +Type not computed + +[0] → — DATA +[1] → #25 CTRL +[2] → #14 CTRL012φ_arg  #37#37 φ_arg +Type not computed + +[0] → #36 ASSOC +[1] → #26 DATA +[2] → #16 DATA[0] → #36012Return  #39#39 Return +Type not computed + +[0] → #36 CTRL +[1] → #37 DATA01Loop  #6Loop · 14 nodes−Fold region diff --git a/chapter08/docs/Makefile b/chapter08/docs/Makefile index 12659b8f..6fa0f057 100644 --- a/chapter08/docs/Makefile +++ b/chapter08/docs/Makefile @@ -1,12 +1 @@ -GV := $(wildcard *.gv) -SVG := $(patsubst %.gv,%.svg,$(GV)) - -.PHONY: all -all: $(SVG) - -%.svg: %.gv - dot -Tsvg $< > $@ - -.PHONY: clean -clean: - @rm -f $(SVG) +include ../../graph/docs.mk -- cgit v1.2.3