3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-20 10:10:21 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-06-03 21:10:07 -07:00
parent cbf089e10d
commit 9ca5b3f304
14 changed files with 20 additions and 21 deletions

View file

@ -182,13 +182,13 @@ void asserted_formulas::get_assertions(ptr_vector<expr> & result) const {
void asserted_formulas::push_scope() {
reduce();
commit();
SASSERT(inconsistent() || m_qhead == m_formulas.size() || m.limit().get_cancel_flag());
SASSERT(inconsistent() || m_qhead == m_formulas.size() || m.limit().is_canceled());
TRACE("asserted_formulas_scopes", tout << "before push: " << m_scopes.size() << "\n";);
m_scoped_substitution.push();
m_scopes.push_back(scope());
scope & s = m_scopes.back();
s.m_formulas_lim = m_formulas.size();
SASSERT(inconsistent() || s.m_formulas_lim == m_qhead || m.limit().get_cancel_flag());
SASSERT(inconsistent() || s.m_formulas_lim == m_qhead || m.limit().is_canceled());
s.m_inconsistent_old = m_inconsistent;
m_defined_names.push();
m_elim_term_ite.push();

View file

@ -554,7 +554,7 @@ namespace smt {
catch (...) {
// Restore trail size since procedure was interrupted in the middle.
// If the add_eq_trail remains on the trail stack, then Z3 may crash when the destructor is invoked.
TRACE("add_eq", tout << "add_eq interrupted. This is unsafe " << m.limit().get_cancel_flag() << "\n";);
TRACE("add_eq", tout << "add_eq interrupted. This is unsafe " << m.limit().is_canceled() << "\n";);
m_trail_stack.shrink(old_trail_size);
throw;
}

View file

@ -264,7 +264,7 @@ namespace smt {
bool context::check_th_diseq_propagation() const {
TRACE("check_th_diseq_propagation", tout << "m_propagated_th_diseqs.size() " << m_propagated_th_diseqs.size() << "\n";);
int num = get_num_bool_vars();
if (inconsistent() || get_manager().limit().get_cancel_flag()) {
if (inconsistent() || get_manager().limit().is_canceled()) {
return true;
}
for (bool_var v = 0; v < num; v++) {

View file

@ -191,7 +191,7 @@ namespace smt {
template<typename Ext>
bool theory_arith<Ext>::satisfy_bounds() const {
if (get_manager().limit().get_cancel_flag())
if (get_manager().limit().is_canceled())
return true;
int num = get_num_vars();
for (theory_var v = 0; v < num; v++) {
@ -217,7 +217,7 @@ namespace smt {
template<typename Ext>
bool theory_arith<Ext>::valid_assignment() const {
if (get_manager().limit().get_cancel_flag())
if (get_manager().limit().is_canceled())
return true;
if (valid_row_assignment() &&
satisfy_bounds() &&

View file

@ -1811,7 +1811,7 @@ namespace smt {
}
bool theory_bv::check_invariant() {
if (m.limit().get_cancel_flag())
if (m.limit().is_canceled())
return true;
if (ctx.inconsistent())
return true;

View file

@ -3441,7 +3441,7 @@ public:
else {
rational r = get_value(v);
TRACE("arith", tout << mk_pp(o, m) << " v" << v << " := " << r << "\n";);
SASSERT("integer variables should have integer values: " && (!a.is_int(o) || r.is_int() || m.limit().get_cancel_flag()));
SASSERT("integer variables should have integer values: " && (!a.is_int(o) || r.is_int() || m.limit().is_canceled()));
if (a.is_int(o) && !r.is_int()) r = floor(r);
return alloc(expr_wrapper_proc, m_factory->mk_value(r, m.get_sort(o)));
}

View file

@ -2301,7 +2301,7 @@ void theory_seq::validate_fmls(enode_pair_vector const& eqs, literal_vector cons
k.assert_expr(f);
}
lbool r = k.check();
if (r != l_false && !m.limit().get_cancel_flag()) {
if (r != l_false && !m.limit().is_canceled()) {
model_ref mdl;
k.get_model(mdl);
IF_VERBOSE(0,