pub enum RulePlan {
MultiwayCandidate {
head_predicate: String,
hypergraph: HypergraphRule,
variable_order: Vec<VertexId>,
},
BinaryFallback {
head_predicate: String,
boundaries: Vec<Boundary>,
},
}Expand description
Plan choice for a single rule.
Mirrors the dispatch contract: every rule goes either to the future multiway WCOJ path or to the existing binary-join fallback. The variant carries the metadata the downstream path needs to act on the verdict — for multiway, the hypergraph and a resolved variable order; for fallback, the boundary list explaining why.
Variants§
MultiwayCandidate
Rule cleared the typed gate. Ready for the future WCOJ
kernel path. The structural super::evaluate_rule /
super::evaluate_rule_typed would also accept this rule
today; PR 6 carries no execution itself, just the dispatch
metadata.
Fields
head_predicate: StringPredicate name of the rule head, copied from the
source Rule for diagnostic / explain use.
hypergraph: HypergraphRuleHypergraph IR built from the rule body — carried so the future kernel does not rebuild it.
variable_order: Vec<VertexId>Variable order produced by
super::AppearanceOrder.
Length equals hypergraph.vertex_count().
BinaryFallback
Rule cannot be planned as multiway. Caller must use the existing binary-join lowering path. The boundaries vector is non-empty and lists every reason the typed gate rejected the rule; preserving all of them keeps explain output and downstream telemetry honest about cumulative fallback drivers.