Skip to content

A small tested application diagrams ​

A small tested application

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 5 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. Logger is provided by ConsoleLogger. The same instance is shared.

Startup ​

It sets numbers of type List<int> to a list containing 1, 2. It sets pair of type Tuple<int,string> to a tuple containing 1, "apple". It sets unique of type Set<int> to a set containing 1, 2, 1. It sets fruit of type Map<int,string> to a map with 1 mapped to "apples"; 2 mapped to "pears". source

It sets calculator to a Calculator using injected Logger for _logger. It prints calculator.add with right from the item at index 1 in numbers and left from the item at index 0 in numbers using injected Console for console. It prints pair.get with index 1. It prints the number of elements in unique. source

It prints the value under 2 in fruit. It prints load with fail true. If this work raises FileError, it prints "load failed as expected". If this work raises IndexError, it prints "unexpected index failure". source

Data flow ​

100%
Mermaid source
flowchart TD
    n0["calculator"]
    n1["logging"]
    n2["Startup"]
    n0 -->|"Logger.log(message)"| n1
    n2 -->|"Calculator / Calculator.add(left, right) + 1 more → Calculator / int + 1 more"| n0

Package boundaries ​

logging package calls
100%
Mermaid source
flowchart LR
    n0["August libraries"]
    n1["logging"]
    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
calculatorlogging1Inputs, results and call sites
loggingAugust libraries1Inputs, results and call sites
Startupcalculator3Inputs, results and call sites

Data crossing these boundaries (5 contracts) ​

calculator → logging ​

1 operation, 1 site

Logger.log · interface dispatch

Inputs: message: string. Result: void.

Caller or entryEvidence
Calculator.addCall site · Caller explanation

logging → August libraries ​

1 operation, 1 site

Console.write · interface dispatch

Inputs: value: string. Result: void.

Caller or entryEvidence
ConsoleLogger.logCall site · Caller explanation

Startup → calculator ​

3 operations, 3 sites

Calculator

No caller-supplied inputs. Result: Calculator.

Caller or entryEvidence
StartupCall site · Caller explanation

Calculator.add

Inputs: left: int, right: int. Result: int.

Caller or entryEvidence
StartupCall site · Caller explanation

load

Inputs: fail: bool. Result: string.

Caller or entryEvidence
StartupCall site · Caller explanation

Open a folder ​

FolderRead
loggingFolder data flow

Open a module ​

ModuleRead
calculator.augFlow and sequences · Explanation
logging/console.augFlow and sequences · Explanation
logging/export.augFlow and sequences · Explanation
logging/logger.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