mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 09:40:20 +00:00
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings * cmake: make missing non-virtual dtors error * treewide: add missing virtual destructors * cmake: add a few more checks * api: add missing virtual destructor to user_propagator_base * examples: compile cpp example with compiler warnings * model: fix unused variable warnings * rewriter: fix logical-op-parentheses warnings * sat: fix unused variable warnings * smt: fix unused variable warnings
This commit is contained in:
parent
1d45a33163
commit
96671cfc73
39 changed files with 68 additions and 9 deletions
|
@ -3046,7 +3046,6 @@ void seq_rewriter::mk_antimirov_deriv_rec(expr* e, expr* r, expr* path, expr_ref
|
|||
auto nothing = [&]() { return expr_ref(re().mk_empty(r->get_sort()), m()); };
|
||||
auto epsilon = [&]() { return expr_ref(re().mk_epsilon(seq_sort), m()); };
|
||||
auto dotstar = [&]() { return expr_ref(re().mk_full_seq(r->get_sort()), m()); };
|
||||
auto dotplus = [&]() { return expr_ref(re().mk_plus(re().mk_full_char(r->get_sort())), m()); };
|
||||
unsigned lo = 0, hi = 0;
|
||||
if (re().is_empty(r) || re().is_epsilon(r))
|
||||
// D(e,[]) = D(e,()) = []
|
||||
|
@ -3182,7 +3181,7 @@ void seq_rewriter::mk_antimirov_deriv_rec(expr* e, expr* r, expr* path, expr_ref
|
|||
else if (re().is_loop(r, r1, lo))
|
||||
result = mk_antimirov_deriv_concat(mk_antimirov_deriv(e, r1, path), re().mk_loop(r1, lo - 1));
|
||||
else if (re().is_loop(r, r1, lo, hi)) {
|
||||
if (lo == 0 && hi == 0 || hi < lo)
|
||||
if ((lo == 0 && hi == 0) || hi < lo)
|
||||
result = nothing();
|
||||
else
|
||||
result = mk_antimirov_deriv_concat(mk_antimirov_deriv(e, r1, path), re().mk_loop(r1, (lo == 0 ? 0 : lo - 1), hi - 1));
|
||||
|
@ -3260,7 +3259,7 @@ expr_ref seq_rewriter::mk_antimirov_deriv_concat(expr* d, expr* r) {
|
|||
}
|
||||
|
||||
expr_ref seq_rewriter::mk_antimirov_deriv_negate(expr* d) {
|
||||
sort* seq_sort = nullptr, * ele_sort = nullptr;
|
||||
sort* seq_sort = nullptr;
|
||||
VERIFY(m_util.is_re(d, seq_sort));
|
||||
auto nothing = [&]() { return expr_ref(re().mk_empty(d->get_sort()), m()); };
|
||||
auto epsilon = [&]() { return expr_ref(re().mk_epsilon(seq_sort), m()); };
|
||||
|
@ -3404,7 +3403,7 @@ expr_ref seq_rewriter::simplify_path(expr* path) {
|
|||
result = simplify_path(t);
|
||||
else if (m().is_true(t))
|
||||
result = simplify_path(h);
|
||||
else if (m().is_eq(h, lhs, rhs) || m().is_not(h, h1) && m().is_eq(h1, lhs, rhs))
|
||||
else if (m().is_eq(h, lhs, rhs) || (m().is_not(h, h1) && m().is_eq(h1, lhs, rhs)))
|
||||
elim_condition(lhs, result);
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue