Expand description
Solution rendering: the readable text form (term_to_string) plus the
raw term word the bson encoder walks. (No JSON rendering — the engine
speaks text + bson; JSON, if a host wants it, is derived from bson at the
host boundary.)
Structs§
- Binding
- One query-variable binding, materialized at solution time.
textis the readable form;bufis a relocatable snapshot of the (already dereferenced) value term — a raw heap word would alias later solutions’ cells once backtracking rewinds and reuses the arena. - Rendered
Solution - One captured solution: bindings sorted by variable name, rendered AND snapshotted immediately — heap terms are undone by backtracking afterwards, so anything cell-backed must be copied out before the next solution is pursued (#58).
Functions§
- capture_
solution - Capture the current solution from the machine’s query variables.
- format_
term format_termrendering: plain functional notation (no infix), atoms unquoted, vars_<idx>, lists[a, b|T]. This is the byte contract for error messages (“Runtime error: error(…)”).- term_
to_ string - term_
to_ string_ quoted writeq/1rendering: liketerm_to_stringbut atoms that wouldn’t read back unquoted are single-quoted (issue #33). Used only bywriteq/1.