Skip to content

Commit

Permalink
fix #2546, retrieve model in optsmt lex before iterating
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Sep 10, 2019
1 parent 0481adb commit 6384080
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ast/arith_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ app * arith_decl_plugin::mk_numeral(rational const & val, bool is_int) {
}
parameter p[2] = { parameter(val), parameter(static_cast<int>(is_int)) };
func_decl * decl;

if (is_int && !m_convert_int_numerals_to_real)
decl = m_manager->mk_const_decl(m_intv_sym, m_int_decl, func_decl_info(m_family_id, OP_NUM, 2, p));
else
Expand Down
1 change: 1 addition & 0 deletions src/opt/optsmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ namespace opt {
for (unsigned i = 0; i < obj_index; ++i) {
commit_assignment(i);
}
m_s->get_model(m_model);

unsigned steps = 0;
unsigned step_incs = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/smt/smt_model_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,13 @@ namespace smt {
/**
\brief Return true if q is satisfied by m_curr_model.
*/

bool model_checker::check(quantifier * q) {
SASSERT(!m_aux_context->relevancy());
scoped_ctx_push _push(m_aux_context.get());

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

assert_neg_q_m(flat_q, sks);
Expand Down
1 change: 1 addition & 0 deletions src/solver/smt_logics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ bool smt_logics::logic_has_reals_only(symbol const& s) {
s == "UFLRA" ||
s == "LRA" ||
s == "RDL" ||
s == "NRA" ||
s == "QF_NRA" ||
s == "QF_UFNRA" ||
s == "QF_UFLRA";
Expand Down
1 change: 1 addition & 0 deletions src/tactic/smtlogics/nra_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tactic * mk_nra_tactic(ast_manager & m, params_ref const& p) {
mk_simplify_tactic(m, p),
mk_propagate_values_tactic(m, p),
mk_qe_lite_tactic(m),
mk_simplify_tactic(m, p),
cond(mk_is_qfnra_probe(),
or_else(try_for(mk_qfnra_nlsat_tactic(m, p), 5000),
try_for(mk_qfnra_nlsat_tactic(m, p1), 10000),
Expand Down

0 comments on commit 6384080

Please sign in to comment.