mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 08:28:44 +00:00
Don't leave propagation loop too early (cause of unsoundness in bench0)
This commit is contained in:
parent
4406652c7b
commit
66469bb678
2 changed files with 7 additions and 3 deletions
|
@ -293,7 +293,7 @@ namespace polysat {
|
||||||
* Propagate assignment to a pvar
|
* Propagate assignment to a pvar
|
||||||
*/
|
*/
|
||||||
void solver::propagate(pvar v) {
|
void solver::propagate(pvar v) {
|
||||||
LOG_H2("Propagate v" << v);
|
LOG_H2("Propagate " << assignment_pp(*this, v, get_value(v)));
|
||||||
SASSERT(!m_locked_wlist);
|
SASSERT(!m_locked_wlist);
|
||||||
DEBUG_CODE(m_locked_wlist = v;);
|
DEBUG_CODE(m_locked_wlist = v;);
|
||||||
auto& wlist = m_pwatch[v];
|
auto& wlist = m_pwatch[v];
|
||||||
|
@ -749,8 +749,11 @@ namespace polysat {
|
||||||
LOG(bool_justification_pp(m_bvars, lit));
|
LOG(bool_justification_pp(m_bvars, lit));
|
||||||
LOG("Literal " << lit << " is " << lit2cnstr(lit));
|
LOG("Literal " << lit << " is " << lit2cnstr(lit));
|
||||||
LOG("Conflict: " << m_conflict);
|
LOG("Conflict: " << m_conflict);
|
||||||
if (m_bvars.level(var) <= base_level())
|
if (m_bvars.level(var) <= base_level()) {
|
||||||
break;
|
// NOTE: the levels of boolean literals on the stack aren't always ordered by level (cf. replay functionality in pop_levels).
|
||||||
|
// Thus we can only skip base level literals here, instead of aborting the loop.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
SASSERT(!m_bvars.is_assumption(var));
|
SASSERT(!m_bvars.is_assumption(var));
|
||||||
if (m_bvars.is_decision(var)) {
|
if (m_bvars.is_decision(var)) {
|
||||||
revert_bool_decision(lit);
|
revert_bool_decision(lit);
|
||||||
|
|
|
@ -633,6 +633,7 @@ namespace polysat {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool viable::resolve(pvar v, conflict& core) {
|
bool viable::resolve(pvar v, conflict& core) {
|
||||||
|
DEBUG_CODE( log(v); );
|
||||||
if (has_viable(v))
|
if (has_viable(v))
|
||||||
return false;
|
return false;
|
||||||
entry const* e = m_units[v];
|
entry const* e = m_units[v];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue