Skip to content

Commit

Permalink
bug in bounds
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Jan 13, 2022
1 parent 2363bfc commit d5cc162
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sat/smt/pb_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ namespace pb {
return nullptr;
}

if (k < lits.size()) {
if (k > lits.size()) {
if (lit == sat::null_literal)
s().add_clause(0, nullptr, sat::status::th(false, get_id()));
else
Expand Down Expand Up @@ -1458,6 +1458,7 @@ namespace pb {
for (auto const [w, l] : wlits)
weight += w;
if (weight < k) {
std::cout << "weight " << weight << " " << k << "\n";
if (lit == sat::null_literal)
s().add_clause(0, nullptr, sat::status::th(false, get_id()));
else
Expand Down

0 comments on commit d5cc162

Please sign in to comment.