Skip to content

Commit

Permalink
fix #2652
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Oct 23, 2019
1 parent e2a9cb8 commit f4fd947
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
14 changes: 6 additions & 8 deletions src/ast/fpa/bv2fpa_converter.cpp
Expand Up @@ -466,16 +466,14 @@ void bv2fpa_converter::convert_uf2bvuf(model_core * mc, model_core * target_mode
}
continue;
}
// kv.m_value contains the model for the unspecified cases of kv.m_key.
// TBD: instead of mapping the interpretation of f to just the graph for the
// uninterpreted case, map it to a condition, ite, that filters out the
// pre-condition for which argument combinations are interpreted vs. uninterpreted.
// if (m_fpa_util.is_to_ieee_bv(f)) {
// }
// if (m_fpa_util.is_to_sbv(f)) {
// }


// f is a floating point function: f(x,y) : Float
// f_uf is a bit-vector function: f_uf(xB,yB) : BitVec
// then there is f_def: f_Bv(xB, yB) := if(range(xB),.., f_uf(xB,yB))
// f(x,y) := to_float(if(range(to_bv(x)), ... f_uf(to_bv(xB), to_bv(yB)))) - not practical
// := if(range_fp(x), ...., to_float(f_uf(...)) - approach

target_model->register_decl(f, convert_func_interp(mc, f, f_uf));
}
}
Expand Down
24 changes: 0 additions & 24 deletions src/ast/fpa/fpa2bv_converter.cpp
Expand Up @@ -3201,26 +3201,6 @@ void fpa2bv_converter::mk_to_bv(func_decl * f, unsigned num, expr * const * args
sort * xs = m.get_sort(x);
sort * bv_srt = f->get_range();

#if 0
// for this to work, the following is required:
// 1. split_fp should succeed even if the argument does not satisfy is_fp
// we would need functions to access the sgn, exp and sig fields
// 2. an inverse of bv2rm, here called rm2bv.
expr_ref arg1(m), arg2(m), _rm(m);

var_subst vsubst(m, false);
expr* def = get_bv_def(f);
if (def) {
result = vsubst(def, 2, args);
return;
}
arg1 = m.mk_var(0, m.get_sort(args[0]));
arg2 = m.mk_var(1, m.get_sort(args[1]));
_rm = m_util.mk_rm2bv(arg1);
rm = _rm;
x = arg2;
#endif

expr_ref sgn(m), sig(m), exp(m), lz(m);
unpack(x, sgn, sig, exp, lz, true);

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

#if 0
set_bv_def(f, result);
result = vsubst(result, 2, args);
#endif
SASSERT(is_well_sorted(m, result));
}

Expand Down
2 changes: 1 addition & 1 deletion src/smt/smt_model_checker.cpp
Expand Up @@ -238,7 +238,7 @@ namespace smt {
sk_value = get_type_compatible_term(sk_value);
}
func_decl * f = nullptr;
if (autil.is_as_array(sk_value, f) && cex->get_func_interp(f)) {
if (autil.is_as_array(sk_value, f) && cex->get_func_interp(f) && cex->get_func_interp(f)->get_interp()) {
expr_ref body(cex->get_func_interp(f)->get_interp(), m);
ptr_vector<sort> sorts(f->get_arity(), f->get_domain());
svector<symbol> names;
Expand Down

0 comments on commit f4fd947

Please sign in to comment.