From 22df891893d30e9906d0b14fc3ae5d8e67d500b2 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 3 Oct 2026 14:03:48 -0700 Subject: Chapter renumber, and split ch 17 Renumber chapters 10a, 10b, 11, 12, 13, 14 -> 10, 11, 13, 12, [11,14]. Split ch 17 into a 17a and 17b; shuffle around im/mutable syntax to be consistent, and present it more slowly. THe new immutable syntax is pushed through all later chapters --- chapter10b/docs/10-grammar.md | 125 -------- chapter10b/docs/Makefile | 1 - chapter10b/docs/example1.gv | 20 -- chapter10b/docs/example1.json | 31 -- chapter10b/docs/example1.svg | 155 ---------- chapter10b/docs/example2a.gv | 17 -- chapter10b/docs/example2a.json | 20 -- chapter10b/docs/example2a.svg | 103 ------- chapter10b/docs/example2b.gv | 19 -- chapter10b/docs/example2b.json | 30 -- chapter10b/docs/example2b.svg | 150 ---------- chapter10b/docs/example2c.gv | 15 - chapter10b/docs/example2c.json | 23 -- chapter10b/docs/example2c.svg | 121 -------- chapter10b/docs/lattice.gv | 133 --------- chapter10b/docs/lattice.svg | 644 ----------------------------------------- 16 files changed, 1607 deletions(-) delete mode 100644 chapter10b/docs/10-grammar.md delete mode 100644 chapter10b/docs/Makefile delete mode 100644 chapter10b/docs/example1.gv delete mode 100644 chapter10b/docs/example1.json delete mode 100644 chapter10b/docs/example1.svg delete mode 100644 chapter10b/docs/example2a.gv delete mode 100644 chapter10b/docs/example2a.json delete mode 100644 chapter10b/docs/example2a.svg delete mode 100644 chapter10b/docs/example2b.gv delete mode 100644 chapter10b/docs/example2b.json delete mode 100644 chapter10b/docs/example2b.svg delete mode 100644 chapter10b/docs/example2c.gv delete mode 100644 chapter10b/docs/example2c.json delete mode 100644 chapter10b/docs/example2c.svg delete mode 100644 chapter10b/docs/lattice.gv delete mode 100644 chapter10b/docs/lattice.svg (limited to 'chapter10b/docs') diff --git a/chapter10b/docs/10-grammar.md b/chapter10b/docs/10-grammar.md deleted file mode 100644 index 9a80d6ea..00000000 --- a/chapter10b/docs/10-grammar.md +++ /dev/null @@ -1,125 +0,0 @@ -# Grammar for Chapter 10b - -```antlrv4 -grammar SimpleLanguage; - -program - : statement+ EOF - ; - -statement - : returnStatement - | structDeclaration - | declStatement - | blockStatment - | expressionStatement - | ifStatement - | whileStatement - | breakStatement - | continueStatment - ; - -field - : 'int' IDENTIFIER ';' - ; - -fields - : field+ - ; - -structDeclaration - : 'struct' IDENTIFIER '{' fields '}' - ; - -whileStatement - : 'while' '(' expression ')' statement - ; - -breakStatement - : 'break' ';' - ; - -continueStatement - : 'continue' ';' - ; - -ifStatement - : 'if' '(' expression ')' statement ('else' statement)? - ; - - -expressionStatement - : IDENTIFIER '=' expression ';' - | fieldExpression '=' expression ';' - ; - -blockStatement - : '{' statement+ '}' - ; - -structName - : IDENTIFIER - ; - -declStatement - : 'int' IDENTIFIER '=' expression ';' - | structName ('?')? IDENTIFIER '=' expression ';' - ; - -returnStatement - : 'return' expression ';' - ; - -expression - : comparisonExpression - ; - -comparisonExpression - : additiveExpression (('==' | '!='| '>'| '<'| '>='| '<=') additiveExpression)* - ; - -additiveExpression - : multiplicativeExpression (('+' | '-') multiplicativeExpression)* - ; - -multiplicativeExpression - : unaryExpression (('*' | '/') unaryExpression)* - ; - -unaryExpression - : ('-') unaryExpression - | '!' unaryExpression - | primaryExpression - ; - -newExpression - : 'new' IDENTIFIER - ; - -fieldExpression - : primaryExpresson '.' IDENTIFIER - ; - -primaryExpression - : IDENTIFIER - | INTEGER_LITERAL - | 'true' - | 'false' - | 'null' - | newExpression - | '(' expression ')' - | fieldExpression - ; - -INTEGER_LITERAL - : [1-9][0-9]* - | [0] - ; - -IDENTIFIER - : NON_DIGIT (NON_DIGIT | DIGIT)* - ; - -NON_DIGIT: [a-zA-Z_]; -DEC_DIGIT: [0-9]; -``` diff --git a/chapter10b/docs/Makefile b/chapter10b/docs/Makefile deleted file mode 100644 index 6fa0f057..00000000 --- a/chapter10b/docs/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../graph/docs.mk diff --git a/chapter10b/docs/example1.gv b/chapter10b/docs/example1.gv deleted file mode 100644 index 5e059d77..00000000 --- a/chapter10b/docs/example1.gv +++ /dev/null @@ -1,20 +0,0 @@ -digraph Memory { - // IR styles match graph/web/render.js; arrows are use -> definition. - graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; - node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; - - rankdir=BT; - - M [label="Initial memory" shape=octagon style="filled" fillcolor="#dcecff"]; - X [label="Store x = 42" shape=octagon style="filled" fillcolor="#dcecff"]; - Y [label="Loop: Store y" shape=octagon style="filled" fillcolor="#dcecff"]; - L [label="Load x (42)" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - L -> X -> M [color="#2867b2"]; Y -> M [color="#2867b2"]; - MemMerge -> X [color="#2867b2"]; MemMerge -> Y [color="#2867b2"]; - Return -> MemMerge [color="#2867b2"]; Return -> L; - { rank=same; MemMerge -> L [style=invis]; } - Y -> X [style=invis]; // Layout only: keep the stores in code order. - Return [shape=box style="filled" fillcolor="#fff1c4"]; - MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; -} diff --git a/chapter10b/docs/example1.json b/chapter10b/docs/example1.json deleted file mode 100644 index 67c277e1..00000000 --- a/chapter10b/docs/example1.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "ver": 1, - "comp": "chapter10b/docs/example1.svg", - "step": 1, - "roots": [24], - "scope": 0, - "nodes": [ - {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"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": 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": "#42", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 8, "label": "Store p.x", "type": "MEM#2", "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": 7, "role": "DATA", "label": null}], "proj": null}, - {"id": 9, "label": "Store p.y", "type": "MEM#3", "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": 11, "label": "MemPhi y", "type": "MEM#3", "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 9, "role": "MEM", "label": null}, {"idx": 2, "def": 19, "role": "MEM", "label": null}], "proj": null}, - {"id": 12, "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": 21, "role": "DATA", "label": null}], "proj": null}, - {"id": 15, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, - {"id": 16, "label": "False", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 1}}, - {"id": 17, "label": "Load p.y", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 15, "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": 18, "label": "+", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 17, "role": "DATA", "label": null}, {"idx": 2, "def": 12, "role": "DATA", "label": null}], "proj": null}, - {"id": 19, "label": "Store p.y", "type": "MEM#3", "kind": "MEM", "edges": [{"idx": 0, "def": 15, "role": "CTRL", "label": null}, {"idx": 1, "def": 11, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 18, "role": "DATA", "label": null}], "proj": null}, - {"id": 20, "label": "#1", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 21, "label": "-", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "DATA", "label": null}, {"idx": 2, "def": 20, "role": "DATA", "label": null}], "proj": null}, - {"id": 22, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 8, "role": "MEM", "label": null}, {"idx": 3, "def": 11, "role": "MEM", "label": null}], "proj": null}, - {"id": 23, "label": "Load p.x", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 16, "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": 24, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 23, "role": "DATA", "label": null}], "proj": null} - ], - "groups": [ - ] -} diff --git a/chapter10b/docs/example1.svg b/chapter10b/docs/example1.svg deleted file mode 100644 index 46faf818..00000000 --- a/chapter10b/docs/example1.svg +++ /dev/null @@ -1,155 +0,0 @@ -#6[0] → #1 · ASSOC#7[0] → #1 · ASSOC#8[1] → #3 · MEM#8[2] → #5 · DATA#8[3] → #7 · DATA#9[1] → #3 · MEM#9[2] → #5 · DATA#9[3] → #6 · DATA#11[1] → #9 · MEM#11[2] → #19 · MEM#12[1] → #4 · DATA#12[2] → #21 · DATA#17[0] → #15 · CTRL#17[1] → #11 · MEM#17[2] → #5 · DATA#18[1] → #17 · DATA#18[2] → #12 · DATA#19[0] → #15 · CTRL#19[1] → #11 · MEM#19[2] → #5 · DATA#19[3] → #18 · DATA#20[0] → #1 · ASSOC#21[1] → #12 · DATA#21[2] → #20 · DATA#22[1] → #3 · MEM#22[2] → #8 · MEM#22[3] → #11 · MEM#23[0] → #16 · CTRL#23[1] → #8 · MEM#23[2] → #5 · DATA#24[1] → #22 · MEM#24[2] → #23 · DATAStart  #1#1 Start -Type not computed - -$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 -Type not computed - -[0] → — CTRL0#0  #6#6 #0 -Type not computed - -[0] → #1 ASSOC0#42  #7#7 #42 -Type not computed - -[0] → #1 ASSOC0Store p.x  #8MEM#2#8 Store p.x -MEM#2 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #7 DATA0123Store p.y  #9MEM#3#9 Store p.y -MEM#3 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #6 DATA0123MemPhi y  #11MEM#3#11 MemPhi y -MEM#3 - -[0] → — ASSOC -[1] → #9 MEM -[2] → #19 MEM012Phi arg  #12#12 Phi arg -Type not computed - -[0] → — ASSOC -[1] → #4 DATA -[2] → #21 DATA012True  #15/0#15 True -Projection 0 of #0 -Type not computed - -False  #16/1#16 False -Projection 1 of #0 -Type not computed - -Load p.y  #17#17 Load p.y -Type not computed - -[0] → #15 CTRL -[1] → #11 MEM -[2] → #5 DATA -[3] → — DATA0123+  #18#18 + -Type not computed - -[0] → — CTRL -[1] → #17 DATA -[2] → #12 DATA012Store p.y  #19MEM#3#19 Store p.y -MEM#3 - -[0] → #15 CTRL -[1] → #11 MEM -[2] → #5 DATA -[3] → #18 DATA0123#1  #20#20 #1 -Type not computed - -[0] → #1 ASSOC0-  #21#21 - -Type not computed - -[0] → — CTRL -[1] → #12 DATA -[2] → #20 DATA012MemMerge  #22#22 MemMerge -Type not computed - -[0] → — CTRL -[1] → #3 MEM -[2] → #8 MEM -[3] → #11 MEM0123Load p.x  #23#23 Load p.x -Type not computed - -[0] → #16 CTRL -[1] → #8 MEM -[2] → #5 DATA -[3] → — DATA0123Return  #24#24 Return -Type not computed - -[0] → — CTRL -[1] → #22 MEM -[2] → #23 DATA012 diff --git a/chapter10b/docs/example2a.gv b/chapter10b/docs/example2a.gv deleted file mode 100644 index 187e63b9..00000000 --- a/chapter10b/docs/example2a.gv +++ /dev/null @@ -1,17 +0,0 @@ -digraph Memory { - // IR styles match graph/web/render.js; arrows are use -> definition. - graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; - node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; - - rankdir=RL; - - M [label="Default memory" shape=octagon style="filled" fillcolor="#dcecff"]; - X [label="Store x" shape=octagon style="filled" fillcolor="#dcecff"]; - Y [label="Store y" shape=octagon style="filled" fillcolor="#dcecff"]; - X -> M [color="#2867b2"]; Y -> M [color="#2867b2"]; - MemMerge -> M [xlabel="default",color="#2867b2"]; MemMerge -> X [xlabel="x",color="#2867b2"]; - MemMerge -> Y [xlabel="y",color="#2867b2"]; Return -> MemMerge [color="#2867b2"]; - Return [shape=box style="filled" fillcolor="#fff1c4"]; - MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; -} diff --git a/chapter10b/docs/example2a.json b/chapter10b/docs/example2a.json deleted file mode 100644 index 2a9461b6..00000000 --- a/chapter10b/docs/example2a.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "ver": 1, - "comp": "chapter10b/docs/example2a.svg", - "step": 1, - "roots": [11], - "scope": 0, - "nodes": [ - {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"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": 0, "role": "CTRL", "label": null}], "proj": null}, - {"id": 7, "label": "Store p.x", "type": "MEM#2", "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": 4, "role": "DATA", "label": null}], "proj": null}, - {"id": 8, "label": "#42", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 9, "label": "Store p.y", "type": "MEM#3", "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": 8, "role": "DATA", "label": null}], "proj": null}, - {"id": 10, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 7, "role": "MEM", "label": null}, {"idx": 3, "def": 9, "role": "MEM", "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": 5, "role": "DATA", "label": null}], "proj": null} - ], - "groups": [ - ] -} diff --git a/chapter10b/docs/example2a.svg b/chapter10b/docs/example2a.svg deleted file mode 100644 index b43a55b4..00000000 --- a/chapter10b/docs/example2a.svg +++ /dev/null @@ -1,103 +0,0 @@ -#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #4 · DATA#8[0] → #1 · ASSOC#9[1] → #3 · MEM#9[2] → #5 · DATA#9[3] → #8 · DATA#10[1] → #3 · MEM#10[2] → #7 · MEM#10[3] → #9 · MEM#11[1] → #10 · MEM#11[2] → #5 · DATAStart  #1#1 Start -Type not computed - -$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 -Type not computed - -[0] → — CTRL0Store p.x  #7MEM#2#7 Store p.x -MEM#2 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #4 DATA0123#42  #8#8 #42 -Type not computed - -[0] → #1 ASSOC0Store p.y  #9MEM#3#9 Store p.y -MEM#3 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #8 DATA0123MemMerge  #10#10 MemMerge -Type not computed - -[0] → — CTRL -[1] → #3 MEM -[2] → #7 MEM -[3] → #9 MEM0123Return  #11#11 Return -Type not computed - -[0] → — CTRL -[1] → #10 MEM -[2] → #5 DATA012 diff --git a/chapter10b/docs/example2b.gv b/chapter10b/docs/example2b.gv deleted file mode 100644 index 39b87a6a..00000000 --- a/chapter10b/docs/example2b.gv +++ /dev/null @@ -1,19 +0,0 @@ -digraph Memory { - // IR styles match graph/web/render.js; arrows are use -> definition. - graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; - node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; - - rankdir=RL; - - P [label="MemPhi(x)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; - B [label="BulkMemPhi(All except x)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; - P -> Left [xlabel="slice x",color="#2867b2"]; P -> Right [xlabel="slice x",color="#2867b2"]; - B -> Left [color="#2867b2"]; B -> Right [color="#2867b2"]; - P -> Region [style=dashed,color="#9396a3"]; B -> Region [style=dashed,color="#9396a3"]; - MemMerge -> P [xlabel="x",color="#2867b2"]; MemMerge -> B [xlabel="default",color="#2867b2"]; - MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; - Left [shape=octagon style="filled" fillcolor="#dcecff"]; - Right [shape=octagon style="filled" fillcolor="#dcecff"]; - Region [shape=trapezium style="filled" fillcolor="#fff1c4"]; -} diff --git a/chapter10b/docs/example2b.json b/chapter10b/docs/example2b.json deleted file mode 100644 index 3d919618..00000000 --- a/chapter10b/docs/example2b.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "ver": 1, - "comp": "chapter10b/docs/example2b.svg", - "step": 1, - "roots": [23], - "scope": 0, - "nodes": [ - {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"id": 3, "label": "$mem", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 1, "role": "MEM", "label": null}], "proj": {"par": 1, "idx": 1}}, - {"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": "MEM#2", "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": "MEM#3", "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": 9, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 7, "role": "MEM", "label": null}, {"idx": 3, "def": 8, "role": "MEM", "label": null}], "proj": null}, - {"id": 11, "label": "True", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 0}}, - {"id": 12, "label": "False", "type": null, "kind": "CTRL", "edges": [], "proj": {"par": 0, "idx": 1}}, - {"id": 13, "label": "#3", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 14, "label": "Store p.x", "type": "MEM#2", "kind": "MEM", "edges": [{"idx": 0, "def": 11, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 13, "role": "DATA", "label": null}], "proj": null}, - {"id": 15, "label": "#4", "type": null, "kind": "DATA", "edges": [{"idx": 0, "def": 1, "role": "ASSOC", "label": null}], "proj": null}, - {"id": 16, "label": "Store p.x", "type": "MEM#2", "kind": "MEM", "edges": [{"idx": 0, "def": 12, "role": "CTRL", "label": null}, {"idx": 1, "def": 7, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}, {"idx": 3, "def": 15, "role": "DATA", "label": null}], "proj": null}, - {"id": 17, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 9, "role": "MEM", "label": null}, {"idx": 2, "def": 14, "role": "MEM", "label": null}], "proj": null}, - {"id": 18, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 9, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "MEM", "label": null}], "proj": null}, - {"id": 20, "label": "MemPhi x", "type": "MEM#2", "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 14, "role": "MEM", "label": null}, {"idx": 2, "def": 16, "role": "MEM", "label": null}], "proj": null}, - {"id": 21, "label": "BulkMemPhi except x", "type": null, "kind": "PHI", "edges": [{"idx": 0, "def": 0, "role": "ASSOC", "label": null}, {"idx": 1, "def": 17, "role": "MEM", "label": null}, {"idx": 2, "def": 18, "role": "MEM", "label": null}], "proj": null}, - {"id": 22, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 21, "role": "MEM", "label": null}, {"idx": 2, "def": 20, "role": "MEM", "label": null}], "proj": null}, - {"id": 23, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 22, "role": "MEM", "label": null}, {"idx": 2, "def": 5, "role": "DATA", "label": null}], "proj": null} - ], - "groups": [ - ] -} diff --git a/chapter10b/docs/example2b.svg b/chapter10b/docs/example2b.svg deleted file mode 100644 index 54ddad9d..00000000 --- a/chapter10b/docs/example2b.svg +++ /dev/null @@ -1,150 +0,0 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #3 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#9[1] → #3 · MEM#9[2] → #7 · MEM#9[3] → #8 · MEM#13[0] → #1 · ASSOC#14[0] → #11 · CTRL#14[1] → #7 · MEM#14[2] → #5 · DATA#14[3] → #13 · DATA#15[0] → #1 · ASSOC#16[0] → #12 · CTRL#16[1] → #7 · MEM#16[2] → #5 · DATA#16[3] → #15 · DATA#17[1] → #9 · MEM#17[2] → #14 · MEM#18[1] → #9 · MEM#18[2] → #16 · MEM#20[1] → #14 · MEM#20[2] → #16 · MEM#21[1] → #17 · MEM#21[2] → #18 · MEM#22[1] → #21 · MEM#22[2] → #20 · MEM#23[1] → #22 · MEM#23[2] → #5 · DATAStart  #1#1 Start -Type not computed - -$mem  #3/1#3 $mem -Projection 1 of #1 -Type not computed - -[0] → #1 MEMnew Point  #5#5 new Point -Type not computed - -[0] → — CTRL0#0  #6#6 #0 -Type not computed - -[0] → #1 ASSOC0Store p.x  #7MEM#2#7 Store p.x -MEM#2 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8MEM#3#8 Store p.y -MEM#3 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #6 DATA0123MemMerge  #9#9 MemMerge -Type not computed - -[0] → — CTRL -[1] → #3 MEM -[2] → #7 MEM -[3] → #8 MEM0123True  #11/0#11 True -Projection 0 of #0 -Type not computed - -False  #12/1#12 False -Projection 1 of #0 -Type not computed - -#3  #13#13 #3 -Type not computed - -[0] → #1 ASSOC0Store p.x  #14MEM#2#14 Store p.x -MEM#2 - -[0] → #11 CTRL -[1] → #7 MEM -[2] → #5 DATA -[3] → #13 DATA0123#4  #15#15 #4 -Type not computed - -[0] → #1 ASSOC0Store p.x  #16MEM#2#16 Store p.x -MEM#2 - -[0] → #12 CTRL -[1] → #7 MEM -[2] → #5 DATA -[3] → #15 DATA0123MemMerge  #17#17 MemMerge -Type not computed - -[0] → — CTRL -[1] → #9 MEM -[2] → #14 MEM012MemMerge  #18#18 MemMerge -Type not computed - -[0] → — CTRL -[1] → #9 MEM -[2] → #16 MEM012MemPhi x  #20MEM#2#20 MemPhi x -MEM#2 - -[0] → — ASSOC -[1] → #14 MEM -[2] → #16 MEM012BulkMemPhi except x  #21#21 BulkMemPhi except x -Type not computed - -[0] → — ASSOC -[1] → #17 MEM -[2] → #18 MEM012MemMerge  #22#22 MemMerge -Type not computed - -[0] → — CTRL -[1] → #21 MEM -[2] → #20 MEM012Return  #23#23 Return -Type not computed - -[0] → — CTRL -[1] → #22 MEM -[2] → #5 DATA012 diff --git a/chapter10b/docs/example2c.gv b/chapter10b/docs/example2c.gv deleted file mode 100644 index b32d186d..00000000 --- a/chapter10b/docs/example2c.gv +++ /dev/null @@ -1,15 +0,0 @@ -digraph Memory { - // IR styles match graph/web/render.js; arrows are use -> definition. - graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; - node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; - - rankdir=RL; - - M [label="Prior x memory" shape=octagon style="filled" fillcolor="#dcecff"]; - L [label="Load p.x" shape=box style="rounded,filled" fillcolor="#edf3f7"]; - S [label="Store p.x" shape=octagon style="filled" fillcolor="#dcecff"]; - L -> M [color="#2867b2"]; S -> M [color="#2867b2"]; - S -> L [style=dashed,xlabel="execute load first"]; - Y [label="Store p.y: independent" shape=octagon style="filled" fillcolor="#dcecff"]; -} diff --git a/chapter10b/docs/example2c.json b/chapter10b/docs/example2c.json deleted file mode 100644 index 380815a2..00000000 --- a/chapter10b/docs/example2c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "ver": 1, - "comp": "chapter10b/docs/example2c.svg", - "step": 1, - "roots": [13], - "scope": 0, - "nodes": [ - {"id": 1, "label": "Start", "type": null, "kind": "CTRL", "edges": [], "proj": null}, - {"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": 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": "MEM#2", "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": "MEM#3", "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": 9, "label": "Load p.x", "type": null, "kind": "DATA", "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": 0, "role": "DATA", "label": null}], "proj": null}, - {"id": 10, "label": "Store p.x", "type": "MEM#2", "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": 11, "label": "Store p.y", "type": "MEM#3", "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": 12, "label": "MemMerge", "type": null, "kind": "MEM", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 3, "role": "MEM", "label": null}, {"idx": 2, "def": 10, "role": "MEM", "label": null}, {"idx": 3, "def": 11, "role": "MEM", "label": null}], "proj": null}, - {"id": 13, "label": "Return", "type": null, "kind": "CTRL", "edges": [{"idx": 0, "def": 0, "role": "CTRL", "label": null}, {"idx": 1, "def": 12, "role": "MEM", "label": null}, {"idx": 2, "def": 9, "role": "DATA", "label": null}], "proj": null} - ], - "groups": [ - ] -} diff --git a/chapter10b/docs/example2c.svg b/chapter10b/docs/example2c.svg deleted file mode 100644 index 01bbe10a..00000000 --- a/chapter10b/docs/example2c.svg +++ /dev/null @@ -1,121 +0,0 @@ -#6[0] → #1 · ASSOC#7[1] → #3 · MEM#7[2] → #5 · DATA#7[3] → #6 · DATA#8[1] → #3 · MEM#8[2] → #5 · DATA#8[3] → #6 · DATA#9[1] → #7 · MEM#9[2] → #5 · DATA#10[1] → #7 · MEM#10[2] → #5 · DATA#10[3] → #4 · DATA#11[1] → #8 · MEM#11[2] → #5 · DATA#11[3] → #4 · DATA#12[1] → #3 · MEM#12[2] → #10 · MEM#12[3] → #11 · MEM#13[1] → #12 · MEM#13[2] → #9 · DATAStart  #1#1 Start -Type not computed - -$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 -Type not computed - -[0] → — CTRL0#0  #6#6 #0 -Type not computed - -[0] → #1 ASSOC0Store p.x  #7MEM#2#7 Store p.x -MEM#2 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #6 DATA0123Store p.y  #8MEM#3#8 Store p.y -MEM#3 - -[0] → — CTRL -[1] → #3 MEM -[2] → #5 DATA -[3] → #6 DATA0123Load p.x  #9#9 Load p.x -Type not computed - -[0] → — CTRL -[1] → #7 MEM -[2] → #5 DATA -[3] → — DATA0123Store p.x  #10MEM#2#10 Store p.x -MEM#2 - -[0] → — CTRL -[1] → #7 MEM -[2] → #5 DATA -[3] → #4 DATA0123Store p.y  #11MEM#3#11 Store p.y -MEM#3 - -[0] → — CTRL -[1] → #8 MEM -[2] → #5 DATA -[3] → #4 DATA0123MemMerge  #12#12 MemMerge -Type not computed - -[0] → — CTRL -[1] → #3 MEM -[2] → #10 MEM -[3] → #11 MEM0123Return  #13#13 Return -Type not computed - -[0] → — CTRL -[1] → #12 MEM -[2] → #9 DATA012 diff --git a/chapter10b/docs/lattice.gv b/chapter10b/docs/lattice.gv deleted file mode 100644 index 93d99dd8..00000000 --- a/chapter10b/docs/lattice.gv +++ /dev/null @@ -1,133 +0,0 @@ -digraph Lattice { - rankdir=TB; - newrank=true; - // Preserve the same-rank ordering edges through cluster layout. - remincross=false; - nodesep=0.22; - ranksep=0.65; - node [shape=ellipse, style=filled, fontname="DejaVu Sans", fontsize=13]; - edge [color="#555555", arrowsize=0.6]; - - // These arrows are lattice-order edges, not use/definition edges. - TOP [label="⊤", fillcolor=black, fontcolor=white]; - BOT [label="⊥", fillcolor=black, fontcolor=white]; - - subgraph cluster_control { - label="Control"; fontname="Arial"; color="#cccccc"; - node [fillcolor="#ffff00"]; - XCTRL [label="⊤:ctrl"]; - CTRL [label="⊥:ctrl"]; - XCTRL -> CTRL; - } - - subgraph cluster_integer { - label="Integer"; fontname="Arial"; color="#cccccc"; - node [fillcolor="#add8e6"]; - INT_TOP [label="⊤:int"]; - INT_BOT [label="⊥:int"]; - INT_NEG [label="… −2, −1"]; - INT_ZERO [label="0"]; - INT_POS [label="1, 2, …"]; - {rank=same; INT_NEG; INT_ZERO; INT_POS;} - INT_NEG -> INT_ZERO -> INT_POS [style=invis]; - INT_TOP -> {INT_NEG INT_ZERO INT_POS}; - {INT_NEG INT_ZERO INT_POS} -> INT_BOT; - } - - subgraph cluster_pointer { - label="Pointer = nullability × struct type"; - fontname="Arial"; color="#cccccc"; - node [fillcolor="#008000", fontcolor=white]; - PTR_TOP [label="⊤:ptr\n[*⊤:struct]"]; - PTR_BOT [label="⊥:ptr\n[*⊥:struct?]"]; - PTR_NULL [label="null"]; - PTR_ANY [label="*⊥:struct\n[ptr any struct]"]; - PTR_PERSON [label="*Person"]; - PTR_S1 [label="*s1"]; - PTR_MORE [label="*s2, …"]; - PTR_PERSON_NIL [label="*Person?"]; - PTR_S1_NIL [label="*s1?"]; - PTR_MORE_NIL [label="*s2?, …"]; - {rank=same; PTR_PERSON; PTR_S1; PTR_MORE; PTR_NULL;} - {rank=same; PTR_ANY; PTR_PERSON_NIL; PTR_S1_NIL; PTR_MORE_NIL;} - PTR_PERSON -> PTR_S1 -> PTR_MORE -> PTR_NULL [style=invis]; - PTR_ANY -> PTR_PERSON_NIL -> PTR_S1_NIL -> PTR_MORE_NIL [style=invis]; - PTR_TOP -> {PTR_PERSON PTR_S1 PTR_MORE PTR_NULL}; - {PTR_PERSON PTR_S1 PTR_MORE} -> PTR_ANY; - PTR_PERSON -> PTR_PERSON_NIL; - PTR_S1 -> PTR_S1_NIL; - PTR_MORE -> PTR_MORE_NIL; - PTR_NULL -> {PTR_PERSON_NIL PTR_S1_NIL PTR_MORE_NIL}; - {PTR_ANY PTR_PERSON_NIL PTR_S1_NIL PTR_MORE_NIL} -> PTR_BOT; - } - - subgraph cluster_struct { - label="Struct\nnamed collection of named scalar types"; - fontname="Arial"; color="#cccccc"; - node [fillcolor="#90ee90"]; - STRUCT_TOP [label="⊤:struct\n[struct top]"]; - STRUCT_BOT [label="⊥:struct\n[struct bottom]"]; - STRUCT_PERSON [label="Person\nage: int", shape=box]; - STRUCT_S1 [label="s1\nx: int", shape=box]; - STRUCT_S2 [label="s2\nx: int, y: int", shape=box]; - STRUCT_MORE [label="…", shape=box]; - {rank=same; STRUCT_PERSON; STRUCT_S1; STRUCT_S2; STRUCT_MORE;} - STRUCT_PERSON -> STRUCT_S1 -> STRUCT_S2 -> STRUCT_MORE [style=invis]; - STRUCT_TOP -> {STRUCT_PERSON STRUCT_S1 STRUCT_S2 STRUCT_MORE}; - {STRUCT_PERSON STRUCT_S1 STRUCT_S2 STRUCT_MORE} -> STRUCT_BOT; - } - - subgraph cluster_memory { - label="Memory\nprecise alias slices"; fontname="Arial"; color="#cccccc"; - node [fillcolor="#00008b", fontcolor=white]; - MEM_TOP [label="⊤:mem"]; - MEM_BOT [label="⊥:mem"]; - MEM_ALIAS2 [label="MEM#2"]; - MEM_ALIAS3 [label="MEM#3"]; - MEM_MORE [label="…"]; - {rank=same; MEM_ALIAS2; MEM_ALIAS3; MEM_MORE;} - MEM_ALIAS2 -> MEM_ALIAS3 -> MEM_MORE [style=invis]; - MEM_TOP -> {MEM_ALIAS2 MEM_ALIAS3 MEM_MORE}; - {MEM_ALIAS2 MEM_ALIAS3 MEM_MORE} -> MEM_BOT; - } - - subgraph cluster_tuple { - label="Tuple\ncollection of types"; - fontname="Arial"; color="#cccccc"; - node [fillcolor="#ffc0cb"]; - TUPLE_TOP [label="⊤:tuple"]; - TUPLE_BOT [label="⊥:tuple"]; - // Each black element stands for a recursively nested type lattice. - TUPLE1 [shape=plain, label=< - - - -
tuple
type
- >]; - TUPLE2 [shape=plain, label=< - - - - -
tuple
type
type
- >]; - TUPLEN [shape=plain, label=< - - - - - -
tuple
type
…
type
- >]; - {rank=same; TUPLE1; TUPLE2; TUPLEN;} - TUPLE1 -> TUPLE2 -> TUPLEN [style=invis]; - TUPLE_TOP -> {TUPLE1 TUPLE2 TUPLEN}; - {TUPLE1 TUPLE2 TUPLEN} -> TUPLE_BOT; - } - - TOP -> {XCTRL INT_TOP PTR_TOP STRUCT_TOP MEM_TOP TUPLE_TOP}; - {CTRL INT_BOT PTR_BOT STRUCT_BOT MEM_BOT TUPLE_BOT} -> BOT; - {rank=same; XCTRL; INT_TOP; PTR_TOP; STRUCT_TOP; MEM_TOP; TUPLE_TOP;} - {rank=same; CTRL; INT_BOT; PTR_BOT; STRUCT_BOT; MEM_BOT; TUPLE_BOT;} - XCTRL -> INT_TOP -> PTR_TOP -> STRUCT_TOP -> MEM_TOP -> TUPLE_TOP [style=invis]; -} diff --git a/chapter10b/docs/lattice.svg b/chapter10b/docs/lattice.svg deleted file mode 100644 index 8d2e2875..00000000 --- a/chapter10b/docs/lattice.svg +++ /dev/null @@ -1,644 +0,0 @@ - - - - - - -Lattice - - -cluster_control - -Control - - -cluster_integer - -Integer - - -cluster_pointer - -Pointer = nullability × struct type - - -cluster_struct - -Struct -named collection of named scalar types - - -cluster_memory - -Memory -precise alias slices - - -cluster_tuple - -Tuple -collection of types - - - -TOP - -⊤ - - - -XCTRL - -⊤:ctrl - - - -TOP->XCTRL - - - - - -INT_TOP - -⊤:int - - - -TOP->INT_TOP - - - - - -PTR_TOP - -⊤:ptr -[*⊤:struct] - - - -TOP->PTR_TOP - - - - - -STRUCT_TOP - -⊤:struct -[struct top] - - - -TOP->STRUCT_TOP - - - - - -MEM_TOP - -⊤:mem - - - -TOP->MEM_TOP - - - - - -TUPLE_TOP - -⊤:tuple - - - -TOP->TUPLE_TOP - - - - - -BOT - -⊥ - - - -CTRL - -⊥:ctrl - - - -XCTRL->CTRL - - - - - - -CTRL->BOT - - - - - -INT_NEG - -… −2, −1 - - - -INT_TOP->INT_NEG - - - - - -INT_ZERO - -0 - - - -INT_TOP->INT_ZERO - - - - - -INT_POS - -1, 2, … - - - -INT_TOP->INT_POS - - - - - - -INT_BOT - -⊥:int - - - -INT_BOT->BOT - - - - - -INT_NEG->INT_BOT - - - - - - -INT_ZERO->INT_BOT - - - - - - -INT_POS->INT_BOT - - - - - -PTR_NULL - -null - - - -PTR_TOP->PTR_NULL - - - - - -PTR_PERSON - -*Person - - - -PTR_TOP->PTR_PERSON - - - - - -PTR_S1 - -*s1 - - - -PTR_TOP->PTR_S1 - - - - - -PTR_MORE - -*s2, … - - - -PTR_TOP->PTR_MORE - - - - - - -PTR_BOT - -⊥:ptr -[*⊥:struct?] - - - -PTR_BOT->BOT - - - - - -PTR_PERSON_NIL - -*Person? - - - -PTR_NULL->PTR_PERSON_NIL - - - - - -PTR_S1_NIL - -*s1? - - - -PTR_NULL->PTR_S1_NIL - - - - - -PTR_MORE_NIL - -*s2?, … - - - -PTR_NULL->PTR_MORE_NIL - - - - - -PTR_ANY - -*⊥:struct -[ptr any struct] - - - -PTR_ANY->PTR_BOT - - - - - - -PTR_PERSON->PTR_ANY - - - - - - -PTR_PERSON->PTR_PERSON_NIL - - - - - -PTR_S1->PTR_ANY - - - - - - -PTR_S1->PTR_S1_NIL - - - - - - -PTR_MORE->PTR_ANY - - - - - -PTR_MORE->PTR_MORE_NIL - - - - - -PTR_PERSON_NIL->PTR_BOT - - - - - - -PTR_S1_NIL->PTR_BOT - - - - - - -PTR_MORE_NIL->PTR_BOT - - - - - -STRUCT_PERSON - -Person -age: int - - - -STRUCT_TOP->STRUCT_PERSON - - - - - -STRUCT_S1 - -s1 -x: int - - - -STRUCT_TOP->STRUCT_S1 - - - - - -STRUCT_S2 - -s2 -x: int, y: int - - - -STRUCT_TOP->STRUCT_S2 - - - - - -STRUCT_MORE - -… - - - -STRUCT_TOP->STRUCT_MORE - - - - - - -STRUCT_BOT - -⊥:struct -[struct bottom] - - - -STRUCT_BOT->BOT - - - - - -STRUCT_PERSON->STRUCT_BOT - - - - - - -STRUCT_S1->STRUCT_BOT - - - - - - -STRUCT_S2->STRUCT_BOT - - - - - - -STRUCT_MORE->STRUCT_BOT - - - - - -MEM_ALIAS2 - -MEM#2 - - - -MEM_TOP->MEM_ALIAS2 - - - - - -MEM_ALIAS3 - -MEM#3 - - - -MEM_TOP->MEM_ALIAS3 - - - - - -MEM_MORE - -… - - - -MEM_TOP->MEM_MORE - - - - - - -MEM_BOT - -⊥:mem - - - -MEM_BOT->BOT - - - - - -MEM_ALIAS2->MEM_BOT - - - - - - -MEM_ALIAS3->MEM_BOT - - - - - - -MEM_MORE->MEM_BOT - - - - - -TUPLE1 - - - -tuple - - -type - - - -TUPLE_TOP->TUPLE1 - - - - - -TUPLE2 - - - -tuple - - -type - - -type - - - -TUPLE_TOP->TUPLE2 - - - - - -TUPLEN - - - -tuple - - -type - - -… - - -type - - - -TUPLE_TOP->TUPLEN - - - - - -TUPLE_BOT - -⊥:tuple - - - -TUPLE_BOT->BOT - - - - - -TUPLE1->TUPLE_BOT - - - - - - -TUPLE2->TUPLE_BOT - - - - - - -TUPLEN->TUPLE_BOT - - - - - -- cgit v1.2.3