3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-14 11:14:43 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-04-30 09:30:43 -07:00
commit f525f43e43
155 changed files with 3188 additions and 1043 deletions

View file

@ -500,7 +500,16 @@ namespace smt {
expr* arg = atom->get_arg(i);
literal l = compile_arg(arg);
numeral c = pb.get_coeff(atom, i);
args.push_back(std::make_pair(l, c));
switch (ctx.get_assignment(l)) {
case l_true:
k -= c;
break;
case l_false:
break;
default:
args.push_back(std::make_pair(l, c));
break;
}
}
if (pb.is_at_most_k(atom) || pb.is_le(atom)) {
// turn W <= k into -W >= -k
@ -512,7 +521,7 @@ namespace smt {
else {
SASSERT(pb.is_at_least_k(atom) || pb.is_ge(atom) || pb.is_eq(atom));
}
TRACE("pb", display(tout, *c););
TRACE("pb", display(tout, *c, true););
//app_ref fml1(m), fml2(m);
//fml1 = c->to_expr(ctx, m);
c->unique();