File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,11 +252,9 @@ impl Engine {
252252 }
253253
254254 fn analyze_conflict ( & mut self , mut clause : usize ) {
255- println ! ( "Engine before conflict analysis:\n {}" , self ) ;
256-
257255 self . seen . fill ( false ) ;
258256 let mut counter: usize = 0 ;
259- let mut p: Option < ( Lit , usize ) > = None ;
257+ let mut p: Option < ( Lit , Option < usize > ) > = None ;
260258 self . learnt . clear ( ) ;
261259 self . learnt . push ( Lit :: default ( ) ) ; // Placeholder for the asserting literal
262260
@@ -286,7 +284,7 @@ impl Engine {
286284 let v = self . propagated_vars . pop ( ) . expect ( "There should be a variable to resolve away" ) ;
287285 if self . seen [ v] {
288286 let sign = self . value ( v) == & LBool :: True ;
289- let reason = self . reason [ v] . expect ( "There should be a reason clause for this variable" ) ;
287+ let reason = self . reason [ v] ;
290288 self . undo ( v) ;
291289 break Some ( ( Lit :: new ( v, sign) , reason) ) ;
292290 }
@@ -302,7 +300,7 @@ impl Engine {
302300 }
303301
304302 // 4. Update clause to the reason of the variable we just resolved away
305- clause = p. expect ( "There should be a reason clause for this variable" ) . 1 ;
303+ clause = p. expect ( "There should be a reason clause for this variable" ) . 1 . expect ( "There should be a reason clause for this variable" ) ;
306304 }
307305
308306 // 5. Final cleanup - undo all assignments made at this level
You can’t perform that action at this time.
0 commit comments