mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
Activate constraints when their boolean literal is propagated
This commit is contained in:
parent
3f15bf5963
commit
05b846a472
3 changed files with 30 additions and 67 deletions
|
@ -118,17 +118,14 @@ namespace polysat {
|
|||
auto& premises = it->m_value;
|
||||
clause_builder c_lemma(*m_solver);
|
||||
for (auto premise : premises) {
|
||||
handle_saturation_premises(c);
|
||||
handle_saturation_premises(premise);
|
||||
c_lemma.push_literal(~premise.blit());
|
||||
}
|
||||
c_lemma.push_literal(c.blit());
|
||||
clause* cl = cm().store(c_lemma.build());
|
||||
if (cl->size() == 1)
|
||||
c->set_unit_clause(cl);
|
||||
// TODO: this should be backtrackable (unless clause is unit).
|
||||
// => add at the end and update pop_levels to replay appropriately
|
||||
m_solver->assign_bool_backtrackable(c.blit(), cl, nullptr);
|
||||
m_solver->activate_constraint(c);
|
||||
m_solver->assign_bool(c.blit(), cl, nullptr);
|
||||
}
|
||||
|
||||
/** Create fallback lemma that excludes the current search state */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue