pub trait Condition<L, N> where
    L: Language,
    N: Analysis<L>, 
{ fn check(
        &self,
        egraph: &mut EGraph<L, N>,
        eclass: Id,
        subst: &Subst
    ) -> bool; fn vars(&self) -> Vec<Var> { ... } }
Expand description

A condition to check in a ConditionalApplier.

See the ConditionalApplier docs.

Notably, any function (Fn) that doesn’t mutate other state and matches the signature of check implements Condition.

Required methods

Check a condition.

eclass is the eclass Id where the match (subst) occured. If this is true, then the ConditionalApplier will fire.

Provided methods

Returns a list of variables that this Condition assumes are bound.

egg will check that the corresponding Searcher binds those variables. By default this return an empty Vec, which basically turns off the checking.

Implementors