Knowledge<T> as a Primitive
Values carry uncertainty, confidence, and provenance by default instead of external spreadsheet logic.
Sounio treats scientific trust as a language concern. The type system keeps uncertainty, provenance, and effect boundaries visible from first line to production deployment.
Mechanisms that make trust and performance coexist in one systems language.
Values carry uncertainty, confidence, and provenance by default instead of external spreadsheet logic.
Values that pass a formal threshold check become Validated<T> — a distinct type that cannot be confused with raw measurements.
Declare algebraic laws — commutative, associative, alternative, Fano-selective — directly on types. The e-graph optimizer uses only the rewrites your algebra permits.
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> and Counterfactual<T> are compiler-level types that carry epistemic confidence. The causal stdlib library implements Pearl’s do-operator.
Control flow can branch on confidence guarantees, so runtime behavior reflects evidence quality.
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.
Dimensional analysis enforced at compile time. Refinement predicate checking works today; SMT integration planned for 2026.
Every value evolves through four tiers — from bare numeric to a fully epistemic, provenance-tracked type.
Raw scalar or structured value with no attached evidence metadata.
Value promoted to dimension-aware representation with unit constraints.
Uncertainty, confidence, and source attribution become part of the value.
Executable value with traceability chain for audit and reproducibility.
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)
} Uncertainty propagates automatically through every operation. Confidence gates enforce data quality at the call site — no boilerplate.
Capture value + uncertainty + confidence from instrument or model.
Composition rules carry uncertainty through transformations.
Confidence thresholds and effect policies decide admissibility.
Execution continues only when evidence satisfies gate criteria.