3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-19 17:50:23 +00:00

fixed bug in is_char_const_range (#5724)

This commit is contained in:
Margus Veanes 2021-12-19 17:46:42 -08:00 committed by GitHub
parent 25d54ebb40
commit be38b256c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -4956,8 +4956,9 @@ void seq_rewriter::elim_condition(expr* elem, expr_ref& cond) {
expr_ref_vector conds_range(m());
flatten_and(cond, conds);
expr* lhs = nullptr, *rhs = nullptr, *e1 = nullptr;
bool all_ranges = true;
bool all_ranges = false;
if (u().is_char(elem)) {
all_ranges = true;
unsigned ch = 0, ch2 = 0;
svector<std::pair<unsigned, unsigned>> ranges, ranges1;
ranges.push_back(std::make_pair(0, u().max_char()));
@ -5057,8 +5058,10 @@ void seq_rewriter::elim_condition(expr* elem, expr_ref& cond) {
if (conds.empty())
// all ranges were removed as trivially true
cond = m().mk_true();
else if (conds.size() == 1)
cond = conds.get(0);
else
cond = m().mk_and(conds_range);
cond = m().mk_and(conds);
}
}