[][src]Trait egg::Condition

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

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

fn check(&self, egraph: &mut EGraph<L, N>, eclass: Id, subst: &Subst) -> bool

Check a condition.

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

Loading content...

Implementors

impl<L, F, N> Condition<L, N> for F where
    L: Language,
    N: Analysis<L>,
    F: Fn(&mut EGraph<L, N>, Id, &Subst) -> bool
[src]

impl<L, N, A1, A2> Condition<L, N> for ConditionEqual<A1, A2> where
    L: Language,
    N: Analysis<L>,
    A1: Applier<L, N>,
    A2: Applier<L, N>, 
[src]

Loading content...