Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 p 12 ∨ p 16 ∨ p 2 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 3 p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 3 p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 3 p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 3 p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 = ⇒ p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 = ⇒ p 3 ∨ p 19 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 = ⇒ p 21 ∨ p 6 p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 = ⇒ p 3 ∨ p 19 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 = ⇒ p 21 ∨ p 6 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 = ⇒ p 21 ∨ p 17 p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 = ⇒ p 3 ∨ p 19 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 = ⇒ p 21 ∨ p 6 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 = ⇒ p 21 ∨ p 17 conflict! p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 p 20 ∨ p 23 p 20 ∨ p 24 p 25 4 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 p 11 ∨ p 13 ∨ p 16 M p d ⇒ 11 = p 12 ∨ p 16 ∨ p 2 M p d ⇒ 11 p 12 = p 2 ∨ p 4 ∨ p 20 ∨ p 10 M p d ⇒ 11 p 12 p 16 = p 10 ∨ p 8 ∨ p 1 M p d ⇒ 11 p 12 p 16 p 2 = p 10 ∨ p 3 M p d ⇒ 11 p 12 p 16 p 2 p 10 = p 3 ∨ p 26 M p d 11 p 12 p 16 p 2 p 10 p 1 = ⇒ p 10 ∨ p 5 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 = ⇒ p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 = ⇒ p 3 ∨ p 19 ∨ p 18 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 = ⇒ p 21 ∨ p 6 M p d 11 p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 = ⇒ p 21 ∨ p 17 conflict! p 22 ∨ p 13 p 13 ∨ p 8 p 4 ∨ p 19 Let’s try to find out the causes of the conflict ■ p 20 ∨ p 23 First of all we will compute, ■ p 20 ∨ p 24 for each literal of the current decision level, p 25 the reason why it is true 4 / 56
Motivating Example p 11 ∨ p 6 ∨ p 12 1. 2. p 11 ∨ p 13 ∨ p 16 3. p 12 ∨ p 16 ∨ p 2 4. p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. 7. p 3 ∨ p 26 8. p 10 ∨ p 5 9. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 10. p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 11. 12. p 21 ∨ p 17 13. p 22 ∨ p 13 14. p 13 ∨ p 8 p 4 ∨ p 19 15. p 20 ∨ p 23 16. 17. p 20 ∨ p 24 18. p 25 5 / 56
Motivating Example p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 11 ∨ p 6 ∨ p 12 1. 11 Reason ⊥ 1 2 3 4 5 6 7 8 9 2. p 11 ∨ p 13 ∨ p 16 3. p 12 ∨ p 16 ∨ p 2 4. p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. 7. p 3 ∨ p 26 8. p 10 ∨ p 5 9. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 10. p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 11. 12. p 21 ∨ p 17 13. p 22 ∨ p 13 14. p 13 ∨ p 8 p 4 ∨ p 19 15. p 20 ∨ p 23 16. 17. p 20 ∨ p 24 18. p 25 5 / 56
Motivating Example p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 11 ∨ p 6 ∨ p 12 1. 11 Reason ⊥ 1 2 3 4 5 6 7 8 9 2. p 11 ∨ p 13 ∨ p 16 3. p 12 ∨ p 16 ∨ p 2 Let us take the conflicting clause p 3 ∨ p 19 ∨ p 18 . 4. p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 18 is true due to clause 9. Resolution gives: p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. 7. p 3 ∨ p 26 p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 8. p 10 ∨ p 5 p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 9. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 10. p 3 ∨ p 19 ∨ p 18 p 21 ∨ p 6 11. 12. p 21 ∨ p 17 13. p 22 ∨ p 13 14. p 13 ∨ p 8 p 4 ∨ p 19 15. p 20 ∨ p 23 16. 17. p 20 ∨ p 24 18. p 25 5 / 56
Motivating Example p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 11 ∨ p 6 ∨ p 12 1. 11 Reason ⊥ 1 2 3 4 5 6 7 8 9 2. p 11 ∨ p 13 ∨ p 16 3. p 12 ∨ p 16 ∨ p 2 Let us take the conflicting clause p 3 ∨ p 19 ∨ p 18 . 4. p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 18 is true due to clause 9. Resolution gives: p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. 7. p 3 ∨ p 26 p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 8. p 10 ∨ p 5 p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 9. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 10. p 3 ∨ p 19 ∨ p 18 Now the last assigned literal that is false in the p 21 ∨ p 6 11. new clause is p 5 . 12. p 21 ∨ p 17 The reason why p 5 is false is clause 8. 13. p 22 ∨ p 13 Again, resolution: 14. p 13 ∨ p 8 p 4 ∨ p 19 15. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 20 ∨ p 23 16. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 17. p 20 ∨ p 24 18. p 25 5 / 56
Motivating Example p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 11 ∨ p 6 ∨ p 12 1. 11 Reason ⊥ 1 2 3 4 5 6 7 8 9 2. p 11 ∨ p 13 ∨ p 16 3. p 12 ∨ p 16 ∨ p 2 Let us take the conflicting clause p 3 ∨ p 19 ∨ p 18 . 4. p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 18 is true due to clause 9. Resolution gives: p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. 7. p 3 ∨ p 26 p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 8. p 10 ∨ p 5 p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 9. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 10. p 3 ∨ p 19 ∨ p 18 Now the last assigned literal that is false in the p 21 ∨ p 6 11. new clause is p 5 . 12. p 21 ∨ p 17 The reason why p 5 is false is clause 8. 13. p 22 ∨ p 13 Again, resolution: 14. p 13 ∨ p 8 p 4 ∨ p 19 15. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 20 ∨ p 23 16. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 17. p 20 ∨ p 24 18. p 25 The process is now iterated... 5 / 56
Motivating Example p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 12 ∨ p 16 ∨ p 2 3. p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 10 ∨ p 8 ∨ p 1 5. M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 10 ∨ p 3 6. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 3 ∨ p 26 7. 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 10 ∨ p 5 8. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 3 ∨ p 19 ∨ p 18 10. p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 22 ∨ p 13 13. p 13 ∨ p 8 14. p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 12 ∨ p 16 ∨ p 2 3. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 10 ∨ p 5 8. p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 3 ∨ p 19 ∨ p 18 10. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 22 ∨ p 13 13. p 13 ∨ p 8 14. p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 12 ∨ p 16 ∨ p 2 3. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. ∅ Reason 1 2 3 4 5 6 7 8 9 p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 10 ∨ p 5 8. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 3 ∨ p 19 ∨ p 18 10. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 22 ∨ p 13 13. p 13 ∨ p 8 14. p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example p 11 ∨ p 6 ∨ p 12 1. M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 13 ∨ p 16 2. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 12 ∨ p 16 ∨ p 2 11 3. ∅ Reason 1 2 3 4 5 6 7 8 9 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 10 ∨ p 8 ∨ p 1 5. p 10 ∨ p 3 6. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 3 ∨ p 26 7. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 10 ∨ p 5 8. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 3 ∨ p 19 ∨ p 18 10. p 21 ∨ p 6 11. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 22 ∨ p 13 13. p 13 ∨ p 8 14. p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 1. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 p 11 ∨ p 13 ∨ p 16 2. 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 12 ∨ p 16 ∨ p 2 3. p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 10 ∨ p 8 ∨ p 1 5. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 10 ∨ p 3 6. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 3 ∨ p 26 7. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 5 8. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 3 ∨ p 19 ∨ p 18 10. p 21 ∨ p 6 11. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 13 ∨ p 8 14. p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p 11 ∨ p 6 ∨ p 12 1. p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 p 11 ∨ p 13 ∨ p 16 2. ∅ Reason 1 2 3 4 5 6 7 8 9 p 12 ∨ p 16 ∨ p 2 3. p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 10 ∨ p 8 ∨ p 1 5. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 10 ∨ p 3 6. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 3 ∨ p 26 7. p 10 ∨ p 5 8. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 3 ∨ p 19 ∨ p 18 10. p 21 ∨ p 6 11. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 13 ∨ p 8 14. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 12 ∨ p 16 ∨ p 2 3. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 10 ∨ p 8 ∨ p 1 5. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 3 6. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 3 ∨ p 26 7. p 10 ∨ p 5 8. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 3 ∨ p 19 ∨ p 18 10. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 21 ∨ p 6 11. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 21 ∨ p 17 12. p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 11 ∨ p 13 ∨ p 16 p 13 ∨ p 8 14. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 11 ∨ p 13 p 4 ∨ p 19 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 12 ∨ p 16 ∨ p 2 3. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 8 ∨ p 1 5. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 5 8. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 3 ∨ p 19 ∨ p 18 10. p 21 ∨ p 6 p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 11. p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 11 ∨ p 13 ∨ p 16 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 11 ∨ p 13 p 11 ∨ p 6 ∨ p 12 p 13 ∨ p 8 14. p 4 ∨ p 19 p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 11 ∨ p 13 ∨ p 6 15. p 20 ∨ p 23 16. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 12 ∨ p 16 ∨ p 2 3. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 8 ∨ p 1 5. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 5 8. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 3 ∨ p 19 ∨ p 18 10. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 11 ∨ p 13 ∨ p 16 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 11 ∨ p 13 p 11 ∨ p 6 ∨ p 12 p 13 ∨ p 8 14. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 11 ∨ p 13 ∨ p 6 p 4 ∨ p 19 15. p 20 ∨ p 23 16. Now the process cannot continue any longer. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 12 ∨ p 16 ∨ p 2 3. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 8 ∨ p 1 5. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 5 8. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 3 ∨ p 19 ∨ p 18 10. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 11 ∨ p 13 ∨ p 16 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 11 ∨ p 13 p 11 ∨ p 6 ∨ p 12 p 13 ∨ p 8 14. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 11 ∨ p 13 ∨ p 6 p 4 ∨ p 19 15. p 20 ∨ p 23 16. All obtained clauses are false in the assignment. p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example M is p 25 p d 21 p 6 p 17 p d 22 p 13 p 8 p d 4 p 19 p d 20 p 23 p d Literal p 12 p 16 p 2 p 10 p 1 p 3 p 26 p 5 p 18 11 ∅ Reason 1 2 3 4 5 6 7 8 9 p 11 ∨ p 6 ∨ p 12 1. p 11 ∨ p 13 ∨ p 16 2. p 3 ∨ p 19 ∨ p 18 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 p 12 ∨ p 16 ∨ p 2 3. p 3 ∨ p 19 ∨ p 1 ∨ p 5 ∨ p 17 p 10 ∨ p 5 p 2 ∨ p 4 ∨ p 20 ∨ p 10 4. p 3 ∨ p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 p 10 ∨ p 8 ∨ p 1 5. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 3 6. p 3 ∨ p 26 7. p 19 ∨ p 1 ∨ p 17 ∨ p 10 p 10 ∨ p 8 ∨ p 1 p 10 ∨ p 5 8. p 19 ∨ p 17 ∨ p 10 ∨ p 8 p 2 ∨ p 4 ∨ p 20 ∨ p 10 p 1 ∨ p 3 ∨ p 5 ∨ p 17 ∨ p 18 9. p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 12 ∨ p 16 ∨ p 2 p 3 ∨ p 19 ∨ p 18 10. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 21 ∨ p 6 11. p 21 ∨ p 17 12. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 16 p 11 ∨ p 13 ∨ p 16 p 22 ∨ p 13 13. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 12 ∨ p 11 ∨ p 13 p 11 ∨ p 6 ∨ p 12 p 13 ∨ p 8 14. p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 11 ∨ p 13 ∨ p 6 p 4 ∨ p 19 15. p 20 ∨ p 23 16. Lits assigned at last decision level 5 in blue p 20 ∨ p 24 17. 18. p 25 6 / 56
Motivating Example Three clauses with only one literal assigned at the last DL (5): ■ p 19 ∨ p 17 ∨ p 10 ∨ p 8 (max DL of others: 3) ◆ p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 (max DL of others: 4) ◆ p 19 ∨ p 17 ∨ p 8 ∨ p 4 ∨ p 20 ∨ p 11 ∨ p 13 ∨ p 6 (max DL of others: 4) ◆ If we had had those clauses: ■ At DL. 3 we could’ve propagated p 10 ◆ At DL. 4 we could’ve propagated p 2 ◆ At DL. 4 we could’ve propagated p 11 ◆ In practice procedure stops when we find the first such clause, because: ■ It is the cheapest one to find ◆ It can propagate lits at a lower DL ◆ (literals of previous decision levels are never removed) 7 / 56
Backjump rule This example motivates us to introduce the rule: for some clause C ∨ l ′ : = C ∨ l ′ and M | F | = ¬ C ⇒ M l ′ | Backjump M l d N | | F = | F if l ′ is undefined in M l ′ or ¬ l ′ occurs in F The only thing we need is a backjump clause C ∨ l ′ such that: 1. It is a logical consequence of the rest of the clauses 2. All its literals are false at some previous decision level d , except one which was undefined at d 8 / 56
Conflict Analysis The procedure shown in the example is called conflict analysis ■ Why is the obtained clause a logical consequence of the input? ■ Because resolution is correct ◆ 9 / 56
Conflict Analysis The procedure shown in the example is called conflict analysis ■ Why is the obtained clause false under the current assignment? ■ Conflicting clause is false under the current assignment ◆ Each non-decision lit l false at the last decision level ( dl ) ◆ can be resolved away with a reason clause of the form l 1 ∨ · · · ∨ l n ∨ ¬ l l is replaced by lits l 1 , . . . , l n such that all of them are false ◆ 10 / 56
Conflict Analysis The procedure shown in the example is called conflict analysis ■ Why a clause with only one lit at last decision level ( dl ) can be obtained? ■ Conflicting clause has at least two lits at decision level dl ◆ (provided unit propagation applied before any decision) Each non-decision lit l at decision level dl is replaced by lits l 1 , . . . , l n ◆ such that 1. All of them have been added to the assignment before l (hence their decision level is ≤ dl ) 2. At least one was set at decision level dl (again, provided ....) In the worst case, we will terminate with ◆ a clause with the last decision lit being the only set at decision level dl 11 / 56
Conflict Analysis - Conflict Graph Situation can be represented with the conflict graph: ■ p 17 p p p 6 20 p 19 8 p p p p 4 18 12 1 p p p ⊥ 2 10 11 p p p 16 5 3 p 13 12 / 56
Conflict Analysis - Conflict Graph The cut represents 1-UIP learning scheme (UIP ≡ Unique Implication Point) ■ p 17 p p p 6 20 p 19 8 p p p p 4 18 12 1 p p p ⊥ 2 10 11 1UIP p p p 16 5 3 p 13 Backjump clause is p 19 ∨ p 17 ∨ p 8 ∨ p 10 ■ 13 / 56
Conflict Analysis - Conflict Graph This cut represents the 2-UIP learning scheme ■ p 17 p p p 6 20 p 19 8 p p p p 4 18 12 1 p p p ⊥ 2 10 11 2UIP p p p 16 5 3 p 13 Backjump clause is p 19 ∨ p 17 ∨ p 8 ∨ p 20 ∨ p 4 ∨ p 2 ■ 14 / 56
Conflict Analysis - Conflict Graph This cut represents the 3-UIP learning scheme ■ p 17 p p p 6 20 p 19 8 p p p p 4 18 12 1 p p p ⊥ 2 10 11 3UIP p p p 16 5 3 p 13 Backjump clause is p 19 ∨ p 17 ∨ p 8 ∨ p 20 ∨ p 4 ∨ p 6 ∨ p 11 ∨ p 13 ■ 15 / 56
What is a good lemma? Every time a conflict is found, conflict analysis is started ■ Backjump clause is added to the clause database (we say it is learned): ■ Learn � all atoms of C occur in F M | | F = ⇒ M | | F, C if F | = C Backjump clauses once they are learned are referred to as lemmas ■ Learning them helps to prevent future similar conflicts ■ The set of literals of previous DL in the 2UIP ■ contains the literals of previous DL in the 1UIP So 1UIP gives shorter clauses than 2UIP ■ Also 1UIP allows one to backjump to a lower or equal DL ■ However, in general difficult to assess in advance the quality of a lemma ■ 16 / 56
Lemma Shortening But, given a lemma L , any lemma L ′ ⊆ L is clearly better. ■ Given L , how to obtain a possible L ′ ? ■ LOCAL MINIMIZATION: ■ Generate lemma L and mark its literals ◆ Remove non-decision literals l ∈ L such that ◆ reason ( l ) \ { l } contains only marked literals EXAMPLE: our 2-UIP clause was p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 with reason ( p 19 ) = p 4 ∨ p 19 . Hence p 19 can be removed. Why? 17 / 56
Lemma Shortening But, given a lemma L , any lemma L ′ ⊆ L is clearly better. ■ Given L , how to obtain a possible L ′ ? ■ LOCAL MINIMIZATION: ■ Generate lemma L and mark its literals ◆ Remove non-decision literals l ∈ L such that ◆ reason ( l ) \ { l } contains only marked literals EXAMPLE: our 2-UIP clause was p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 with reason ( p 19 ) = p 4 ∨ p 19 . Hence p 19 can be removed. Why? p 19 ∨ p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 p 4 ∨ p 19 p 17 ∨ p 8 ∨ p 2 ∨ p 4 ∨ p 20 17 / 56
Lemma Shortening RECURSIVE MINIMIZATION: ■ Generate lemma L and mark its literals ◆ Remove non-decision literals l ∈ L such that search backwards from l ◆ in the implication graph reaches only negations of marked literals p 4 p 1. p 1 ∨ p 2 p 5 p 1 ∨ p 6 2. 2 3. p 2 ∨ p 6 ∨ p 3 p ⊥ p p 1 ∨ p 4 ∨ p 5 1 4. 3 5. p 3 ∨ p 4 ∨ p 5 p 6 ⇒ p 1 d p 2 p 6 p 3 p 4 d p 5 ∅ = ⇒ . . . = 1UIP lemma is p 3 ∨ p 4 ∨ p 1 ■ p 3 is clearly removable ■ 18 / 56
Overview of the session Conflict Analysis ■ Motivating example ◆ Backjumping ◆ Conflict graph ◆ Lemma shortening ◆ Lemma removal ■ Decision heuristics ■ Restarts ■ Efficient implementation of UnitProp : ■ Occur lists ◆ Two-watched literals ◆ Final remarks ■ 18 / 56
Lemma Removal Effects of adding lemmas: ■ + Reduces the search space - Space traversal slower since unit propagation becomes expensive Hence we cannot keep all generated lemmas. We need: ■ Forget F | M | | F, C = ⇒ M | | F if = C Which lemmas to keep and which ones to forget? ■ Each lemma has a number called activity ◆ Activity is incremented when lemma is used in conflict analysis ◆ From time to time, lemmas with low activity are removed ◆ Mixed policies: keep ◆ short lemmas ■ recent lemmas ■ lemmas with low Literals Blocks Distance (LDB): ■ no. of different decision levels involved in a clause 19 / 56
Overview of the session Conflict Analysis ■ Motivating example ◆ Backjumping ◆ Conflict graph ◆ Lemma shortening ◆ Lemma removal ■ Decision heuristics ■ Restarts ■ Efficient implementation of UnitProp : ■ Occur lists ◆ Two-watched literals ◆ Final remarks ■ 19 / 56
Decision Heuristic SAT instances may have (tens, hundreds of ?) thousands of variables ■ Most SAT instances have clusters of variables: ■ sets of variables that are semantically linked GOAL: to force the SAT solver to work on one cluster at a time Each variable has an associated activity ■ Each time it appears in a conflict analysis, its activity is incremented ■ Recent activity should be given more importance: ■ Divide all activities by integer K from time to time, or ◆ Keep increasing the activity increment ◆ Decide chooses unassigned var with highest activity ■ Note that heuristic does not depend on clauses: CHEAP! ■ Value selection: take false , or last tried value for that variable (last phase) ■ 20 / 56
Overview of the session Conflict Analysis ■ Motivating example ◆ Backjumping ◆ Conflict graph ◆ Lemma shortening ◆ Lemma removal ■ Decision heuristics ■ Restarts ■ Efficient implementation of UnitProp : ■ Occur lists ◆ Two-watched literals ◆ Final remarks ■ 20 / 56
Restarts Early mistakes in the search tree have dramatic effects in running time ■ HOW TO AVOID THIS BEHAVIOUR? Introduce restarts: ■ Restart M | | F = ⇒ ∅ | | F Why should a new run behave differently? And why could it be better? ■ In a new run, the solver may behave better among others thanks to: ■ the activities of the variables ◆ the learned lemmas ◆ Only the assignment is reset! 21 / 56
Restarts - Strategies Unrestricted application of Restart leads to incompleteness ■ What is done in practice? ■ A restart strategy tells after how many conflicts a restart should be made ■ Set initial RESTART LIMIT ◆ After RESTART LIMIT conflicts: ◆ Update RESTART LIMIT according to the restart strategy ■ Apply Restart ■ For example: ■ Let RESTART LIMIT follow the Luby sequence, defined as: ◆ r 0 := N ; r i := N · l i , where ■ � 2 k − 1 if ∃ k with i = 2 k − 1 l i = if ∃ k with 2 k − 1 ≤ i < 2 k − 1 l i − 2 k − 1 +1 22 / 56
Restarts - Strategies Luby-based restart sequence with initial 512 18000 16000 14000 RESTART LIMIT 12000 10000 8000 6000 4000 2000 0 0 10 20 30 40 50 60 70 80 90 100 23 / 56
Restarts - Strategies Another possibility is an inner-outer geometric sequence: for (int inner = 100, outer = 100;;) { // Run SAT-solver for ’inner’ conflicts if (inner >= outer) { outer *= 1.1; inner = 100; } else inner *= 1.1 } 24 / 56
Restarts - Strategies Inner-outer geometric sequence 1800 1600 1400 RESTART LIMIT 1200 1000 800 600 400 200 0 0 50 100 150 200 250 300 350 400 450 500 25 / 56
Overall CDCL algorithm while(true) { while (propagate gives conflict()) { if (decision level==0) return UNSAT; else analyze conflict(); } restart if applicable(); remove lemmas if applicable(); if (!decide()) returns SAT; // All vars assigned } 26 / 56
Overview of the session Conflict Analysis ■ Motivating example ◆ Backjumping ◆ Conflict graph ◆ Lemma shortening ◆ Lemma removal ■ Decision heuristics ■ Restarts ■ Efficient implementation of UnitProp : ■ Occur lists ◆ Two-watched literals ◆ Final remarks ■ 26 / 56
Performance of SAT Solvers The most important tasks that a SAT solver performs are: ■ Choose which variable to Decide on ◆ Apply unit propagation exhaustively ◆ Analyze conflicts ◆ When profiling a state-of-the art SAT solver we get: ■ Variable selection ( ≈ 10%) ◆ Unit propagation application ( ≈ 80%) ◆ Conflict analysis ( ≈ 10%) ◆ Hence, the most important thing to optimize is ■ unit propagation, aka BCP (Boolean Constraint Propagation) 27 / 56
BCP with Occur Lists BCP only has to detect propagating or conflicting clauses ■ There is no need to detect that all clauses are true ■ Instead of traversing the whole clause set again and again: ■ For each literal, store the clauses where it appears in occur lists ◆ Every time a new lit l is added to the assignment, ◆ only clauses containing l need to be visited Let’s see how it would work with an example ■ 28 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p U U U U U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p 5 2 3 1 2 5 6 6 Current assignment: ∅ 29 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p U F U U U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 2 6 6 d Current assignment: p 2 Now, we propagate p 2 visiting ClausesWith[ p 2 ] 30 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p U F U U U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p 5 2 3 1 2 5 6 6 d Current assignment: p 2 Literal p 1 has to be added to the assignment 31 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U U U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 1 6 6 d p 1 Current assignment: p 2 Now, we propagate p 1 visiting ClausesWith[ p 1 ] 32 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U U U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p 5 2 3 1 2 5 6 6 d p 1 Current assignment: p 2 No lit is propagated, we have to decide 33 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U F U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 4 6 6 d p 1 p 4 d Current assignment: p 2 Now, we propagate p 4 visiting ClausesWith[ p 4 ] 34 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U F U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p 5 2 3 1 2 5 6 6 d p 1 p 4 d Current assignment: p 2 Literals p 6 , p 5 have to be added to the assignment 35 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U F F T 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p p 2 6 p p 4 p 5 5 5 6 p p p 5 2 3 1 2 5 6 6 6 d p 1 p 4 d p 6 p 5 Current assignment: p 2 Now, we propagate p 5 visiting ClausesWith[ p 5 ] 36 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U F F T 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 6 6 6 d p 1 p 4 d p 6 p 5 Current assignment: p 2 Literal p 3 has to be added to the assignment 37 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F F F F T 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p p 2 6 p p 4 p 3 5 5 6 p p p 5 2 3 1 2 5 6 6 6 d p 1 p 4 d p 6 p 5 p 3 Current assignment: p 2 Now, we propagate p 3 visiting ClausesWith[ p 3 ] 38 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F F F F T 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 6 6 6 d p 1 p 4 d p 6 p 5 p 3 Current assignment: p 2 Clause 5 indicates a conflict. Backtrack/backjump is called. 39 / 56
BCP with Occur Lists p p p p p p 1 2 3 4 5 6 Model p p 2 p T F U T U U 1 1 6 p p 3 p 5 p p 2 ToPropagate ClausesWith 2 1 6 p 6 p 2 p p p 1 4 2 5 3 1 1 4 p p 2 3 4 6 1 p p 2 2 4 p p 1 2 5 2 3 3 p p p p p 3 6 5 4 4 6 1 3 p p 2 6 p p 4 p 5 5 6 p p p 5 2 3 1 2 5 4 6 6 d p 1 p 4 Current assignment: p 2 Procedure continues propagating p 4 40 / 56
BCP - How to improve it? The key observation is the following: ■ A clause with 2 non-false literals can’t be propagating or conflicting For each clause we will try to watch two non-false literals ■ Enough to visit a clause when a watched literal becomes false ■ If 2 non-false literals do not exist, this is because: ■ All the lits are false (then backtrack) ◆ All the lits are false but one, which is undef (then propagate) ◆ All the lits are false but one, which is true ◆ This is called the two watched literals scheme ■ 41 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p U U U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 5 3 1 1 2 4 p p 2 3 4 1 p 1 p 2 2 4 p p 2 2 3 3 p p p p p 6 5 4 4 6 1 3 p p 6 p 5 p p 5 5 6 p p 4 2 3 5 6 6 Current assignment: ∅ 42 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p U F U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 5 3 1 1 2 4 p p 2 3 4 1 p 1 p 2 2 4 p p 2 2 3 3 p p p p p 6 5 4 4 6 1 3 p p 6 p 5 p p 5 5 6 p p p 4 2 3 5 2 6 6 d Current assignment: p 2 Now, we propagate p 2 visiting ClausesWithLitWatched[ p 2 ] 43 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p U F U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 5 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p 4 2 3 5 6 6 d Current assignment: p 2 Clauses 2 and 3 are rewatched. Clause 4 can’t because it is unit ( p 1 ) 44 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 5 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p p 4 2 3 5 1 6 6 d p 1 Current assignment: p 2 Now, we propagate p 1 visiting ClausesWithLitWatched[ p 1 ] 45 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p 4 2 3 5 6 6 d p 1 Current assignment: p 2 Clauses 5 is reselected. No lit is unit propagated. We have to decide. 46 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U F U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p p 4 2 3 5 4 6 6 d p 1 p 4 d Current assignment: p 2 Now, we propagate p 4 visiting ClausesWithLitWatched[ p 4 ] 47 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U F U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p 4 2 3 5 6 6 d p 1 p 4 d Current assignment: p 2 Clause 6 unit propagates p 5 and clause 3 propagates p 6 . 48 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U F F T 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p p 2 6 6 p 5 p p 5 5 6 p p p 4 2 3 5 5 6 6 d p 1 p 4 d p 5 p 6 Current assignment: p 2 Now, we propagate p 6 visiting ClausesWithLitWatched[ p 6 ] 49 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U F F T 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p p 4 2 3 5 5 6 6 d p 1 p 4 d p 5 p 6 Current assignment: p 2 Clause 5 can’t be reselected because it is unit ( p 3 ). 50 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F T F F T 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p p 2 6 p 5 p p 3 5 5 6 p p p 4 2 3 5 5 6 6 d p 1 p 4 d p 5 p 6 p 3 Current assignment: p 2 Now, we propagate p 3 visiting ClausesWithLitWatched[ p 3 ] 51 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F T F F T 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p p 4 2 3 5 5 6 6 d p 1 p 4 d p 5 p 6 p 3 Current assignment: p 2 Clause 2 indicates a conflict. Backjump/backtrack is called. 52 / 56
BCP - Two Watched Literals p p p p p p 1 2 3 4 5 6 Model p p p T F U U U U 1 1 2 6 p 2 p p 5 p p 2 ToPropagate ClausesWithLitWatched 3 1 6 p 6 p p p p 1 4 3 1 1 2 4 p p 4 1 p 1 p 2 2 4 p p 2 2 5 3 3 p p p p p 6 3 5 4 4 6 1 3 p p 2 6 p 5 p p 5 5 6 p p 4 2 3 5 6 6 d p 1 (lit p 4 not yet added) Current assignment: p 2 After backtrack watches are properly placed! 53 / 56
Two watched literals - Analysis Each clause is visited far less often ■ Upon backtrack, nothing has to be done ■ Inactive literals tend to be watched, hence further reducing the number of ■ clauses to be visited Very effective for long clauses (e.g. lemmas) ■ 54 / 56
Overview of the session Conflict Analysis ■ Motivating example ◆ Backjumping ◆ Conflict graph ◆ Lemma shortening ◆ Lemma removal ■ Decision heuristics ■ Restarts ■ Efficient implementation of UnitProp : ■ Occur lists ◆ Two-watched literals ◆ Final remarks ■ 54 / 56
Recommend
More recommend