Localized V2 rewrite for this language is in progress. Showing English-first content for now.
Language

Designed for evidence-aware software, not just numerical output.

Sounio treats scientific trust as a language concern. The type system keeps uncertainty, provenance, and effect boundaries visible from first line to production deployment.

Core Pillars

Mechanisms that make trust and performance coexist in one systems language.

Knowledge<T> as a Primitive

Values carry uncertainty, confidence, and provenance by default instead of external spreadsheet logic.

Validated<T>

Values that pass a formal threshold check become Validated<T> — a distinct type that cannot be confused with raw measurements.

Algebra Declarations

Declare algebraic laws — commutative, associative, alternative, Fano-selective — directly on types. The e-graph optimizer uses only the rewrites your algebra permits.

Unobserved<T> & Observation

Values can remain Unobserved<T> until a comparison or I/O boundary collapses them. Bayesian and quantum measurement semantics live in the type system.

Intervention<T> & Counterfactual<T>

Intervention<T> and Counterfactual<T> are compiler-level types that carry epistemic confidence. The causal stdlib library implements Pearl’s do-operator.

Confidence-Gated Execution

Control flow can branch on confidence guarantees, so runtime behavior reflects evidence quality.

Explicit Effects

I/O, mutation, allocation, GPU, probabilistic, and observation effects are visible in function signatures. Callee effects must be a subset of the caller’s declared effects.

Units + Constraints

Dimensional analysis enforced at compile time. Refinement predicate checking works today; SMT integration planned for 2026.

The Knowledge<T> Progression

Every value evolves through four tiers — from bare numeric to a fully epistemic, provenance-tracked type.

  1. Tier 1

    T

    Raw scalar or structured value with no attached evidence metadata.

  2. Tier 2

    Quantity<T, Unit>

    Value promoted to dimension-aware representation with unit constraints.

  3. Tier 3

    Knowledge<T>

    Uncertainty, confidence, and source attribution become part of the value.

  4. Tier 4

    Knowledge<T, Provenance>

    Executable value with traceability chain for audit and reproducibility.

What Epistemic Code Looks Like

Trust conditions become explicit runtime behavior rather than hidden assumptions.

let concentration: Knowledge<f64> = Knowledge(
  9.8,
  ε=0.97,
  prov="lab_run_042"
)

if concentration.ε > 0.95 {
  approve_for_decision(concentration)
} else {
  request_remeasurement(concentration)
}

From Measurement to Decision

Uncertainty propagates automatically through every operation. Confidence gates enforce data quality at the call site — no boilerplate.

1

Measure

Capture value + uncertainty + confidence from instrument or model.

2

Propagate

Composition rules carry uncertainty through transformations.

3

Evaluate

Confidence thresholds and effect policies decide admissibility.

4

Act

Execution continues only when evidence satisfies gate criteria.