From cbe0e3cccfde0c0b5d342f169e9653994e18692f Mon Sep 17 00:00:00 2001 From: Jasper den Ouden Date: Sat, 5 Mar 2022 22:43:56 +0100 Subject: [PATCH] Dot file attempts --- doc/other/component_process.dot | 37 +++++++++++++++++++++++++++++++++ doc/other/extract_process.dot | 18 ++++++++++++++++ doc/other/variable_process.dot | 34 ++++++++++++++++++++++++++++++ doc/other/variant_process.dot | 26 +++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 doc/other/component_process.dot create mode 100644 doc/other/extract_process.dot create mode 100644 doc/other/variable_process.dot create mode 100644 doc/other/variant_process.dot diff --git a/doc/other/component_process.dot b/doc/other/component_process.dot new file mode 100644 index 0000000..c7905b6 --- /dev/null +++ b/doc/other/component_process.dot @@ -0,0 +1,37 @@ + +digraph variable_process { + + subgraph cluster_obtain { + label = "obtaining component" + "originating object,\ncomponent" -> { "both exist" "stack empty" "missing component"} + "both exist" -> "get it" + "stack empty" -> "user error(1)" + "missing component" -> "in setting stage" -> "create & add" + "missing component" -> "as object otherwise" -> "user error(2)" + } + + { "create & add" "get it" } -> "have component" -> { "get the value" "set it" } + + subgraph cluster_getting { + label="getting" + "get the value" -> {ny_g a_g} + ny_g [ label="not yet set" ] + a_g [ label="already set" ] + ny_g -> "bug:\nshould fail at obtaining" + a_g -> "type is in there" + } + "type is in there" -> use + + use [ label="use further\npotentially call" ] + + subgraph cluster_setting { + label="setting" + "set it" -> "not yet set" + "set it" [ label="set it\n(input type)" ] + "not yet set" -> "bug:\nshouldn't be obtained" + "set it" -> "type already\nspecified" -> { "is subtype" "not subtype" } + "not subtype" -> "in setting stage\n(still)" -> "combine types" + "not subtype" -> "object final" -> "user error(3)" + } + {"combine types" "is subtype"} -> done +} diff --git a/doc/other/extract_process.dot b/doc/other/extract_process.dot new file mode 100644 index 0000000..67e4846 --- /dev/null +++ b/doc/other/extract_process.dot @@ -0,0 +1,18 @@ + +digraph extract { + label = "NOTE: not sure about this one" + parse [ shape=box ] + "type calculate" [ shape=box ] + "to c" [ shape=box ] + parse -> "type calculate" + "type calculate" -> "extract top" [ xlabel="type calculated code objects +from each function variant" minlen=2 ] + "extract top" -> "to c" [ label="extracted, stay_in +appended for each statement" ] + + subgraph cluster_extract { + "extract top" -> extract + label = "each _statement_" + extract -> {"extracted" "stay in arguments"} [ label="append" ] + } +} diff --git a/doc/other/variable_process.dot b/doc/other/variable_process.dot new file mode 100644 index 0000000..54863d4 --- /dev/null +++ b/doc/other/variable_process.dot @@ -0,0 +1,34 @@ + +digraph variable_process { + + subgraph cluster_obtain { + label = "obtaining variable object" + "access variable" -> { exists missing } + exists -> "get it" + missing -> "create & add" + } + { "create & add" "get it" } -> "have variable" -> { "set it" "get the value" } + subgraph cluster_getting { + label="getting\nin a loop it will redo body\nuntil values stable" + "get the value" -> {ny_g a_g} + ny_g [ label="not yet set" ] + a_g [ label="already set" ] + ny_g -> "user error" + ny_g [ tooltip="at type-calculation-time, not define-time" ] + a_g -> "type is in there" + } + "type is in there" -> use + + use [ label="use further\npotentially call" ] + + subgraph cluster_setting { + label="setting" + "set it" -> { "not yet set" "already set" } + "set it" [ label="set it\n(input type)" ] + just_given [ label="the type is\njust given type" ] + combine [ label="combine with\nexisting type" ] + "not yet set" -> just_given + "already set" -> combine + } + {just_given combine} -> done +} diff --git a/doc/other/variant_process.dot b/doc/other/variant_process.dot new file mode 100644 index 0000000..e4a2aa5 --- /dev/null +++ b/doc/other/variant_process.dot @@ -0,0 +1,26 @@ + +digraph user_fun_process { + + "user function called\nwith input" -> "look if variant\nexists" -> {yes no} + {yes "finish variant"} -> "put in variant\nput in stack result" + no -> "new variant" + + subgraph cluster_variant { + "new variant" -> "set unresolved distance zero" -> "run code" -> "calls another function" -> { "it resolves" unres } + unres [ label="distance to unresolved" ] + "run code" [ shape=square ] + unres -> "keep value:\ndistance to unresolved minimum of these" + distres_leq [ label="distance to resolved <= max depth of call" ] + distres_ge [ label="distance to resolved > max depth of call +or none unresolved" ] + "run code" -> "end of code" -> distres_ge + distres_ge -> "figure return value" [ label="escape loop" ] + "figure return value" -> "finish variant" + "end of code" -> distres_leq -> settemp -> "run code" + + settemp [ label="set temporary results\nresolved distance" ] + + //distres [ shape=diamond ] + //{ settemp unres } -> distres -> { unres distres_leq distres_ge} [ style=dashed ] + } +} -- 2.45.2