mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
edaec81aa2
7 changed files with 30 additions and 13 deletions
|
@ -316,13 +316,21 @@ void bv2fpa_converter::convert_consts(model_core * mc, model_core * target_model
|
|||
app * a2 = to_app(val->get_arg(2));
|
||||
|
||||
expr_ref v0(m), v1(m), v2(m);
|
||||
#ifdef Z3DEBUG
|
||||
v0 = mc->get_const_interp(a0->get_decl());
|
||||
v1 = mc->get_const_interp(a1->get_decl());
|
||||
v2 = mc->get_const_interp(a2->get_decl());
|
||||
#else
|
||||
expr * bv = mc->get_const_interp(to_app(to_app(a0)->get_arg(0))->get_decl());
|
||||
unsigned bv_sz = m_bv_util.get_bv_size(bv);
|
||||
v0 = m_bv_util.mk_extract(bv_sz-1, bv_sz-1, bv);
|
||||
v1 = m_bv_util.mk_extract(bv_sz-2, sbits-1, bv);
|
||||
v2 = m_bv_util.mk_extract(sbits-2, 0, bv);
|
||||
#endif
|
||||
|
||||
if (!v0) v0 = m_bv_util.mk_numeral(0, 1);
|
||||
if (!v1) v1 = m_bv_util.mk_numeral(0, ebits);
|
||||
if (!v2) v2 = m_bv_util.mk_numeral(0, sbits-1);
|
||||
if (!v0) v0 = m_bv_util.mk_numeral(0, 1);
|
||||
if (!v1) v1 = m_bv_util.mk_numeral(0, ebits);
|
||||
if (!v2) v2 = m_bv_util.mk_numeral(0, sbits-1);
|
||||
|
||||
expr_ref sgn(m), exp(m), sig(m);
|
||||
m_th_rw(v0, sgn);
|
||||
|
|
|
@ -3295,8 +3295,6 @@ void fpa2bv_converter::mk_to_sbv(func_decl * f, unsigned num, expr * const * arg
|
|||
|
||||
void fpa2bv_converter::mk_to_ubv_unspecified(func_decl * f, unsigned num, expr * const * args, expr_ref & result) {
|
||||
SASSERT(num == 0);
|
||||
unsigned ebits = f->get_parameter(0).get_int();
|
||||
unsigned sbits = f->get_parameter(1).get_int();
|
||||
unsigned width = m_bv_util.get_bv_size(f->get_range());
|
||||
|
||||
if (m_hi_fp_unspecified)
|
||||
|
@ -3326,8 +3324,6 @@ expr_ref fpa2bv_converter::mk_to_ubv_unspecified(unsigned ebits, unsigned sbits,
|
|||
|
||||
void fpa2bv_converter::mk_to_sbv_unspecified(func_decl * f, unsigned num, expr * const * args, expr_ref & result) {
|
||||
SASSERT(num == 0);
|
||||
unsigned ebits = f->get_parameter(0).get_int();
|
||||
unsigned sbits = f->get_parameter(1).get_int();
|
||||
unsigned width = m_bv_util.get_bv_size(f->get_range());
|
||||
|
||||
if (m_hi_fp_unspecified)
|
||||
|
@ -3339,7 +3335,7 @@ void fpa2bv_converter::mk_to_sbv_unspecified(func_decl * f, unsigned num, expr *
|
|||
m_uf2bvuf.insert(f, fd);
|
||||
m.inc_ref(f);
|
||||
m.inc_ref(fd);
|
||||
}
|
||||
}
|
||||
result = m.mk_const(fd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue