pub fn push_goal(&mut self, environment: &Arc<Environment>, goal: Goal) {
        debug!("push_goal({:?}, {:?})", goal, environment);
        match goal {
            Goal::Quantified(QuantifierKind::ForAll, subgoal) => {
                let InEnvironment { environment: subenvironment, goal: subgoal } =
                    subgoal.instantiate_universally(environment);
                self.push_goal(&subenvironment, *subgoal);
            }
            Goal::Quantified(QuantifierKind::Exists, subgoal) => {
                let subgoal = self.instantiate_in(environment.universe,
                                                  subgoal.binders.iter().cloned(),
                                                  &subgoal.value);
                self.push_goal(environment, *subgoal);
            }
            Goal::Implies(wc, subgoal) => {
                let new_environment = &environment.add_clauses(wc);
                self.push_goal(new_environment, *subgoal);
            }
            Goal::And(subgoal1, subgoal2) => {
                self.push_goal(environment, *subgoal1);
                self.push_goal(environment, *subgoal2);
            }
            Goal::Not(subgoal) => {
                let in_env = InEnvironment::new(environment, *subgoal);
                self.obligations.push(Obligation::Refute(in_env));
            }
            Goal::Leaf(wc) => {
                self.obligations.push(Obligation::Prove(InEnvironment::new(environment, wc)));
            }
            Goal::CannotProve(()) => {
                self.cannot_prove = true;
            }
        }
    }
/// Create obligations for the given goal in the given environment. This may
/// ultimately create any number of obligations.
Create obligations for the given goal in the given environment. This may
ultimately create any number of obligations.
Create obligations for the given goal in the given environment . This may ultimately create any number of obligations .
pub fn push_goal(&mut self, environment: &Arc<Environment>, goal: Goal) {
        debug!("push_goal({:?}, {:?})", goal, environment);
        match goal {
            Goal::Quantified(QuantifierKind::ForAll, subgoal) => {
                let InEnvironment { environment: subenvironment, goal: subgoal } =
                    subgoal.instantiate_universally(environment);
                self.push_goal(&subenvironment, *subgoal);
            }
            Goal::Quantified(QuantifierKind::Exists, subgoal) => {
                let subgoal = self.instantiate_in(environment.universe,
                                                  subgoal.binders.iter().cloned(),
                                                  &subgoal.value);
                self.push_goal(environment, *subgoal);
            }
            Goal::Implies(wc, subgoal) => {
                let new_environment = &environment.add_clauses(wc);
                self.push_goal(new_environment, *subgoal);
            }
            Goal::And(subgoal1, subgoal2) => {
                self.push_goal(environment, *subgoal1);
                self.push_goal(environment, *subgoal2);
            }
            Goal::Not(subgoal) => {
                let in_env = InEnvironment::new(environment, *subgoal);
                self.obligations.push(Obligation::Refute(in_env));
            }
            Goal::Leaf(wc) => {
                self.obligations.push(Obligation::Prove(InEnvironment::new(environment, wc)));
            }
            Goal::CannotProve(()) => {
                self.cannot_prove = true;
            }
        }
    }
pub fn push_goal ( & mut self , environment : & Arc < Environment > , goal : Goal ) { debug ! ( " " goal environment ) ; match goal { Goal :: Quantified ( QuantifierKind :: ForAll , subgoal ) => { let InEnvironment { environment : subenvironment , goal : subgoal } = subgoal . instantiate_universally ( environment ) ; self . push_goal ( & subenvironment , * subgoal ) ; } Goal :: Quantified ( QuantifierKind :: Exists , subgoal ) => { let subgoal = self . instantiate_in ( environment . universe , subgoal . binders . iter ( ) . cloned ( ) , & subgoal . value ) ; self . push_goal ( environment , * subgoal ) ; } Goal :: Implies ( wc , subgoal ) => { let new_environment = & environment . add_clauses ( wc ) ; self . push_goal ( new_environment , * subgoal ) ; } Goal :: And ( subgoal1 , subgoal2 ) => { self . push_goal ( environment , * subgoal1 ) ; self . push_goal ( environment , * subgoal2 ) ; } Goal :: Not ( subgoal ) => { let in_env = InEnvironment :: new ( environment , * subgoal ) ; self . obligations . push ( Obligation :: Refute ( in_env ) ) ; } Goal :: Leaf ( wc ) => { self . obligations . push ( Obligation :: Prove ( InEnvironment :: new ( environment , wc ) ) ) ; } Goal :: CannotProve ( ( ) ) => { self . cannot_prove = true ; } } }
Create obligations for the given goal in the given environment.
Create obligations for the given goal in the given environment .
&mut self
environment
&Arc<Environment>
goal
Goal