mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
fix ordering for value propagation to ensure values are preferred
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
009e94d188
commit
62f8cc1289
|
@ -514,9 +514,15 @@ bool asserted_formulas::is_gt(expr* lhs, expr* rhs) {
|
||||||
if (lhs == rhs) {
|
if (lhs == rhs) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (m.is_value(rhs)) {
|
// values are always less in ordering than non-values.
|
||||||
|
bool v1 = m.is_value(lhs);
|
||||||
|
bool v2 = m.is_value(rhs);
|
||||||
|
if (!v1 && v2) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (v1 && !v2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
SASSERT(is_ground(lhs) && is_ground(rhs));
|
SASSERT(is_ground(lhs) && is_ground(rhs));
|
||||||
if (depth(lhs) > depth(rhs)) {
|
if (depth(lhs) > depth(rhs)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue