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.

Stock: three ways to change a stock level, their parts, the shared work and a declared retry family.

Loading the authored layout.

ledger: a ledger with spending limits.

Loading the authored layout.

Loading the worked examples and practice.