mirror of
https://github.com/Z3Prover/z3
synced 2025-08-26 04:56:03 +00:00
parent
c42d590db3
commit
f989e4eb38
3 changed files with 12 additions and 5 deletions
|
@ -70,17 +70,18 @@ br_status datatype_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr
|
|||
return BR_FAILED;
|
||||
app * a = to_app(args[0]);
|
||||
func_decl * c_decl = a->get_decl();
|
||||
if (c_decl != m_util.get_accessor_constructor(f)) {
|
||||
func_decl * acc = m_util.get_update_accessor(f);
|
||||
if (c_decl != m_util.get_accessor_constructor(acc)) {
|
||||
result = a;
|
||||
return BR_DONE;
|
||||
}
|
||||
ptr_vector<func_decl> const & acc = *m_util.get_constructor_accessors(c_decl);
|
||||
SASSERT(acc.size() == a->get_num_args());
|
||||
unsigned num = acc.size();
|
||||
ptr_vector<func_decl> const & accs = *m_util.get_constructor_accessors(c_decl);
|
||||
SASSERT(accs.size() == a->get_num_args());
|
||||
unsigned num = accs.size();
|
||||
ptr_buffer<expr> new_args;
|
||||
for (unsigned i = 0; i < num; ++i) {
|
||||
|
||||
if (f == acc[i]) {
|
||||
if (acc == accs[i]) {
|
||||
new_args.push_back(args[1]);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue