Skip to content

Commit

Permalink
fix propagator notification when ILB keeps unsat state that was found…
Browse files Browse the repository at this point in the history
… by preprocessing
  • Loading branch information
kfazekas committed Dec 18, 2023
1 parent 2e73459 commit d114667
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/external.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ void External::reset_observed_vars () {
// Shouldn't be called if there is no connected propagator
assert (propagator);
reset_extended ();

internal->notified = 0;
LOG ("reset notified counter to 0");

if (!is_observed.size ()) return;

assert (!max_var || (size_t) max_var + 1 == is_observed.size ());

for (auto elit : vars) {
Expand All @@ -405,8 +411,8 @@ void External::reset_observed_vars () {
melt (elit);
}
}
internal->notified = 0;
LOG ("reset notified counter to 0");


}

bool External::observed (int elit) {
Expand Down
2 changes: 2 additions & 0 deletions src/internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,13 @@ void Internal::produce_failed_assumptions () {
assert (!assumptions.empty ());
while (!unsat) {
assert (!satisfied ());
notify_assignments ();
if (decide ())
break;
while (!unsat && !propagate ())
analyze ();
}
notify_assignments ();
if (unsat)
LOG ("formula is actually unsatisfiable unconditionally");
else
Expand Down
4 changes: 2 additions & 2 deletions src/mobical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ class MockPropagator : public ExternalPropagator {
}

void notify_new_decision_level () {
MLOG ("notify new decision level " << observed_trail.size () << " -> "
<< observed_trail.size () + 1
MLOG ("notify new decision level " << observed_trail.size () -1 << " -> "
<< observed_trail.size ()
<< std::endl);
observed_trail.push_back (std::vector<int> ());
}
Expand Down

0 comments on commit d114667

Please sign in to comment.