3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 11:07:51 +00:00

Bugfixes for model verification of unspecified values of fp.min/fp.max

This commit is contained in:
Christoph M. Wintersteiger 2015-11-02 19:25:44 +00:00
parent 14d2356a32
commit 92152b16ca
6 changed files with 131 additions and 113 deletions

View file

@ -43,26 +43,26 @@ class fpa2bv_tactic : public tactic {
}
void updt_params(params_ref const & p) {
m_rw.cfg().updt_params(p);
m_rw.cfg().updt_params(p);
}
void set_cancel(bool f) {
m_rw.set_cancel(f);
}
virtual void operator()(goal_ref const & g,
goal_ref_buffer & result,
model_converter_ref & mc,
virtual void operator()(goal_ref const & g,
goal_ref_buffer & result,
model_converter_ref & mc,
proof_converter_ref & pc,
expr_dependency_ref & core) {
SASSERT(g->is_well_sorted());
m_proofs_enabled = g->proofs_enabled();
m_produce_models = g->models_enabled();
m_produce_unsat_cores = g->unsat_core_enabled();
mc = 0; pc = 0; core = 0; result.reset();
tactic_report report("fpa2bv", *g);
m_rw.reset();
m_rw.reset();
TRACE("fpa2bv", tout << "BEFORE: " << std::endl; g->display(tout););
@ -70,7 +70,7 @@ class fpa2bv_tactic : public tactic {
result.push_back(g.get());
return;
}
m_num_steps = 0;
expr_ref new_curr(m);
proof_ref new_pr(m);
@ -91,7 +91,7 @@ class fpa2bv_tactic : public tactic {
const app * a = to_app(new_curr.get());
if (a->get_family_id() == m_conv.fu().get_family_id() &&
a->get_decl_kind() == OP_FPA_IS_NAN) {
// Inject auxiliary lemmas that fix e to the one and only NaN value,
// Inject auxiliary lemmas that fix e to the one and only NaN value,
// that is (= e (fp #b0 #b1...1 #b0...01)), so that the value propagation
// has a value to propagate.
expr * sgn, *sig, *exp;
@ -104,8 +104,8 @@ class fpa2bv_tactic : public tactic {
}
}
if (g->models_enabled())
mc = mk_fpa2bv_model_converter(m, m_conv.const2bv(), m_conv.rm_const2bv(), m_conv.uf2bvuf(), m_conv.decls_to_hide());
if (g->models_enabled())
mc = mk_fpa2bv_model_converter(m, m_conv);
g->inc_depth();
result.push_back(g.get());
@ -114,7 +114,7 @@ class fpa2bv_tactic : public tactic {
result.back()->assert_expr(m_conv.m_extra_assertions[i].get());
SASSERT(g->is_well_sorted());
TRACE("fpa2bv", tout << "AFTER: " << std::endl; g->display(tout);
TRACE("fpa2bv", tout << "AFTER: " << std::endl; g->display(tout);
if (mc) mc->display(tout); tout << std::endl; );
}
};
@ -141,12 +141,12 @@ public:
m_imp->updt_params(p);
}
virtual void collect_param_descrs(param_descrs & r) {
virtual void collect_param_descrs(param_descrs & r) {
}
virtual void operator()(goal_ref const & in,
goal_ref_buffer & result,
model_converter_ref & mc,
virtual void operator()(goal_ref const & in,
goal_ref_buffer & result,
model_converter_ref & mc,
proof_converter_ref & pc,
expr_dependency_ref & core) {
try {
@ -156,8 +156,8 @@ public:
throw tactic_exception(ex.msg());
}
}
virtual void cleanup() {
virtual void cleanup() {
imp * d = alloc(imp, m_imp->m, m_params);
#pragma omp critical (tactic_cancel)
{
@ -173,6 +173,6 @@ protected:
}
};
tactic * mk_fpa2bv_tactic(ast_manager & m, params_ref const & p) {
tactic * mk_fpa2bv_tactic(ast_manager & m, params_ref const & p) {
return clean(alloc(fpa2bv_tactic, m, p));
}