fn apply_everywhere_once(rules_: &[&str], egraph: &mut EGraph) {
    let rules: Vec<Rewrite<Lambda,LambdaAnalysis>> = rules(rules_);
    let matches: Vec<Vec<SearchMatches>> = rules.iter().map(|r| r.search(egraph)).collect();
    for (r,m) in rules.iter().zip(matches) {
        let hits = r.apply(egraph, &m).len();
        println!("(applied {} {} times out of {} matches)",r.name(),hits, m.len());
    }
    egraph.rebuild();
}
/// finds everywhere the rewrite rules matches and applies it to each of them
/// and rebuilds the egraph. Will only apply to matches that are visible before
/// any rewriting occurs. This is the same as running a runner with an iter limit of 1.
/// I guess I'm not using this in the code right now bc I like the runner's report.
finds everywhere the rewrite rules matches and applies it to each of them
and rebuilds the egraph. Will only apply to matches that are visible before
any rewriting occurs. This is the same as running a runner with an iter limit of 1.
I guess I'm not using this in the code right now bc I like the runner's report.
finds everywhere the rewrite rules matches and applies it to each of them and rebuilds the egraph . Will only apply to matches that are visible before any rewriting occurs . This is the same as running a runner with an iter limit of 1 . I guess I ' m not using this in the code right now bc I like the runner ' s report .
fn apply_everywhere_once(rules_: &[&str], egraph: &mut EGraph) {
    let rules: Vec<Rewrite<Lambda,LambdaAnalysis>> = rules(rules_);
    let matches: Vec<Vec<SearchMatches>> = rules.iter().map(|r| r.search(egraph)).collect();
    for (r,m) in rules.iter().zip(matches) {
        let hits = r.apply(egraph, &m).len();
        println!("(applied {} {} times out of {} matches)",r.name(),hits, m.len());
    }
    egraph.rebuild();
}
fn apply_everywhere_once ( rules_ : & [ & str ] , egraph : & mut EGraph ) { let rules : Vec < Rewrite < Lambda , LambdaAnalysis > > = rules ( rules_ ) ; let matches : Vec < Vec < SearchMatches > > = rules . iter ( ) . map ( | r | r . search ( egraph ) ) . collect ( ) ; for ( r , m ) in rules . iter ( ) . zip ( matches ) { let hits = r . apply ( egraph , & m ) . len ( ) ; println ! ( " " r name ( ) hits m len ( ) ) ; } egraph . rebuild ( ) ; }
finds everywhere the rewrite rules matches and applies it to each of them
and rebuilds the egraph.
finds everywhere the rewrite rules matches and applies it to each of them and rebuilds the egraph .
rules_
&[&str]
egraph
&mut EGraph
rules_
&[&str]
egraph
&mut EGraph