Concepts

End-to-End Flow

From CNL text to a compiled KB and executable reasoning plans.

Overview

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.

Pipeline stages

1. Lexing

Turn text into tokens, apply keyword matching, and preserve spans.

2. Parsing

Build a lossless AST with typed predicates and explicit boolean structure.

3. Validation

Reject ambiguous input and enforce determinism rules (DS03, DS07).

4. Compilation

Intern symbols, map to ConceptualIDs, and emit KB updates or plans.

5. Reasoning

Execute query/proof/plan/solve with bitset primitives on the KB.

Artifacts produced

Compilation produces several artifacts that are reused by all pragmatics:

  • SymbolTable with ConceptualIDs and reverse lookup.
  • KB with relations, inverse indices, and attribute indexes.
  • RuleStore with compiled rule plans.
  • CommandStore with query, proof, and solve plans.