mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 14:23:40 +00:00
make it C++17 friendly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
20a5baeb70
commit
db242c28c6
3 changed files with 11 additions and 10 deletions
|
@ -88,6 +88,8 @@ namespace polysat {
|
||||||
pdd rhs;
|
pdd rhs;
|
||||||
bool is_strict;
|
bool is_strict;
|
||||||
constraint const* src;
|
constraint const* src;
|
||||||
|
inequality(pdd const & lhs, pdd const & rhs, bool is_strict, constraint const* src):
|
||||||
|
lhs(lhs), rhs(rhs), is_strict(is_strict), src(src) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -214,12 +214,12 @@ namespace polysat {
|
||||||
inequality eq_constraint::as_inequality() const {
|
inequality eq_constraint::as_inequality() const {
|
||||||
SASSERT(!is_undef());
|
SASSERT(!is_undef());
|
||||||
pdd zero = p() - p();
|
pdd zero = p() - p();
|
||||||
if (is_positive()) {
|
if (is_positive())
|
||||||
// p <= 0
|
// p <= 0
|
||||||
return { .lhs = p(), .rhs = zero, .is_strict = false, .src = this };
|
return inequality(p(), zero, false, this);
|
||||||
} else {
|
else
|
||||||
// 0 < p
|
// 0 < p
|
||||||
return { .lhs = zero, .rhs = p(), .is_strict = true, .src = this };
|
return inequality(zero, p(), true, this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,10 +290,9 @@ namespace polysat {
|
||||||
|
|
||||||
inequality ule_constraint::as_inequality() const {
|
inequality ule_constraint::as_inequality() const {
|
||||||
SASSERT(!is_undef());
|
SASSERT(!is_undef());
|
||||||
if (is_positive()) {
|
if (is_positive())
|
||||||
return { .lhs = lhs(), .rhs = rhs(), .is_strict = false, .src = this };
|
return inequality(lhs(), rhs(), false, this);
|
||||||
} else {
|
else
|
||||||
return { .lhs = rhs(), .rhs = lhs(), .is_strict = true, .src = this };
|
return inequality(rhs(), lhs(), true, this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue