Skip to content

§4. Execution model overview

Generated from docs/LANGUAGE.md §4. This is the normative specification; for a guided tour see the Language and Neurosymbolic sections.

(Details in RUNTIME.md; stated here because construct semantics depend on it.)

  1. Event-sourced semantics. Every nondeterministic boundary event — model call (prompt, seed, model hash, output), embedding, contract verdict, policy decision, monitor sample — is recorded in a hash-chained append-only event log. Replay against the log is the definition of deterministic reproduction; the same substrate powers the semantic debugger, monitor windows, self-healing context, and training-data export (02; 12 §4.4; Gen traces, PLDI 2019).
  2. Parallel by default. Independent dataflow branches execute concurrently under structured-concurrency scopes (§5.12); there is no GIL. Model calls are non-blocking effects; the scheduler batches them (continuous batching default, 06) — SGLang’s co-design lesson: program structure is a cache/batch opportunity (04 §2.1).
  3. Two-phase generation. Constructs with distributional semantics use free reasoning → constrained emission, never whole-output token masking, which distorts distributions and reasoning (CRANE; Grammar-Aligned Decoding).
  4. Serial decode budget is a semantic parameter. A simulate call’s expressive class and reliability scale with granted decode length (Merrill & Sabharwal, ICLR 2024); budgets appear in signatures and are enforced by the scheduler with typed budget-exceeded errors.
  5. One incremental query engine. Compiler, LSP, verification memos, and the semantic knowledge graph are one Salsa-style red-green database (12 §4.1; 11); contracts in signatures act as cache firewalls (09 §3.2).