From 7472c04c23604838d046023c4ed085f6dfa608b2 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 30 Jan 2024 16:12:31 +0100 Subject: [PATCH] feat: continue on unknown depencies (#25) --- src/solver/mod.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/solver/mod.rs b/src/solver/mod.rs index b445ec3..b0acd2c 100644 --- a/src/solver/mod.rs +++ b/src/solver/mod.rs @@ -215,19 +215,13 @@ impl> Sol // Exclusions are negative assertions, tracked outside of the watcher system self.negative_assertions.push((solvable_id, clause_id)); - // There might be a conflict now - let conflicts = if self.decision_tracker.assigned_value(solvable_id) - == Some(true) - { - vec![clause_id] - } else { - Vec::new() - }; - - // The new assertion should be kept in all cases (it is returned in the - // lhs of the tuple), and a conflicts should be reported if present (rhs - // of the tuple) - return Ok((vec![clause_id], conflicts)); + new_clauses.push(clause_id); + + if self.decision_tracker.assigned_value(solvable_id) == Some(true) { + conflicting_clauses.push(clause_id); + } + + continue; } } }