Skip to content

Commit f4fd947

Browse files
fix #2652
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent e2a9cb8 commit f4fd947

File tree

3 files changed

+7
-33
lines changed

3 files changed

+7
-33
lines changed

src/ast/fpa/bv2fpa_converter.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,16 +466,14 @@ void bv2fpa_converter::convert_uf2bvuf(model_core * mc, model_core * target_mode
466466
}
467467
continue;
468468
}
469-
// kv.m_value contains the model for the unspecified cases of kv.m_key.
470-
// TBD: instead of mapping the interpretation of f to just the graph for the
471-
// uninterpreted case, map it to a condition, ite, that filters out the
472-
// pre-condition for which argument combinations are interpreted vs. uninterpreted.
473-
// if (m_fpa_util.is_to_ieee_bv(f)) {
474-
// }
475-
// if (m_fpa_util.is_to_sbv(f)) {
476-
// }
477469

478470

471+
// f is a floating point function: f(x,y) : Float
472+
// f_uf is a bit-vector function: f_uf(xB,yB) : BitVec
473+
// then there is f_def: f_Bv(xB, yB) := if(range(xB),.., f_uf(xB,yB))
474+
// f(x,y) := to_float(if(range(to_bv(x)), ... f_uf(to_bv(xB), to_bv(yB)))) - not practical
475+
// := if(range_fp(x), ...., to_float(f_uf(...)) - approach
476+
479477
target_model->register_decl(f, convert_func_interp(mc, f, f_uf));
480478
}
481479
}

src/ast/fpa/fpa2bv_converter.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,26 +3201,6 @@ void fpa2bv_converter::mk_to_bv(func_decl * f, unsigned num, expr * const * args
32013201
sort * xs = m.get_sort(x);
32023202
sort * bv_srt = f->get_range();
32033203

3204-
#if 0
3205-
// for this to work, the following is required:
3206-
// 1. split_fp should succeed even if the argument does not satisfy is_fp
3207-
// we would need functions to access the sgn, exp and sig fields
3208-
// 2. an inverse of bv2rm, here called rm2bv.
3209-
expr_ref arg1(m), arg2(m), _rm(m);
3210-
3211-
var_subst vsubst(m, false);
3212-
expr* def = get_bv_def(f);
3213-
if (def) {
3214-
result = vsubst(def, 2, args);
3215-
return;
3216-
}
3217-
arg1 = m.mk_var(0, m.get_sort(args[0]));
3218-
arg2 = m.mk_var(1, m.get_sort(args[1]));
3219-
_rm = m_util.mk_rm2bv(arg1);
3220-
rm = _rm;
3221-
x = arg2;
3222-
#endif
3223-
32243204
expr_ref sgn(m), sig(m), exp(m), lz(m);
32253205
unpack(x, sgn, sig, exp, lz, true);
32263206

@@ -3370,10 +3350,6 @@ void fpa2bv_converter::mk_to_bv(func_decl * f, unsigned num, expr * const * args
33703350
result = m.mk_ite(c2, v2, result);
33713351
result = m.mk_ite(c1, v1, result);
33723352

3373-
#if 0
3374-
set_bv_def(f, result);
3375-
result = vsubst(result, 2, args);
3376-
#endif
33773353
SASSERT(is_well_sorted(m, result));
33783354
}
33793355

src/smt/smt_model_checker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ namespace smt {
238238
sk_value = get_type_compatible_term(sk_value);
239239
}
240240
func_decl * f = nullptr;
241-
if (autil.is_as_array(sk_value, f) && cex->get_func_interp(f)) {
241+
if (autil.is_as_array(sk_value, f) && cex->get_func_interp(f) && cex->get_func_interp(f)->get_interp()) {
242242
expr_ref body(cex->get_func_interp(f)->get_interp(), m);
243243
ptr_vector<sort> sorts(f->get_arity(), f->get_domain());
244244
svector<symbol> names;

0 commit comments

Comments
 (0)