Explicit logic declarations for program verification and optimization.
Topo extracts the logical requirements of a program — what's public, what must run before what,
what can run in parallel — from implicit code patterns into explicit .topo declarations.
These declarations are auditable, machine-verifiable contracts.
Non-external functions cannot access system capabilities. Violations are compile-time errors, not warnings.
Explicit stage ordering, parallelism, and visibility give the compiler information beyond what traditional analysis can derive.
A 1000-line PR might have 3 unsafe points marked external — reviewers check those, not the entire diff.
Every .topo declaration falls into one of three classes.
Which symbols are public API, which are implementation detail. Enables visibility verification, dead code elimination, and symbol obfuscation.
Which operations must precede which (stage<N>). Enables stage isolation verification and instruction reordering.
Which operations are independent (pipeline DAG). Enables automatic parallelization and pipeline codegen.
Per-language SDKs with analysis, transpilation, and LSP support.