Expand description
Query-level control constructs and deterministic builtins.
Clause bodies compile control flow to native code; this module only
serves goals built at RUNTIME — the --query string today, call/1
metacalls in M4. It walks goal TERMS, never clauses (the rule in
docs/design/LESSONS_FROM_V1.md stays intact).
The implementations mirror the compiled lowering exactly (same choice-point shapes, same commit heights), so a goal behaves identically whether it appears in a clause body or a query.
Functions§
- plg_
rt_ ⚠b_ catch_ 3 - Safety
- plg_
rt_ ⚠b_ findall_ 3 - Safety
- plg_
rt_ ⚠b_ throw_ 1 - Safety
- plg_
rt_ ⚠metacall - Compiled-code entries for control builtins taking goal terms.
- plg_
rt_ ⚠pred_ between_ 3 - Compiled-code entry for between/3 (uniform predicate signature, arguments in the A registers — dispatched like a user predicate).
- try_
atom_ builtin - Atom-only goals (
true,fail,!). - try_
builtin - Try to handle
name/arityas a control construct or deterministic builtin. Returns None when it’s an ordinary predicate call.