Skip to content

Commit 32f8705

Browse files
#7001 - align is_numeral without to behavior if is_numeral with return numeral.
1 parent 35bc522 commit 32f8705

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/api/api_numeral.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ bool is_numeral_sort(Z3_context c, Z3_sort ty) {
2929
if (!ty) return false;
3030
sort * _ty = to_sort(ty);
3131
family_id fid = _ty->get_family_id();
32-
if (fid != mk_c(c)->get_arith_fid() &&
33-
fid != mk_c(c)->get_bv_fid() &&
34-
fid != mk_c(c)->get_datalog_fid() &&
35-
fid != mk_c(c)->get_fpa_fid()) {
36-
return false;
37-
}
38-
return true;
32+
return
33+
fid == mk_c(c)->get_arith_fid() ||
34+
fid == mk_c(c)->get_bv_fid() ||
35+
fid == mk_c(c)->get_datalog_fid() ||
36+
fid == mk_c(c)->get_fpa_fid();
37+
3938
}
4039

4140
static bool check_numeral_sort(Z3_context c, Z3_sort ty) {
@@ -152,7 +151,7 @@ extern "C" {
152151
mk_c(c)->bvutil().is_numeral(e) ||
153152
mk_c(c)->fpautil().is_numeral(e) ||
154153
mk_c(c)->fpautil().is_rm_numeral(e) ||
155-
mk_c(c)->datalog_util().is_numeral_ext(e);
154+
mk_c(c)->datalog_util().is_numeral(e);
156155
Z3_CATCH_RETURN(false);
157156
}
158157

0 commit comments

Comments
 (0)