How Orb draws a program: traits as state machines, transitions as labelled edges, and traits talking to each other as sequence diagrams.
AVL (Almadar Visual Language) draws a program the way the compiler sees it. Every diagram on this site is generated from a real program, so a picture cannot disagree with the code.
AVL draws one trait at a time. When traits react to each other, a sequence diagram shows the order: who fires which event, what each trait does, and what it sends on. In the notes example, saving a note tells the list to reload:
avl-state-machine draws one trait: states as nodes (the initial one marked), transitions as edges labelled with their event and the kinds of effects they run. Interactive programs can highlight the active state and the last transition taken, which is how the home page of this site animates its approval machine.
Approval
on Expense · states: 4 · transitions: 6| Mark | Meaning |
|---|---|
| Node | A state. The initial state carries the entry marker. |
| Edge | A transition. The label is the event; the glyphs are its effects (set, persist, emit, render-ui, …). |
| Dashed edge | A transition back to an earlier state. |
| Highlight | The current state, or the transition that just fired. |
Mount transitions (INIT) are not drawn: they run once when a page opens and are not something a user can trigger.
The avl-glyph pattern draws the language's building blocks on their own: an entity, a field and its type, an effect, a guard, an event. Use them to annotate your own documentation.
Validation lists what the compiler checks.
A programming language of composable state machines.