Skip to content

Commit 6384080

Browse files
fix #2546, retrieve model in optsmt lex before iterating
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 0481adb commit 6384080

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

src/ast/arith_decl_plugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ app * arith_decl_plugin::mk_numeral(rational const & val, bool is_int) {
447447
}
448448
parameter p[2] = { parameter(val), parameter(static_cast<int>(is_int)) };
449449
func_decl * decl;
450+
450451
if (is_int && !m_convert_int_numerals_to_real)
451452
decl = m_manager->mk_const_decl(m_intv_sym, m_int_decl, func_decl_info(m_family_id, OP_NUM, 2, p));
452453
else

src/opt/optsmt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ namespace opt {
181181
for (unsigned i = 0; i < obj_index; ++i) {
182182
commit_assignment(i);
183183
}
184+
m_s->get_model(m_model);
184185

185186
unsigned steps = 0;
186187
unsigned step_incs = 0;

src/smt/smt_model_checker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,13 @@ namespace smt {
322322
/**
323323
\brief Return true if q is satisfied by m_curr_model.
324324
*/
325+
325326
bool model_checker::check(quantifier * q) {
326327
SASSERT(!m_aux_context->relevancy());
327328
scoped_ctx_push _push(m_aux_context.get());
328329

329330
quantifier * flat_q = get_flat_quantifier(q);
330-
TRACE("model_checker", tout << "model checking:\n" << expr_ref(q->get_expr(), m) << "\n" << expr_ref(flat_q->get_expr(), m) << "\n";);
331+
TRACE("model_checker", tout << "model checking:\n" << expr_ref(flat_q->get_expr(), m) << "\n";);
331332
expr_ref_vector sks(m);
332333

333334
assert_neg_q_m(flat_q, sks);

src/solver/smt_logics.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ bool smt_logics::logic_has_reals_only(symbol const& s) {
3535
s == "UFLRA" ||
3636
s == "LRA" ||
3737
s == "RDL" ||
38+
s == "NRA" ||
3839
s == "QF_NRA" ||
3940
s == "QF_UFNRA" ||
4041
s == "QF_UFLRA";

src/tactic/smtlogics/nra_tactic.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ tactic * mk_nra_tactic(ast_manager & m, params_ref const& p) {
3939
mk_simplify_tactic(m, p),
4040
mk_propagate_values_tactic(m, p),
4141
mk_qe_lite_tactic(m),
42+
mk_simplify_tactic(m, p),
4243
cond(mk_is_qfnra_probe(),
4344
or_else(try_for(mk_qfnra_nlsat_tactic(m, p), 5000),
4445
try_for(mk_qfnra_nlsat_tactic(m, p1), 10000),

0 commit comments

Comments
 (0)