FOR CLINICIANS & RESEARCHERS • BIOMATERIALS & PHARMACOLOGY

Your Calculations Hide Uncertainty.

When you compute a drug dose, a patient metric, or a clinical prediction, traditional code gives you a single number with no context. Sounio automatically tracks measurement error, ISO GUM uncertainty, and data provenance through every step of execution.

Featured: Vancomycin dosing that cannot lie about uncertainty.

Built for clinical safety & high-consequence scientific software.
BETA TOOLCHAIN • SELF-HOSTED EPISTEMIC PL

Compute at the boundary between certainty and consequence.

Sounio is a systems programming language for scientific teams that need to reason not only about values, but about trust, provenance, and uncertainty at every stage of execution.

Featured: Deep-dive on the non-associative 168 Octonion theorem.

Built for teams shipping high-consequence scientific software.

EPISTEMIC SYSTEMS LANGUAGE

A programming language that carries
what it doesn't know.

Not a workaround. A type.

COMPILE-TIME PATIENT SAFETY

The gate fires before any code runs.

vancomycin_dosing.sio
fn dose_vancomycin(auc: Knowledge<f64>) -> f64
  where auc.ε >= 0.82
{
  auc.value / 24.0
}

// caller — ε = 0.71, below threshold:
let measured = Knowledge { value: 430.0, ε: 0.71 };
dose_vancomycin(measured);
E: epistemic confidence too low ε = 0.71 < where auc.ε >= 0.82 — compile rejected

Not a heuristic. Not a warning. The type checker sees ε = 0.71, the signature requires ε ≥ 0.82, and the program does not compile. The contract is in the type.

Read the full vancomycin example →

EPISTEMIC FIXED POINT

The language turned its uncertainty system on itself. Across eight bootstrap generations, the compiler tracked its own confidence through every expression. At generation eight: 113,931 expressions. All certain. Guard overhead: zero bytes. The binary proved it by compiling itself twice to the same hash.

md5(gen₂.elf) = md5(gen₃.elf) · 15,636 call sites · 0 guarded · 1.25 MB

See the bootstrap convergence proof →

Epistemic. Effect. Algebra.

Three compile-time type disciplines no other language has as first-class primitives. Each enforced at every call site. Each formally specified.

CONFIDENCE GATE
fn dose_vancomycin(auc: Knowledge<f64>) -> f64
  where auc.ε >= 0.82
{
  auc.value / 24.0
}
EFFECT TYPE
effect NonUnitary {
  amplitude: Complex<f64>
}

fn tt_amplitude(
  p1: FourMomentum, p2: FourMomentum
) -> f64 / NonUnitary {
  // …
}
ALGEBRA TYPE
algebra Octonion {
  basis: [e0..e7]
  product: fano_table
  reassociate: fano_selective
}

let count = count_nonassoc_triples();
// result: 168

The type system travels.

130 stdlib modules. Eight domains no other compiled language reaches with compile-time uncertainty, effects, and algebra together.

PHARMACOKINETICS

16 compartments. One sedenion.

14-compartment PBPK · Cayley-Dickson transfer dynamics · GUM-exact ODE

Each sedenion basis element encodes one anatomical compartment. Drug transfer between tissues is Cayley-Dickson multiplication — the algebra is the pharmacokinetics.

Explore →

STANDARD MODEL

18 constants. Every σ. Enforced.

31 modules · PDG uncertainties at every vertex · LO QED ±2% vs CERN data

The 18 Standard Model parameters carry their PDG uncertainties as Knowledge<f64>. The type checker enforces error budgets through every Feynman amplitude.

Explore →

COMPUTATIONAL PSYCHIATRY

Double-bind dynamics. In code.

Bateson L0-L3 · Spencer-Brown calculus · Pask eigenforms · executable Maturana

Second-order cybernetics formalized as running programs. Double-bind dynamics, schismogenesis, autopoiesis — not metaphors. Types.

Explore →

QUANTUM COMPUTING

No-cloning. In the type system.

Linear-typed qubits · Bell pairs · VQE H₂ ground state · compile-time no-copy

Linear types make quantum cloning a compile error. No runtime check. No convention. The no-cloning theorem is a constraint on the type of Qubit.

Explore →

PHYSICAL UNITS

mg/kg is a type. mg/L + L/h won't compile.

44 SI base + derived units · dimensional analysis at compile time · 100+ PK variables typed

Physical units are first-class types. Dimensional mismatches are compile errors. A 100-variable PBPK model carries its full unit type at every step.

Explore →

DIFFERENTIAL PRIVACY

Privacy budget. Cannot be double-spent.

Linear-typed ε · Laplace mechanism · GUM Type-B noise folded with genomic uncertainty

The privacy budget ε is a linear type — the compiler prevents double consumption. Noise folds into GUM uncertainty; both are tracked in the same type.

Explore →

GEOMETRY PROOFS

IMO theorems. Honest confidence.

AlphaGeoZero · Beta-distributed solution confidence · first geometry prover with ε

AlphaGeoZero proves IMO geometry problems and reports per-problem confidence as a Beta distribution — the first geometry prover that quantifies its own uncertainty.

Explore →

BROWSER RUNTIME

Runs in the browser. No install.

WASM target · rapamycin PBPK client-side · souc build --backend wasm

Compile to WebAssembly. The dissertation PBPK model runs in the browser tab — full stdlib, zero server, epistemic types intact.

Explore →

THE COMPILER

It compiles itself.

souc is written in Sounio and bootstrapped through three stages. Stage 2 and Stage 3 binaries are SHA-256 identical — the fixed-point is the proof.

3 bootstrap stages — C → souc₁ → souc₂ ≡ souc₃
4 compiler phases — parse / check / HLIR / emit
5 backends — x86_64 · ARM64 · PTX/GPU · WASM · Cranelift JIT
1000+ e-graph rewrite rules in the optimisation pass
LSP language server — completions, diagnostics, goto definition for VS Code, Neovim, JetBrains

Bootstrap fixed-point

# Stage 0 → 1 (C-compiled seed)
souc-seed lean_single.sio  gen1.elf

# Stage 1 → 2
./gen1.elf lean_single.sio gen2.elf

# Stage 2 → 3  (fixed-point check)
./gen2.elf lean_single.sio gen3.elf

sha256sum gen2.elf gen3.elf
# must be identical
Compiler architecture →

Honest status for pharmacology and patient-safety features — not marketing claims.

Works

  • Vancomycin ε gate — compile-fail fixtures reject under-confident dosing (ASHP ε ≥ 0.82)
  • ISO GUM propagation — Knowledge<T> uncertainty through arithmetic in stdlib epistemic lane
  • PBPK dissertation demo — browser-side rapamycin & semaglutide compartment simulation

Scaffolding

  • Provenance metadata — prov strings on Knowledge<T>; full audit chain still expanding
  • Clinical Lean obligations — partial formal verification; not a regulatory submission

Missing

  • EHR / FHIR integration — no live hospital connector in public artifacts
  • Multi-site clinical validation — single-author research codebase, not a trial platform

See vancomycin clinical proof →

Clone the repo. Run the self-hosted compiler. Read the proof surfaces. The public onboarding path is the checked self-hosted launcher. It type-checks and compiles to host binaries — no Rust/Cargo build step required for the default workflow.

$ git clone https://github.com/sounio-lang/sounio.git