3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

Moved auxiliary fp.isNaN lemma injection to the right place.

Fixes #102
This commit is contained in:
Christoph M. Wintersteiger 2015-05-22 12:33:53 +01:00
parent 891073d3fe
commit 8fc0ba0ab5
2 changed files with 16 additions and 7 deletions

View file

@ -88,6 +88,22 @@ class fpa2bv_tactic : public tactic {
new_pr = m.mk_modus_ponens(pr, new_pr);
}
g->update(idx, new_curr, new_pr, g->dep(idx));
if (is_app(new_curr)) {
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,
// that is (= e (fp #b0 #b1...1 #b0...01)), so that the value propagation
// has a value to propagate.
expr * sgn, *sig, *exp;
expr_ref top_exp(m);
m_conv.split_fp(new_curr, sgn, exp, sig);
m.mk_eq(sgn, m_conv.bu().mk_numeral(0, 1));
m.mk_eq(exp, m_conv.bu().mk_numeral(-1, m_conv.bu().get_bv_size(exp)));
m.mk_eq(sig, m_conv.bu().mk_numeral(1, m_conv.bu().get_bv_size(sig)));
}
}
}
if (g->models_enabled())