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 --- chapter10a/docs/example1.json | 5 +-- chapter10a/docs/example1.svg | 34 +++++++--------- chapter10a/docs/example2a.json | 19 ++++----- chapter10a/docs/example2a.svg | 61 ++++++++++------------------ chapter10a/docs/example2b.json | 20 ++++----- chapter10a/docs/example2b.svg | 61 +++++++++++----------------- chapter10a/docs/example2c.json | 5 +-- chapter10a/docs/example2c.svg | 30 ++++++-------- chapter10a/docs/load-after-store-after.json | 5 +-- chapter10a/docs/load-after-store-after.svg | 26 +++++------- chapter10a/docs/load-after-store-before.json | 5 +-- chapter10a/docs/load-after-store-before.svg | 28 ++++++------- 12 files changed, 120 insertions(+), 179 deletions(-) (limited to 'chapter10a/docs') diff --git a/chapter10a/docs/example1.json b/chapter10a/docs/example1.json index 1b556c04..07e1dfef 100644 --- a/chapter10a/docs/example1.json +++ b/chapter10a/docs/example1.json @@ -6,10 +6,9 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.y", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, @@ -17,7 +16,7 @@ {"id": 10, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 9, "role": "DATA", "label": null}], "proj": null}, {"id": 11, "label": "Store p.y", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, {"id": 12, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 13, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "MEM", "label": null}, {"idx": 2, "def": 12, "role": "DATA", "label": null}], "proj": null} + {"id": 13, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "MEM", "label": null}, {"idx": 2, "def": 12, "role": "DATA", "label": null}], "proj": null} ], "groups": [ ] diff --git a/chapter10a/docs/example1.svg b/chapter10a/docs/example1.svg index b50701b0..d98e0ccd 100644 --- a/chapter10a/docs/example1.svg +++ b/chapter10a/docs/example1.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#9[0] → #1 · ASSOC#10[1] → #8 · MEM#10[2] → #5 · DATA#10[3] → #9 · DATA#11[1] → #10 · MEM#11[2] → #5 · DATA#11[3] → #4 · DATA#12[1] → #11 · MEM#12[2] → #5 · DATA#13[1] → #11 · MEM#13[2] → #12 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg +[0] → #1 MEMarg  #4/2#4 arg Projection 2 of #1 Type not computed -[0] → #1 DATAnew Point  #5#5 new Point +[0] → #1 DATAnew Point  #5#5 new Point Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8#8 Store p.y +[3] → #6 DATA0123Store p.y  #8#8 Store p.y Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #6 DATA0123#3  #9#9 #3 +[3] → #6 DATA0123#3  #9#9 #3 Type not computed -[0] → #1 ASSOC0Store p.x  #10#10 Store p.x +[0] → #1 ASSOC0Store p.x  #10#10 Store p.x Type not computed [0] → — CTRL [1] → #8 MEM [2] → #5 DATA -[3] → #9 DATA0123Store p.y  #11#11 Store p.y +[3] → #9 DATA0123Store p.y  #11#11 Store p.y Type not computed [0] → — CTRL [1] → #10 MEM [2] → #5 DATA -[3] → #4 DATA0123Load p.x  #12#12 Load p.x +[3] → #4 DATA0123Load p.x  #12#12 Load p.x Type not computed [0] → — CTRL [1] → #11 MEM [2] → #5 DATA -[3] → — DATA0123Return  #13#13 Return +[3] → — DATA0123Return  #13#13 Return Type not computed -[0] → #2 CTRL +[0] → — CTRL [1] → #11 MEM -[2] → #12 DATA012 +[2] → #12 DATA012 diff --git a/chapter10a/docs/example2a.json b/chapter10a/docs/example2a.json index 2fa04643..7c22da0a 100644 --- a/chapter10a/docs/example2a.json +++ b/chapter10a/docs/example2a.json @@ -6,26 +6,21 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, - {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.y", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, - {"id": 9, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 10, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 9, "role": "CTRL", "label": null}], "proj": {"par": 9, "idx": 0}}, - {"id": 11, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 9, "role": "CTRL", "label": null}], "proj": {"par": 9, "idx": 1}}, + {"id": 10, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, + {"id": 11, "label": "False", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 1}}, {"id": 12, "label": "#3", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 13, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 12, "role": "DATA", "label": null}], "proj": null}, + {"id": 13, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 10, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 12, "role": "DATA", "label": null}], "proj": null}, {"id": 14, "label": "#4", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 15, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 14, "role": "DATA", "label": null}], "proj": null}, - {"id": 16, "label": "Region", "type": null, "kind": "REGION", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 10, "role": "CTRL", "label": null}, {"idx": 2, "def": 11, "role": "CTRL", "label": null}], "proj": null}, - {"id": 17, "label": "Phi $mem", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 16, "role": "ASSOC", "label": null}, {"idx": 1, "def": 13, "role": "MEM", "label": null}, {"idx": 2, "def": 15, "role": "MEM", "label": null}], "proj": null}, + {"id": 15, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 14, "role": "DATA", "label": null}], "proj": null}, + {"id": 17, "label": "Phi $mem", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 13, "role": "MEM", "label": null}, {"idx": 2, "def": 15, "role": "MEM", "label": null}], "proj": null}, {"id": 18, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 17, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 19, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 16, "role": "CTRL", "label": null}, {"idx": 1, "def": 17, "role": "MEM", "label": null}, {"idx": 2, "def": 18, "role": "DATA", "label": null}], "proj": null} + {"id": 19, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 17, "role": "MEM", "label": null}, {"idx": 2, "def": 18, "role": "DATA", "label": null}], "proj": null} ], "groups": [ - {"id": 9, "par": 0, "nodes": [7, 8, 9, 10, 11, 13, 15, 16, 17]} ] } diff --git a/chapter10a/docs/example2a.svg b/chapter10a/docs/example2a.svg index eb43548f..b7664907 100644 --- a/chapter10a/docs/example2a.svg +++ b/chapter10a/docs/example2a.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#12[0] → #1 · ASSOC#13[0] → #10 · CTRL#13[1] → #8 · MEM#13[2] → #5 · DATA#13[3] → #12 · DATA#14[0] → #1 · ASSOC#15[0] → #11 · CTRL#15[1] → #8 · MEM#15[2] → #5 · DATA#15[3] → #14 · DATA#17[1] → #13 · MEM#17[2] → #15 · MEM#18[1] → #17 · MEM#18[2] → #5 · DATA#19[1] → #17 · MEM#19[2] → #18 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg -Projection 2 of #1 -Type not computed - -[0] → #1 DATAnew Point  #5#5 new Point +[0] → #1 MEMnew Point  #5#5 new Point Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8#8 Store p.y +[3] → #6 DATA0123Store p.y  #8#8 Store p.y Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #6 DATA0123If  #9#9 If -Type not computed - -[0] → #2 CTRL -[1] → #4 DATA01True  #10/0#10 True -Projection 0 of #9 +[3] → #6 DATA0123True  #10/0#10 True +Projection 0 of #0 Type not computed -[0] → #9 CTRLFalse  #11/1#11 False -Projection 1 of #9 +False  #11/1#11 False +Projection 1 of #0 Type not computed -[0] → #9 CTRL#3  #12#12 #3 +#3  #12#12 #3 Type not computed -[0] → #1 ASSOC0Store p.x  #13#13 Store p.x +[0] → #1 ASSOC0Store p.x  #13#13 Store p.x Type not computed -[0] → — CTRL +[0] → #10 CTRL [1] → #8 MEM [2] → #5 DATA -[3] → #12 DATA0123#4  #14#14 #4 +[3] → #12 DATA0123#4  #14#14 #4 Type not computed -[0] → #1 ASSOC0Store p.x  #15#15 Store p.x +[0] → #1 ASSOC0Store p.x  #15#15 Store p.x Type not computed -[0] → — CTRL +[0] → #11 CTRL [1] → #8 MEM [2] → #5 DATA -[3] → #14 DATA0123Region  #16#16 Region +[3] → #14 DATA0123Phi $mem  #17#17 Phi $mem Type not computed [0] → — ASSOC -[1] → #10 CTRL -[2] → #11 CTRL012Phi $mem  #17#17 Phi $mem -Type not computed - -[0] → #16 ASSOC [1] → #13 MEM -[2] → #15 MEM[0] → #16012Load p.x  #18#18 Load p.x +[2] → #15 MEM012Load p.x  #18#18 Load p.x Type not computed [0] → — CTRL [1] → #17 MEM [2] → #5 DATA -[3] → — DATA0123Return  #19#19 Return +[3] → — DATA0123Return  #19#19 Return Type not computed -[0] → #16 CTRL +[0] → — CTRL [1] → #17 MEM -[2] → #18 DATA012If  #9If · 9 nodes−Fold region +[2] → #18 DATA012 diff --git a/chapter10a/docs/example2b.json b/chapter10a/docs/example2b.json index 50fbfc74..0b778aea 100644 --- a/chapter10a/docs/example2b.json +++ b/chapter10a/docs/example2b.json @@ -6,26 +6,22 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.y", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, - {"id": 9, "label": "Loop", "type": null, "kind": "LOOP", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 2, "role": "CTRL", "label": null}, {"idx": 2, "def": 13, "role": "CTRL", "label": null}], "proj": null}, - {"id": 10, "label": "Phi $mem", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 9, "role": "ASSOC", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 15, "role": "MEM", "label": null}], "proj": null}, - {"id": 11, "label": "Phi arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 9, "role": "ASSOC", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 17, "role": "DATA", "label": null}], "proj": null}, - {"id": 12, "label": "If", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 9, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "DATA", "label": null}], "proj": null}, - {"id": 13, "label": "True", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}], "proj": {"par": 12, "idx": 0}}, - {"id": 14, "label": "False", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}], "proj": {"par": 12, "idx": 1}}, - {"id": 15, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, + {"id": 10, "label": "Phi $mem", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 15, "role": "MEM", "label": null}], "proj": null}, + {"id": 11, "label": "Phi arg", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 4, "role": "DATA", "label": null}, {"idx": 2, "def": 17, "role": "DATA", "label": null}], "proj": null}, + {"id": 13, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, + {"id": 14, "label": "False", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 1}}, + {"id": 15, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 13, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 11, "role": "DATA", "label": null}], "proj": null}, {"id": 16, "label": "#1", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 17, "label": "-", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "DATA", "label": null}, {"idx": 2, "def": 16, "role": "DATA", "label": null}], "proj": null}, - {"id": 18, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 19, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 14, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 18, "role": "DATA", "label": null}], "proj": null} + {"id": 18, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 14, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, + {"id": 19, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 18, "role": "DATA", "label": null}], "proj": null} ], "groups": [ - {"id": 9, "par": 0, "nodes": [7, 8, 9, 10, 11, 12, 13, 14, 15, 17]} ] } diff --git a/chapter10a/docs/example2b.svg b/chapter10a/docs/example2b.svg index e5322a61..1feb91a3 100644 --- a/chapter10a/docs/example2b.svg +++ b/chapter10a/docs/example2b.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#10[1] → #8 · MEM#10[2] → #15 · MEM#11[1] → #4 · DATA#11[2] → #17 · DATA#15[0] → #13 · CTRL#15[1] → #10 · MEM#15[2] → #5 · DATA#15[3] → #11 · DATA#16[0] → #1 · ASSOC#17[1] → #11 · DATA#17[2] → #16 · DATA#18[0] → #14 · CTRL#18[1] → #10 · MEM#18[2] → #5 · DATA#19[1] → #10 · MEM#19[2] → #18 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg +[0] → #1 MEMarg  #4/2#4 arg Projection 2 of #1 Type not computed -[0] → #1 DATAnew Point  #5#5 new Point +[0] → #1 DATAnew Point  #5#5 new Point Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8#8 Store p.y +[3] → #6 DATA0123Store p.y  #8#8 Store p.y Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #6 DATA0123Loop  #9#9 Loop +[3] → #6 DATA0123Phi $mem  #10#10 Phi $mem Type not computed [0] → — ASSOC -[1] → #2 CTRL -[2] → #13 CTRL012Phi $mem  #10#10 Phi $mem -Type not computed - -[0] → #9 ASSOC [1] → #8 MEM -[2] → #15 MEM[0] → #9012Phi arg  #11#11 Phi arg +[2] → #15 MEM012Phi arg  #11#11 Phi arg Type not computed -[0] → #9 ASSOC +[0] → — ASSOC [1] → #4 DATA -[2] → #17 DATA[0] → #9012If  #12#12 If -Type not computed - -[0] → #9 CTRL -[1] → #11 DATA01True  #13/0#13 True -Projection 0 of #12 +[2] → #17 DATA012True  #13/0#13 True +Projection 0 of #0 Type not computed -[0] → #12 CTRLFalse  #14/1#14 False -Projection 1 of #12 +False  #14/1#14 False +Projection 1 of #0 Type not computed -[0] → #12 CTRLStore p.x  #15#15 Store p.x +Store p.x  #15#15 Store p.x Type not computed -[0] → — CTRL +[0] → #13 CTRL [1] → #10 MEM [2] → #5 DATA -[3] → #11 DATA0123#1  #16#16 #1 +[3] → #11 DATA0123#1  #16#16 #1 Type not computed -[0] → #1 ASSOC0-  #17#17 - +[0] → #1 ASSOC0-  #17#17 - Type not computed [0] → — CTRL [1] → #11 DATA -[2] → #16 DATA012Load p.x  #18#18 Load p.x +[2] → #16 DATA012Load p.x  #18#18 Load p.x Type not computed -[0] → — CTRL +[0] → #14 CTRL [1] → #10 MEM [2] → #5 DATA -[3] → — DATA0123Return  #19#19 Return +[3] → — DATA0123Return  #19#19 Return Type not computed -[0] → #14 CTRL +[0] → — CTRL [1] → #10 MEM -[2] → #18 DATA012Loop  #9Loop · 10 nodes−Fold region +[2] → #18 DATA012 diff --git a/chapter10a/docs/example2c.json b/chapter10a/docs/example2c.json index 4e7e096b..84c3d2b6 100644 --- a/chapter10a/docs/example2c.json +++ b/chapter10a/docs/example2c.json @@ -6,16 +6,15 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Point", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.y", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 9, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, {"id": 10, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 11, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null} + {"id": 11, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 10, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null} ], "groups": [ ] diff --git a/chapter10a/docs/example2c.svg b/chapter10a/docs/example2c.svg index eb8fad03..f7f7bce3 100644 --- a/chapter10a/docs/example2c.svg +++ b/chapter10a/docs/example2c.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#9[1] → #8 · MEM#9[2] → #5 · DATA#10[1] → #8 · MEM#10[2] → #5 · DATA#10[3] → #4 · DATA#11[1] → #10 · MEM#11[2] → #9 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg +[0] → #1 MEMarg  #4/2#4 arg Projection 2 of #1 Type not computed -[0] → #1 DATAnew Point  #5#5 new Point +[0] → #1 DATAnew Point  #5#5 new Point Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8#8 Store p.y +[3] → #6 DATA0123Store p.y  #8#8 Store p.y Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #6 DATA0123Load p.x  #9#9 Load p.x +[3] → #6 DATA0123Load p.x  #9#9 Load p.x Type not computed [0] → — CTRL [1] → #8 MEM [2] → #5 DATA -[3] → — DATA0123Store p.x  #10#10 Store p.x +[3] → — DATA0123Store p.x  #10#10 Store p.x Type not computed [0] → — CTRL [1] → #8 MEM [2] → #5 DATA -[3] → #4 DATA0123Return  #11#11 Return +[3] → #4 DATA0123Return  #11#11 Return Type not computed -[0] → #2 CTRL +[0] → — CTRL [1] → #10 MEM -[2] → #9 DATA012 +[2] → #9 DATA012 diff --git a/chapter10a/docs/load-after-store-after.json b/chapter10a/docs/load-after-store-after.json index 0f0d3a93..d27efe5b 100644 --- a/chapter10a/docs/load-after-store-after.json +++ b/chapter10a/docs/load-after-store-after.json @@ -6,14 +6,13 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Box", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Box", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 10, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 4, "role": "DATA", "label": null}], "proj": null} + {"id": 10, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 4, "role": "DATA", "label": null}], "proj": null} ], "groups": [ ] diff --git a/chapter10a/docs/load-after-store-after.svg b/chapter10a/docs/load-after-store-after.svg index ee6d8189..78867d38 100644 --- a/chapter10a/docs/load-after-store-after.svg +++ b/chapter10a/docs/load-after-store-after.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #4 · DATA#10[1] → #8 · MEM#10[2] → #4 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg +[0] → #1 MEMarg  #4/2#4 arg Projection 2 of #1 Type not computed -[0] → #1 DATAnew Box  #5#5 new Box +[0] → #1 DATAnew Box  #5#5 new Box Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.x  #8#8 Store p.x +[3] → #6 DATA0123Store p.x  #8#8 Store p.x Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #4 DATA0123Return  #10#10 Return +[3] → #4 DATA0123Return  #10#10 Return Type not computed -[0] → #2 CTRL +[0] → — CTRL [1] → #8 MEM -[2] → #4 DATA012 +[2] → #4 DATA012 diff --git a/chapter10a/docs/load-after-store-before.json b/chapter10a/docs/load-after-store-before.json index 5a15a4e4..ba4e2e0b 100644 --- a/chapter10a/docs/load-after-store-before.json +++ b/chapter10a/docs/load-after-store-before.json @@ -6,15 +6,14 @@ "scope": 0, "nodes": [ {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 2, "label": "$ctrl", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 1, "role": "CTRL", "label": null}], "proj": {"par": 1, "idx": 0}}, {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, {"id": 4, "label": "arg", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "DATA", "label": null}], "proj": {"par": 1, "idx": 2}}, - {"id": 5, "label": "new Box", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}], "proj": null}, + {"id": 5, "label": "new Box", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}], "proj": null}, {"id": 6, "label": "#0", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, {"id": 7, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 6, "role": "DATA", "label": null}], "proj": null}, {"id": 8, "label": "Store p.x", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 4, "role": "DATA", "label": null}], "proj": null}, {"id": 9, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 10, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 2, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null} + {"id": 10, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 8, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null} ], "groups": [ ] diff --git a/chapter10a/docs/load-after-store-before.svg b/chapter10a/docs/load-after-store-before.svg index cdb152e3..497c915d 100644 --- a/chapter10a/docs/load-after-store-before.svg +++ b/chapter10a/docs/load-after-store-before.svg @@ -1,4 +1,4 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #7 · MEM#8[2] → #5 · DATA#8[3] → #4 · DATA#9[1] → #8 · MEM#9[2] → #5 · DATA#10[1] → #8 · MEM#10[2] → #9 · DATAStart  #1#1 Start Type not computed -$ctrl  #2/0#2 $ctrl -Projection 0 of #1 -Type not computed - -[0] → #1 CTRL$mem  #3/1#3 $mem +$mem  #3/1#3 $mem Projection 1 of #1 Type not computed -[0] → #1 MEMarg  #4/2#4 arg +[0] → #1 MEMarg  #4/2#4 arg Projection 2 of #1 Type not computed -[0] → #1 DATAnew Box  #5#5 new Box +[0] → #1 DATAnew Box  #5#5 new Box Type not computed -[0] → #2 CTRL0#0  #6#6 #0 +[0] → — CTRL0#0  #6#6 #0 Type not computed -[0] → #1 ASSOC0Store p.x  #7#7 Store p.x +[0] → #1 ASSOC0Store p.x  #7#7 Store p.x Type not computed [0] → — CTRL [1] → #3 MEM [2] → #5 DATA -[3] → #6 DATA0123Store p.x  #8#8 Store p.x +[3] → #6 DATA0123Store p.x  #8#8 Store p.x Type not computed [0] → — CTRL [1] → #7 MEM [2] → #5 DATA -[3] → #4 DATA0123Load p.x  #9#9 Load p.x +[3] → #4 DATA0123Load p.x  #9#9 Load p.x Type not computed [0] → — CTRL [1] → #8 MEM [2] → #5 DATA -[3] → — DATA0123Return  #10#10 Return +[3] → — DATA0123Return  #10#10 Return Type not computed -[0] → #2 CTRL +[0] → — CTRL [1] → #8 MEM -[2] → #9 DATA012 +[2] → #9 DATA012 -- cgit v1.2.3