[][src]Trait egg::Runner

pub trait Runner<L, M> where
    L: Language,
    M: Metadata<L>, 
{ type Error: Debug; fn pre_step(
        &mut self,
        _egraph: &mut EGraph<L, M>
    ) -> Result<(), Self::Error> { ... }
fn post_step(
        &mut self,
        _iteration: &Iteration,
        _egraph: &mut EGraph<L, M>
    ) -> Result<(), Self::Error> { ... }
fn during_step(&mut self, _egraph: &EGraph<L, M>) -> Result<(), Self::Error> { ... }
fn search_rewrite(
        &mut self,
        egraph: &mut EGraph<L, M>,
        rewrite: &Rewrite<L, M>
    ) -> Vec<SearchMatches> { ... }
fn apply_rewrite(
        &mut self,
        egraph: &mut EGraph<L, M>,
        rewrite: &Rewrite<L, M>,
        matches: Vec<SearchMatches>
    ) -> usize { ... }
fn step(
        &mut self,
        egraph: &mut EGraph<L, M>,
        rules: &[Rewrite<L, M>]
    ) -> Result<Iteration, Self::Error> { ... }
fn run(
        &mut self,
        egraph: &mut EGraph<L, M>,
        rules: &[Rewrite<L, M>]
    ) -> (Vec<Iteration>, Self::Error) { ... }
fn run_expr(
        &mut self,
        initial_expr: RecExpr<L>,
        rules: &[Rewrite<L, M>]
    ) -> (EGraph<L, M>, RunReport<L, Self::Error>) { ... } }

Associated Types

type Error: Debug

Loading content...

Provided methods

fn pre_step(&mut self, _egraph: &mut EGraph<L, M>) -> Result<(), Self::Error>

fn post_step(
    &mut self,
    _iteration: &Iteration,
    _egraph: &mut EGraph<L, M>
) -> Result<(), Self::Error>

fn during_step(&mut self, _egraph: &EGraph<L, M>) -> Result<(), Self::Error>

fn search_rewrite(
    &mut self,
    egraph: &mut EGraph<L, M>,
    rewrite: &Rewrite<L, M>
) -> Vec<SearchMatches>

Dictates search behavior

fn apply_rewrite(
    &mut self,
    egraph: &mut EGraph<L, M>,
    rewrite: &Rewrite<L, M>,
    matches: Vec<SearchMatches>
) -> usize

Dictates how matches will be applied.

fn step(
    &mut self,
    egraph: &mut EGraph<L, M>,
    rules: &[Rewrite<L, M>]
) -> Result<Iteration, Self::Error>

fn run(
    &mut self,
    egraph: &mut EGraph<L, M>,
    rules: &[Rewrite<L, M>]
) -> (Vec<Iteration>, Self::Error)

fn run_expr(
    &mut self,
    initial_expr: RecExpr<L>,
    rules: &[Rewrite<L, M>]
) -> (EGraph<L, M>, RunReport<L, Self::Error>)

Loading content...

Implementors

impl<L, M> Runner<L, M> for SimpleRunner where
    L: Language,
    M: Metadata<L>, 
[src]

type Error = SimpleRunnerError

Loading content...