Interpreted and compiled profiles plus validated agentic conversion.
Core-1 Modalities, Dynamic Values, and Adaptation
Status: normative shared preview
Independent axes
C1-MOD-001 — Per-message authoring modality. Every Core-1 message declares exactly one authoring modality:
public interpreted algorithm message explore(...) ...
public compiled algorithm message serve(...) ...
The rule applies without exception to algorithm, compute, state, flow,
and optimize, including portable templates. Initializers retain their fixed
lifecycle form and have no modality. Core-0 syntax and artifacts are unchanged.
C1-MOD-002 — Modality is not a tier. Authoring modality and execution tier
are orthogonal. An interpreted message executes from the checked semantic AST.
A compiled message may execute through that interpreter, a conforming JIT, or
an AOT/native materializer. compiled means that the body passed the closed,
materializable profile; it does not require eager native compilation.
C1-MOD-003 — Dependency-closure admission. Native, JIT, and AOT admission
walk the complete local call closure. Reaching one interpreted message rejects
the materialization with ZL-MODALITY-0002. The interpreter may execute mixed
closures. A modality change is therefore atomic over the dependency closure
submitted by an adaptive generation, never a partially swapped call graph.
C1-MOD-004 — Different language envelopes. The interpreted profile may admit operations that the compiled profile cannot prove or materialize. A conversion is not specified as a syntactic transpilation and need not preserve internal structure. It must preserve the typed boundary behavior and declared contracts selected by the validation policy.
Dynamic values and late binding
C1-DYN-001 — Owned boundary value. Dynamic is an owned, durable boundary
value with closed runtime tags null, bool, i64, f64, text, list, and
record. Lists and records recursively own their children. They cannot contain
borrows, transactions, process capabilities, device leases, searches, or flow
activation authority, so a Dynamic value may cross every interpreted domain
boundary under the ordinary domain boundary rules.
C1-DYN-002 — Explicit compiled consumption. Compiled code may receive and
return Dynamic, but it may consume a payload only after an explicit closed
tag match. There is no implicit numeric conversion, truthiness, field coercion,
or hidden default. A failed typed read is a checked type mismatch.
C1-DYN-003 — Late lookup authority. Name-based record lookup is a
reflect operation. It requires both reflect in the transitive declared
effect set and a runtime-issued opaque reflect capability. Declaring the effect
does not mint authority. Missing either side fails before lookup.
C1-DYN-004 — Canonical transport. Dynamic boundary serialization uses
ZLD2: a versioned canonical recursive payload and SHA-256 digest. Record keys
are stored in UTF-8 byte order and duplicates reject. Malformed, noncanonical,
or digest-mismatched values fail closed. Runtime type identities hash only the
closed structural type, not scalar values.
Agent-driven conversion
C1-ADAPT-001 — Agent discretion. After policy evidence is available, the runtime may ask an agent whether to keep the active body or propose the other authoring modality. The language runtime owns admission; an agent response is untrusted candidate source, never executable authority.
C1-ADAPT-002 — Candidate gate. A candidate is compiled under the same edition, preview, semantic profile, and verification mode. Every typed contract identity in the reachable closure, including imported private call targets and their ownership, capability, boundary, and behavioral-contract facts, must remain identical. The requested message must have the selected target modality. Policy replay cases must reproduce status and result, and all ordinary compile-time contracts still apply. Failure leaves the active generation untouched.
C1-ADAPT-003 — Atomic generation and lineage. Passing a gate atomically promotes the complete candidate module closure. Dispatch observes either the old or new generation. Generation number, active contract/body/implementation identities, execution tier, evidence count, and a domain-separated lineage identity are observable through the v2 view.
C1-ADAPT-004 — Divergence. A later contract failure, replay mismatch, external receipt mismatch, or shadow-evaluator mismatch may report divergence against the exact active implementation identity. The runtime atomically restores the prior generation, resets to the checked interpreter tier, and quarantines the divergent body identity. A quarantined body cannot be promoted again in that dispatch lifetime.
C1-ADAPT-005 — Source-independent requests. Decision and transformation callbacks receive the active typed message, observation evidence, requested target, and borrowed canonical checked-AST JSON. This permits mechanical or agentic conversion in either direction without requiring original source text. For a closure containing imports, the package callback returns a complete source set. The runtime resolves and links that set with the Core-1 package compiler and admits only the self-contained artifact whose module identity matches the active root; a missing root or partial package rejects.
Pillar application
- Algorithm messages use the rules directly.
- Compute modality describes kernel/dataflow authoring. Device execution remains an explicit boundary; Dynamic is not an implicit tensor element.
- State transitions preserve serializable transaction semantics across a generation swap. Only later transactions observe a promoted generation.
- Flow histories record implementation identity and code epoch. Existing runs replay against their recorded epoch; promotion governs later admissions.
- Optimize problems retain canonical space, evidence, and tie-breaking rules. A body or proposal that participates in problem behavior participates in the problem identity independently of the execution tier.