3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-11 05:30:51 +00:00

bv_bounds/ctx_simplify: improve handling of (ite x a b) where (not x) is proved to be false

This commit is contained in:
Nuno Lopes 2016-02-19 09:42:42 +00:00
parent 73f93dbadb
commit 121b3b60f3
2 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,11 @@ struct interval {
explicit interval() : l(0), h(0), sz(0), tight(false) {}
interval(const rational& l, const rational& h, unsigned sz, bool tight = false) : l(l), h(h), sz(sz), tight(tight) {
// canonicalize full set
if (is_wrapped() && l == h + rational::one()) {
this->l = rational::zero();
this->h = uMaxInt(sz);
}
SASSERT(invariant());
}