Skip to content

Modules and composition diagrams ​

Modules and composition

Start with how the application begins, then follow data between its folders. Open an operation to see its decisions, calls, failures and cleanup. Its explanation supplies the exact contract and linked dependencies.

This view includes 6 application source files. Package and interface boundaries show checked contracts; their runtime implementations are not expanded. The views describe the checked program, not desired requirements or a recorded execution.

Where execution begins ​

Providers ​

Console is provided by SystemConsole. The same instance is shared.

Application is provided by ApplicationImpl. The same instance is shared. It requires bindings for Console. Include providers from Counters.

Startup ​

It sets app to the instance provided for Application. It calls app.start. It sets names to a map with 1 mapped to "apple"; 2 mapped to "pear". If the value under 2 in names is null, it prints "missing fruit". source

If the value under 2 in names is not null, using name for it prints name. It reads a tuple containing 3, "plum" once and binds [0] as code and [1] as label. It prints the number of elements in a set containing a Fruit with code and name from label, a Fruit with name from label and code. Within a task and ownership scope, it sets counter to the instance provided for Counter. source

With temporary permission to change counter, it calls counter.increment. It prints counter.value. On leaving this scope, join its child tasks and release its local values. It prints double with amount 7. source

It calls double with amount -1. If this work raises RangeError, it prints "negative amount rejected". source

Data flow ​

100%
Mermaid source
flowchart TD
    n0["counters"]
    n1["domain"]
    n2["Startup"]
    n2 -->|"Counter.increment / Counter.value → int"| n0
    n2 -->|"Application.start / double(amount) → int"| n1

Package boundaries ​

domain package calls
100%
Mermaid source
flowchart LR
    n0["August libraries"]
    n1["domain"]
    n1 -->|"Console.write(value)"| n0

Follow the data ​

Each row opens the complete operations and call sites behind one pair of logical units. A grouped arrow records calls between those units; connected arrows need not belong to the same execution path.

FromToOperationsRead
domainAugust libraries1Inputs, results and call sites
Startupcounters2Inputs, results and call sites
Startupdomain3Inputs, results and call sites

Data crossing these boundaries (6 contracts) ​

domain → August libraries ​

1 operation, 1 site

Console.write · interface dispatch

Inputs: value: string. Result: void.

Caller or entryEvidence
ApplicationImpl.startCall site · Caller explanation

Startup → counters ​

2 operations, 2 sites

Counter.increment · interface dispatch

No caller-supplied inputs. Result: void.

Caller or entryEvidence
StartupCall site · Caller explanation

Counter.value · interface dispatch

No caller-supplied inputs. Result: int.

Caller or entryEvidence
StartupCall site · Caller explanation

Startup → domain ​

3 operations, 5 sites

Application.start · interface dispatch

No caller-supplied inputs. Result: void.

Caller or entryEvidence
StartupCall site · Caller explanation

Fruit · value construction

Inputs: code: int, name: string. Result: Fruit.

Caller or entryEvidence
StartupCall site · Caller explanation
StartupCall site · Caller explanation

double

Inputs: amount: int. Result: int.

Caller or entryEvidence
StartupCall site · Caller explanation
StartupCall site · Caller explanation

Open a folder ​

FolderRead
domainFolder data flow

Open a module ​

ModuleRead
counters.augFlow and sequences · Explanation
domain/app.augFlow and sequences · Explanation
domain/export.augFlow and sequences · Explanation
domain/models.augFlow and sequences · Explanation
domain/numbers.augFlow and sequences · Explanation
main.augFlow and sequences · Explanation

These are static call boundaries, not a request trace. Interface implementations and foreign internals stop at their checked contracts. Dotted arrows defer a callback or browser action. Imports alone do not imply a call.

Last updated:

The world runs on language