mirror of
https://github.com/Z3Prover/z3
synced 2025-08-20 10:10:21 +00:00
fixed bug in is_char_const_range (#5724)
This commit is contained in:
parent
25d54ebb40
commit
be38b256c8
2 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue