From cc394f0fe9d6bb259dd55e925b655dad5c82b657 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Wed, 1 Apr 2020 03:42:13 -0700 Subject: [PATCH] na Signed-off-by: Nikolaj Bjorner --- src/math/lp/lar_solver.cpp | 11 +++++------ src/math/lp/nla_core.cpp | 19 +++++++++---------- src/math/lp/u_set.h | 8 +++++++- src/model/model_evaluator.cpp | 4 ++-- src/smt/theory_lra.cpp | 4 ++-- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/math/lp/lar_solver.cpp b/src/math/lp/lar_solver.cpp index 5772888e4..6b81d6faa 100644 --- a/src/math/lp/lar_solver.cpp +++ b/src/math/lp/lar_solver.cpp @@ -2395,9 +2395,7 @@ bool lar_solver::inside_bounds(lpvar j, const impq& val) const { bool lar_solver::try_to_patch(lpvar j, const mpq& val, const std::function& blocker, const std::function& report_change) { if (is_base(j)) { - bool r = remove_from_basis(j); - SASSERT(r); - (void)r; + VERIFY(remove_from_basis(j)); } impq ival(val); if (!inside_bounds(j, ival)) @@ -2409,10 +2407,10 @@ bool lar_solver::try_to_patch(lpvar j, const mpq& val, const std::functionget_family_id(); bool is_uninterp = fid != null_family_id && m.get_plugin(fid)->is_considered_uninterpreted(f); br_status st = BR_FAILED; - if (num == 0 && (fid == null_family_id || is_uninterp)) { // || m_ar.is_as_array(f) + if (num == 0 && (fid == null_family_id || is_uninterp)) { // || m_ar.is_as_array(f)) { expr * val = m_model.get_const_interp(f); if (val != nullptr) { result = val; @@ -168,7 +168,7 @@ struct evaluator_cfg : public default_rewriter_cfg { TRACE("model_evaluator", tout << result << "\n";); return st; } - else if (m_model_completion) { + else if (m_model_completion && !m_ar.is_as_array(f)) { sort * s = f->get_range(); expr * val = m_model.get_some_value(s); m_model.register_decl(f, val); diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index f1754177f..1e6e69e3a 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -1561,8 +1561,8 @@ public: void init_variable_values() { reset_variable_values(); - if (!m.canceled() && m_solver.get() && th.get_num_vars() > 0) { - TRACE("arith", tout << "update variable values\n";); + if (!m.canceled() && m_solver.get() && th.get_num_vars() > 0) { + TRACE("arith", display(tout << "update variable values\n");); lp().get_model(m_variable_values); } }