Expand description
nibli-semantics: flat AST buffer → FOL logic buffer. An internal
Rust pipeline stage of the single nibli-pipeline WASM component (NOT a standalone
WIT component). Compiles nibli-kr’s
flat AST buffer into a flat First-Order Logic buffer via the SemanticCompiler,
then flattens the tree-structured IrForm IR into the WIT-compatible
index-based LogicBuffer.
The flattener expands Biconditional and Xor IR nodes into primitive
And/Or/Not nodes (sharing sub-tree indices for zero-cost duplication).
Modules§
- dictionary
- Predicate-arity facade over the committed English corpus. Predicate arities — a thin facade over the SINGLE arity source.
- ir
- First-Order Logic IR types (
IrTerm,IrForm). First-Order Logic intermediate representation. - semantic
- Semantic compiler: AST → FOL logic form tree. Semantic compiler: flat AST buffer → First-Order Logic IR.
Functions§
- compile_
from_ ast - Compile a nibli-kr-produced AST buffer into a logic buffer. Primary API for all callers (nibli-pipeline, nibli-engine).
- compile_
injected_ fact - Compile a directly-injected ground fact
(relation, args)into the SAME event-decomposed, arity-padded FOL shape that a surface assertion ofrelationproduces — so injected facts are matched by surface text queries (la .adam. cu gerkumatches:assert gerku adam), not just by raw-FOL or same-shape direct facts.