domain/app.aug diagrams
Project overview · Compiled explanation
Class interactions
Mermaid source
flowchart TD
n0["Console"]
n1["Application"]
n2["ApplicationImpl"]
n2 -->|"calls write; depends on console"| n0
n2 -->|"implements"| n1
Sequences
Call arrows identify checked targets; loop and branch frames determine when they run. Open that target’s module to follow its implementation. Branches describe alternatives; loops describe repeated work. Native calls and interface dispatch stop at their declared contracts. Exit notes end that path; enclosing recovery and cleanup remain visible.
Application.start
Writes the fruit names through the selected console.
It can call Console.write.
Interface contract; implementation selected at runtime. Explanation.
ApplicationImpl constructor
Construction stores dependencies; start performs the visible external work. It implements Application.
The console dependency is injected as Console and stored read-only.
Receive fields: injected console. Explanation.
ApplicationImpl.start
Writes the fruit names through the selected console.
It can call Console.write.
Mermaid source
sequenceDiagram
participant p0 as ApplicationImpl.start
participant p1 as console: Console
p0->>p0: Fruit(code=1, name=”apple”) · construct value
p0-->>p0: Fruit result: Fruit
p0->>p0: Fruit(name=”pear”, code=2) · construct value
p0-->>p0: Fruit result 2: Fruit
Note over p0: Set fruit to [Fruit result, Fruit result 2]
loop For each item in fruit
p0->>p1: write(value=item.name) · interface dispatch
end
Called contracts
- Console.write — august/io/contracts.aug
- Application — domain/app.aug
- Fruit — domain/models.aug