3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

refactor get_sort

This commit is contained in:
Nikolaj Bjorner 2021-02-02 04:45:54 -08:00
parent 4455f6caf8
commit 3ae4c6e9de
129 changed files with 362 additions and 362 deletions

View file

@ -365,7 +365,7 @@ extern "C" {
case AST_APP: {
expr * e = to_expr(_a);
// Real algebraic numbers are not considered Z3_NUMERAL_AST
if (is_numeral_sort(c, of_sort(mk_c(c)->m().get_sort(e))) && mk_c(c)->m().is_unique_value(e))
if (is_numeral_sort(c, of_sort(e->get_sort())) && mk_c(c)->m().is_unique_value(e))
return Z3_NUMERAL_AST;
return Z3_APP_AST;
}

View file

@ -185,7 +185,7 @@ extern "C" {
app* a = to_app(vars[i]);
_names.push_back(to_app(a)->get_decl()->get_name());
_args.push_back(a);
_vars.push_back(mk_c(c)->m().get_sort(a));
_vars.push_back(a->get_sort());
}
expr_ref result(mk_c(c)->m());
expr_abstract(mk_c(c)->m(), 0, num_decls, _args.c_ptr(), to_expr(body), result);
@ -232,7 +232,7 @@ extern "C" {
}
symbol s(to_app(a)->get_decl()->get_name());
names.push_back(of_symbol(s));
types.push_back(of_sort(mk_c(c)->m().get_sort(a)));
types.push_back(of_sort(a->get_sort()));
bound_asts.push_back(a);
if (a->get_family_id() != null_family_id || a->get_num_args() != 0) {
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);