From e4dc3273f201ae741637b626998637cce973546b Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 2 Oct 2026 13:04:34 -0700 Subject: First pass README updates --- chapter10a/docs/example1.gv | 20 ++-- chapter10a/docs/example1.svg | 48 ++++----- chapter10a/docs/example2a.gv | 21 ++-- chapter10a/docs/example2a.svg | 56 +++++----- chapter10a/docs/example2b.gv | 22 ++-- chapter10a/docs/example2b.svg | 48 ++++----- chapter10a/docs/example2c.gv | 17 +-- chapter10a/docs/example2c.svg | 34 +++--- chapter10a/docs/lattice.gv | 2 +- chapter10a/docs/lattice.svg | 233 +++++++++++++++++++++--------------------- 10 files changed, 263 insertions(+), 238 deletions(-) (limited to 'chapter10a/docs') diff --git a/chapter10a/docs/example1.gv b/chapter10a/docs/example1.gv index d399b562..9585b8e4 100644 --- a/chapter10a/docs/example1.gv +++ b/chapter10a/docs/example1.gv @@ -1,10 +1,16 @@ 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; - node [shape=box]; - M0 [label="Initial memory"]; - X [label="Store p.x = 3"]; - Y [label="Store p.y = arg"]; - L [label="Load p.x"]; - L -> Y -> X -> M0 [color=blue]; - Return -> Y [color=blue]; Return -> L; + + M0 [label="Initial memory" shape=octagon style="filled" fillcolor="#dcecff"]; + X [label="Store p.x = 3" shape=octagon style="filled" fillcolor="#dcecff"]; + Y [label="Store p.y = arg" shape=octagon style="filled" fillcolor="#dcecff"]; + L [label="Load p.x" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + L -> Y -> X -> M0 [color="#2867b2"]; + Return -> Y [color="#2867b2"]; Return -> L; + Return [shape=box style="filled" fillcolor="#fff1c4"]; } diff --git a/chapter10a/docs/example1.svg b/chapter10a/docs/example1.svg index d1c5e3bd..fdb4864c 100644 --- a/chapter10a/docs/example1.svg +++ b/chapter10a/docs/example1.svg @@ -4,70 +4,70 @@ - - + + Memory - + M0 - -Initial memory + +Initial memory X - -Store p.x = 3 + +Store p.x = 3 X->M0 - - + + Y - -Store p.y = arg + +Store p.y = arg Y->X - - + + L - -Load p.x + +Load p.x L->Y - - + + Return - -Return + +Return Return->Y - - + + Return->L - - + + diff --git a/chapter10a/docs/example2a.gv b/chapter10a/docs/example2a.gv index ec5afbdc..93a8a904 100644 --- a/chapter10a/docs/example2a.gv +++ b/chapter10a/docs/example2a.gv @@ -1,10 +1,17 @@ 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; - node [shape=box]; - M [label="Incoming memory"]; - A [label="True: Store x"]; - B [label="False: Store y"]; - P [label="Phi(memory)"]; - P -> A -> M [color=blue]; P -> B -> M [color=blue]; - P -> Region [style=dashed]; Return -> P [color=blue]; + + M [label="Incoming memory" shape=octagon style="filled" fillcolor="#dcecff"]; + A [label="True: Store x" shape=octagon style="filled" fillcolor="#dcecff"]; + B [label="False: Store x" shape=octagon style="filled" fillcolor="#dcecff"]; + P [label="Phi(memory)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; + P -> A -> M [color="#2867b2"]; P -> B -> M [color="#2867b2"]; + P -> Region [style=dashed,color="#9396a3"]; Return -> P [color="#2867b2"]; + Return [shape=box style="filled" fillcolor="#fff1c4"]; + Region [shape=trapezium style="filled" fillcolor="#fff1c4"]; } diff --git a/chapter10a/docs/example2a.svg b/chapter10a/docs/example2a.svg index f9a9b4fd..f0bbf531 100644 --- a/chapter10a/docs/example2a.svg +++ b/chapter10a/docs/example2a.svg @@ -4,82 +4,82 @@ - - + + Memory - + M - -Incoming memory + +Incoming memory A - -True: Store x + +True: Store x A->M - - + + B - -False: Store y + +False: Store x B->M - - + + P - -Phi(memory) + +Phi(memory) P->A - - + + P->B - - + + Region - -Region + +Region P->Region - - + + Return - -Return + +Return Return->P - - + + diff --git a/chapter10a/docs/example2b.gv b/chapter10a/docs/example2b.gv index 3f3309e5..c7d64509 100644 --- a/chapter10a/docs/example2b.gv +++ b/chapter10a/docs/example2b.gv @@ -1,11 +1,19 @@ 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; - node [shape=box]; - P [label="Phi(memory)"]; - S [label="Loop-body Store"]; - P -> Entry [color=blue]; - P -> S [color=blue,constraint=false]; // Backedge must not place Store before Phi. - S -> P [color=blue]; - P -> Loop [style=dashed]; Return -> P [color=blue]; + + P [label="Phi(memory)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; + S [label="Loop-body Store" shape=octagon style="filled" fillcolor="#dcecff"]; + P -> Entry [color="#2867b2"]; + P -> S [color="#2867b2",constraint=false]; // Backedge must not place Store before Phi. + S -> P [color="#2867b2"]; + P -> Loop [style=dashed,color="#9396a3"]; Return -> P [color="#2867b2"]; Return -> S [style=invis]; // Layout only: Phi, Store, Return from left to right. + Return [shape=box style="filled" fillcolor="#fff1c4"]; + Entry [shape=octagon style="filled" fillcolor="#dcecff"]; + Loop [shape=box style="rounded,filled" fillcolor="#ffe0ab"]; } diff --git a/chapter10a/docs/example2b.svg b/chapter10a/docs/example2b.svg index 8fff33d4..77ebec85 100644 --- a/chapter10a/docs/example2b.svg +++ b/chapter10a/docs/example2b.svg @@ -4,70 +4,70 @@ - - + + Memory - + P - -Phi(memory) + +Phi(memory) S - -Loop-body Store + +Loop-body Store P->S - - + + Entry - -Entry + +Entry P->Entry - - + + Loop - -Loop + +Loop P->Loop - - + + S->P - - + + Return - -Return + +Return Return->P - - + + diff --git a/chapter10a/docs/example2c.gv b/chapter10a/docs/example2c.gv index ef8a5fc8..f3a52b4d 100644 --- a/chapter10a/docs/example2c.gv +++ b/chapter10a/docs/example2c.gv @@ -1,9 +1,14 @@ 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; - node [shape=box]; - M [label="Prior memory"]; - L [label="Load p.x"]; - S [label="Store p.x"]; - L -> M [color=blue]; S -> M [color=blue]; - S -> L [style=dashed,label="execute load first"]; + + M [label="Prior 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"]; } diff --git a/chapter10a/docs/example2c.svg b/chapter10a/docs/example2c.svg index c7b37912..2aa8fa2d 100644 --- a/chapter10a/docs/example2c.svg +++ b/chapter10a/docs/example2c.svg @@ -4,47 +4,47 @@ - - + + Memory - + M - -Prior memory + +Prior memory L - -Load p.x + +Load p.x L->M - - + + S - -Store p.x + +Store p.x S->M - - + + S->L - - -execute load first + + +execute load first diff --git a/chapter10a/docs/lattice.gv b/chapter10a/docs/lattice.gv index 733a5287..eb4d7fb1 100644 --- a/chapter10a/docs/lattice.gv +++ b/chapter10a/docs/lattice.gv @@ -69,7 +69,7 @@ digraph Lattice { 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: *s1", 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]; diff --git a/chapter10a/docs/lattice.svg b/chapter10a/docs/lattice.svg index 24c0de8c..c8bed535 100644 --- a/chapter10a/docs/lattice.svg +++ b/chapter10a/docs/lattice.svg @@ -4,122 +4,122 @@ - - + + Lattice - + cluster_control - -Control + +Control cluster_integer - -Integer + +Integer cluster_pointer - -Pointer = nullability × struct type + +Pointer = nullability × struct type cluster_struct - -Struct -named collection of named scalar types + +Struct +named collection of named scalar types cluster_memory - -Memory + +Memory cluster_tuple - -Tuple -collection of types + +Tuple +collection of types TOP - -⊤ + +⊤ XCTRL - -⊤:ctrl + +⊤:ctrl TOP->XCTRL - - + + INT_TOP - -⊤:int + +⊤:int TOP->INT_TOP - - + + PTR_TOP - -⊤:ptr -[*⊤:struct] + +⊤:ptr +[*⊤:struct] TOP->PTR_TOP - - + + STRUCT_TOP - -⊤:struct -[struct top] + +⊤:struct +[struct top] TOP->STRUCT_TOP - - + + MEM_TOP - -⊤:mem + +⊤:mem TOP->MEM_TOP - - + + TUPLE_TOP - -⊤:tuple + +⊤:tuple TOP->TUPLE_TOP - - + + @@ -136,8 +136,8 @@ XCTRL->CTRL - - + + @@ -155,8 +155,8 @@ INT_TOP->INT_NEG - - + + @@ -167,8 +167,8 @@ INT_TOP->INT_ZERO - - + + @@ -179,8 +179,8 @@ INT_TOP->INT_POS - - + + @@ -218,51 +218,50 @@ PTR_NULL - -null -[*⊤:struct?] + +null PTR_TOP->PTR_NULL - - + + PTR_PERSON - -*Person + +*Person PTR_TOP->PTR_PERSON - - + + PTR_S1 - -*s1 + +*s1 PTR_TOP->PTR_S1 - - + + PTR_MORE - -*s2, … + +*s2, … PTR_TOP->PTR_MORE - - + + @@ -287,8 +286,8 @@ PTR_NULL->PTR_PERSON_NIL - - + + @@ -299,8 +298,8 @@ PTR_NULL->PTR_S1_NIL - - + + @@ -311,8 +310,8 @@ PTR_NULL->PTR_MORE_NIL - - + + @@ -331,41 +330,41 @@ 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 - - + + @@ -397,8 +396,8 @@ STRUCT_TOP->STRUCT_PERSON - - + + @@ -410,8 +409,8 @@ STRUCT_TOP->STRUCT_S1 - - + + @@ -423,8 +422,8 @@ STRUCT_TOP->STRUCT_S2 - - + + @@ -435,8 +434,8 @@ STRUCT_TOP->STRUCT_MORE - - + + @@ -488,8 +487,8 @@ MEM_TOP->MEM_BOT - - + + @@ -501,38 +500,38 @@ TUPLE1 - -(type) + +(type) TUPLE_TOP->TUPLE1 - - + + TUPLE2 - -(type, type) + +(type, type) TUPLE_TOP->TUPLE2 - - + + TUPLEN - -(type, …) + +(type, …) TUPLE_TOP->TUPLEN - - + + @@ -549,22 +548,22 @@ TUPLE1->TUPLE_BOT - - + + TUPLE2->TUPLE_BOT - - + + TUPLEN->TUPLE_BOT - - + + -- cgit v1.2.3