pub fn check_goals(&self, id: Id, goals: &[Pattern<L>]) {
        let (cost, best) = Extractor::new(self, AstSize).find_best(id);
        println!("End ({}): {}", cost, best.pretty(80));

        for (i, goal) in goals.iter().enumerate() {
            println!("Trying to prove goal {}: {}", i, goal.pretty(40));
            let matches = goal.search_eclass(&self, id);
            if matches.is_none() {
                let best = Extractor::new(&self, AstSize).find_best(id).1;
                panic!(
                    "Could not prove goal {}:\n{}\nBest thing found:\n{}",
                    i,
                    goal.pretty(40),
                    best.pretty(40),
                );
            }
        }
    }
/// Panic if the given eclass doesn't contain the given patterns
///
/// Useful for testing.
Panic if the given eclass doesn't contain the given patterns
Useful for testing.
Panic if the given eclass doesn ' t contain the given patterns Useful for testing .
pub fn check_goals(&self, id: Id, goals: &[Pattern<L>]) {
        let (cost, best) = Extractor::new(self, AstSize).find_best(id);
        println!("End ({}): {}", cost, best.pretty(80));
        for (i, goal) in goals.iter().enumerate() {
            println!("Trying to prove goal {}: {}", i, goal.pretty(40));
            let matches = goal.search_eclass(&self, id);
            if matches.is_none() {
                let best = Extractor::new(&self, AstSize).find_best(id).1;
                panic!(
                    "Could not prove goal {}:\n{}\nBest thing found:\n{}",
                    i,
                    goal.pretty(40),
                    best.pretty(40),
                );
            }
        }
    }
pub fn check_goals ( & self , id : Id , goals : & [ Pattern < L > ] ) { let ( cost , best ) = Extractor :: new ( self , AstSize ) . find_best ( id ) ; println ! ( " " cost best pretty ( 80 ) ) ; for ( i , goal ) in goals . iter ( ) . enumerate ( ) { println ! ( " " i goal pretty ( 40 ) ) ; let matches = goal . search_eclass ( & self , id ) ; if matches . is_none ( ) { let best = Extractor :: new ( & self , AstSize ) . find_best ( id ) . 1 ; panic ! ( " \n \n \n " i goal pretty ( 40 ) best pretty ( 40 ) ) ; } } }
Panic if the given eclass doesn't contain the given patterns
Useful for testing.
Panic if the given eclass doesn ' t contain the given patterns Useful for testing .
&self
id
Id
goals
&[Pattern<L>]
&self
id
Id
goals
&[Pattern<L>]