Skip to main content

execute

Function execute 

Source
pub fn execute<'a>(
    ir: &'a mut Ir,
    stratified: &StratifiedProgram<'a>,
    store: Box<dyn Store + 'a>,
) -> Result<Interpreter<'a>>
Expand description

Executes a compiled Mangle program using the pure Rust interpreter.

This function:

  1. Iterates through the strata defined in StratifiedProgram.
  2. Identifies recursive predicates within each stratum.
  3. Executes non-recursive strata once.
  4. Executes recursive strata using a semi-naive evaluation loop.

Returns the Interpreter instance, which holds the final state (facts) of the execution.