diff options
| author | Cliff Click <cliffc@acm.org> | 2026-09-29 09:44:41 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-09-29 09:44:41 -0700 |
| commit | e1bba17ff54400a34ede0eaacad863420d021119 (patch) | |
| tree | 99bef5b646f0febf919208e6f4cbce81227811eb /chapter10a/docs | |
| parent | 41be002e89358649da46c33c8245aa786afdad6a (diff) | |
| download | Simple-e1bba17ff54400a34ede0eaacad863420d021119.tar.gz Simple-e1bba17ff54400a34ede0eaacad863420d021119.zip | |
Split ch10
Basic memory introduction in 10a, then precise aliases in 10b.
Diffstat (limited to 'chapter10a/docs')
| -rw-r--r-- | chapter10a/docs/10-grammar.md | 125 | ||||
| -rw-r--r-- | chapter10a/docs/Makefile | 14 | ||||
| -rw-r--r-- | chapter10a/docs/example1.gv | 10 | ||||
| -rw-r--r-- | chapter10a/docs/example1.svg | 73 | ||||
| -rw-r--r-- | chapter10a/docs/example2a.gv | 10 | ||||
| -rw-r--r-- | chapter10a/docs/example2a.svg | 85 | ||||
| -rw-r--r-- | chapter10a/docs/example2b.gv | 8 | ||||
| -rw-r--r-- | chapter10a/docs/example2b.svg | 73 | ||||
| -rw-r--r-- | chapter10a/docs/example2c.gv | 9 | ||||
| -rw-r--r-- | chapter10a/docs/example2c.svg | 50 | ||||
| -rw-r--r-- | chapter10a/docs/lattice.gv | 151 | ||||
| -rw-r--r-- | chapter10a/docs/lattice.svg | 466 |
12 files changed, 1074 insertions, 0 deletions
diff --git a/chapter10a/docs/10-grammar.md b/chapter10a/docs/10-grammar.md new file mode 100644 index 00000000..5b9b680e --- /dev/null +++ b/chapter10a/docs/10-grammar.md @@ -0,0 +1,125 @@ +# Grammar for Chapter 10a + +```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/chapter10a/docs/Makefile b/chapter10a/docs/Makefile new file mode 100644 index 00000000..055882b2 --- /dev/null +++ b/chapter10a/docs/Makefile @@ -0,0 +1,14 @@ +GV := $(wildcard *.gv) +SVG := $(patsubst %.gv,%.svg,$(GV)) +.DELETE_ON_ERROR: + +.PHONY: all +all: $(SVG) + +%.svg: %.gv + dot -Tsvg $< > $@ + @sed -i 's/\r$$//' $@ + +.PHONY: clean +clean: + @rm -f $(SVG) diff --git a/chapter10a/docs/example1.gv b/chapter10a/docs/example1.gv new file mode 100644 index 00000000..38214174 --- /dev/null +++ b/chapter10a/docs/example1.gv @@ -0,0 +1,10 @@ +digraph Memory { + rankdir=LR; + node [shape=box]; + M0 [label="Initial memory"]; + X [label="Store p.x = 3"]; + Y [label="Store p.y = arg"]; + L [label="Load p.x"]; + M0 -> X -> Y -> L [color=blue]; + Y -> Return [color=blue]; L -> Return; +} diff --git a/chapter10a/docs/example1.svg b/chapter10a/docs/example1.svg new file mode 100644 index 00000000..7ae4b560 --- /dev/null +++ b/chapter10a/docs/example1.svg @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 12.2.0 (20241103.1931) + --> +<!-- Title: Memory Pages: 1 --> +<svg width="556pt" height="67pt" + viewBox="0.00 0.00 555.75 67.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63)"> +<title>Memory</title> +<polygon fill="white" stroke="none" points="-4,4 -4,-63 551.75,-63 551.75,4 -4,4"/> +<!-- M0 --> +<g id="node1" class="node"> +<title>M0</title> +<polygon fill="none" stroke="black" points="98.5,-36 0,-36 0,0 98.5,0 98.5,-36"/> +<text text-anchor="middle" x="49.25" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Initial memory</text> +</g> +<!-- X --> +<g id="node2" class="node"> +<title>X</title> +<polygon fill="none" stroke="black" points="222.5,-36 134.5,-36 134.5,0 222.5,0 222.5,-36"/> +<text text-anchor="middle" x="178.5" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Store p.x = 3</text> +</g> +<!-- M0->X --> +<g id="edge1" class="edge"> +<title>M0->X</title> +<path fill="none" stroke="blue" d="M98.72,-18C106.55,-18 114.71,-18 122.68,-18"/> +<polygon fill="blue" stroke="blue" points="122.65,-21.5 132.65,-18 122.65,-14.5 122.65,-21.5"/> +</g> +<!-- Y --> +<g id="node3" class="node"> +<title>Y</title> +<polygon fill="none" stroke="black" points="357,-36 258.5,-36 258.5,0 357,0 357,-36"/> +<text text-anchor="middle" x="307.75" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Store p.y = arg</text> +</g> +<!-- X->Y --> +<g id="edge2" class="edge"> +<title>X->Y</title> +<path fill="none" stroke="blue" d="M222.94,-18C230.67,-18 238.84,-18 246.94,-18"/> +<polygon fill="blue" stroke="blue" points="246.76,-21.5 256.76,-18 246.76,-14.5 246.76,-21.5"/> +</g> +<!-- L --> +<g id="node4" class="node"> +<title>L</title> +<polygon fill="none" stroke="black" points="457.75,-59 393,-59 393,-23 457.75,-23 457.75,-59"/> +<text text-anchor="middle" x="425.38" y="-35.95" font-family="Times New Roman,serif" font-size="14.00">Load p.x</text> +</g> +<!-- Y->L --> +<g id="edge3" class="edge"> +<title>Y->L</title> +<path fill="none" stroke="blue" d="M357.45,-27.69C365.41,-29.27 373.61,-30.9 381.42,-32.46"/> +<polygon fill="blue" stroke="blue" points="380.54,-35.85 391.03,-34.37 381.9,-28.98 380.54,-35.85"/> +</g> +<!-- Return --> +<g id="node5" class="node"> +<title>Return</title> +<polygon fill="none" stroke="black" points="547.75,-36 493.75,-36 493.75,0 547.75,0 547.75,-36"/> +<text text-anchor="middle" x="520.75" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Return</text> +</g> +<!-- Y->Return --> +<g id="edge4" class="edge"> +<title>Y->Return</title> +<path fill="none" stroke="blue" d="M357.3,-15.3C368.98,-14.76 381.44,-14.27 393,-14 421.77,-13.32 428.99,-13.07 457.75,-14 465.65,-14.25 474.1,-14.69 482.14,-15.18"/> +<polygon fill="blue" stroke="blue" points="481.8,-18.67 492.01,-15.83 482.26,-11.68 481.8,-18.67"/> +</g> +<!-- L->Return --> +<g id="edge5" class="edge"> +<title>L->Return</title> +<path fill="none" stroke="black" d="M458.25,-33.15C466,-31.24 474.37,-29.18 482.36,-27.21"/> +<polygon fill="black" stroke="black" points="482.95,-30.67 491.82,-24.88 481.28,-23.87 482.95,-30.67"/> +</g> +</g> +</svg> diff --git a/chapter10a/docs/example2a.gv b/chapter10a/docs/example2a.gv new file mode 100644 index 00000000..13fd75e0 --- /dev/null +++ b/chapter10a/docs/example2a.gv @@ -0,0 +1,10 @@ +digraph Memory { + rankdir=LR; + node [shape=box]; + M [label="Incoming memory"]; + A [label="True: Store x"]; + B [label="False: Store y"]; + P [label="Phi(memory)"]; + M -> A -> P [color=blue]; M -> B -> P [color=blue]; + Region -> P [style=dashed]; P -> Return [color=blue]; +} diff --git a/chapter10a/docs/example2a.svg b/chapter10a/docs/example2a.svg new file mode 100644 index 00000000..1752659e --- /dev/null +++ b/chapter10a/docs/example2a.svg @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 12.2.0 (20241103.1931) + --> +<!-- Title: Memory Pages: 1 --> +<svg width="469pt" height="152pt" + viewBox="0.00 0.00 469.25 152.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 148)"> +<title>Memory</title> +<polygon fill="white" stroke="none" points="-4,4 -4,-148 465.25,-148 465.25,4 -4,4"/> +<!-- M --> +<g id="node1" class="node"> +<title>M</title> +<polygon fill="none" stroke="black" points="118.75,-117 0,-117 0,-81 118.75,-81 118.75,-117"/> +<text text-anchor="middle" x="59.38" y="-93.95" font-family="Times New Roman,serif" font-size="14.00">Incoming memory</text> +</g> +<!-- A --> +<g id="node2" class="node"> +<title>A</title> +<polygon fill="none" stroke="black" points="244.25,-144 156.25,-144 156.25,-108 244.25,-108 244.25,-144"/> +<text text-anchor="middle" x="200.25" y="-120.95" font-family="Times New Roman,serif" font-size="14.00">True: Store x</text> +</g> +<!-- M->A --> +<g id="edge1" class="edge"> +<title>M->A</title> +<path fill="none" stroke="blue" d="M118.87,-110.37C127.53,-112.06 136.42,-113.78 144.99,-115.45"/> +<polygon fill="blue" stroke="blue" points="144.05,-118.83 154.53,-117.31 145.38,-111.96 144.05,-118.83"/> +</g> +<!-- B --> +<g id="node3" class="node"> +<title>B</title> +<polygon fill="none" stroke="black" points="245.75,-90 154.75,-90 154.75,-54 245.75,-54 245.75,-90"/> +<text text-anchor="middle" x="200.25" y="-66.95" font-family="Times New Roman,serif" font-size="14.00">False: Store y</text> +</g> +<!-- M->B --> +<g id="edge3" class="edge"> +<title>M->B</title> +<path fill="none" stroke="blue" d="M118.87,-87.63C126.93,-86.06 135.19,-84.45 143.21,-82.9"/> +<polygon fill="blue" stroke="blue" points="143.7,-86.37 152.84,-81.02 142.36,-79.5 143.7,-86.37"/> +</g> +<!-- P --> +<g id="node4" class="node"> +<title>P</title> +<polygon fill="none" stroke="black" points="371.25,-90 281.75,-90 281.75,-54 371.25,-54 371.25,-90"/> +<text text-anchor="middle" x="326.5" y="-66.95" font-family="Times New Roman,serif" font-size="14.00">Phi(memory)</text> +</g> +<!-- A->P --> +<g id="edge2" class="edge"> +<title>A->P</title> +<path fill="none" stroke="blue" d="M243.66,-107.57C253.06,-103.48 263.13,-99.11 272.87,-94.87"/> +<polygon fill="blue" stroke="blue" points="274.11,-98.15 281.89,-90.95 271.32,-91.73 274.11,-98.15"/> +</g> +<!-- B->P --> +<g id="edge4" class="edge"> +<title>B->P</title> +<path fill="none" stroke="blue" d="M246.11,-72C253.95,-72 262.19,-72 270.28,-72"/> +<polygon fill="blue" stroke="blue" points="270.03,-75.5 280.03,-72 270.03,-68.5 270.03,-75.5"/> +</g> +<!-- Return --> +<g id="node6" class="node"> +<title>Return</title> +<polygon fill="none" stroke="black" points="461.25,-90 407.25,-90 407.25,-54 461.25,-54 461.25,-90"/> +<text text-anchor="middle" x="434.25" y="-66.95" font-family="Times New Roman,serif" font-size="14.00">Return</text> +</g> +<!-- P->Return --> +<g id="edge6" class="edge"> +<title>P->Return</title> +<path fill="none" stroke="blue" d="M371.73,-72C379.7,-72 387.94,-72 395.7,-72"/> +<polygon fill="blue" stroke="blue" points="395.49,-75.5 405.49,-72 395.49,-68.5 395.49,-75.5"/> +</g> +<!-- Region --> +<g id="node5" class="node"> +<title>Region</title> +<polygon fill="none" stroke="black" points="227.75,-36 172.75,-36 172.75,0 227.75,0 227.75,-36"/> +<text text-anchor="middle" x="200.25" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Region</text> +</g> +<!-- Region->P --> +<g id="edge5" class="edge"> +<title>Region->P</title> +<path fill="none" stroke="black" stroke-dasharray="5,2" d="M228.21,-29.72C241.2,-35.36 257.25,-42.34 272.54,-48.98"/> +<polygon fill="black" stroke="black" points="271,-52.13 281.57,-52.91 273.79,-45.71 271,-52.13"/> +</g> +</g> +</svg> diff --git a/chapter10a/docs/example2b.gv b/chapter10a/docs/example2b.gv new file mode 100644 index 00000000..9db0f5fb --- /dev/null +++ b/chapter10a/docs/example2b.gv @@ -0,0 +1,8 @@ +digraph Memory { + rankdir=LR; + node [shape=box]; + P [label="Phi(memory)"]; + S [label="Loop-body Store"]; + Entry -> P [color=blue]; P -> S -> P [color=blue]; + Loop -> P [style=dashed]; P -> Return [color=blue]; +} diff --git a/chapter10a/docs/example2b.svg b/chapter10a/docs/example2b.svg new file mode 100644 index 00000000..1f106d63 --- /dev/null +++ b/chapter10a/docs/example2b.svg @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 12.2.0 (20241103.1931) + --> +<!-- Title: Memory Pages: 1 --> +<svg width="332pt" height="125pt" + viewBox="0.00 0.00 331.75 125.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 121)"> +<title>Memory</title> +<polygon fill="white" stroke="none" points="-4,4 -4,-121 327.75,-121 327.75,4 -4,4"/> +<!-- P --> +<g id="node1" class="node"> +<title>P</title> +<polygon fill="none" stroke="black" points="179.5,-90 90,-90 90,-54 179.5,-54 179.5,-90"/> +<text text-anchor="middle" x="134.75" y="-66.95" font-family="Times New Roman,serif" font-size="14.00">Phi(memory)</text> +</g> +<!-- S --> +<g id="node2" class="node"> +<title>S</title> +<polygon fill="none" stroke="black" points="323.75,-90 215.5,-90 215.5,-54 323.75,-54 323.75,-90"/> +<text text-anchor="middle" x="269.62" y="-66.95" font-family="Times New Roman,serif" font-size="14.00">Loop-body Store</text> +</g> +<!-- P->S --> +<g id="edge2" class="edge"> +<title>P->S</title> +<path fill="none" stroke="blue" d="M180,-65.6C187.69,-65.35 195.84,-65.23 203.95,-65.25"/> +<polygon fill="blue" stroke="blue" points="203.79,-68.75 213.83,-65.35 203.87,-61.75 203.79,-68.75"/> +</g> +<!-- Return --> +<g id="node5" class="node"> +<title>Return</title> +<polygon fill="none" stroke="black" points="296.62,-36 242.62,-36 242.62,0 296.62,0 296.62,-36"/> +<text text-anchor="middle" x="269.62" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Return</text> +</g> +<!-- P->Return --> +<g id="edge5" class="edge"> +<title>P->Return</title> +<path fill="none" stroke="blue" d="M180,-54.02C196.8,-47.19 215.75,-39.49 231.8,-32.97"/> +<polygon fill="blue" stroke="blue" points="233.04,-36.24 240.98,-29.23 230.4,-29.76 233.04,-36.24"/> +</g> +<!-- S->P --> +<g id="edge3" class="edge"> +<title>S->P</title> +<path fill="none" stroke="blue" d="M215.34,-78.63C207.46,-78.78 199.33,-78.79 191.4,-78.67"/> +<polygon fill="blue" stroke="blue" points="191.59,-75.17 181.51,-78.44 191.42,-82.17 191.59,-75.17"/> +</g> +<!-- Entry --> +<g id="node3" class="node"> +<title>Entry</title> +<polygon fill="none" stroke="black" points="54,-117 0,-117 0,-81 54,-81 54,-117"/> +<text text-anchor="middle" x="27" y="-93.95" font-family="Times New Roman,serif" font-size="14.00">Entry</text> +</g> +<!-- Entry->P --> +<g id="edge1" class="edge"> +<title>Entry->P</title> +<path fill="none" stroke="blue" d="M54.41,-92.26C61.81,-90.37 70.15,-88.24 78.56,-86.09"/> +<polygon fill="blue" stroke="blue" points="79.3,-89.51 88.12,-83.65 77.57,-82.73 79.3,-89.51"/> +</g> +<!-- Loop --> +<g id="node4" class="node"> +<title>Loop</title> +<polygon fill="none" stroke="black" points="54,-63 0,-63 0,-27 54,-27 54,-63"/> +<text text-anchor="middle" x="27" y="-39.95" font-family="Times New Roman,serif" font-size="14.00">Loop</text> +</g> +<!-- Loop->P --> +<g id="edge4" class="edge"> +<title>Loop->P</title> +<path fill="none" stroke="black" stroke-dasharray="5,2" d="M54.41,-51.74C61.81,-53.63 70.15,-55.76 78.56,-57.91"/> +<polygon fill="black" stroke="black" points="77.57,-61.27 88.12,-60.35 79.3,-54.49 77.57,-61.27"/> +</g> +</g> +</svg> diff --git a/chapter10a/docs/example2c.gv b/chapter10a/docs/example2c.gv new file mode 100644 index 00000000..0a9f0462 --- /dev/null +++ b/chapter10a/docs/example2c.gv @@ -0,0 +1,9 @@ +digraph Memory { + rankdir=LR; + node [shape=box]; + M [label="Prior memory"]; + L [label="Load p.x"]; + S [label="Store p.x"]; + M -> L [color=blue]; M -> S [color=blue]; + L -> S [style=dashed,label="execute load first"]; +} diff --git a/chapter10a/docs/example2c.svg b/chapter10a/docs/example2c.svg new file mode 100644 index 00000000..90f90920 --- /dev/null +++ b/chapter10a/docs/example2c.svg @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 12.2.0 (20241103.1931) + --> +<!-- Title: Memory Pages: 1 --> +<svg width="398pt" height="78pt" + viewBox="0.00 0.00 398.25 78.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 74)"> +<title>Memory</title> +<polygon fill="white" stroke="none" points="-4,4 -4,-74 394.25,-74 394.25,4 -4,4"/> +<!-- M --> +<g id="node1" class="node"> +<title>M</title> +<polygon fill="none" stroke="black" points="93.25,-36 0,-36 0,0 93.25,0 93.25,-36"/> +<text text-anchor="middle" x="46.62" y="-12.95" font-family="Times New Roman,serif" font-size="14.00">Prior memory</text> +</g> +<!-- L --> +<g id="node2" class="node"> +<title>L</title> +<polygon fill="none" stroke="black" points="195,-70 130.25,-70 130.25,-34 195,-34 195,-70"/> +<text text-anchor="middle" x="162.62" y="-46.95" font-family="Times New Roman,serif" font-size="14.00">Load p.x</text> +</g> +<!-- M->L --> +<g id="edge1" class="edge"> +<title>M->L</title> +<path fill="none" stroke="blue" d="M93.66,-31.73C101.99,-34.21 110.64,-36.79 118.87,-39.25"/> +<polygon fill="blue" stroke="blue" points="117.72,-42.56 128.31,-42.06 119.73,-35.85 117.72,-42.56"/> +</g> +<!-- S --> +<g id="node3" class="node"> +<title>S</title> +<polygon fill="none" stroke="black" points="390.25,-40 324.75,-40 324.75,-4 390.25,-4 390.25,-40"/> +<text text-anchor="middle" x="357.5" y="-16.95" font-family="Times New Roman,serif" font-size="14.00">Store p.x</text> +</g> +<!-- M->S --> +<g id="edge2" class="edge"> +<title>M->S</title> +<path fill="none" stroke="blue" d="M93.53,-18.59C152.81,-19.36 255.2,-20.69 313.19,-21.44"/> +<polygon fill="blue" stroke="blue" points="312.95,-24.94 323,-21.57 313.04,-17.94 312.95,-24.94"/> +</g> +<!-- L->S --> +<g id="edge3" class="edge"> +<title>L->S</title> +<path fill="none" stroke="black" stroke-dasharray="5,2" d="M195.47,-47.05C227.62,-42.05 277.5,-34.29 313.22,-28.73"/> +<polygon fill="black" stroke="black" points="313.44,-32.24 322.79,-27.24 312.37,-25.32 313.44,-32.24"/> +<text text-anchor="middle" x="259.88" y="-47.15" font-family="Times New Roman,serif" font-size="14.00">execute load first</text> +</g> +</g> +</svg> diff --git a/chapter10a/docs/lattice.gv b/chapter10a/docs/lattice.gv new file mode 100644 index 00000000..b2d8255e --- /dev/null +++ b/chapter10a/docs/lattice.gv @@ -0,0 +1,151 @@ +digraph Lattice { + compound = true; + // Define nodes + splines=false; + node [shape=circle, style=filled]; + nodesep=0.6; + + TOP [label=<<B>⊤</B >>, fillcolor=black, fontcolor=white]; + BOT [label=<<B>⊥</B>>, fillcolor=black, fontcolor=white]; + + // ---------------------- + // Control + XCTRL [label=<<B>⊤</B >:ctrl>, fillcolor=yellow, shape=oval]; + CTRL [label=<<B>⊥</B>:ctrl>, fillcolor=yellow, shape=oval]; + + TOP -> XCTRL; + XCTRL -> CTRL; + CTRL -> BOT; + + // ---------------------- + // Integers + INT_TOP [label=<<B>⊤</B >:int>, fillcolor=lightblue, shape=oval]; + INT_BOT [label=<<B>⊥</B>:int>, fillcolor=lightblue, shape=oval]; + + INT_MINDOTS [label="...", fillcolor=lightblue, shape=oval]; + INT_ZERO [label="0" , fillcolor=lightblue]; + INT_MAXDOTS [label="...", fillcolor=lightblue, shape=oval]; + + TOP -> INT_TOP; + INT_TOP -> INT_MINDOTS; + INT_TOP -> INT_ZERO; + INT_TOP -> INT_MAXDOTS; + INT_MINDOTS -> INT_BOT; + INT_ZERO -> INT_BOT; + INT_MAXDOTS -> INT_BOT; + INT_BOT -> BOT; + + INT_MINDOTS -> INT_ZERO -> INT_MAXDOTS [style=invis]; + + // ---------------------- + // Pointers, just a boolean nil/not and a struct + PTR [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="green"><FONT color="white">*ptr</FONT></TD></TR> + <TR><TD BGCOLOR="lightgreen">struct</TD></TR> + </TABLE> + >]; + PTR0 [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="green"><FONT color="white">*ptr?</FONT></TD></TR> + <TR><TD BGCOLOR="lightgreen">struct</TD></TR> + </TABLE> + >]; + + TOP -> PTR; + PTR -> PTR0; + PTR0 -> BOT; + + // ---------------------- + // Structs + STRUCT_TOP [label=<<B>⊤</B >:struct>, fillcolor=lightgreen, shape=oval]; + STRUCT_BOT [label=<<B>⊥</B>:struct>, fillcolor=lightgreen, shape=oval]; + + STRUCT_S1 [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="lightgreen">field</TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + </TABLE> + >]; + STRUCT_S2 [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="lightgreen">field</TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + <TR><TD BGCOLOR="lightgreen">field</TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + </TABLE> + >]; + STRUCT_SN [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="lightgreen">field</TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + <TR><TD BGCOLOR="lightgreen">... </TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + <TR><TD BGCOLOR="lightgreen">field</TD><TD BGCOLOR="lightblue:green" gradientangle="315">int/ptr</TD></TR> + </TABLE> + >]; + + + TOP -> STRUCT_TOP; + STRUCT_TOP -> STRUCT_S1; + STRUCT_TOP -> STRUCT_S2; + STRUCT_TOP -> STRUCT_SN; + STRUCT_S1 -> STRUCT_BOT; + STRUCT_S2 -> STRUCT_BOT; + STRUCT_SN -> STRUCT_BOT; + STRUCT_BOT -> BOT; + + STRUCT_S1 -> STRUCT_S2 -> STRUCT_SN [style=invis]; + + // ---------------------- + // Memory + MEM_TOP [label=<<B>⊤</B >:mem>, fillcolor=blue, fontcolor=white, shape=oval]; + MEM_BOT [label=<<B>⊥</B>:mem>, fillcolor=blue, fontcolor=white, shape=oval]; + + TOP -> MEM_TOP; + MEM_TOP -> MEM_BOT; + MEM_BOT -> BOT; + + + // ---------------------- + // Tuples + + TUPLE_TOP [label=<<B>⊤</B >:tuple>, fillcolor=pink, shape=oval]; + TUPLE_BOT [label=<<B>⊥</B>:tuple>, fillcolor=pink, shape=oval]; + + TUPLE1 [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="pink">Tuple</TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">type</FONT></TD></TR> + </TABLE> + >]; + TUPLE2 [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="pink">Tuple</TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">type</FONT></TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">type</FONT></TD></TR> + </TABLE> + >]; + TUPLEN [shape=none, fillcolor=none, label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="pink">Tuple</TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">type</FONT></TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">...</FONT></TD></TR> + <TR><TD BGCOLOR="black" ><FONT color="white">type</FONT></TD></TR> + </TABLE> + >]; + + + TOP -> TUPLE_TOP; + TUPLE_TOP -> TUPLE1; + TUPLE_TOP -> TUPLE2; + TUPLE_TOP -> TUPLEN; + TUPLE1 -> TUPLE_BOT; + TUPLE2 -> TUPLE_BOT; + TUPLEN -> TUPLE_BOT; + TUPLE_BOT -> BOT; + + // ---------------------- + // Additional customization + {rank=same; TOP;} + {rank=same; INT_TOP; XCTRL; STRUCT_TOP; MEM_TOP; TUPLE_TOP} + {rank=same; INT_MINDOTS; INT_ZERO; INT_MAXDOTS; + STRUCT_S1; STRUCT_S2; STRUCT_SN;} + {rank=same; INT_BOT; CTRL; STRUCT_BOT; MEM_BOT; TUPLE_BOT} + {rank=same; BOT;} +} diff --git a/chapter10a/docs/lattice.svg b/chapter10a/docs/lattice.svg new file mode 100644 index 00000000..aa296366 --- /dev/null +++ b/chapter10a/docs/lattice.svg @@ -0,0 +1,466 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 12.2.0 (20241103.1931) + --> +<!-- Title: Lattice Pages: 1 --> +<svg width="1132pt" height="440pt" + viewBox="0.00 0.00 1131.51 440.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 436.5)"> +<title>Lattice</title> +<polygon fill="white" stroke="none" points="-4,4 -4,-436.5 1127.51,-436.5 1127.51,4 -4,4"/> +<!-- TOP --> +<g id="node1" class="node"> +<title>TOP</title> +<ellipse fill="black" stroke="black" cx="478.51" cy="-411.37" rx="21.12" ry="21.12"/> +<text text-anchor="start" x="470.63" y="-406.95" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00" fill="white">⊤</text> +</g> +<!-- XCTRL --> +<g id="node3" class="node"> +<title>XCTRL</title> +<ellipse fill="yellow" stroke="black" cx="36.51" cy="-327.75" rx="36.51" ry="18"/> +<text text-anchor="start" x="17.76" y="-323.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊤</text> +<text text-anchor="start" x="33.51" y="-323.7" font-family="Times New Roman,serif" font-size="14.00">:ctrl</text> +</g> +<!-- TOP->XCTRL --> +<g id="edge1" class="edge"> +<title>TOP->XCTRL</title> +<path fill="none" stroke="black" d="M457.49,-406.49C389.63,-393.96 175.41,-354.4 81.44,-337.04"/> +<polygon fill="black" stroke="black" points="82.28,-333.64 71.81,-335.27 81.01,-340.53 82.28,-333.64"/> +</g> +<!-- INT_TOP --> +<g id="node5" class="node"> +<title>INT_TOP</title> +<ellipse fill="lightblue" stroke="black" cx="220.51" cy="-327.75" rx="33.95" ry="18"/> +<text text-anchor="start" x="203.63" y="-323.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊤</text> +<text text-anchor="start" x="219.38" y="-323.7" font-family="Times New Roman,serif" font-size="14.00">:int</text> +</g> +<!-- TOP->INT_TOP --> +<g id="edge4" class="edge"> +<title>TOP->INT_TOP</title> +<path fill="none" stroke="black" d="M458.26,-403.97C415.59,-390.47 315.75,-358.88 259.97,-341.23"/> +<polygon fill="black" stroke="black" points="261.14,-337.93 250.55,-338.25 259.03,-344.61 261.14,-337.93"/> +</g> +<!-- PTR --> +<g id="node10" class="node"> +<title>PTR</title> +<polygon fill="none" stroke="none" points="387.51,-354.25 333.51,-354.25 333.51,-301.25 387.51,-301.25 387.51,-354.25"/> +<polygon fill="green" stroke="none" points="342.51,-327.75 342.51,-350.25 378.51,-350.25 378.51,-327.75 342.51,-327.75"/> +<polygon fill="none" stroke="black" points="342.51,-327.75 342.51,-350.25 378.51,-350.25 378.51,-327.75 342.51,-327.75"/> +<text text-anchor="start" x="349.63" y="-333.95" font-family="Times New Roman,serif" font-size="14.00" fill="white">*ptr</text> +<polygon fill="lightgreen" stroke="none" points="342.51,-305.25 342.51,-327.75 378.51,-327.75 378.51,-305.25 342.51,-305.25"/> +<polygon fill="none" stroke="black" points="342.51,-305.25 342.51,-327.75 378.51,-327.75 378.51,-305.25 342.51,-305.25"/> +<text text-anchor="start" x="345.51" y="-311.45" font-family="Times New Roman,serif" font-size="14.00">struct</text> +</g> +<!-- TOP->PTR --> +<g id="edge14" class="edge"> +<title>TOP->PTR</title> +<path fill="none" stroke="black" d="M461.35,-398.5C444.42,-386.79 418.03,-368.54 396.49,-353.64"/> +<polygon fill="black" stroke="black" points="398.75,-350.95 388.54,-348.14 394.77,-356.7 398.75,-350.95"/> +</g> +<!-- STRUCT_TOP --> +<g id="node12" class="node"> +<title>STRUCT_TOP</title> +<ellipse fill="lightgreen" stroke="black" cx="514.51" cy="-327.75" rx="44.7" ry="18"/> +<text text-anchor="start" x="489.76" y="-323.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊤</text> +<text text-anchor="start" x="505.51" y="-323.7" font-family="Times New Roman,serif" font-size="14.00">:struct</text> +</g> +<!-- TOP->STRUCT_TOP --> +<g id="edge17" class="edge"> +<title>TOP->STRUCT_TOP</title> +<path fill="none" stroke="black" d="M486.86,-391.44C491.45,-381.02 497.24,-367.9 502.33,-356.35"/> +<polygon fill="black" stroke="black" points="505.5,-357.86 506.33,-347.29 499.09,-355.03 505.5,-357.86"/> +</g> +<!-- MEM_TOP --> +<g id="node17" class="node"> +<title>MEM_TOP</title> +<ellipse fill="blue" stroke="black" cx="757.51" cy="-327.75" rx="43.67" ry="18"/> +<text text-anchor="start" x="733.51" y="-323.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00" fill="white">⊤</text> +<text text-anchor="start" x="749.26" y="-323.7" font-family="Times New Roman,serif" font-size="14.00" fill="white">:mem</text> +</g> +<!-- TOP->MEM_TOP --> +<g id="edge27" class="edge"> +<title>TOP->MEM_TOP</title> +<path fill="none" stroke="black" d="M498.57,-404.5C542.92,-391.53 650.2,-360.14 711.86,-342.1"/> +<polygon fill="black" stroke="black" points="712.75,-345.49 721.37,-339.32 710.79,-338.77 712.75,-345.49"/> +</g> +<!-- TUPLE_TOP --> +<g id="node19" class="node"> +<title>TUPLE_TOP</title> +<ellipse fill="pink" stroke="black" cx="950.51" cy="-327.75" rx="42.65" ry="18"/> +<text text-anchor="start" x="927.26" y="-323.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊤</text> +<text text-anchor="start" x="943.01" y="-323.7" font-family="Times New Roman,serif" font-size="14.00">:tuple</text> +</g> +<!-- TOP->TUPLE_TOP --> +<g id="edge30" class="edge"> +<title>TOP->TUPLE_TOP</title> +<path fill="none" stroke="black" d="M499.4,-406.76C569.58,-394.62 798.17,-355.09 900.36,-337.42"/> +<polygon fill="black" stroke="black" points="900.85,-340.89 910.1,-335.74 899.65,-333.99 900.85,-340.89"/> +</g> +<!-- BOT --> +<g id="node2" class="node"> +<title>BOT</title> +<ellipse fill="black" stroke="black" cx="448.51" cy="-21.12" rx="21.12" ry="21.12"/> +<text text-anchor="start" x="440.63" y="-16.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00" fill="white">⊥</text> +</g> +<!-- CTRL --> +<g id="node4" class="node"> +<title>CTRL</title> +<ellipse fill="yellow" stroke="black" cx="36.51" cy="-104.75" rx="36.51" ry="18"/> +<text text-anchor="start" x="17.76" y="-100.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊥</text> +<text text-anchor="start" x="33.51" y="-100.7" font-family="Times New Roman,serif" font-size="14.00">:ctrl</text> +</g> +<!-- XCTRL->CTRL --> +<g id="edge2" class="edge"> +<title>XCTRL->CTRL</title> +<path fill="none" stroke="black" d="M36.51,-309.5C36.51,-271.02 36.51,-181.25 36.51,-134.4"/> +<polygon fill="black" stroke="black" points="40.01,-134.45 36.51,-124.45 33.01,-134.45 40.01,-134.45"/> +</g> +<!-- CTRL->BOT --> +<g id="edge3" class="edge"> +<title>CTRL->BOT</title> +<path fill="none" stroke="black" d="M69.88,-97.14C147.7,-81.72 340.42,-43.54 416.69,-28.43"/> +<polygon fill="black" stroke="black" points="417.29,-31.88 426.41,-26.5 415.93,-25.01 417.29,-31.88"/> +</g> +<!-- INT_MINDOTS --> +<g id="node7" class="node"> +<title>INT_MINDOTS</title> +<ellipse fill="lightblue" stroke="black" cx="68.51" cy="-216.25" rx="27" ry="18"/> +<text text-anchor="middle" x="68.51" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">...</text> +</g> +<!-- INT_TOP->INT_MINDOTS --> +<g id="edge5" class="edge"> +<title>INT_TOP->INT_MINDOTS</title> +<path fill="none" stroke="black" d="M200.95,-312.66C174.03,-293.27 125.48,-258.29 95.24,-236.5"/> +<polygon fill="black" stroke="black" points="97.5,-233.82 87.34,-230.81 93.41,-239.5 97.5,-233.82"/> +</g> +<!-- INT_ZERO --> +<g id="node8" class="node"> +<title>INT_ZERO</title> +<ellipse fill="lightblue" stroke="black" cx="156.51" cy="-216.25" rx="18" ry="18"/> +<text text-anchor="middle" x="156.51" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">0</text> +</g> +<!-- INT_TOP->INT_ZERO --> +<g id="edge6" class="edge"> +<title>INT_TOP->INT_ZERO</title> +<path fill="none" stroke="black" d="M210.79,-310.12C200.2,-292 183.15,-262.82 170.98,-242.01"/> +<polygon fill="black" stroke="black" points="174.12,-240.45 166.05,-233.58 168.08,-243.98 174.12,-240.45"/> +</g> +<!-- INT_MAXDOTS --> +<g id="node9" class="node"> +<title>INT_MAXDOTS</title> +<ellipse fill="lightblue" stroke="black" cx="244.51" cy="-216.25" rx="27" ry="18"/> +<text text-anchor="middle" x="244.51" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">...</text> +</g> +<!-- INT_TOP->INT_MAXDOTS --> +<g id="edge7" class="edge"> +<title>INT_TOP->INT_MAXDOTS</title> +<path fill="none" stroke="black" d="M224.26,-309.64C228.03,-292.44 233.9,-265.64 238.35,-245.33"/> +<polygon fill="black" stroke="black" points="241.74,-246.23 240.46,-235.72 234.9,-244.73 241.74,-246.23"/> +</g> +<!-- INT_BOT --> +<g id="node6" class="node"> +<title>INT_BOT</title> +<ellipse fill="lightblue" stroke="black" cx="220.51" cy="-104.75" rx="33.95" ry="18"/> +<text text-anchor="start" x="203.63" y="-100.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊥</text> +<text text-anchor="start" x="219.38" y="-100.7" font-family="Times New Roman,serif" font-size="14.00">:int</text> +</g> +<!-- INT_BOT->BOT --> +<g id="edge11" class="edge"> +<title>INT_BOT->BOT</title> +<path fill="none" stroke="black" d="M248.01,-93.9C290.83,-78.57 373.15,-49.1 417.83,-33.11"/> +<polygon fill="black" stroke="black" points="418.93,-36.43 427.17,-29.76 416.57,-29.84 418.93,-36.43"/> +</g> +<!-- INT_MINDOTS->INT_BOT --> +<g id="edge8" class="edge"> +<title>INT_MINDOTS->INT_BOT</title> +<path fill="none" stroke="black" d="M86.24,-202.47C112.22,-183.76 160.89,-148.7 191.95,-126.33"/> +<polygon fill="black" stroke="black" points="193.68,-129.39 199.75,-120.71 189.59,-123.71 193.68,-129.39"/> +</g> +<!-- INT_MINDOTS->INT_ZERO --> +<!-- INT_ZERO->INT_BOT --> +<g id="edge9" class="edge"> +<title>INT_ZERO->INT_BOT</title> +<path fill="none" stroke="black" d="M165.14,-200.48C175.34,-183.02 192.52,-153.64 205.04,-132.22"/> +<polygon fill="black" stroke="black" points="207.97,-134.13 210,-123.73 201.93,-130.6 207.97,-134.13"/> +</g> +<!-- INT_ZERO->INT_MAXDOTS --> +<!-- INT_MAXDOTS->INT_BOT --> +<g id="edge10" class="edge"> +<title>INT_MAXDOTS->INT_BOT</title> +<path fill="none" stroke="black" d="M240.76,-198.14C237.01,-181.04 231.18,-154.46 226.74,-134.19"/> +<polygon fill="black" stroke="black" points="230.2,-133.6 224.64,-124.58 223.36,-135.09 230.2,-133.6"/> +</g> +<!-- PTR0 --> +<g id="node11" class="node"> +<title>PTR0</title> +<polygon fill="none" stroke="none" points="387.51,-131.25 333.51,-131.25 333.51,-78.25 387.51,-78.25 387.51,-131.25"/> +<polygon fill="green" stroke="none" points="342.51,-104.75 342.51,-127.25 378.51,-127.25 378.51,-104.75 342.51,-104.75"/> +<polygon fill="none" stroke="black" points="342.51,-104.75 342.51,-127.25 378.51,-127.25 378.51,-104.75 342.51,-104.75"/> +<text text-anchor="start" x="346.63" y="-110.95" font-family="Times New Roman,serif" font-size="14.00" fill="white">*ptr?</text> +<polygon fill="lightgreen" stroke="none" points="342.51,-82.25 342.51,-104.75 378.51,-104.75 378.51,-82.25 342.51,-82.25"/> +<polygon fill="none" stroke="black" points="342.51,-82.25 342.51,-104.75 378.51,-104.75 378.51,-82.25 342.51,-82.25"/> +<text text-anchor="start" x="345.51" y="-88.45" font-family="Times New Roman,serif" font-size="14.00">struct</text> +</g> +<!-- PTR->PTR0 --> +<g id="edge15" class="edge"> +<title>PTR->PTR0</title> +<path fill="none" stroke="black" d="M360.51,-301.29C360.51,-261.89 360.51,-187.62 360.51,-142.52"/> +<polygon fill="black" stroke="black" points="364.01,-142.68 360.51,-132.68 357.01,-142.68 364.01,-142.68"/> +</g> +<!-- PTR0->BOT --> +<g id="edge16" class="edge"> +<title>PTR0->BOT</title> +<path fill="none" stroke="black" d="M387.39,-78.81C399.39,-67.68 413.41,-54.68 424.99,-43.94"/> +<polygon fill="black" stroke="black" points="427.24,-46.63 432.19,-37.26 422.48,-41.5 427.24,-46.63"/> +</g> +<!-- STRUCT_S1 --> +<g id="node14" class="node"> +<title>STRUCT_S1</title> +<polygon fill="none" stroke="none" points="487.38,-234.25 401.63,-234.25 401.63,-198.25 487.38,-198.25 487.38,-234.25"/> +<polygon fill="lightgreen" stroke="none" points="409.63,-205 409.63,-227.5 440.38,-227.5 440.38,-205 409.63,-205"/> +<polygon fill="none" stroke="black" points="409.63,-205 409.63,-227.5 440.38,-227.5 440.38,-205 409.63,-205"/> +<text text-anchor="start" x="412.63" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">field</text> +<defs> +<linearGradient id="l_0" gradientUnits="userSpaceOnUse" x1="446.1" y1="-224.2" x2="473.67" y2="-208.29" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_0)" stroke="none" points="440.38,-205 440.38,-227.5 479.38,-227.5 479.38,-205 440.38,-205"/> +<polygon fill="none" stroke="black" points="440.38,-205 440.38,-227.5 479.38,-227.5 479.38,-205 440.38,-205"/> +<text text-anchor="start" x="443.38" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +</g> +<!-- STRUCT_TOP->STRUCT_S1 --> +<g id="edge18" class="edge"> +<title>STRUCT_TOP->STRUCT_S1</title> +<path fill="none" stroke="black" d="M503.88,-310.12C492.57,-292.43 474.53,-264.21 461.3,-243.51"/> +<polygon fill="black" stroke="black" points="464.39,-241.85 456.06,-235.31 458.49,-245.62 464.39,-241.85"/> +</g> +<!-- STRUCT_S2 --> +<g id="node15" class="node"> +<title>STRUCT_S2</title> +<polygon fill="none" stroke="none" points="616.38,-242.75 530.63,-242.75 530.63,-189.75 616.38,-189.75 616.38,-242.75"/> +<polygon fill="lightgreen" stroke="none" points="538.63,-216.25 538.63,-238.75 569.38,-238.75 569.38,-216.25 538.63,-216.25"/> +<polygon fill="none" stroke="black" points="538.63,-216.25 538.63,-238.75 569.38,-238.75 569.38,-216.25 538.63,-216.25"/> +<text text-anchor="start" x="541.63" y="-222.45" font-family="Times New Roman,serif" font-size="14.00">field</text> +<defs> +<linearGradient id="l_1" gradientUnits="userSpaceOnUse" x1="575.1" y1="-235.45" x2="602.67" y2="-219.54" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_1)" stroke="none" points="569.38,-216.25 569.38,-238.75 608.38,-238.75 608.38,-216.25 569.38,-216.25"/> +<polygon fill="none" stroke="black" points="569.38,-216.25 569.38,-238.75 608.38,-238.75 608.38,-216.25 569.38,-216.25"/> +<text text-anchor="start" x="572.38" y="-222.45" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +<polygon fill="lightgreen" stroke="none" points="538.63,-193.75 538.63,-216.25 569.38,-216.25 569.38,-193.75 538.63,-193.75"/> +<polygon fill="none" stroke="black" points="538.63,-193.75 538.63,-216.25 569.38,-216.25 569.38,-193.75 538.63,-193.75"/> +<text text-anchor="start" x="541.63" y="-199.95" font-family="Times New Roman,serif" font-size="14.00">field</text> +<defs> +<linearGradient id="l_2" gradientUnits="userSpaceOnUse" x1="575.1" y1="-212.95" x2="602.67" y2="-197.04" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_2)" stroke="none" points="569.38,-193.75 569.38,-216.25 608.38,-216.25 608.38,-193.75 569.38,-193.75"/> +<polygon fill="none" stroke="black" points="569.38,-193.75 569.38,-216.25 608.38,-216.25 608.38,-193.75 569.38,-193.75"/> +<text text-anchor="start" x="572.38" y="-199.95" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +</g> +<!-- STRUCT_TOP->STRUCT_S2 --> +<g id="edge19" class="edge"> +<title>STRUCT_TOP->STRUCT_S2</title> +<path fill="none" stroke="black" d="M523.73,-309.64C531.97,-294.34 544.3,-271.45 554.63,-252.28"/> +<polygon fill="black" stroke="black" points="557.59,-254.17 559.26,-243.7 551.43,-250.85 557.59,-254.17"/> +</g> +<!-- STRUCT_SN --> +<g id="node16" class="node"> +<title>STRUCT_SN</title> +<polygon fill="none" stroke="none" points="745.38,-254 659.63,-254 659.63,-178.5 745.38,-178.5 745.38,-254"/> +<polygon fill="lightgreen" stroke="none" points="667.63,-227.5 667.63,-250 698.38,-250 698.38,-227.5 667.63,-227.5"/> +<polygon fill="none" stroke="black" points="667.63,-227.5 667.63,-250 698.38,-250 698.38,-227.5 667.63,-227.5"/> +<text text-anchor="start" x="670.63" y="-233.7" font-family="Times New Roman,serif" font-size="14.00">field</text> +<defs> +<linearGradient id="l_3" gradientUnits="userSpaceOnUse" x1="704.1" y1="-246.7" x2="731.67" y2="-230.79" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_3)" stroke="none" points="698.38,-227.5 698.38,-250 737.38,-250 737.38,-227.5 698.38,-227.5"/> +<polygon fill="none" stroke="black" points="698.38,-227.5 698.38,-250 737.38,-250 737.38,-227.5 698.38,-227.5"/> +<text text-anchor="start" x="701.38" y="-233.7" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +<polygon fill="lightgreen" stroke="none" points="667.63,-205 667.63,-227.5 698.38,-227.5 698.38,-205 667.63,-205"/> +<polygon fill="none" stroke="black" points="667.63,-205 667.63,-227.5 698.38,-227.5 698.38,-205 667.63,-205"/> +<text text-anchor="start" x="673.63" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">...  </text> +<defs> +<linearGradient id="l_4" gradientUnits="userSpaceOnUse" x1="704.1" y1="-224.2" x2="731.67" y2="-208.29" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_4)" stroke="none" points="698.38,-205 698.38,-227.5 737.38,-227.5 737.38,-205 698.38,-205"/> +<polygon fill="none" stroke="black" points="698.38,-205 698.38,-227.5 737.38,-227.5 737.38,-205 698.38,-205"/> +<text text-anchor="start" x="701.38" y="-211.2" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +<polygon fill="lightgreen" stroke="none" points="667.63,-182.5 667.63,-205 698.38,-205 698.38,-182.5 667.63,-182.5"/> +<polygon fill="none" stroke="black" points="667.63,-182.5 667.63,-205 698.38,-205 698.38,-182.5 667.63,-182.5"/> +<text text-anchor="start" x="670.63" y="-188.7" font-family="Times New Roman,serif" font-size="14.00">field</text> +<defs> +<linearGradient id="l_5" gradientUnits="userSpaceOnUse" x1="704.1" y1="-201.7" x2="731.67" y2="-185.79" > +<stop offset="0" style="stop-color:lightblue;stop-opacity:1.;"/> +<stop offset="1" style="stop-color:green;stop-opacity:1.;"/> +</linearGradient> +</defs> +<polygon fill="url(#l_5)" stroke="none" points="698.38,-182.5 698.38,-205 737.38,-205 737.38,-182.5 698.38,-182.5"/> +<polygon fill="none" stroke="black" points="698.38,-182.5 698.38,-205 737.38,-205 737.38,-182.5 698.38,-182.5"/> +<text text-anchor="start" x="701.38" y="-188.7" font-family="Times New Roman,serif" font-size="14.00">int/ptr</text> +</g> +<!-- STRUCT_TOP->STRUCT_SN --> +<g id="edge20" class="edge"> +<title>STRUCT_TOP->STRUCT_SN</title> +<path fill="none" stroke="black" d="M539.09,-312.43C567.11,-296.11 613.72,-268.96 650.01,-247.82"/> +<polygon fill="black" stroke="black" points="651.76,-250.85 658.64,-242.8 648.24,-244.81 651.76,-250.85"/> +</g> +<!-- STRUCT_BOT --> +<g id="node13" class="node"> +<title>STRUCT_BOT</title> +<ellipse fill="lightgreen" stroke="black" cx="512.51" cy="-104.75" rx="44.7" ry="18"/> +<text text-anchor="start" x="487.76" y="-100.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊥</text> +<text text-anchor="start" x="503.51" y="-100.7" font-family="Times New Roman,serif" font-size="14.00">:struct</text> +</g> +<!-- STRUCT_BOT->BOT --> +<g id="edge24" class="edge"> +<title>STRUCT_BOT->BOT</title> +<path fill="none" stroke="black" d="M499.56,-87.23C490.56,-75.76 478.41,-60.26 468.22,-47.27"/> +<polygon fill="black" stroke="black" points="471.08,-45.24 462.16,-39.53 465.57,-49.56 471.08,-45.24"/> +</g> +<!-- STRUCT_S1->STRUCT_BOT --> +<g id="edge21" class="edge"> +<title>STRUCT_S1->STRUCT_BOT</title> +<path fill="none" stroke="black" d="M454.84,-198.62C465.77,-181.01 483.19,-152.96 496.02,-132.29"/> +<polygon fill="black" stroke="black" points="498.98,-134.16 501.29,-123.82 493.04,-130.47 498.98,-134.16"/> +</g> +<!-- STRUCT_S1->STRUCT_S2 --> +<!-- STRUCT_S2->STRUCT_BOT --> +<g id="edge22" class="edge"> +<title>STRUCT_S2->STRUCT_BOT</title> +<path fill="none" stroke="black" d="M559.36,-189.85C549.77,-172.63 537.12,-149.92 527.38,-132.44"/> +<polygon fill="black" stroke="black" points="530.68,-131.18 522.76,-124.15 524.57,-134.59 530.68,-131.18"/> +</g> +<!-- STRUCT_S2->STRUCT_SN --> +<!-- STRUCT_SN->STRUCT_BOT --> +<g id="edge23" class="edge"> +<title>STRUCT_SN->STRUCT_BOT</title> +<path fill="none" stroke="black" d="M659.87,-190.67C625.81,-171.04 578.69,-143.89 546.98,-125.62"/> +<polygon fill="black" stroke="black" points="548.99,-122.73 538.58,-120.77 545.49,-128.8 548.99,-122.73"/> +</g> +<!-- MEM_BOT --> +<g id="node18" class="node"> +<title>MEM_BOT</title> +<ellipse fill="blue" stroke="black" cx="756.51" cy="-104.75" rx="43.67" ry="18"/> +<text text-anchor="start" x="732.51" y="-100.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00" fill="white">⊥</text> +<text text-anchor="start" x="748.26" y="-100.7" font-family="Times New Roman,serif" font-size="14.00" fill="white">:mem</text> +</g> +<!-- MEM_TOP->MEM_BOT --> +<g id="edge28" class="edge"> +<title>MEM_TOP->MEM_BOT</title> +<path fill="none" stroke="black" d="M757.43,-309.5C757.25,-271.02 756.85,-181.25 756.64,-134.4"/> +<polygon fill="black" stroke="black" points="760.14,-134.43 756.6,-124.45 753.14,-134.47 760.14,-134.43"/> +</g> +<!-- MEM_BOT->BOT --> +<g id="edge29" class="edge"> +<title>MEM_BOT->BOT</title> +<path fill="none" stroke="black" d="M720.57,-94.23C659.71,-78.09 537.34,-45.67 479.79,-30.41"/> +<polygon fill="black" stroke="black" points="480.88,-27.08 470.32,-27.9 479.09,-33.85 480.88,-27.08"/> +</g> +<!-- TUPLE1 --> +<g id="node21" class="node"> +<title>TUPLE1</title> +<polygon fill="none" stroke="none" points="929.51,-242.75 875.51,-242.75 875.51,-189.75 929.51,-189.75 929.51,-242.75"/> +<polygon fill="pink" stroke="none" points="883.76,-216.25 883.76,-238.75 921.26,-238.75 921.26,-216.25 883.76,-216.25"/> +<polygon fill="none" stroke="black" points="883.76,-216.25 883.76,-238.75 921.26,-238.75 921.26,-216.25 883.76,-216.25"/> +<text text-anchor="start" x="886.76" y="-222.45" font-family="Times New Roman,serif" font-size="14.00">Tuple</text> +<polygon fill="black" stroke="none" points="883.76,-193.75 883.76,-216.25 921.26,-216.25 921.26,-193.75 883.76,-193.75"/> +<polygon fill="none" stroke="black" points="883.76,-193.75 883.76,-216.25 921.26,-216.25 921.26,-193.75 883.76,-193.75"/> +<text text-anchor="start" x="890.88" y="-199.95" font-family="Times New Roman,serif" font-size="14.00" fill="white">type</text> +</g> +<!-- TUPLE_TOP->TUPLE1 --> +<g id="edge31" class="edge"> +<title>TUPLE_TOP->TUPLE1</title> +<path fill="none" stroke="black" d="M943.01,-309.64C936.37,-294.48 926.45,-271.87 918.1,-252.81"/> +<polygon fill="black" stroke="black" points="921.35,-251.51 914.13,-243.76 914.94,-254.32 921.35,-251.51"/> +</g> +<!-- TUPLE2 --> +<g id="node22" class="node"> +<title>TUPLE2</title> +<polygon fill="none" stroke="none" points="1026.51,-254 972.51,-254 972.51,-178.5 1026.51,-178.5 1026.51,-254"/> +<polygon fill="pink" stroke="none" points="980.76,-227.5 980.76,-250 1018.26,-250 1018.26,-227.5 980.76,-227.5"/> +<polygon fill="none" stroke="black" points="980.76,-227.5 980.76,-250 1018.26,-250 1018.26,-227.5 980.76,-227.5"/> +<text text-anchor="start" x="983.76" y="-233.7" font-family="Times New Roman,serif" font-size="14.00">Tuple</text> +<polygon fill="black" stroke="none" points="980.76,-205 980.76,-227.5 1018.26,-227.5 1018.26,-205 980.76,-205"/> +<polygon fill="none" stroke="black" points="980.76,-205 980.76,-227.5 1018.26,-227.5 1018.26,-205 980.76,-205"/> +<text text-anchor="start" x="987.88" y="-211.2" font-family="Times New Roman,serif" font-size="14.00" fill="white">type</text> +<polygon fill="black" stroke="none" points="980.76,-182.5 980.76,-205 1018.26,-205 1018.26,-182.5 980.76,-182.5"/> +<polygon fill="none" stroke="black" points="980.76,-182.5 980.76,-205 1018.26,-205 1018.26,-182.5 980.76,-182.5"/> +<text text-anchor="start" x="987.88" y="-188.7" font-family="Times New Roman,serif" font-size="14.00" fill="white">type</text> +</g> +<!-- TUPLE_TOP->TUPLE2 --> +<g id="edge32" class="edge"> +<title>TUPLE_TOP->TUPLE2</title> +<path fill="none" stroke="black" d="M958.17,-309.64C963.64,-297.4 971.29,-280.3 978.53,-264.14"/> +<polygon fill="black" stroke="black" points="981.68,-265.65 982.57,-255.09 975.3,-262.79 981.68,-265.65"/> +</g> +<!-- TUPLEN --> +<g id="node23" class="node"> +<title>TUPLEN</title> +<polygon fill="none" stroke="none" points="1123.51,-265.25 1069.51,-265.25 1069.51,-167.25 1123.51,-167.25 1123.51,-265.25"/> +<polygon fill="pink" stroke="none" points="1077.76,-238.75 1077.76,-261.25 1115.26,-261.25 1115.26,-238.75 1077.76,-238.75"/> +<polygon fill="none" stroke="black" points="1077.76,-238.75 1077.76,-261.25 1115.26,-261.25 1115.26,-238.75 1077.76,-238.75"/> +<text text-anchor="start" x="1080.76" y="-244.95" font-family="Times New Roman,serif" font-size="14.00">Tuple</text> +<polygon fill="black" stroke="none" points="1077.76,-216.25 1077.76,-238.75 1115.26,-238.75 1115.26,-216.25 1077.76,-216.25"/> +<polygon fill="none" stroke="black" points="1077.76,-216.25 1077.76,-238.75 1115.26,-238.75 1115.26,-216.25 1077.76,-216.25"/> +<text text-anchor="start" x="1084.88" y="-222.45" font-family="Times New Roman,serif" font-size="14.00" fill="white">type</text> +<polygon fill="black" stroke="none" points="1077.76,-193.75 1077.76,-216.25 1115.26,-216.25 1115.26,-193.75 1077.76,-193.75"/> +<polygon fill="none" stroke="black" points="1077.76,-193.75 1077.76,-216.25 1115.26,-216.25 1115.26,-193.75 1077.76,-193.75"/> +<text text-anchor="start" x="1090.88" y="-199.95" font-family="Times New Roman,serif" font-size="14.00" fill="white">...</text> +<polygon fill="black" stroke="none" points="1077.76,-171.25 1077.76,-193.75 1115.26,-193.75 1115.26,-171.25 1077.76,-171.25"/> +<polygon fill="none" stroke="black" points="1077.76,-171.25 1077.76,-193.75 1115.26,-193.75 1115.26,-171.25 1077.76,-171.25"/> +<text text-anchor="start" x="1084.88" y="-177.45" font-family="Times New Roman,serif" font-size="14.00" fill="white">type</text> +</g> +<!-- TUPLE_TOP->TUPLEN --> +<g id="edge33" class="edge"> +<title>TUPLE_TOP->TUPLEN</title> +<path fill="none" stroke="black" d="M970.81,-311.52C993.97,-294.15 1032.28,-265.42 1060.53,-244.23"/> +<polygon fill="black" stroke="black" points="1062.58,-247.07 1068.48,-238.27 1058.38,-241.47 1062.58,-247.07"/> +</g> +<!-- TUPLE_BOT --> +<g id="node20" class="node"> +<title>TUPLE_BOT</title> +<ellipse fill="pink" stroke="black" cx="950.51" cy="-104.75" rx="42.65" ry="18"/> +<text text-anchor="start" x="927.26" y="-100.7" font-family="Times New Roman,serif" font-weight="bold" font-size="14.00">⊥</text> +<text text-anchor="start" x="943.01" y="-100.7" font-family="Times New Roman,serif" font-size="14.00">:tuple</text> +</g> +<!-- TUPLE_BOT->BOT --> +<g id="edge37" class="edge"> +<title>TUPLE_BOT->BOT</title> +<path fill="none" stroke="black" d="M911.12,-97.34C814.88,-81.7 569.24,-41.75 480.83,-27.38"/> +<polygon fill="black" stroke="black" points="481.59,-23.96 471.16,-25.81 480.47,-30.87 481.59,-23.96"/> +</g> +<!-- TUPLE1->TUPLE_BOT --> +<g id="edge34" class="edge"> +<title>TUPLE1->TUPLE_BOT</title> +<path fill="none" stroke="black" d="M913.64,-189.85C921.12,-172.8 930.96,-150.34 938.59,-132.93"/> +<polygon fill="black" stroke="black" points="941.61,-134.78 942.41,-124.21 935.19,-131.97 941.61,-134.78"/> +</g> +<!-- TUPLE2->TUPLE_BOT --> +<g id="edge35" class="edge"> +<title>TUPLE2->TUPLE_BOT</title> +<path fill="none" stroke="black" d="M983.19,-178.79C976.51,-163.86 968.92,-146.89 962.73,-133.07"/> +<polygon fill="black" stroke="black" points="966.02,-131.83 958.74,-124.13 959.63,-134.69 966.02,-131.83"/> +</g> +<!-- TUPLEN->TUPLE_BOT --> +<g id="edge36" class="edge"> +<title>TUPLEN->TUPLE_BOT</title> +<path fill="none" stroke="black" d="M1069.73,-195.16C1044.22,-176.03 1005.9,-147.29 979.64,-127.59"/> +<polygon fill="black" stroke="black" points="981.86,-124.89 971.76,-121.69 977.66,-130.49 981.86,-124.89"/> +</g> +</g> +</svg> |
