[][src]Trait egg::Searcher

pub trait Searcher<L, M> where
    L: Language,
    M: Metadata<L>, 
{ fn search_eclass(
        &self,
        egraph: &EGraph<L, M>,
        eclass: Id
    ) -> Option<SearchMatches>; fn search(&self, egraph: &EGraph<L, M>) -> Vec<SearchMatches> { ... } }

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>

Search one eclass, returning None if no matches can be found. This should not return a SearchMatches with no mappings.

Loading content...

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.

Loading content...

Implementors

impl<L, M> Searcher<L, M> for Pattern<L> where
    L: Language,
    M: Metadata<L>, 
[src]

Loading content...