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. docs/design/IO.md.)
Structs§
- Binding
- One query-variable binding, materialized at solution time.
wordis the already-dereferenced value term (zero extra computation over producing the text); the bson encoder walks it viacopyterm::copy_to_buf. - Rendered
Solution - One captured solution: bindings sorted by variable name (v1 rule), rendered immediately (terms are undone by backtracking afterwards).
Functions§
- capture_
solution - Capture the current solution from the machine’s query variables.
- format_
term - v1’s
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.