[−][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, M>,
eclass: Id
) -> Option<SearchMatches>
&self,
egraph: &EGraph<L, M>,
eclass: Id
) -> Option<SearchMatches>
Search one eclass, returning None if no matches can be found. This should not return a SearchMatches with no mappings.
Provided methods
fn search(&self, egraph: &EGraph<L, M>) -> 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, M> Searcher<L, M> for Pattern<L> where
L: Language,
M: Metadata<L>,
[src]
L: Language,
M: Metadata<L>,
fn search(&self, egraph: &EGraph<L, M>) -> Vec<SearchMatches>
[src]
fn search_eclass(
&self,
egraph: &EGraph<L, M>,
eclass: Id
) -> Option<SearchMatches>
[src]
&self,
egraph: &EGraph<L, M>,
eclass: Id
) -> Option<SearchMatches>