mirror of
https://github.com/Z3Prover/z3
synced 2026-04-26 13:53:33 +00:00
Narrow conflicting constraint after backjumping
This commit is contained in:
parent
54ed6d4413
commit
4406652c7b
3 changed files with 36 additions and 0 deletions
|
|
@ -148,6 +148,7 @@ namespace polysat {
|
|||
SASSERT(m_vars.empty());
|
||||
SASSERT(m_bail_vars.empty());
|
||||
SASSERT(m_lemmas.empty());
|
||||
SASSERT(m_narrow_queue.empty());
|
||||
}
|
||||
return is_empty;
|
||||
}
|
||||
|
|
@ -159,6 +160,7 @@ namespace polysat {
|
|||
m_relevant_vars.reset();
|
||||
m_var_occurrences.reset();
|
||||
m_lemmas.reset();
|
||||
m_narrow_queue.reset();
|
||||
m_kind = conflict_kind_t::ok;
|
||||
m_level = UINT_MAX;
|
||||
SASSERT(empty());
|
||||
|
|
@ -211,6 +213,7 @@ namespace polysat {
|
|||
void conflict::init(signed_constraint c) {
|
||||
SASSERT(empty());
|
||||
m_level = s.m_level;
|
||||
m_narrow_queue.push_back(c.blit()); // if the conflict is only due to a missed propagation of c
|
||||
set_impl(c);
|
||||
logger().begin_conflict();
|
||||
}
|
||||
|
|
@ -535,6 +538,15 @@ namespace polysat {
|
|||
return std::move(m_lemmas);
|
||||
}
|
||||
|
||||
sat::literal_vector conflict::take_narrow_queue() {
|
||||
#ifndef NDEBUG
|
||||
on_scope_exit check_empty([this]() {
|
||||
SASSERT(m_narrow_queue.empty());
|
||||
});
|
||||
#endif
|
||||
return std::move(m_narrow_queue);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void conflict::learn_side_lemmas() {
|
||||
auto needs_side_lemma = [this](sat::literal lit) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue