From cf5be6998b26723ae29ab1edab84d32b0702182d Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Wed, 13 Aug 2025 13:25:24 -0700 Subject: TypeAnalysis continued --- docs/lattice_iff.gv | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 docs/lattice_iff.gv (limited to 'docs/lattice_iff.gv') diff --git a/docs/lattice_iff.gv b/docs/lattice_iff.gv new file mode 100644 index 00000000..61e857b1 --- /dev/null +++ b/docs/lattice_iff.gv @@ -0,0 +1,97 @@ +digraph Lattice { + compound = true; + // Define nodes + splines=false; + node [shape=circle, style=filled]; + nodesep=0.6; + + TOP [label=<⊤>, fillcolor=black, fontcolor=white]; + BOT [label=<⊥>, fillcolor=black, fontcolor=white]; + + // ---------------------- + // Integers + INT_TOP [label=<⊤:int>, fillcolor=lightblue, shape=oval]; + INT_BOT [label=<⊥:int>, fillcolor=lightblue, shape=oval]; + + INT_HI [label="max < min" , fillcolor=lightblue, shape=oval]; + INT_XBOOL [label="1...0", fillcolor=lightblue, shape=oval]; + INT_CON [label="constants...", fillcolor=lightblue, shape=oval]; + INT_CON0 [label="0", fillcolor=lightblue]; + INT_CON1 [label="1", fillcolor=lightblue]; + INT_BOOL [label="0...1", fillcolor=lightblue,shape=oval]; + INT_LO [label="max > min" , fillcolor=lightblue, shape=oval]; + + TOP -> INT_TOP; + INT_TOP -> INT_HI; + INT_HI -> INT_XBOOL; + INT_XBOOL -> INT_CON0; + INT_XBOOL -> INT_CON1; + INT_HI -> INT_CON; + INT_CON0 -> INT_BOOL; + INT_CON1 -> INT_BOOL; + INT_BOOL -> INT_LO; + INT_CON -> INT_LO; + INT_LO -> INT_BOT; + INT_BOT -> BOT; + + INT_CON0 -> INT_CON1 -> INT_CON [style=invis]; + + // ---------------------- + // Floats + FLT_TOP [label=<⊤:flt>, fillcolor=aqua, shape=oval]; + FLT_BOT [label=<⊥:flt>, fillcolor=aqua, shape=oval]; + + FLT_CON64 [label="64b consts\n[excludes\n32b consts]" , fillcolor=aqua, shape=oval]; + FLT_CON32 [label="32b consts", fillcolor=aqua, shape=oval]; + FLT_CONPI [label="3.14159...", fillcolor=aqua, shape=oval]; + FLT_X32 [label="~f32", fillcolor=aqua]; + FLT_CON0 [label="0." , fillcolor=aqua]; + FLT_32 [label="f32" , fillcolor=aqua]; + + TOP -> FLT_TOP; + FLT_TOP -> FLT_CON64 + FLT_TOP -> FLT_CONPI + FLT_CON64 -> FLT_BOT + FLT_CONPI -> FLT_BOT + + FLT_TOP -> FLT_X32; + FLT_X32 -> FLT_CON0; + FLT_X32 -> FLT_CON32; + FLT_CON0 -> FLT_32; + FLT_CON32 -> FLT_32; + FLT_32 -> FLT_BOT + + FLT_BOT -> BOT; + + FLT_CON0 -> FLT_CON32 -> FLT_CONPI -> FLT_CON64 [style=invis]; + + // ---------------------- + // sub-Floats + FL8_TOP [label=<⊤:FP8>, fillcolor=aqua, shape=oval]; + FL8_BOT [label=<⊥:FP8>, fillcolor=aqua, shape=oval]; + + FL8_MINDOTS [label="...", fillcolor=aqua, shape=oval]; + FL8_ZERO [label="0" , fillcolor=aqua]; + FL8_MAXDOTS [label="...", fillcolor=aqua, shape=oval]; + + TOP -> FL8_TOP; + FL8_TOP -> FL8_MINDOTS; + FL8_TOP -> FL8_ZERO; + FL8_TOP -> FL8_MAXDOTS; + FL8_MINDOTS -> FL8_BOT; + FL8_ZERO -> FL8_BOT; + FL8_MAXDOTS -> FL8_BOT; + FL8_BOT -> BOT; + + FL8_MINDOTS -> FL8_ZERO -> FL8_MAXDOTS [style=invis]; + + // Additional customization + {rank=same; TOP} + {rank=same; INT_TOP; FLT_TOP; FL8_TOP; } + {rank=same; INT_CON; INT_CON0; INT_CON1; + FLT_CON32; FLT_CON64; FLT_CON0; FLT_CONPI; + FL8_MINDOTS; FL8_ZERO; FL8_MAXDOTS; + } + {rank=same; INT_BOT; FLT_BOT; FL8_BOT; } + {rank=same; BOT;} +} -- cgit v1.2.3