mirror of
https://github.com/Z3Prover/z3
synced 2025-07-06 20:56:25 +00:00
Bugfix for unspecified FP model values.
This commit is contained in:
parent
cae53c3ec2
commit
4ed2b8a0f9
1 changed files with 13 additions and 4 deletions
|
@ -401,10 +401,19 @@ void fpa2bv_model_converter::convert(model * bv_mdl, model * float_mdl) {
|
||||||
func_decl * f = it->m_key;
|
func_decl * f = it->m_key;
|
||||||
if (f->get_arity() == 0)
|
if (f->get_arity() == 0)
|
||||||
{
|
{
|
||||||
array_model am = convert_array_func_interp(f, it->m_value, bv_mdl);
|
array_util au(m);
|
||||||
if (am.new_float_fd) float_mdl->register_decl(am.new_float_fd, am.new_float_fi);
|
if (au.is_array(f->get_range())) {
|
||||||
if (am.result) float_mdl->register_decl(f, am.result);
|
array_model am = convert_array_func_interp(f, it->m_value, bv_mdl);
|
||||||
if (am.bv_fd) seen.insert(am.bv_fd);
|
if (am.new_float_fd) float_mdl->register_decl(am.new_float_fd, am.new_float_fi);
|
||||||
|
if (am.result) float_mdl->register_decl(f, am.result);
|
||||||
|
if (am.bv_fd) seen.insert(am.bv_fd);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Just keep.
|
||||||
|
expr_ref val(m);
|
||||||
|
bv_mdl->eval(it->m_value, val);
|
||||||
|
float_mdl->register_decl(f, val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
func_interp * fmv = convert_func_interp(f, it->m_value, bv_mdl);
|
func_interp * fmv = convert_func_interp(f, it->m_value, bv_mdl);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue