Reading message traces
Diagram and Trace

--- routing traces ---
⟹ main.“” ⟪“”₋“@1”⟫
↓ main.“” ➔ main.Echo₀.“” ⟪“”₋“@1”⟫
⋯ main.Echo₀.“” ∴ main.Echo₀.“” ⟪“”₋“@1”⟫
→ main.Echo₀.“” ➔ main.Echo₁.“” None
⋯ main.Echo₁.“” ∴ main.Echo₁.“” ⟪“”₋“@1”⟫
↑ main.Echo₁.“” ➔ main.“” ⟪“”₋“@1”⟫
--- done ---
How to read the trace:
- each line is indented sequentially
- each line begins with a routing operation
⟹inject external message
↓route downwards (from input gate to a child’s input port)
→route across (from child’s output port to a child’s input port)
↑route up (from child’s output port to output gate)
⇶route through (from input gate to output gate) (useful for stubbing out components during development)
⋯invoke child’s handler which enqueues a message on its output port
Messages are formatted as:
⟪“”₋“@1”⟫
- port name vs. message payload
- during bootstrap, all portnames are strings, all payloads are strings (to accomodate readability of bootstrap intermediate results)
Example
The below output is read as:
- inject message
⟪“”₋“@1”⟫into componentmainon port""(the “@1” is a string payload that reminds me of the test number (#1 in this case)) - invoke sub-component
main.Echo₀to handle a message on port"", the message is⟪“”₋“@1”⟫- in this case
mainis the tab name of the top-level diagram, andEcho₀is the 0’th instance of theEchotemplate that belongs tomain - each Container component generates a set of unique instances of template components specific to the Container
- note that a Container may contain other Containers - these are recursively instantiated before the run
- in this case
- an output message from
main.Echo₀from port""is routed across tomain.Echo₁on its input port"" main.Echo₁is invoked and it generates a single output message on its""output port- the output message from
main.Echo₁is routed upwards to the""output port (gate) ofmain
--- routing traces ---
⟹ main.“” ⟪“”₋“@1”⟫
↓ main.“” ➔ main.Echo₀.“” ⟪“”₋“@1”⟫
⋯ main.Echo₀.“” ∴ main.Echo₀.“” ⟪“”₋“@1”⟫
→ main.Echo₀.“” ➔ main.Echo₁.“” None
⋯ main.Echo₁.“” ∴ main.Echo₁.“” ⟪“”₋“@1”⟫
↑ main.Echo₁.“” ➔ main.“” ⟪“”₋“@1”⟫
--- done ---
Bugs? In need of further investigation
- on line 4, the displayed message is
None- this should be a message, notNone - what will be displayed when a component produces more than one output?
- on the same output port?
- on different output ports?
- this Trace shows all routings, what if we only want a backtrace of a specific message?
- hints to self:
- each routed message should be tagged with the routing descriptor that caused it
- we should be able to follow the trace backwards starting at a specific output message, displaying only a trace of how the message was generated
- a Trace is really a tree of Traces
- when looked at in the forward direction, we should see a tree
- when looked at in the backwards direction, we should only only see a single backtrace (trace thread)
- hints to self:
Appendix - See Also
References
https://guitarvydas.github.io/2004/01/06/References.html
Blog
Blog
obsidian blogs (see blogs that begin with a date 202x-xx-xx-)
Videos
videos - programming simplicity playlist
Pamphlets
Discord
Programming Simplicity all welcome, I invite more discussion of these topics, esp. regarding Drawware and 0D
@paul_tarvydas