mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
fix bugs exposed by testSolver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5566965a5a
commit
97b2fc9ee7
3 changed files with 34 additions and 4 deletions
|
@ -163,6 +163,9 @@ public:
|
|||
}
|
||||
|
||||
expr* mk_le(unsigned sz, rational const* weights, expr* const* args, rational const& w) {
|
||||
if (sz == 0) {
|
||||
return w.is_neg()?m.mk_false():m.mk_true();
|
||||
}
|
||||
if (sz == 1 && weights[0].is_one() && w >= rational::one()) {
|
||||
return m.mk_true();
|
||||
}
|
||||
|
@ -173,6 +176,9 @@ public:
|
|||
}
|
||||
|
||||
expr* mk_ge(unsigned sz, rational const* weights, expr* const* args, rational const& w) {
|
||||
if (sz == 0) {
|
||||
return w.is_pos()?m.mk_false():m.mk_true();
|
||||
}
|
||||
if (sz == 1 && weights[0].is_one() && w.is_one()) {
|
||||
return args[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue