mirror of
https://github.com/Z3Prover/z3
synced 2025-08-06 19:21:22 +00:00
refactor get_sort
This commit is contained in:
parent
4455f6caf8
commit
3ae4c6e9de
129 changed files with 362 additions and 362 deletions
|
@ -114,7 +114,7 @@ expr* bv2real_util::mk_bv2real_c(expr* s, expr* t, rational const& d, rational c
|
|||
sig.m_r = r;
|
||||
func_decl* f;
|
||||
if (!m_sig2decl.find(sig, f)) {
|
||||
sort* domain[2] = { m_manager.get_sort(s), m_manager.get_sort(t) };
|
||||
sort* domain[2] = { s->get_sort(), t->get_sort() };
|
||||
sort* real = m_arith.mk_real();
|
||||
f = m_manager.mk_fresh_func_decl("bv2real", "", 2, domain, real);
|
||||
m_decls.push_back(f);
|
||||
|
|
|
@ -51,7 +51,7 @@ class fix_dl_var_tactic : public tactic {
|
|||
}
|
||||
|
||||
bool is_arith(expr * n) {
|
||||
sort * s = m.get_sort(n);
|
||||
sort * s = n->get_sort();
|
||||
return s->get_family_id() == m_util.get_family_id();
|
||||
}
|
||||
|
||||
|
|
|
@ -802,7 +802,7 @@ class fm_tactic : public tactic {
|
|||
forbidden_proc(imp & o):m_owner(o) {}
|
||||
void operator()(::var * n) {}
|
||||
void operator()(app * n) {
|
||||
if (is_uninterp_const(n) && m_owner.m.get_sort(n)->get_family_id() == m_owner.m_util.get_family_id()) {
|
||||
if (is_uninterp_const(n) && n->get_sort()->get_family_id() == m_owner.m_util.get_family_id()) {
|
||||
m_owner.m_forbidden_set.insert(n->get_decl());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ class lia2pb_tactic : public tactic {
|
|||
}
|
||||
}
|
||||
else {
|
||||
sort * s = m_owner.m.get_sort(n);
|
||||
sort * s = n->get_sort();
|
||||
if (s->get_family_id() == m_owner.m_util.get_family_id())
|
||||
throw_failed(n);
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ class normalize_bounds_tactic : public tactic {
|
|||
for (expr * x : m_bm) {
|
||||
if (is_target(x, val)) {
|
||||
num_norm_bounds++;
|
||||
sort * s = m.get_sort(x);
|
||||
sort * s = x->get_sort();
|
||||
app * x_prime = m.mk_fresh_const(nullptr, s);
|
||||
expr * def = m_util.mk_add(x_prime, m_util.mk_numeral(val, s));
|
||||
subst.insert(x, def);
|
||||
|
|
|
@ -136,7 +136,7 @@ struct has_nlmul {
|
|||
has_nlmul(ast_manager& m):m(m), a(m) {}
|
||||
|
||||
void throw_found(expr* e) {
|
||||
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(m.get_sort(e), m) << "\n";);
|
||||
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
|
||||
throw found();
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ static bool is_lp(goal const & g) {
|
|||
while (m.is_not(f, f))
|
||||
sign = !sign;
|
||||
if (m.is_eq(f) && !sign) {
|
||||
if (m.get_sort(to_app(f)->get_arg(0))->get_family_id() != u.get_family_id())
|
||||
if (to_app(f)->get_arg(0)->get_sort()->get_family_id() != u.get_family_id())
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ struct is_non_nira_functor {
|
|||
is_non_nira_functor(ast_manager & _m, bool _int, bool _real, bool _quant, bool linear):m(_m), u(m), m_int(_int), m_real(_real), m_quant(_quant), m_linear(linear) {}
|
||||
|
||||
void throw_found(expr* e) {
|
||||
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(m.get_sort(e), m) << "\n";);
|
||||
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
|
||||
throw found();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue