1. Lexing
Turn text into tokens, apply keyword matching, and preserve spans.
From CNL text to a compiled KB and executable reasoning plans.
CNL-PL follows a deterministic pipeline: tokenize, parse, validate, compile, then execute a pragmatic plan. Each stage is strict and repeatable, which is essential for reasoning and explainability.
For a full scenario and a visual pipeline diagram, see Theory Part 6.
Turn text into tokens, apply keyword matching, and preserve spans.
Build a lossless AST with typed predicates and explicit boolean structure.
Reject ambiguous input and enforce determinism rules (DS03, DS07).
Intern symbols, map to ConceptualIDs, and emit KB updates or plans.
Execute query/proof/plan/solve with bitset primitives on the KB.
Compilation produces several artifacts that are reused by all pragmatics: