3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 03:57:51 +00:00

support for legacy datatype test

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-09-05 10:28:11 -07:00
parent aac7773a52
commit 06087c17be
12 changed files with 100 additions and 98 deletions

View file

@ -23,6 +23,7 @@ br_status datatype_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr
switch(f->get_decl_kind()) {
case OP_DT_CONSTRUCTOR: return BR_FAILED;
case OP_DT_RECOGNISER:
case OP_DT_IS:
//
// simplify is_cons(cons(x,y)) -> true
// simplify is_cons(nil) -> false

View file

@ -753,18 +753,14 @@ br_status poly_rewriter<Config>::cancel_monomials(expr * lhs, expr * rhs, bool m
normalize(c);
TRACE("mk_le_bug", tout << c << "\n";);
if (!has_multiple && num_coeffs <= 1) {
if (move) {
if (is_numeral(rhs)) {
TRACE("mk_le_bug", tout << "rhs is numeral\n";);
return BR_FAILED;
}
}
else {
if (num_coeffs == 0 || is_numeral(rhs)) {
TRACE("mk_le_bug", tout << "rhs is numeral or no coeffs\n";);
return BR_FAILED;
}
}