Reading diagrams / Topic 29 of 42

Who runs the rounds

The rule

Under each lane, a loop arrow runs back into the program box. Its caption says what repeats the step, what the replies come from, and which routes run it: “each call of /reviews/run runs it”. The caption also says how the step repeats: a fold, such as “fold_until”, repeats the round; a definition that calls itself takes a round each time; rounds written out one after another are a number the code fixes. A route named there starts that engine, and the engine runs the rounds.

A lane drawn faint, with its wires, pills and loop, is an engine that does not run. A constant of the program picks one of two engines, and the caption under each of their loops names it: “runs: constant case_carry = Stored” under the one it picks, and “not run: constant case_carry = Stored” under the other. The constant is one value in the program's code, the same for every call. Both engines are drawn because both are checked, and a faint lane's wires and caption say what it would reach and which route would run it if the constant picked it. In Icetakes, the faint lane 1 reads “each call of /internal/cases/advance would run it”, so each call runs lane 2, not lane 1.

A route can also take a single step itself, with no engine. A dashed green line from its row into the top of the box, with “takes one step itself” printed over it, is such a route, and the box lists it after “one step per call of”. Each call takes one step of the program and acts on the answer. Only a loop caption says a route runs an engine.

The map draws that a reply comes back, and from which resource. What a reply says, or whether it is right, is not drawn.

One more mark sits on the program box. When a request carries a choice among the program's own kinds, short openings under it list the kinds. In Icetakes, ReadPolicy carries a Role, and the openings under it are Lawyer, DevilsAdvocate and TaxonomyClerk. A bold name under a request is the program's own word for a kind, where a match maps each kind to one plain value; hover over it to see the kind.

review-desk.

Loading the system map.

problemsapi.

Loading the system map.

Icetakes: its program has three engines, and one route takes a single step itself. Lanes 1 and 2 come from one package, CaseAdvance, so each is named by its definition too, and a constant picks which of them runs.

Loading the system map.

Loading the worked examples and practice.