[−][src]Trait egg::Searcher
The lefthand side of a Rewrite
.
A Searcher
is something that can search the egraph and find
matching substititions.
Right now the only significant Searcher
is Pattern
.
Required methods
fn search_eclass(
&self,
egraph: &EGraph<L, N>,
eclass: Id
) -> Option<SearchMatches>
&self,
egraph: &EGraph<L, N>,
eclass: Id
) -> Option<SearchMatches>
Search one eclass, returning None if no matches can be found. This should not return a SearchMatches with no substs.
Provided methods
fn search(&self, egraph: &EGraph<L, N>) -> Vec<SearchMatches>
Search the whole EGraph
, returning a list of all the
SearchMatches
where something was found.
This just calls search_eclass
on each eclass.
Implementors
impl<L: Language, A: Analysis<L>> Searcher<L, A> for Pattern<L>
[src]
fn search(&self, egraph: &EGraph<L, A>) -> Vec<SearchMatches>
[src]
fn search_eclass(
&self,
egraph: &EGraph<L, A>,
eclass: Id
) -> Option<SearchMatches>
[src]
&self,
egraph: &EGraph<L, A>,
eclass: Id
) -> Option<SearchMatches>