From 41ae6269689e2b3cde9f7ac4227923d4085dceda Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 2 Oct 2026 16:21:02 -0700 Subject: More better layout ch10a,b,11 --- chapter11/docs/graph1.json | 18 ++----- chapter11/docs/graph1.svg | 64 +++++++---------------- chapter11/docs/graph2.json | 28 ++++------ chapter11/docs/graph2.svg | 74 +++++++++------------------ chapter11/docs/graph3-snip.json | 13 ++--- chapter11/docs/graph3-snip.svg | 31 ++++------- chapter11/docs/graph3.json | 27 ++++------ chapter11/docs/graph3.svg | 72 +++++++++----------------- chapter11/docs/graph4.json | 28 ++-------- chapter11/docs/graph4.svg | 103 +++++++------------------------------ chapter11/docs/graph5.json | 36 ++++--------- chapter11/docs/graph5.svg | 111 ++++++++-------------------------------- chapter11/docs/graph6.json | 35 ++++--------- chapter11/docs/graph6.svg | 109 +++++++++------------------------------ chapter11/docs/graph7.svg | 2 +- chapter11/docs/graph8.svg | 2 +- 16 files changed, 193 insertions(+), 560 deletions(-) (limited to 'chapter11/docs') diff --git a/chapter11/docs/graph1.json b/chapter11/docs/graph1.json index 748bdae9..2d58e0ba 100644 --- a/chapter11/docs/graph1.json +++ b/chapter11/docs/graph1.json @@ -2,32 +2,24 @@ "ver": 1, "comp": "chapter11/docs/graph1.svg", "step": 1, - "roots": [], + "roots": [25], "scope": 0, "nodes": [ {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 224, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, - {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 1}}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 11, "label": "#2", "type": null, "kind": "DATA", "edges": [], "proj": null}, {"id": 12, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, - {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, + {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}], "proj": null}, {"id": 21, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, {"id": 22, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 23, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "CTRL", "label": null}, {"idx": 2, "def": 10, "role": "CTRL", "label": null}], "proj": null}, - {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 23, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, - {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 23, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} + {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 17, "par": 0, "nodes": [8, 10, 17, 22, 23, 224]} ] } diff --git a/chapter11/docs/graph1.svg b/chapter11/docs/graph1.svg index ef4d0293..93a2a03f 100644 --- a/chapter11/docs/graph1.svg +++ b/chapter11/docs/graph1.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #224 · MEM#12[1] → #6 · MEM#12[2] → #9 · DATA#12[3] → #11 · DATA#14[1] → #12 · MEM#14[2] → #13 · DATA#14[3] → #4 · DATA#16[1] → #14 · MEM#16[2] → #9 · DATA#22[1] → #14 · MEM#22[2] → #9 · DATA#22[3] → #21 · DATA#25[1] → #1 · MEM#25[2] → #16 · DATA#224[1] → #22 · MEM#224[2] → #14 · MEMMemMerge  #1#1 MemMerge Type not computed [0] → — DATA [1] → #6 MEM -[2] → #224 MEM012Start  #2#2 Start +[2] → #224 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #25 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg -Projection 2 of #2 -Type not computed - -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #17 -Type not computed - -[0] → #17 CTRLnew S  #9#9 new S +[0] → #2 MEMnew S  #9#9 new S Type not computed -[0] → #5 CTRL0False  #10/1#10 False -Projection 1 of #17 +[0] → — CTRL0#2  #11#11 #2 Type not computed -[0] → #17 CTRL#2  #11#11 #2 -Type not computed - -.f =  #12#12 .f = +.f =  #12#12 .f = Type not computed [0] → — DATA [1] → #6 MEM [2] → #9 DATA -[3] → #11 DATA0123new S  #13#13 new S +[3] → #11 DATA0123new S  #13#13 new S Type not computed -[0] → #5 CTRL0.f =  #14#14 .f = +[0] → — CTRL0.f =  #14#14 .f = Type not computed [0] → — DATA [1] → #12 MEM [2] → #13 DATA -[3] → #4 DATA0123.f  #16#16 .f +[3] → #4 DATA0123.f  #16#16 .f Type not computed [0] → — DATA [1] → #14 MEM -[2] → #9 DATA012If  #17#17 If -Type not computed - -[0] → #5 CTRL -[1] → #7 DATA01#1  #21#21 #1 +[2] → #9 DATA012#1  #21#21 #1 Type not computed -.f =  #22#22 .f = +.f =  #22#22 .f = Type not computed [0] → — DATA [1] → #14 MEM [2] → #9 DATA -[3] → #21 DATA0123Region  #23#23 Region -Type not computed - -[0] → — DATA -[1] → #8 CTRL -[2] → #10 CTRL012Return  #25#25 Return +[3] → #21 DATA0123Return  #25#25 Return Type not computed -[0] → #23 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 +[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 Type not computed -[0] → #23 ASSOC +[0] → — ASSOC [1] → #22 MEM -[2] → #14 MEM[0] → #23012If  #17If · 6 nodes−Fold region +[2] → #14 MEM012 diff --git a/chapter11/docs/graph2.json b/chapter11/docs/graph2.json index 7c50307d..602c1584 100644 --- a/chapter11/docs/graph2.json +++ b/chapter11/docs/graph2.json @@ -2,32 +2,24 @@ "ver": 1, "comp": "chapter11/docs/graph2.svg", "step": 1, - "roots": [], + "roots": [25], "scope": 0, "nodes": [ - {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 23, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 224, "role": "MEM", "label": null}], "proj": null}, + {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 224, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, - {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 1}}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 11, "label": "#2", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 12, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, - {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}], "proj": null}, + {"id": 12, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, + {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, + {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, + {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, {"id": 21, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 22, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 23, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "CTRL", "label": null}, {"idx": 2, "def": 10, "role": "CTRL", "label": null}], "proj": null}, - {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 23, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, - {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 23, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} + {"id": 22, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, + {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 17, "par": 0, "nodes": [1, 8, 10, 17, 23, 224]} ] } diff --git a/chapter11/docs/graph2.svg b/chapter11/docs/graph2.svg index a3afd14f..05210749 100644 --- a/chapter11/docs/graph2.svg +++ b/chapter11/docs/graph2.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #224 · MEM#12[1] → #6 · MEM#12[2] → #9 · DATA#12[3] → #11 · DATA#14[1] → #12 · MEM#14[2] → #13 · DATA#14[3] → #4 · DATA#16[1] → #14 · MEM#16[2] → #9 · DATA#22[1] → #14 · MEM#22[2] → #9 · DATA#22[3] → #21 · DATA#25[1] → #1 · MEM#25[2] → #16 · DATA#224[1] → #22 · MEM#224[2] → #14 · MEMMemMerge  #1#1 MemMerge Type not computed -[0] → #23 CTRL +[0] → — CTRL [1] → #6 MEM -[2] → #224 MEM012Start  #2#2 Start +[2] → #224 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #25 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg -Projection 2 of #2 -Type not computed - -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #17 -Type not computed - -[0] → #17 CTRLnew S  #9#9 new S -Type not computed - -[0] → #5 CTRL0False  #10/1#10 False -Projection 1 of #17 +[0] → #2 MEMnew S  #9#9 new S Type not computed -[0] → #17 CTRL#2  #11#11 #2 +[0] → — CTRL0#2  #11#11 #2 Type not computed -.f =  #12#12 .f = +.f =  #12#12 .f = Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #6 MEM [2] → #9 DATA -[3] → #11 DATA0123new S  #13#13 new S +[3] → #11 DATA0123new S  #13#13 new S Type not computed -[0] → #5 CTRL0.f =  #14#14 .f = +[0] → — CTRL0.f =  #14#14 .f = Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #12 MEM [2] → #13 DATA -[3] → #4 DATA0123.f  #16#16 .f +[3] → #4 DATA0123.f  #16#16 .f Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #14 MEM -[2] → #9 DATA012If  #17#17 If +[2] → #9 DATA012#1  #21#21 #1 Type not computed -[0] → #5 CTRL -[1] → #7 DATA01#1  #21#21 #1 +.f =  #22#22 .f = Type not computed -.f =  #22#22 .f = -Type not computed - -[0] → #5 CTRL +[0] → — CTRL [1] → #14 MEM [2] → #9 DATA -[3] → #21 DATA0123Region  #23#23 Region -Type not computed - -[0] → — DATA -[1] → #8 CTRL -[2] → #10 CTRL012Return  #25#25 Return +[3] → #21 DATA0123Return  #25#25 Return Type not computed -[0] → #23 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 +[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 Type not computed -[0] → #23 ASSOC +[0] → — ASSOC [1] → #22 MEM -[2] → #14 MEM[0] → #23012If  #17If · 6 nodes−Fold region +[2] → #14 MEM012 diff --git a/chapter11/docs/graph3-snip.json b/chapter11/docs/graph3-snip.json index 00b3e744..7dade538 100644 --- a/chapter11/docs/graph3-snip.json +++ b/chapter11/docs/graph3-snip.json @@ -2,16 +2,13 @@ "ver": 1, "comp": "chapter11/docs/graph3-snip.svg", "step": 1, - "roots": [], + "roots": [22], "scope": 0, "nodes": [ - {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 0, "role": "MEM", "label": null}, {"idx": 2, "def": 0, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 0, "role": "DATA", "label": null}], "proj": null}, + {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, + {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 0, "role": "MEM", "label": null}, {"idx": 2, "def": 0, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, + {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, {"id": 21, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, {"id": 22, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}, {"idx": 4, "def": 16, "role": "DATA", "label": null}], "proj": null} ], diff --git a/chapter11/docs/graph3-snip.svg b/chapter11/docs/graph3-snip.svg index cf6420c5..9f5218af 100644 --- a/chapter11/docs/graph3-snip.svg +++ b/chapter11/docs/graph3-snip.svg @@ -1,4 +1,4 @@ -#16[1] → #14 · MEM#16[2] → #9 · DATA#22[0] → #8 · CTRL#22[1] → #14 · MEM#22[2] → #9 · DATA#22[3] → #21 · DATA#22[4] → #16 · DATATrue  #8/0#8 True +Projection 0 of #0 Type not computed -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 +new S  #9#9 new S Type not computed -[0] → #2 CTRLTrue  #8/0#8 True -Projection 0 of #17 +[0] → — CTRL0.f =  #14#14 .f = Type not computed -[0] → #17 CTRLnew S  #9#9 new S -Type not computed - -[0] → #5 CTRL0.f =  #14#14 .f = -Type not computed - -[0] → #5 CTRL +[0] → — CTRL [1] → — MEM [2] → — DATA -[3] → — DATA0123.f  #16#16 .f +[3] → — DATA0123.f  #16#16 .f Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #14 MEM -[2] → #9 DATA012If  #17#17 If -Type not computed - -[0] → #5 CTRL -[1] → — DATA01#1  #21#21 #1 +[2] → #9 DATA012#1  #21#21 #1 Type not computed -.f =  #22#22 .f = +.f =  #22#22 .f = Type not computed [0] → #8 CTRL diff --git a/chapter11/docs/graph3.json b/chapter11/docs/graph3.json index 998c6f87..577d7c3b 100644 --- a/chapter11/docs/graph3.json +++ b/chapter11/docs/graph3.json @@ -2,32 +2,25 @@ "ver": 1, "comp": "chapter11/docs/graph3.svg", "step": 1, - "roots": [], + "roots": [25], "scope": 0, "nodes": [ - {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 23, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 224, "role": "MEM", "label": null}], "proj": null}, + {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 224, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, - {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 17, "role": "CTRL", "label": null}], "proj": {"par": 17, "idx": 1}}, + {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 11, "label": "#2", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 12, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, - {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}], "proj": null}, + {"id": 12, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, + {"id": 13, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, + {"id": 14, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, + {"id": 16, "label": ".f", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, {"id": 21, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, {"id": 22, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}, {"idx": 4, "def": 16, "role": "DATA", "label": null}], "proj": null}, - {"id": 23, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 8, "role": "CTRL", "label": null}, {"idx": 2, "def": 10, "role": "CTRL", "label": null}], "proj": null}, - {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 23, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, - {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 23, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} + {"id": 25, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, + {"id": 224, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 17, "par": 0, "nodes": [1, 8, 10, 17, 22, 23, 224]} ] } diff --git a/chapter11/docs/graph3.svg b/chapter11/docs/graph3.svg index 6fe5fe73..0247b5c6 100644 --- a/chapter11/docs/graph3.svg +++ b/chapter11/docs/graph3.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #224 · MEM#12[1] → #6 · MEM#12[2] → #9 · DATA#12[3] → #11 · DATA#14[1] → #12 · MEM#14[2] → #13 · DATA#14[3] → #4 · DATA#16[1] → #14 · MEM#16[2] → #9 · DATA#22[0] → #8 · CTRL#22[1] → #14 · MEM#22[2] → #9 · DATA#22[3] → #21 · DATA#22[4] → #16 · DATA#25[1] → #1 · MEM#25[2] → #16 · DATA#224[1] → #22 · MEM#224[2] → #14 · MEMMemMerge  #1#1 MemMerge Type not computed -[0] → #23 CTRL +[0] → — CTRL [1] → #6 MEM -[2] → #224 MEM012Start  #2#2 Start +[2] → #224 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #25 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg -Projection 2 of #2 -Type not computed - -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #17 +[0] → #2 MEMTrue  #8/0#8 True +Projection 0 of #0 Type not computed -[0] → #17 CTRLnew S  #9#9 new S +new S  #9#9 new S Type not computed -[0] → #5 CTRL0False  #10/1#10 False -Projection 1 of #17 +[0] → — CTRL0#2  #11#11 #2 Type not computed -[0] → #17 CTRL#2  #11#11 #2 +.f =  #12#12 .f = Type not computed -.f =  #12#12 .f = -Type not computed - -[0] → #5 CTRL +[0] → — CTRL [1] → #6 MEM [2] → #9 DATA -[3] → #11 DATA0123new S  #13#13 new S +[3] → #11 DATA0123new S  #13#13 new S Type not computed -[0] → #5 CTRL0.f =  #14#14 .f = +[0] → — CTRL0.f =  #14#14 .f = Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #12 MEM [2] → #13 DATA -[3] → #4 DATA0123.f  #16#16 .f +[3] → #4 DATA0123.f  #16#16 .f Type not computed -[0] → #5 CTRL +[0] → — CTRL [1] → #14 MEM -[2] → #9 DATA012If  #17#17 If -Type not computed - -[0] → #5 CTRL -[1] → #7 DATA01#1  #21#21 #1 +[2] → #9 DATA012#1  #21#21 #1 Type not computed -.f =  #22#22 .f = +.f =  #22#22 .f = Type not computed [0] → #8 CTRL [1] → #14 MEM [2] → #9 DATA [3] → #21 DATA -[4] → #16 DATA01234Region  #23#23 Region -Type not computed - -[0] → — DATA -[1] → #8 CTRL -[2] → #10 CTRL012Return  #25#25 Return +[4] → #16 DATA01234Return  #25#25 Return Type not computed -[0] → #23 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 +[2] → #16 DATA012MemPhi_2  #224#224 MemPhi_2 Type not computed -[0] → #23 ASSOC +[0] → — ASSOC [1] → #22 MEM -[2] → #14 MEM[0] → #23012If  #17If · 7 nodes−Fold region +[2] → #14 MEM012 diff --git a/chapter11/docs/graph4.json b/chapter11/docs/graph4.json index b021c03f..44c1c055 100644 --- a/chapter11/docs/graph4.json +++ b/chapter11/docs/graph4.json @@ -2,41 +2,23 @@ "ver": 1, "comp": "chapter11/docs/graph4.svg", "step": 1, - "roots": [], + "roots": [37], "scope": 0, "nodes": [ {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 37, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 10, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 11, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 5, "role": "CTRL", "label": null}, {"idx": 2, "def": 32, "role": "CTRL", "label": null}], "proj": null}, - {"id": 12, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 1}}, - {"id": 13, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 35, "role": "DATA", "label": null}], "proj": null}, - {"id": 14, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}], "proj": null}, - {"id": 15, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 0}}, - {"id": 16, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 1}}, {"id": 21, "label": "//", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 22, "role": "DATA", "label": null}], "proj": null}, {"id": 22, "label": "#3", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 23, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 24, "role": "DATA", "label": null}], "proj": null}, - {"id": 24, "label": "#5", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 25, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 23, "role": "DATA", "label": null}], "proj": null}, {"id": 31, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 230, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 32, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 15, "role": "CTRL", "label": null}, {"idx": 2, "def": 17, "role": "CTRL", "label": null}], "proj": null}, - {"id": 35, "label": "-", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 36, "role": "DATA", "label": null}], "proj": null}, - {"id": 36, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, - {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 32, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} + {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, + {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 11, "par": 0, "nodes": [8, 10, 11, 12, 13, 14, 16, 35, 230]}, - {"id": 25, "par": 11, "nodes": [15, 17, 21, 23, 25, 31, 32, 233]} ] } diff --git a/chapter11/docs/graph4.svg b/chapter11/docs/graph4.svg index c268b4e9..9ca92879 100644 --- a/chapter11/docs/graph4.svg +++ b/chapter11/docs/graph4.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #230 · MEM#10[1] → #6 · MEM#10[2] → #9 · DATA#10[3] → #4 · DATA#21[1] → #7 · DATA#21[2] → #22 · DATA#31[1] → #230 · MEM#31[2] → #9 · DATA#31[3] → #21 · DATA#37[1] → #1 · MEM#37[2] → #9 · DATA#230[1] → #10 · MEM#230[2] → #233 · MEM#233[1] → #31 · MEM#233[2] → #230 · MEMMemMerge  #1#1 MemMerge Type not computed [0] → — DATA [1] → #6 MEM -[2] → #230 MEM012Start  #2#2 Start +[2] → #230 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #37 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg +[0] → #2 MEMarg  #7/2#7 arg Projection 2 of #2 Type not computed -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #16 -Type not computed - -[0] → #16 CTRLnew S  #9#9 new S +[0] → #2 DATAnew S  #9#9 new S Type not computed -[0] → #5 CTRL0.f =  #10#10 .f = +[0] → — CTRL0.f =  #10#10 .f = Type not computed [0] → — DATA [1] → #6 MEM [2] → #9 DATA -[3] → #4 DATA0123Loop  #11#11 Loop -Type not computed - -[0] → — DATA -[1] → #5 CTRL -[2] → #32 CTRL012False  #12/1#12 False -Projection 1 of #16 -Type not computed - -[0] → #16 CTRLφ_arg  #13#13 φ_arg -Type not computed - -[0] → #11 ASSOC -[1] → #7 DATA -[2] → #35 DATA[0] → #11012<  #14#14 < -Type not computed - -[0] → — DATA -[1] → #4 DATA -[2] → #13 DATA012True  #15/0#15 True -Projection 0 of #25 -Type not computed - -[0] → #25 CTRLIf  #16#16 If -Type not computed - -[0] → #11 CTRL -[1] → #14 DATA01False  #17/1#17 False -Projection 1 of #25 -Type not computed - -[0] → #25 CTRL//  #21#21 // +[3] → #4 DATA0123//  #21#21 // Type not computed [0] → — DATA [1] → #7 DATA -[2] → #22 DATA012#3  #22#22 #3 +[2] → #22 DATA012#3  #22#22 #3 Type not computed -==  #23#23 == -Type not computed - -[0] → — DATA -[1] → #13 DATA -[2] → #24 DATA012#5  #24#24 #5 -Type not computed - -If  #25#25 If -Type not computed - -[0] → #8 CTRL -[1] → #23 DATA01.f =  #31#31 .f = +.f =  #31#31 .f = Type not computed [0] → — DATA [1] → #230 MEM [2] → #9 DATA -[3] → #21 DATA0123Region  #32#32 Region -Type not computed - -[0] → — DATA -[1] → #15 CTRL -[2] → #17 CTRL012-  #35#35 - -Type not computed - -[0] → — DATA -[1] → #13 DATA -[2] → #36 DATA012#1  #36#36 #1 -Type not computed - -Return  #37#37 Return +[3] → #21 DATA0123Return  #37#37 Return Type not computed -[0] → #12 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 +[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 Type not computed -[0] → #11 ASSOC +[0] → — ASSOC [1] → #10 MEM -[2] → #233 MEM[0] → #11012MemPhi_2  #233#233 MemPhi_2 +[2] → #233 MEM012MemPhi_2  #233#233 MemPhi_2 Type not computed -[0] → #32 ASSOC +[0] → — ASSOC [1] → #31 MEM -[2] → #230 MEM[0] → #32012Loop  #11Loop · 17 nodes−Fold regionIf  #25If · 8 nodes−Fold region +[2] → #230 MEM012 diff --git a/chapter11/docs/graph5.json b/chapter11/docs/graph5.json index 2211cb19..659384e0 100644 --- a/chapter11/docs/graph5.json +++ b/chapter11/docs/graph5.json @@ -2,41 +2,23 @@ "ver": 1, "comp": "chapter11/docs/graph5.svg", "step": 1, - "roots": [], + "roots": [37], "scope": 0, "nodes": [ - {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null}, + {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 37, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 11, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 5, "role": "CTRL", "label": null}, {"idx": 2, "def": 32, "role": "CTRL", "label": null}], "proj": null}, - {"id": 12, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 1}}, - {"id": 13, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 35, "role": "DATA", "label": null}], "proj": null}, - {"id": 14, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}], "proj": null}, - {"id": 15, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 0}}, - {"id": 16, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 1}}, - {"id": 21, "label": "//", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 22, "role": "DATA", "label": null}], "proj": null}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, + {"id": 10, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, + {"id": 21, "label": "//", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 22, "role": "DATA", "label": null}], "proj": null}, {"id": 22, "label": "#3", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 23, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 24, "role": "DATA", "label": null}], "proj": null}, - {"id": 24, "label": "#5", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 25, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 23, "role": "DATA", "label": null}], "proj": null}, - {"id": 31, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 230, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 32, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 15, "role": "CTRL", "label": null}, {"idx": 2, "def": 17, "role": "CTRL", "label": null}], "proj": null}, - {"id": 35, "label": "-", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 36, "role": "DATA", "label": null}], "proj": null}, - {"id": 36, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, - {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 32, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} + {"id": 31, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 230, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, + {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, + {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 11, "par": 0, "nodes": [1, 8, 11, 12, 13, 14, 16, 23, 31, 35, 230]}, - {"id": 25, "par": 11, "nodes": [15, 17, 25, 32, 233]} ] } diff --git a/chapter11/docs/graph5.svg b/chapter11/docs/graph5.svg index 1669e008..c120550f 100644 --- a/chapter11/docs/graph5.svg +++ b/chapter11/docs/graph5.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #230 · MEM#10[1] → #6 · MEM#10[2] → #9 · DATA#10[3] → #4 · DATA#21[1] → #7 · DATA#21[2] → #22 · DATA#31[1] → #230 · MEM#31[2] → #9 · DATA#31[3] → #21 · DATA#37[1] → #1 · MEM#37[2] → #9 · DATA#230[1] → #10 · MEM#230[2] → #233 · MEM#233[1] → #31 · MEM#233[2] → #230 · MEMMemMerge  #1#1 MemMerge Type not computed -[0] → #11 CTRL +[0] → — CTRL [1] → #6 MEM -[2] → #230 MEM012Start  #2#2 Start +[2] → #230 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #37 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg +[0] → #2 MEMarg  #7/2#7 arg Projection 2 of #2 Type not computed -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #16 +[0] → #2 DATAnew S  #9#9 new S Type not computed -[0] → #16 CTRLnew S  #9#9 new S +[0] → — CTRL0.f =  #10#10 .f = Type not computed -[0] → #5 CTRL0.f =  #10#10 .f = -Type not computed - -[0] → #5 CTRL +[0] → — CTRL [1] → #6 MEM [2] → #9 DATA -[3] → #4 DATA0123Loop  #11#11 Loop -Type not computed - -[0] → — DATA -[1] → #5 CTRL -[2] → #32 CTRL012False  #12/1#12 False -Projection 1 of #16 +[3] → #4 DATA0123//  #21#21 // Type not computed -[0] → #16 CTRLφ_arg  #13#13 φ_arg -Type not computed - -[0] → #11 ASSOC +[0] → — CTRL [1] → #7 DATA -[2] → #35 DATA[0] → #11012<  #14#14 < -Type not computed - -[0] → #11 CTRL -[1] → #4 DATA -[2] → #13 DATA012True  #15/0#15 True -Projection 0 of #25 -Type not computed - -[0] → #25 CTRLIf  #16#16 If -Type not computed - -[0] → #11 CTRL -[1] → #14 DATA01False  #17/1#17 False -Projection 1 of #25 +[2] → #22 DATA012#3  #22#22 #3 Type not computed -[0] → #25 CTRL//  #21#21 // +.f =  #31#31 .f = Type not computed -[0] → #2 CTRL -[1] → #7 DATA -[2] → #22 DATA012#3  #22#22 #3 -Type not computed - -==  #23#23 == -Type not computed - -[0] → #11 CTRL -[1] → #13 DATA -[2] → #24 DATA012#5  #24#24 #5 -Type not computed - -If  #25#25 If -Type not computed - -[0] → #8 CTRL -[1] → #23 DATA01.f =  #31#31 .f = -Type not computed - -[0] → #11 CTRL +[0] → — CTRL [1] → #230 MEM [2] → #9 DATA -[3] → #21 DATA0123Region  #32#32 Region -Type not computed - -[0] → — DATA -[1] → #15 CTRL -[2] → #17 CTRL012-  #35#35 - -Type not computed - -[0] → #11 CTRL -[1] → #13 DATA -[2] → #36 DATA012#1  #36#36 #1 -Type not computed - -Return  #37#37 Return +[3] → #21 DATA0123Return  #37#37 Return Type not computed -[0] → #12 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 +[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 Type not computed -[0] → #11 ASSOC +[0] → — ASSOC [1] → #10 MEM -[2] → #233 MEM[0] → #11012MemPhi_2  #233#233 MemPhi_2 +[2] → #233 MEM012MemPhi_2  #233#233 MemPhi_2 Type not computed -[0] → #32 ASSOC +[0] → — ASSOC [1] → #31 MEM -[2] → #230 MEM[0] → #32012Loop  #11Loop · 16 nodes−Fold regionIf  #25If · 5 nodes−Fold region +[2] → #230 MEM012 diff --git a/chapter11/docs/graph6.json b/chapter11/docs/graph6.json index 1c08947a..512c308d 100644 --- a/chapter11/docs/graph6.json +++ b/chapter11/docs/graph6.json @@ -2,41 +2,24 @@ "ver": 1, "comp": "chapter11/docs/graph6.svg", "step": 1, - "roots": [], + "roots": [37], "scope": 0, "nodes": [ - {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null}, + {"id": 1, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null}, {"id": 2, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "Stop", "type": null, "kind": "STOP", "edges": [{"idx": 0, "def": 37, "role": "CTRL", "label": null}], "proj": null}, {"id": 4, "label": "#0", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 5, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": {"par": 2, "idx": 0}}, {"id": 6, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 2, "role": "MEM", "label": null}], "proj": {"par": 2, "idx": 1}}, {"id": 7, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "DATA", "label": null}], "proj": {"par": 2, "idx": 2}}, - {"id": 8, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 0}}, - {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 11, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 5, "role": "CTRL", "label": null}, {"idx": 2, "def": 32, "role": "CTRL", "label": null}], "proj": null}, - {"id": 12, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}], "proj": {"par": 16, "idx": 1}}, - {"id": 13, "label": "φ_arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 35, "role": "DATA", "label": null}], "proj": null}, - {"id": 14, "label": "<", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 13, "role": "DATA", "label": null}], "proj": null}, - {"id": 15, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 0}}, - {"id": 16, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 14, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 25, "role": "CTRL", "label": null}], "proj": {"par": 25, "idx": 1}}, - {"id": 21, "label": "//", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 5, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 22, "role": "DATA", "label": null}], "proj": null}, + {"id": 9, "label": "new S", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, + {"id": 10, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 6, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, + {"id": 15, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, + {"id": 21, "label": "//", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "DATA", "label": null}, {"idx": 2, "def": 22, "role": "DATA", "label": null}], "proj": null}, {"id": 22, "label": "#3", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 23, "label": "==", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 24, "role": "DATA", "label": null}], "proj": null}, - {"id": 24, "label": "#5", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 25, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 8, "role": "CTRL", "label": null}, {"idx": 1, "def": 23, "role": "DATA", "label": null}], "proj": null}, {"id": 31, "label": ".f =", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 15, "role": "CTRL", "label": null}, {"idx": 1, "def": 230, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}, {"idx": 3, "def": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 32, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "DATA", "label": null}, {"idx": 1, "def": 15, "role": "CTRL", "label": null}, {"idx": 2, "def": 17, "role": "CTRL", "label": null}], "proj": null}, - {"id": 35, "label": "-", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 32, "role": "CTRL", "label": null}, {"idx": 1, "def": 13, "role": "DATA", "label": null}, {"idx": 2, "def": 36, "role": "DATA", "label": null}], "proj": null}, - {"id": 36, "label": "#1", "type": null, "kind": "DATA", "edges": [], "proj": null}, - {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, - {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 11, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, - {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 32, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} + {"id": 37, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 1, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null}, + {"id": 230, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 233, "role": "MEM", "label": null}], "proj": null}, + {"id": 233, "label": "MemPhi_2", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 31, "role": "MEM", "label": null}, {"idx": 2, "def": 230, "role": "MEM", "label": null}], "proj": null} ], "groups": [ - {"id": 11, "par": 0, "nodes": [8, 11, 12, 13, 14, 16, 23, 230]}, - {"id": 25, "par": 11, "nodes": [15, 17, 25, 31, 32, 35, 233]} ] } diff --git a/chapter11/docs/graph6.svg b/chapter11/docs/graph6.svg index 8862f25c..d6dec88f 100644 --- a/chapter11/docs/graph6.svg +++ b/chapter11/docs/graph6.svg @@ -1,4 +1,4 @@ -#1[1] → #6 · MEM#1[2] → #230 · MEM#10[1] → #6 · MEM#10[2] → #9 · DATA#10[3] → #4 · DATA#21[1] → #7 · DATA#21[2] → #22 · DATA#31[0] → #15 · CTRL#31[1] → #230 · MEM#31[2] → #9 · DATA#31[3] → #21 · DATA#37[1] → #1 · MEM#37[2] → #9 · DATA#230[1] → #10 · MEM#230[2] → #233 · MEM#233[1] → #31 · MEM#233[2] → #230 · MEMMemMerge  #1#1 MemMerge Type not computed -[0] → #12 CTRL +[0] → — CTRL [1] → #6 MEM -[2] → #230 MEM012Start  #2#2 Start +[2] → #230 MEM012Start  #2#2 Start Type not computed -Stop  #3#3 Stop +#0  #4#4 #0 Type not computed -[0] → #37 CTRL0#0  #4#4 #0 -Type not computed - -$ctrl  #5/0#5 $ctrl -Projection 0 of #2 -Type not computed - -[0] → #2 CTRL$mem  #6/1#6 $mem +$mem  #6/1#6 $mem Projection 1 of #2 Type not computed -[0] → #2 MEMarg  #7/2#7 arg +[0] → #2 MEMarg  #7/2#7 arg Projection 2 of #2 Type not computed -[0] → #2 DATATrue  #8/0#8 True -Projection 0 of #16 +[0] → #2 DATAnew S  #9#9 new S Type not computed -[0] → #16 CTRLnew S  #9#9 new S +[0] → — CTRL0.f =  #10#10 .f = Type not computed -[0] → #5 CTRL0.f =  #10#10 .f = -Type not computed - -[0] → #5 CTRL +[0] → — CTRL [1] → #6 MEM [2] → #9 DATA -[3] → #4 DATA0123Loop  #11#11 Loop -Type not computed - -[0] → — DATA -[1] → #5 CTRL -[2] → #32 CTRL012False  #12/1#12 False -Projection 1 of #16 +[3] → #4 DATA0123True  #15/0#15 True +Projection 0 of #0 Type not computed -[0] → #16 CTRLφ_arg  #13#13 φ_arg +//  #21#21 // Type not computed -[0] → #11 ASSOC +[0] → — CTRL [1] → #7 DATA -[2] → #35 DATA[0] → #11012<  #14#14 < +[2] → #22 DATA012#3  #22#22 #3 Type not computed -[0] → #11 CTRL -[1] → #4 DATA -[2] → #13 DATA012True  #15/0#15 True -Projection 0 of #25 -Type not computed - -[0] → #25 CTRLIf  #16#16 If -Type not computed - -[0] → #11 CTRL -[1] → #14 DATA01False  #17/1#17 False -Projection 1 of #25 -Type not computed - -[0] → #25 CTRL//  #21#21 // -Type not computed - -[0] → #5 CTRL -[1] → #7 DATA -[2] → #22 DATA012#3  #22#22 #3 -Type not computed - -==  #23#23 == -Type not computed - -[0] → #8 CTRL -[1] → #13 DATA -[2] → #24 DATA012#5  #24#24 #5 -Type not computed - -If  #25#25 If -Type not computed - -[0] → #8 CTRL -[1] → #23 DATA01.f =  #31#31 .f = +.f =  #31#31 .f = Type not computed [0] → #15 CTRL [1] → #230 MEM [2] → #9 DATA -[3] → #21 DATA0123Region  #32#32 Region -Type not computed - -[0] → — DATA -[1] → #15 CTRL -[2] → #17 CTRL012-  #35#35 - -Type not computed - -[0] → #32 CTRL -[1] → #13 DATA -[2] → #36 DATA012#1  #36#36 #1 -Type not computed - -Return  #37#37 Return +[3] → #21 DATA0123Return  #37#37 Return Type not computed -[0] → #12 CTRL +[0] → — CTRL [1] → #1 MEM -[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 +[2] → #9 DATA012MemPhi_2  #230#230 MemPhi_2 Type not computed -[0] → #11 ASSOC +[0] → — ASSOC [1] → #10 MEM -[2] → #233 MEM[0] → #11012MemPhi_2  #233#233 MemPhi_2 +[2] → #233 MEM012MemPhi_2  #233#233 MemPhi_2 Type not computed -[0] → #32 ASSOC +[0] → — ASSOC [1] → #31 MEM -[2] → #230 MEM[0] → #32012Loop  #11Loop · 15 nodes−Fold regionIf  #25If · 7 nodes−Fold region +[2] → #230 MEM012 diff --git a/chapter11/docs/graph7.svg b/chapter11/docs/graph7.svg index e83b8d54..15d886dc 100644 --- a/chapter11/docs/graph7.svg +++ b/chapter11/docs/graph7.svg @@ -60,7 +60,7 @@ .count { font-size:20px; min-width:35px; text-align:center; } #N { width:6ch; } #scrub { width:clamp(120px,35vw,600px); } - #8[1] → #1 · CTRL#8[2] → #8 · CTRL$ctrl  #1/0#1 $ctrl + </style><defs><marker id="arrow-CTRL" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#b63838"/></marker><marker id="arrow-DATA" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#536477"/></marker><marker id="arrow-MEM" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#2867b2"/></marker><marker id="arrow-ASSOC" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#9396a3"/></marker><marker id="arrow-PARSER" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#7956a5"/></marker></defs><rect width="100%" height="100%" fill="rgb(250, 251, 252)"/><g><g class="regions" style="opacity: 1;"><g class="region" transform="translate(164,171)"><rect class="region-box" rx="8" width="176" height="130" fill="#f1f6fc"/></g></g><rect class="peep-area" rx="36" style="opacity: 0;"/><g class="edges"><path class="edge CTRL" id="e8i1" d="M236,118 L236,223" stroke="#b63838" marker-start="url(#arrow-CTRL)" style="opacity: 1;"><title>#8[1] → #1 · CTRL#8[2] → #8 · CTRL$ctrl  #1/0#1 $ctrl Projection 0 of #2 Type not computed diff --git a/chapter11/docs/graph8.svg b/chapter11/docs/graph8.svg index 4db46240..d96a9a7d 100644 --- a/chapter11/docs/graph8.svg +++ b/chapter11/docs/graph8.svg @@ -60,7 +60,7 @@ .count { font-size:20px; min-width:35px; text-align:center; } #N { width:6ch; } #scrub { width:clamp(120px,35vw,600px); } - </style><defs><marker id="arrow-CTRL" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#b63838"/></marker><marker id="arrow-DATA" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#536477"/></marker><marker id="arrow-MEM" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#2867b2"/></marker><marker id="arrow-ASSOC" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#9396a3"/></marker><marker id="arrow-PARSER" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#7956a5"/></marker></defs><rect width="100%" height="100%" fill="rgb(250, 251, 252)"/><g><g class="regions" style="opacity: 1;"><g class="region" transform="translate(24,171)"><rect class="region-box" rx="8" width="313" height="298" fill="#f1f6fc"/></g></g><rect class="peep-area" rx="36" style="opacity: 0;"/><g class="edges"><path class="edge CTRL" id="e3i0" d="M126,575 C126,599 215.5,602 215.5,626" stroke="#b63838" marker-start="url(#arrow-CTRL)" style="opacity: 1;"><title>#3[0] → #21 · CTRL#8[1] → #6 · CTRL#8[2] → #5 · CTRL#18[0] → #8 · CTRL#18[1] → #4 · DATA#21[0] → #1 · CTRL#21[2] → #4 · DATATrue  #1/0#1 True + </style><defs><marker id="arrow-CTRL" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#b63838"/></marker><marker id="arrow-DATA" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#536477"/></marker><marker id="arrow-MEM" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#2867b2"/></marker><marker id="arrow-ASSOC" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#9396a3"/></marker><marker id="arrow-PARSER" viewBox="0 -4 8 8" refX="8" refY="0" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,-4L8,0L0,4Z" fill="#7956a5"/></marker></defs><rect width="100%" height="100%" fill="rgb(250, 251, 252)"/><g><g class="regions" style="opacity: 1;"><g class="region" transform="translate(24,171)"><rect class="region-box" rx="8" width="313" height="298" fill="#f1f6fc"/></g></g><rect class="peep-area" rx="36" style="opacity: 0;"/><g class="edges"><path class="edge CTRL" id="e3i0" d="M126,575 C126,599 215.5,602 215.5,626" stroke="#b63838" marker-start="url(#arrow-CTRL)" style="opacity: 1;"><title>#3[0] → #21 · CTRL#8[1] → #6 · CTRL#8[2] → #5 · CTRL#18[0] → #8 · CTRL#18[1] → #4 · DATA#21[0] → #1 · CTRL#21[2] → #4 · DATATrue  #1/0#1 True Projection 0 of #18 Type not computed -- cgit v1.2.3