Language Spec (v1.0.0)

A high-level map of the Sounio specification and how it relates to the compiler.

Language Spec (v1.0.0)

The current spec is a release-candidate document with Last Updated: 2026-01-29.

This page is a navigational guide: it tells you what’s in the spec and what to cross-check against the implementation.

The Source of Truth

What the Spec Covers (At a Glance)

  • Lexical structure: keywords, tokens, identifiers, literals
  • Types: primitives, generics, structs/enums/traits, Knowledge<T> (epistemic types)
  • Expressions & statements: precedence, control flow
  • Declarations: modules/imports/visibility, type aliases, effect declarations
  • Effect system: with ..., operations, handlers (model-level)
  • Ownership/borrowing: linear/affine intent and rules
  • Units of measure: dimension model, unit definitions, conversions
  • Refinement types: { x: T | predicate } syntax and checking model
  • GPU programming: kernel surface syntax and execution model
  • Standard library: expected modules and responsibilities

How to Use the Spec Productively

  1. Use the spec to understand the intended model (especially around effects, ownership, epistemics, and units).
  2. For “what compiles today”, validate against:
    • a runnable tests/run-pass/ fixture, or
    • souc check your_file.sio in your current build configuration.

Next