Expand description
The Machine: the single runtime context every compiled predicate
receives (%M in generated IR). Owns the term heap, trail,
choice-point stack, argument registers, the current success
continuation, step accounting, and the runtime atom table.
Structs§
- Choice
Point - Machine
- Registry
Entry - Registry row emitted by codegen as
{ i32, i32, ptr }, sorted by (functor, arity) for binary search. - RtError
- A runtime error in flight. The ball is a relocatable copy (it must survive heap rewinding on the way to a catch frame); the message is its v1-format rendering for top-level output (exit code 3).
- SrcLoc
- One source-location row of the codegen-emitted
@plg_srcmapside-table (SPANS.md Layer 3). A raising call site passes its index (site_id) and the error path resolves it tofile:line:col. Layout mirrors the IR’s{i32, i32, i32}.
Enums§
- CpKind
- Catch frames participate in error unwinding (drive() in solve.rs) and stop cut truncation (v1 rule: catch is opaque to cut).
Constants§
- MAX_
ARGS - Maximum predicate arity passed via argument registers (v1 had no practical limit; raise alongside a frame-passing scheme if ever hit).
- NO_SITE
site_idsentinel meaning “no source location” — runtime-internal raises (query-side undefined goals) and any binary built without provenance. The error message gets noat file:line:colsuffix.
Type Aliases§
- ContFn
- Uniform signature shared by every compiled predicate, continuation,
and retry function — and by runtime-provided continuations. The
uniform C-ABI prototype is what makes
musttailtransfers valid. Returns 0 = fail/exhausted (driver backtracks), 1 = stop (limit hit or final success).