Skip to main content

Module lower

Module lower 

Source
Expand description

Lowering from AST to IR

This module transforms Datalog programs (AST) into the Relational IR (RIR) representation for execution. The lowering process:

  1. Infers schemas from facts and predicate declarations
  2. Tracks variable positions across atoms for join key computation
  3. Builds left-deep join trees for multi-atom rule bodies
  4. Handles negation via set difference (Diff) nodes
  5. Wraps recursive predicates in Fixpoint nodes
  6. Projects to match head variables

Structsยง

Lowerer
Lowerer transforms AST programs into RIR execution plans.