Skip to content

Architecture

VBrazhnik edited this page Jun 21, 2020 · 2 revisions

The processing of the input file divided into three steps:

  1. Lexical analysis
  2. Parsing
  3. Calculations

Lexical analysis

Lexical analysis is performed by lexer.

Lexer validates the form of the input and prepares data for the processing in the next step.

It...:

  • ...clears comments and empty lines from the input files.
  • ...identifies the type of each line and validates the structure of the input file.
  • ...tokenizes statements (rules, initial facts, queries).

Parsing

Parsing is performed by parser.

It...:

  • ...receives tokenized rules, initial facts, and queries.
  • ...validates that tokens form correct rules.
  • ...prepares data for the next step of processing.

Calculations

Calculations are made by inference engine (or just engine).

Types of engines and differences are listed in the chapter “Inference engine”.

Clone this wiki locally