Glossary
This glossary defines the terms used by the tracked docs and the compiler/runtime code.
# Word
A Tyu word is a named stack transformer with declared inputs, outputs, and optional contracts. See crates/frontend/src/parse/decl.rs, crates/ir/src/lib.rs, and crates/semantics/src/types.rs for the code representation.
# Module
A .mod file is a compilation unit. A .def file is the interface record used for separate compilation. See crates/frontend/src/parse/mod.rs, crates/langc/src/iface.rs, and sysroot/Core.def.
# Interface
An interface is the signature-only view of a module. The tracked code uses .def files and the interface-checking helpers in crates/langc/src/iface.rs.
# Effect
An effect describes what a word does to the machine or runtime model. The core effect and capability types live in crates/ir/src/lib.rs, crates/ir/src/contract.rs, and crates/semantics/src/lib.rs.
# Capability
A capability is a grant required by a word or module action. The tracked code treats capabilities as part of the effect/context model; see crates/ir/src/contract.rs and crates/semantics/src/typecheck/context.rs.
# Context
A context is the ambient environment used by the semantics checker when deciding whether a word is legal. See crates/semantics/src/typecheck/context.rs and crates/semantics/src/typecheck/irgen/mod.rs.
# Borrow
A borrow is an ownership-limited access to a region or root. The borrow rules are implemented across crates/semantics/src/typecheck/ and exercised by the corpus in crates/tooling-tests/tests/borrow_exclusivity.rs.
#
iso
iso is a region/borrowing qualifier used by the language model. The tracked semantics and tests treat it as part of the borrow/region system rather than a standalone feature.
# Region
A region is the allocation discipline used by Tyu instead of GC. Allocation goes through the platform words platform.mem.region-create/alloc/reset/destroy; exhaustion raises trap 26 (RegionExhausted). See crates/semantics/src/types.rs, crates/ir/src/lib.rs, and the code generators in crates/codegen-x86_64/src/word.rs, crates/codegen-arm/src/word.rs, and crates/codegen-riscv/src/word.rs.
# Stack bound
StackBound describes the static bound on data-stack growth for a word or module. See crates/ir/src/lib.rs, crates/loader-core/src/rederive.rs, and crates/diag-core/src/decode.rs.
#
abi_hash
abi_hash is the compatibility checksum that binds module layout, target contract, and module metadata together. It is computed in crates/lmod/src/abi_hash.rs, used by crates/lmod/src/modinfo.rs, and checked by crates/loader-core/src/error.rs and crates/diag-core/src/decode.rs.
# Trap code
A trap code is the numeric diagnostic tag attached to a runtime failure or language-emitted trap. See crates/ir/src/lib.rs, crates/diag-core/src/decode.rs, and the diagnostic corpus in crates/tooling-tests/tests/.
# Module format
.lmod is the packed module container consumed by the loader. See crates/lmod/src/lib.rs, crates/lmod-pack/src/lib.rs, and crates/loader-core/src/load.rs.
# Loader
The loader is the code path that authenticates, relocates, and maps a .lmod module. See crates/loader-core/src/lib.rs, crates/loader-core/src/platform.rs, and crates/loader-core/src/load.rs.
# Aperture
An aperture is a declared, bounded window of memory-mapped I/O — bus (real device space) or emulated (RAM the runtime owns) — that modules address symbolically as (aperture, offset) rather than by absolute address. Apertures are declared in a platform descriptor, carried in the module’s aperture-use table (modinfo v4), and bound to the board’s base addresses by the loader at load time. See crates/ir/src/lib.rs, crates/loader-core/src/apertures.rs, and the [[platform.apertures]] sections in platforms/*/platform.toml.
# Platform descriptor
The platform descriptor (platform.toml, schema 2) is the validated, canonically serialized fact sheet for one board: memory regions, MMIO apertures, device/register tables with per-register access semantics, allocator span, and the metal.trust list. The compiler requires it for MMIO compilation (--platform=<dir|pack>), and the loader consumes its compiled projection (never TOML on device). See crates/tyu/src/platform/desc/, crates/tyu/src/platform.rs, and platforms/rp2350/platform.toml.
#
platform_hash
platform_hash is the FNV-1a-64 hash of a platform descriptor’s canonical serialization, stamped into modinfo v4 and compared by the loader — a mismatch rejects the module (E5220, wrong board) before any binding or relocation. See crates/tyu/src/platform/desc/canonical.rs, crates/lmod/src/modinfo.rs, and crates/loader-core/src/apertures.rs.
# REPL session
A REPL session is the browser/native interpreter’s accumulating state: one module (≤ 64 words) built from repeated submissions, a persistent data stack and region heap, and transactional phrases — a faulting phrase rolls its stack/heap/frames back via the undo journal while its definitions commit and its already-emitted output stays. Run (reset + submit) is the program model; submit-without-reset is the session model. See crates/wasm-repl/src/session.rs and devdocs/plans/web-ide.md §Q3.
# Phrase
A phrase is a submission’s trailing expression sequence (7 wrap drop), compiled into the synthetic repl-phrase word and executed against the persistent stack under the transaction rules. Its declared inputs are pinned to the ACTUAL session stack at compile time (the W1 reconciliation), so the checker verifies the phrase against reality. See crates/wasm-repl/src/phrase.rs and crates/wasm-repl/src/session.rs.
# Debug snapshot projections
The debug projections (wasm_repl::debug) are the read-only views — frames, trace events, dictionary, word source, regions, status — that every debug surface (the native repl-cli debug-dump, the wasm ABI, the browser console) renders from. One core, one JSON encoder, one span mapper (I-8/I-11): the JS layer never synthesizes debug facts. See crates/wasm-repl/src/debug.rs and test-goldens/repl/debug/.
# Span bridge
The span bridge (web/spanmap.mjs) is the single translator between the engine’s UTF-8 byte spans and the editor’s UTF-16 offsets — ASCII fast path, general walk, torn offsets clamp to code-point starts. Engine spans anchor to the submitted buffer via the session’s anchor map (ReplSession::doc_span); no component indexes the doc with a raw engine span. See crates/wasm-repl/src/session.rs and web/spanmap.mjs.
# Examples pack
The examples pack (repl-cli pack-examples) is the only bridge between the book’s lab corpus (docs/book/labs/**) and the browser’s example surface: a total, table-driven classifier (green/red/engine/interlude + native-only rules, each with a reason), header-derived expectation codes, deterministic emission, hash-pinned into web/pkg/examples.js. Its behavioral pin drives every runnable lab through a session: green → Ok, red → the checker’s code. See crates/wasm-repl/src/examples_pack.rs and crates/wasm-repl/tests/examples_expectations.rs.