3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 05:18:44 +00:00

Added injection of auxiliary lemmas for fp.isNaN, so that the value propagation can pick up these values and propagate them.

Fixes #96.
This commit is contained in:
Christoph M. Wintersteiger 2015-05-21 19:02:09 +01:00
parent eee076b9f8
commit 6f575689b1
2 changed files with 8 additions and 0 deletions

View file

@ -3044,6 +3044,13 @@ void fpa2bv_converter::mk_is_nan(expr * e, expr_ref & result) {
m_simp.mk_not(sig_is_zero, sig_is_not_zero);
m_simp.mk_eq(exp, top_exp, exp_is_top);
m_simp.mk_and(exp_is_top, sig_is_not_zero, result);
// 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.
m_extra_assertions.push_back(m.mk_eq(sgn, m_bv_util.mk_numeral(0, 1)));
m_extra_assertions.push_back(m.mk_eq(exp, top_exp));
m_extra_assertions.push_back(m.mk_eq(sig, m_bv_util.mk_numeral(1, m_bv_util.get_bv_size(sig))));
}
void fpa2bv_converter::mk_is_inf(expr * e, expr_ref & result) {

View file

@ -37,6 +37,7 @@ tactic * mk_qffp_tactic(ast_manager & m, params_ref const & p) {
mk_smt_tactic(),
and_then(
mk_fpa2bv_tactic(m, p),
mk_propagate_values_tactic(m, p),
using_params(mk_simplify_tactic(m, p), simp_p),
mk_bit_blaster_tactic(m, p),
using_params(mk_simplify_tactic(m, p), simp_p),