Reading diagrams / Topic 39 of 42
Authored layouts: the author’s boxes, the compiler’s facts
The rule
An authored layout is an arrangement of a program that someone, often an agent, writes: which definitions share a box, what each box is called, and where it goes. Yichus checks it against the compiled program and draws it. A layout that leaves a definition out, places one twice, or names one the program does not have is refused, not drawn.
Each box carries the tag “Authored region” above its name, such as “Shared work”: the name, like the grouping, is the author's, and nothing checks it. What is inside is computed. The count opens to list every definition in the box, and “Effects and connections” opens to its direct effects, what the box's own definitions do, such as “write stock”, and the boxes it uses and is used by.
Arrows join boxes, and they are computed. A solid arrow is a checked reference: a definition in one box names one in the other. A dashed arrow is a declaration or matched structure, such as a definition that fills a declared family, not a call. A fan of arrowheads is one route from several boxes, and an arched crossing does not join two routes. The picture draws the selected box's arrows; the checkbox above it draws them all. Selecting an arrow writes its caption under the picture: each definition that references one in the other box, such as transfer → within_limits. A definition the caption does not name makes no reference across that arrow, even if its box is joined to the other.
The line under the picture counts unresolved occurrences: calls to local functions or computed values whose target the compiler did not record. Stock has four, all in retry_flow. From a box that holds one, a missing arrow does not rule a reference out.
The legend sums it up: region names and grouping are authored, and arrows and positions do not claim execution order. The author's longer words, the layout's title and each box's description, sit below the picture under “Author’s notes”, not checked by Yichus.
- Two definitions in one box: the layout put them together. In different boxes: it did not. A box's name is the author's.
- A solid arrow whose caption names the two definitions confirms the reference; one that names others rules it out. No solid arrow rules one out, unless the box it would leave holds an unresolved occurrence; then the picture can't tell. A dashed arrow is not a reference.
- Direct effects confirm what a box's own definitions do; an effect missing there is not done by them, though a box they use may do it.
- Whether the grouping is right, and what runs first: the picture can't tell.
Stock: three ways to change a stock level, their parts, the shared work and a declared retry family.
ledger: a ledger with spending limits.
How to read this: what each mark in these pictures means
Loading the worked examples and practice.