Skip to content

Commit

Permalink
#7001 - align is_numeral without to behavior if is_numeral with retur…
Browse files Browse the repository at this point in the history
…n numeral.
  • Loading branch information
NikolajBjorner committed Nov 19, 2023
1 parent 35bc522 commit 32f8705
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/api/api_numeral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ bool is_numeral_sort(Z3_context c, Z3_sort ty) {
if (!ty) return false;
sort * _ty = to_sort(ty);
family_id fid = _ty->get_family_id();
if (fid != mk_c(c)->get_arith_fid() &&
fid != mk_c(c)->get_bv_fid() &&
fid != mk_c(c)->get_datalog_fid() &&
fid != mk_c(c)->get_fpa_fid()) {
return false;
}
return true;
return
fid == mk_c(c)->get_arith_fid() ||
fid == mk_c(c)->get_bv_fid() ||
fid == mk_c(c)->get_datalog_fid() ||
fid == mk_c(c)->get_fpa_fid();

}

static bool check_numeral_sort(Z3_context c, Z3_sort ty) {
Expand Down Expand Up @@ -152,7 +151,7 @@ extern "C" {
mk_c(c)->bvutil().is_numeral(e) ||
mk_c(c)->fpautil().is_numeral(e) ||
mk_c(c)->fpautil().is_rm_numeral(e) ||
mk_c(c)->datalog_util().is_numeral_ext(e);
mk_c(c)->datalog_util().is_numeral(e);
Z3_CATCH_RETURN(false);
}

Expand Down

0 comments on commit 32f8705

Please sign in to comment.