title: T81 Foundation Specification — T81VM nav:
Version 1.1 — Beta
Status: Beta
Last Revised: 2026-03-01
Applies to: TISC, T81Lang, Axion, Cognitive Tiers
The T81 Virtual Machine (T81VM) is the deterministic execution environment for TISC programs.
This document defines the execution modes, determinism constraints, concurrency model, memory model, and Axion integration.
This specification defines:
It is normative for all T81VM implementations.
T81VM MUST support at least one of the following execution modes; both are recommended:
Interpreter Mode
Deterministic Trace Mode (Trace-JIT)
Implementation status (FW-02): The public
get_execution_mode()API is not yet exposed as a discrete query surface. Axion tier metadata provides indirect mode information via the policy event stream. Exposing a direct query API is tracked as open work item FW-02.
A typical program lifecycle is:
HALT instruction, orOn termination, Axion MUST receive a final state snapshot.
Determinism is a hard requirement.
When no Axion policy is provided, the VM defaults to DenyWithReasonEngine
behavior: normal instruction execution proceeds, but all privileged instruction
attempts are logged and any that exceed tier constraints are denied with a
structured reason record.
Implementations MUST ensure:
Same Inputs → Same Outputs
Given:
No Hidden Sources of Nondeterminism
T81Float) involving division or transcendentals MAY reflect host-platform behavior (e.g., IEEE-754 variations). Strict bit-identity across architectures is NOT guaranteed for these specific opcodes.Stable Ordering
Canonical State Representation
Conformance program:
spec/conformance/t81vm/determinism-profile.t81
The T81VM concurrency model is message-passing and deterministic.
T81VM MAY support multiple execution contexts (threads or lightweight processes) with:
R, PC, SP, FLAGS)Implementation status: Deterministic scheduling events (context switches, round-robin ticks) are not yet recorded as distinct
AxionEvententries in the trace stream. They are observable only through indirect register-state sampling. Recording scheduling as first-class trace events is a post-C2 milestone.
Contexts MUST communicate only via:
Message operations MUST be:
To maintain determinism:
If conflicting writes would occur in an implementation, the behavior MUST be defined as a deterministic fault or resolved via a deterministic tie-breaking rule.
The T81VM memory model defines how memory is structured, addressed, and manipulated.
It is the core of deterministic execution and safe interoperability.
Memory is divided into logical segments:
CODE
STACK
HEAP
TENSOR
META
The actual physical layout is implementation-defined, but the logical semantics MUST match this specification.
Memory MUST be divided into ternary-aligned blocks. Standard block sizes for compliance are:
HanoiVM segment boundaries SHOULD be aligned to at least the Superblock (729 bytes) size to ensure Base-81 compatibility.
Addresses are logical, base-81 aligned integers interpreted as:
(address_space, offset)
Implementations MAY encode this as:
Requirements:
Out-of-segment accesses MUST cause a Bounds Fault, not wrap-around or undefined behavior. Each fault MUST emit the canonical Axion verdict string (reason="bounds fault segment=<segment> addr=<value> action=<description>") before the trap so policy and compliance tooling can replay the precise failure. The documented actions include memory load/store, stack frame allocate/free, heap block allocate/free, and tensor handle access.
Implementation status (AX-M5): The canonical reason string
reason="bounds fault segment=X addr=Y action=Z"is the normative target. Current implementation emits the three fields (segment, addr, action) as separate structured fields in theAxionEventrecord and does not yet concatenate them into the single canonical string form. Full string construction is tracked as AX-M5, targeting 2026-03-14.
Deterministic compliance tests (ctest --test-dir build --output-on-failure) must capture the Axion trace snippet referenced above so auditors can reproduce the same bounds fault strings without inspecting the runtime source.
Objects in HEAP and TENSOR segments MUST follow:
Header:
Body:
Objects MUST:
Each context maintains a stack with:
CALL and removed by RETRequirements:
GC MUST be:
GC MAY be:
But visible behavior MUST be identical to some deterministic sequence of collection points.
Roots include:
Objects MAY be moved during GC if and only if:
All values in memory MUST be stored in canonical form:
non-canonical values decoded from external sources MUST be:
Memory writes that would violate canonicalization MUST be intercepted and handled by the VM (potentially via Axion).
Axion policies require precise visibility into every segment transition. The VM MUST uphold:
mem_ok(addr) returns true only when the address lies within layout.stack, layout.heap, layout.tensor, or layout.meta. Addresses outside these bounds always trigger deterministic bounds faults with canonical verdict.reason strings.stack frame allocated stack addr=... size=..., heap block allocated heap addr=..., tensor slot allocated tensor addr=..., AxRead guard segment=stack addr=42, bounds fault segment=heap ..., meta slot axion event segment=meta addr=..., etc.). Changing these routines without retaining the text breaks policy enforcement.stack_frames and heap_frames track active allocations; mismatched frees log a deterministic bounds fault before trapping.layout.tensor, and meta_ptr always advances before Axion events so metadata writes are sequential.heap relocation from=<old> to=<new> size=<n> before updating the segments so policy runners, trace auditors, and CanonFS can replay the reallocation without ambiguity.heap_ptr to layout.heap.start, clears heap_frames, and logs the relocation event before returning control. This ensures repeated compactions produce the same pointer trace and avoids nondeterminism from fragmented free lists.Maintaining these invariants ensures the deterministic segment trace described in docs/guides/axion-trace.md and RFC-0020, letting auditors replay the exact verdict.reason strings without inspecting the VM implementation.
T81VM MAY support:
Requirements:
Serialized form MUST be deterministic given the same state.
Deserialization MUST recreate state exactly, including:
T81VM programs include float, fraction, and symbol literal pools alongside CODE. Loading a program MUST:
state.floats, state.fractions,
state.symbols) before any instruction executes.Requirements:
Trap::DecodeFault.FADD…FRACDIV) MUST resolve handles, perform canonical
arithmetic (per Data Types), and append canonical results to the pool unless a
deterministically equal entry already exists. Deduplication, if implemented,
MUST follow a stable ordering so observers cannot infer hidden randomness.I2F, I2FRAC, etc.) MUST also produce handles and therefore
extend pools deterministically.Symbol pools follow the same handle rules but are primarily used by language constructs; opcodes that accept symbol handles MUST enforce the same validation behavior.
Conformance program:
spec/conformance/t81vm/axion-log-completeness.t81
Axion supervises the T81VM and MUST be able to:
T81VM MUST emit a trace stream containing:
R, PC, SP, FLAGSThis trace is written into META (or a side channel pointed to by META) and is Axion-visible.
Before or after:
T81VM MUST call Axion-defined hooks which MAY:
Axion MUST be able to:
T81VM MUST provide sufficient metadata (stack structure, call graph hints, etc.) for Axion to make these decisions.
Fault categories are defined in the TISC spec. T81VM is responsible for:
On any fault:
No partial state updates may remain unaccounted for:
Fault details MUST be recorded in META / Axion metadata:
Axion decides:
When executing compiled T81Lang programs, T81VM MAY:
Result[T, E] values at language boundariesT81VM MUST:
t81-overview.mdt81-overview.mdt81-data-types.mdt81-data-types.mdt81-data-types.mdtisc-spec.mdtisc-spec.mdtisc-spec.mdCurrent spec version: v1.2 (updated 2026-03-01).
t81lang-spec.mdt81lang-spec.mdt81lang-spec.mdaxion-kernel.mdaxion-kernel.mdaxion-kernel.mdcognitive-tiers.mdcognitive-tiers.md