pub trait Theory<S: TheoryArgument>: Debug {
fn final_check(&mut self, _: &mut S, model: &[Lit]) -> FinalCheckRes;
fn create_level(&mut self);
fn pop_level(&mut self, n: u32);
fn on_add_clause(&mut self, c: &S::Clause, learnt: bool);
}
Expand description
Theory that parametrizes the solver and can react on events
Required Methods
sourcefn final_check(&mut self, _: &mut S, model: &[Lit]) -> FinalCheckRes
fn final_check(&mut self, _: &mut S, model: &[Lit]) -> FinalCheckRes
Check the model candidate model
thoroughly.
If the partial model isn’t satisfiable in the theory then
this must return FinalCheckRes::Conflict
and push a conflict
clause.
sourcefn create_level(&mut self)
fn create_level(&mut self)
Push a new backtracking level
sourcefn on_add_clause(&mut self, c: &S::Clause, learnt: bool)
fn on_add_clause(&mut self, c: &S::Clause, learnt: bool)
Called whenever the solver gets a new clause