Skip to content

Commit

Permalink
fix: don't debug propagate deleted nogoods (#147)
Browse files Browse the repository at this point in the history
The debug propagate currently also attempts to propagate deleted nogoods
  • Loading branch information
ImkoMarijnissen authored Feb 6, 2025
1 parent dc1c663 commit 07bc835
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pumpkin-solver/src/propagators/nogoods/nogood_propagator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,13 @@ impl NogoodPropagator {
// This is an inefficient implementation for testing purposes
let nogood = &self.nogoods[nogood_id];

if nogood.is_deleted {
// The nogood has already been deleted, meaning that it could be that the call to
// `propagate` would not find any propagations using it due to the watchers being
// deleted
return Ok(());
}

// First we get the number of falsified predicates
let has_falsified_predicate = nogood
.predicates
Expand Down

0 comments on commit 07bc835

Please sign in to comment.