From 777522a048682b75f82546b5f361102594d95551 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Tue, 14 Nov 2023 17:04:06 -0700 Subject: [PATCH] Graphviz: finish types --- graphviz/functions/get_instant.dot | 34 +++++++++++++++ graphviz/functions/types/gen_real.dot | 59 ++++++++++++++++++++++++++ graphviz/functions/types/gen_tuple.dot | 24 +++++++++++ 3 files changed, 117 insertions(+) create mode 100644 graphviz/functions/get_instant.dot create mode 100644 graphviz/functions/types/gen_real.dot create mode 100644 graphviz/functions/types/gen_tuple.dot diff --git a/graphviz/functions/get_instant.dot b/graphviz/functions/get_instant.dot new file mode 100644 index 0000000..4349329 --- /dev/null +++ b/graphviz/functions/get_instant.dot @@ -0,0 +1,34 @@ +digraph fn_get_instant { + labelloc="t"; + graph [fontname = "cc wild words"]; + node [fontname = "cc wild words"]; + edge [fontname = "cc wild words"]; + + label="fn_gen_boolean()"; + fontname=lovebeat; + rankdir=TB; + newrank=true; + + a0 [label="choice" rank=max]; + a1 [label="suitable subroutine"]; + a2 [label="suitable variable"]; + a3 [label="suitable literal"]; + + {rank=same; a1 a2 a3} + + a4 [label="subroutine"]; + a5 [label="variable"]; + a6 [label="literal"]; + + a7 [label="return" shape=oval style=filled fillcolor=lightskyblue1]; + + a0 -> a1; + a0 -> a2; + a0 -> a3; + + a1 -> a4 -> a7; + a1 -> a2; + a2 -> a5 -> a7; + a2 -> a3; + a3 -> a6 -> a7; +} diff --git a/graphviz/functions/types/gen_real.dot b/graphviz/functions/types/gen_real.dot new file mode 100644 index 0000000..674dfe4 --- /dev/null +++ b/graphviz/functions/types/gen_real.dot @@ -0,0 +1,59 @@ +digraph fn_gen_integer { + labelloc="t"; + graph [fontname = "cc wild words"]; + node [fontname = "cc wild words"]; + edge [fontname = "cc wild words"]; + + label="fn_gen_integer()"; + fontname=lovebeat; + rankdir=LR; + newrank=true; + + a0 [label="choice" rank=max]; + + a1 [label="ADD expr"]; + a2 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + a3 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + a4 [label="SUB expr"]; + a5 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + a6 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + a7 [label="MUL expr"]; + a8 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + a9 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + b0 [label="DIV expr"]; + b1 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + b2 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + b3 [label="REM expr"]; + b4 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + b5 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + b6 [label="EXP expr"]; + b7 [label="lhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + b8 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + b9 [label="POS expr"]; + c0 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + c1 [label="NEG expr"]; + c2 [label="rhs gen_real()" shape=diamond style=filled fillcolor=lightcoral]; + + c5 [label="gen_integer()" shape=diamond style=filled fillcolor=lightcoral]; + c3 [label="get_instant()" shape=diamond style=filled fillcolor=lightcoral]; + c4 [label="return" shape=oval style=filled fillcolor=lightskyblue1]; + + + a0 -> a1 -> a2 -> a3 -> c4; + a0 -> a4 -> a5 -> a6 -> c4; + a0 -> a7 -> a8 -> a9 -> c4; + a0 -> b0 -> b1 -> b2 -> c4; + a0 -> b3 -> b4 -> b5 -> c4; + a0 -> b6 -> b7 -> b8 -> c4; + a0 -> b9 -> c0 -> c4; + a0 -> c1 -> c2 -> c4; + a0 -> c3 -> c4; + a0 -> c5 -> c4; +} diff --git a/graphviz/functions/types/gen_tuple.dot b/graphviz/functions/types/gen_tuple.dot new file mode 100644 index 0000000..9ca852e --- /dev/null +++ b/graphviz/functions/types/gen_tuple.dot @@ -0,0 +1,24 @@ +digraph fn_gen_integer { + labelloc="t"; + graph [fontname = "cc wild words"]; + node [fontname = "cc wild words"]; + edge [fontname = "cc wild words"]; + + label="fn_gen_integer()"; + fontname=lovebeat; + rankdir=LR; + newrank=true; + + a0 [label="choice" rank=max]; + a1 [label="for each field"]; + a2 [label="gen that type"]; + a3 [label="get_instant()" shape=diamond style=filled fillcolor=lightcoral]; + a4 [label="return" shape=oval style=filled fillcolor=lightskyblue1]; + + {rank=same; a1 a2 a3} + + a0 -> a1 -> a4; + a0 -> a3 -> a4; + a1 -> a2; + a2 -> a1; +}