mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
fix #2546, retrieve model in optsmt lex before iterating
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0481adb87c
commit
63840806d8
|
@ -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)) };
|
parameter p[2] = { parameter(val), parameter(static_cast<int>(is_int)) };
|
||||||
func_decl * decl;
|
func_decl * decl;
|
||||||
|
|
||||||
if (is_int && !m_convert_int_numerals_to_real)
|
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));
|
decl = m_manager->mk_const_decl(m_intv_sym, m_int_decl, func_decl_info(m_family_id, OP_NUM, 2, p));
|
||||||
else
|
else
|
||||||
|
|
|
@ -181,6 +181,7 @@ namespace opt {
|
||||||
for (unsigned i = 0; i < obj_index; ++i) {
|
for (unsigned i = 0; i < obj_index; ++i) {
|
||||||
commit_assignment(i);
|
commit_assignment(i);
|
||||||
}
|
}
|
||||||
|
m_s->get_model(m_model);
|
||||||
|
|
||||||
unsigned steps = 0;
|
unsigned steps = 0;
|
||||||
unsigned step_incs = 0;
|
unsigned step_incs = 0;
|
||||||
|
|
|
@ -322,12 +322,13 @@ namespace smt {
|
||||||
/**
|
/**
|
||||||
\brief Return true if q is satisfied by m_curr_model.
|
\brief Return true if q is satisfied by m_curr_model.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool model_checker::check(quantifier * q) {
|
bool model_checker::check(quantifier * q) {
|
||||||
SASSERT(!m_aux_context->relevancy());
|
SASSERT(!m_aux_context->relevancy());
|
||||||
scoped_ctx_push _push(m_aux_context.get());
|
scoped_ctx_push _push(m_aux_context.get());
|
||||||
|
|
||||||
quantifier * flat_q = get_flat_quantifier(q);
|
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);
|
expr_ref_vector sks(m);
|
||||||
|
|
||||||
assert_neg_q_m(flat_q, sks);
|
assert_neg_q_m(flat_q, sks);
|
||||||
|
|
|
@ -35,6 +35,7 @@ bool smt_logics::logic_has_reals_only(symbol const& s) {
|
||||||
s == "UFLRA" ||
|
s == "UFLRA" ||
|
||||||
s == "LRA" ||
|
s == "LRA" ||
|
||||||
s == "RDL" ||
|
s == "RDL" ||
|
||||||
|
s == "NRA" ||
|
||||||
s == "QF_NRA" ||
|
s == "QF_NRA" ||
|
||||||
s == "QF_UFNRA" ||
|
s == "QF_UFNRA" ||
|
||||||
s == "QF_UFLRA";
|
s == "QF_UFLRA";
|
||||||
|
|
|
@ -39,6 +39,7 @@ tactic * mk_nra_tactic(ast_manager & m, params_ref const& p) {
|
||||||
mk_simplify_tactic(m, p),
|
mk_simplify_tactic(m, p),
|
||||||
mk_propagate_values_tactic(m, p),
|
mk_propagate_values_tactic(m, p),
|
||||||
mk_qe_lite_tactic(m),
|
mk_qe_lite_tactic(m),
|
||||||
|
mk_simplify_tactic(m, p),
|
||||||
cond(mk_is_qfnra_probe(),
|
cond(mk_is_qfnra_probe(),
|
||||||
or_else(try_for(mk_qfnra_nlsat_tactic(m, p), 5000),
|
or_else(try_for(mk_qfnra_nlsat_tactic(m, p), 5000),
|
||||||
try_for(mk_qfnra_nlsat_tactic(m, p1), 10000),
|
try_for(mk_qfnra_nlsat_tactic(m, p1), 10000),
|
||||||
|
|
Loading…
Reference in a new issue