3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

fix regression

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-11-07 12:15:51 -08:00
parent 8fb92e6312
commit 759d80dfe3
3 changed files with 6 additions and 4 deletions

View file

@ -304,7 +304,7 @@ namespace smt {
lbool val = ctx.get_assignment(bv);
if (inc_min(inc, val) == l_true) {
curr_min += abs(inc);
lits.push_back(literal(bv, val != l_true));
lits.push_back(literal(bv, val == l_true));
}
}
return curr_min;
@ -424,7 +424,7 @@ namespace smt {
}
else if (vars[mid].first < bv) {
lo = mid;
mid += (hi-mid)/2;
mid += (hi-mid)/2 + 1;
}
else {
hi = mid;

View file

@ -111,6 +111,8 @@ static void test_sorting4() {
svector<unsigned> in;
in.resize(5);
test_sorting4_r(0, in);
in.resize(8);
test_sorting4_r(0, in);
}
void test_sorting3() {

View file

@ -96,11 +96,11 @@ Notes:
{}
void operator()(vect const& in, vect& out) {
out.reset();
out.append(in);
if (in.size() <= 1) {
return;
}
out.reset();
out.append(in);
while (!is_power_of2(out.size())) {
out.push_back(m_ext.mk_default());
}