3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

bug fixes to sorting network

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-09-11 21:53:12 -07:00
parent e288b7795d
commit 770d0d58fe
2 changed files with 16 additions and 10 deletions

View file

@ -680,6 +680,12 @@ Notes:
for (unsigned k = 0; k < c; ++k) {
ls.reset();
ls.push_back(ctx.mk_not(out[k]));
if (a <= k) {
add_clause(ctx.mk_not(out[k]), bs[k-a]);
}
if (b <= k) {
add_clause(ctx.mk_not(out[k]), as[k-b]);
}
for (unsigned i = 0; i < std::min(a,k + 1); ++i) {
unsigned j = k - i;
SASSERT(i + j == k);