Skip to content

Commit

Permalink
code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Nov 19, 2022
1 parent 41b40c3 commit dcc995f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ast/converters/expr_inverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ void iexpr_inverter::add_def(expr * v, expr * def) {
return;
SASSERT(uncnstr(v));
SASSERT(to_app(v)->get_num_args() == 0);
m_mc->add(to_app(v)->get_decl(), def);
m_mc->add(v, def);
}

void iexpr_inverter::add_defs(unsigned num, expr* const* args, expr* u, expr* identity) {
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/core/elim_uncnstr_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class elim_uncnstr_tactic : public tactic {
SASSERT(uncnstr(v));
SASSERT(to_app(v)->get_num_args() == 0);
if (m_mc)
m_mc->add(to_app(v)->get_decl(), def);
m_mc->add(v, def);
}

void add_defs(unsigned num, expr * const * args, expr * u, expr * identity) {
Expand Down
4 changes: 2 additions & 2 deletions src/tactic/core/reduce_args_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ struct reduce_args_tactic::imp {
for (auto const& [t, new_def] : *map) {
f_mc->hide(new_def);
SASSERT(new_def->get_arity() == new_args.size());
app * new_t = m.mk_app(new_def, new_args.size(), new_args.data());
app * new_t = m.mk_app(new_def, new_args);
if (def == nullptr) {
def = new_t;
}
Expand All @@ -429,7 +429,7 @@ struct reduce_args_tactic::imp {
if (new_eqs.size() == 1)
cond = new_eqs[0];
else
cond = m.mk_and(new_eqs.size(), new_eqs.data());
cond = m.mk_and(new_eqs);
def = m.mk_ite(cond, new_t, def);
}
}
Expand Down

0 comments on commit dcc995f

Please sign in to comment.