Reading diagrams / Topic 40 of 42
Aligned roles: one plan in three programs
The rule
Some programs follow one plan with different parts. Three small programs, stock, loans and orders, each write one step through a factory: a definition that takes the step's parts as parameters. The compiler checks, program by program, that the step matches its factory's body, and which definition fills each parameter.
The picture lines the programs up in columns. The head of each column names the program and its step, such as restock. Each row is a stage of the plan, and each cell holds the definition in that stage. A dot marks a “Checked role assignment”: the compiler found that definition filling a parameter of the program's factory. A cell that reads “Unpaired” has no parameter of that factory in its row; the legend's words for it, “No authored pairing; behavior unknown”, say the same from the agent's side: nothing is placed there to pair, and what the program does at that stage is unknown.
The rows are authored. Their labels, such as Validate, are violet and dashed: an agent chose which parameters sit side by side. The Pairing band at the top says when a row is more than an analogy. Over stock and loans it reads “Checked: stock and loans stamp one compiled factory skeleton, so these columns pair by parameter”: their factories are built from one compiled skeleton, so two cells in one row fill the same parameter. Over orders it reads “Authored”: the compiler finds no skeleton orders shares, so where its parts sit is the agent's reading.
Under the grid, “Checked family diagnostics” lists siblings: other steps in the same program, written with the same factory, whose bodies do not match it. “loans: 3 other siblings diverge” names three of them; press one to read what differs. “stock: resolved; no divergence recorded here” means the compiler resolved stock's flow declaration and recorded no sibling that fails to match.
Press any cell to open its details: the definition's exact name, its compiled type and the compiler's evidence. The question above the grid and the reason for the opening view are agent-authored and marked so. The picture asserts no shared behaviour and no order: its legend says “No equivalent behavior or execution order is asserted.”
- A dot: the compiler checked that the definition fills a parameter of that program's factory. “Unpaired”: no parameter of it sits in that row.
- The Pairing band: “Checked” columns pair by parameter; an “Authored” pairing is an analogy.
- Whether paired parts compute the same thing, or which runs first: the picture can't tell.
stock, loans and orders: three small programs, each with one step written through a factory.
How to read this: what each mark in these pictures means
Loading the worked examples and practice.