An execution plan for a compiled IR program.
A plan records the chosen evaluation strategy, the planned strata, the
joins (one per positive body atom across all rules), and the predicates
(constraints, aggregates, callbacks). The plan is descriptive: it explains
what the engine will do without changing how the engine evaluates.
Aggregate and callback predicates appear in predicates with
kind: :aggregate / kind: :callback; there are no separate fields for them.
Summary
Types
@type strategy() :: :semi_naive | :magic_sets
@type t() :: %ExDatalog.Planner.Plan{ joins: [ExDatalog.Planner.Join.t()], metadata: map(), predicates: [ExDatalog.Planner.Predicate.t()], strata: [ExDatalog.Planner.Stratum.t()], strategy: strategy() }