Documentation

AVL, the visual language

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.

How traits talk

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:

NoteListNoteFormNoteListNoteFormUserSAVEpersist create NoteNOTE_SAVED → RELOADfetch NoteNotesLoaded → readyrender-ui mainUser

The state machine

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
RAISE
SUBMIT
APPROVE
REJECT
NEW_CLAIM
REVISE
draft
submitted
approved
rejected

Reading a diagram

MarkMeaning
NodeA state. The initial state carries the entry marker.
EdgeA transition. The label is the event; the glyphs are its effects (set, persist, emit, render-ui, …).
Dashed edgeA transition back to an earlier state.
HighlightThe 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.

Glyphs

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.

Orb

A programming language of composable state machines.

© 2026 Almadar. Ljubljana, Slovenia.
Not reported here