mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
parent
0bd06930ae
commit
acdaeca826
|
@ -90,8 +90,7 @@ void fpa2bv_converter::mk_eq(expr * a, expr * b, expr_ref & result) {
|
|||
}
|
||||
|
||||
void fpa2bv_converter::mk_ite(expr * c, expr * t, expr * f, expr_ref & result) {
|
||||
SASSERT(m_util.is_fp(t) && m_util.is_fp(f));
|
||||
|
||||
if (m_util.is_fp(t) && m_util.is_fp(f)) {
|
||||
expr *t_sgn, *t_sig, *t_exp;
|
||||
expr *f_sgn, *f_sig, *f_exp;
|
||||
split_fp(t, t_sgn, t_exp, t_sig);
|
||||
|
@ -104,6 +103,16 @@ void fpa2bv_converter::mk_ite(expr * c, expr * t, expr * f, expr_ref & result) {
|
|||
|
||||
result = m_util.mk_fp(sgn, e, s);
|
||||
}
|
||||
else if (m_util.is_rm(t) && m_util.is_rm(f))
|
||||
{
|
||||
SASSERT(m_util.is_bv2rm(t) && m_util.is_bv2rm(f));
|
||||
TRACE("fpa2bv", tout << "ite rm: t=" << mk_ismt2_pp(t, m) << " f=" << mk_ismt2_pp(f, m) << std::endl; );
|
||||
m_simp.mk_ite(c, to_app(t)->get_arg(0), to_app(f)->get_arg(0), result);
|
||||
result = m_util.mk_bv2rm(result);
|
||||
}
|
||||
else
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
void fpa2bv_converter::mk_distinct(func_decl * f, unsigned num, expr * const * args, expr_ref & result) {
|
||||
// Note: in SMT there is only one NaN, so multiple of them are considered
|
||||
|
|
|
@ -89,7 +89,7 @@ br_status fpa2bv_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr * co
|
|||
}
|
||||
else if (m().is_ite(f)) {
|
||||
SASSERT(num == 3);
|
||||
if (m_conv.is_float(args[1])) {
|
||||
if (m_conv.is_float(args[1]) || m_conv.is_rm(args[1])) {
|
||||
m_conv.mk_ite(args[0], args[1], args[2], result);
|
||||
return BR_DONE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue