mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 03:07:07 +00:00
rewind qhead to ensure re-propagation after cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
41deae52c6
commit
7d7e03e377
|
@ -258,6 +258,7 @@ namespace smt {
|
|||
TRACE("context", tout << is_sat << "\n";);
|
||||
return is_sat;
|
||||
}
|
||||
|
||||
obj_map<expr, expr*> var2val;
|
||||
index_set _assumptions;
|
||||
for (unsigned i = 0; i < assumptions.size(); ++i) {
|
||||
|
|
|
@ -1749,8 +1749,10 @@ namespace smt {
|
|||
unsigned qhead = m_qhead;
|
||||
if (!bcp())
|
||||
return false;
|
||||
if (get_cancel_flag())
|
||||
if (get_cancel_flag()) {
|
||||
m_qhead = qhead;
|
||||
return true;
|
||||
}
|
||||
SASSERT(!inconsistent());
|
||||
propagate_relevancy(qhead);
|
||||
if (inconsistent())
|
||||
|
@ -1768,8 +1770,10 @@ namespace smt {
|
|||
m_qmanager->propagate();
|
||||
if (inconsistent())
|
||||
return false;
|
||||
if (resource_limits_exceeded())
|
||||
if (resource_limits_exceeded()) {
|
||||
m_qhead = qhead;
|
||||
return true;
|
||||
}
|
||||
if (!can_propagate()) {
|
||||
CASSERT("diseq_bug", inconsistent() || check_missing_diseq_conflict());
|
||||
CASSERT("eqc_bool", check_eqc_bool_assignment());
|
||||
|
|
|
@ -29,6 +29,7 @@ uint64 reslimit::count() const {
|
|||
return m_count;
|
||||
}
|
||||
|
||||
|
||||
bool reslimit::inc() {
|
||||
++m_count;
|
||||
return m_cancel == 0 && (m_limit == 0 || m_count <= m_limit);
|
||||
|
|
Loading…
Reference in a new issue