3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-16 10:56:16 +00:00

remove creation of trivial testers

This commit is contained in:
Nikolaj Bjorner 2022-09-01 10:23:21 -07:00
parent 46383a0811
commit 61f7dc3513

View file

@ -169,7 +169,7 @@ namespace mbp {
eqs.push_back(m.mk_eq(access(c, j, acc, b), a->get_arg(j))); eqs.push_back(m.mk_eq(access(c, j, acc, b), a->get_arg(j)));
} }
} }
if (!is_app_of(b, c)) { if (!is_app_of(b, c) && dt.get_datatype_num_constructors(c->get_range()) != 1) {
eqs.push_back(m.mk_app(rec, b)); eqs.push_back(m.mk_app(rec, b));
} }
@ -231,7 +231,7 @@ namespace mbp {
} }
func_decl* c = to_app(l)->get_decl(); func_decl* c = to_app(l)->get_decl();
ptr_vector<func_decl> const& acc = *dt.get_constructor_accessors(c); ptr_vector<func_decl> const& acc = *dt.get_constructor_accessors(c);
if (!is_app_of(r, c)) { if (!is_app_of(r, c) && dt.get_datatype_num_constructors(c->get_range()) != 1) {
lits.push_back(m.mk_app(dt.get_constructor_is(c), r)); lits.push_back(m.mk_app(dt.get_constructor_is(c), r));
} }
for (unsigned i = 0; i < acc.size(); ++i) { for (unsigned i = 0; i < acc.size(); ++i) {