3
0
Fork 0
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:
Nikolaj Bjorner 2013-12-08 18:34:28 -08:00
parent 5566965a5a
commit 97b2fc9ee7
3 changed files with 34 additions and 4 deletions

View file

@ -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];
}