3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-05 14:55:45 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-11-13 17:43:07 -08:00
parent d073583d88
commit 4261345503
7 changed files with 180 additions and 62 deletions

View file

@ -97,11 +97,19 @@ namespace polysat {
bool contains(eval_interval const& other) const {
if (is_full())
return true;
if (lo_val() <= other.lo_val() && other.hi_val() <= hi_val())
// lo <= lo' <= hi' <= hi'
if (lo_val() <= other.lo_val() && other.lo_val() <= other.hi_val() && other.hi_val() <= hi_val())
return true;
if (hi_val() < lo_val() && lo_val() <= other.lo_val() && other.lo_val() <= other.hi_val())
if (lo_val() <= hi_val())
return false;
// hi < lo <= lo' <= hi'
if (lo_val() <= other.lo_val() && other.lo_val() <= other.hi_val())
return true;
if (hi_val() < lo_val() && other.lo_val() < hi_val() && other.hi_val() <= hi_val())
// lo' <= hi' <= hi < lo
if (other.lo_val() <= other.hi_val() && other.hi_val() <= hi_val())
return true;
// hi' <= hi < lo <= lo'
if (other.hi_val() <= hi_val() && lo_val() <= other.lo_val())
return true;
return false;
}