introduction to automated reasoning and satisfiabilitymheule/15816-f19/slides/introduction.pdf ·...
TRANSCRIPT
![Page 1: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/1.jpg)
1/40
Introduction to Automated Reasoningand Satisfiability
Marijn J.H. Heule
http://www.cs.cmu.edu/~mheule/15816-f19/
Automated Reasoning and Satisfiability, September 3, 2019
![Page 2: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/2.jpg)
2/40
Automated Reasoning Has Many Applications
formal verification
train safety exploitgeneration
automatedtheorem proving
bioinformaticssecurity planning andscheduling
term rewriting
termination
encode decodeautomated reasoning
![Page 3: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/3.jpg)
2/40
Automated Reasoning Has Many Applications
formal verification
train safety exploitgeneration
automatedtheorem proving
bioinformaticssecurity planning andscheduling
term rewriting
termination
encode decodeautomated reasoning
![Page 4: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/4.jpg)
3/40
Breakthrough in SAT Solving in the Last 20 Years
Satisfiability (SAT) problem: Can a Boolean formula be satisfied?
mid ’90s: formulas solvable with thousands of variables and clausesnow: formulas solvable with millions of variables and clauses
Edmund Clarke: “a keytechnology of the 21st century”[Biere, Heule, vanMaaren, and Walsh ’09]
Donald Knuth: “evidently a killer app,because it is key to the solution of so
many other problems” [Knuth ’15]
![Page 5: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/5.jpg)
4/40
Satisfiability and Complexity
Complexity classes of decision problems:
P : efficiently computable answers.NP : efficiently checkable yes-answers.
co-NP : efficiently checkable no-answers. P
co-NPNP
Cook-Levin Theorem [1971]: SAT is NP-complete.
Solving the P?= NP question is worth $1,000,000 [Clay MI ’00].
The beauty of NP: guaranteed short solutions.
The effectiveness of SAT solving: fast solutions in practice.
“NP is the new P!”
![Page 6: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/6.jpg)
4/40
Satisfiability and Complexity
Complexity classes of decision problems:
P : efficiently computable answers.NP : efficiently checkable yes-answers.
co-NP : efficiently checkable no-answers. P
co-NPNP
Cook-Levin Theorem [1971]: SAT is NP-complete.
Solving the P?= NP question is worth $1,000,000 [Clay MI ’00].
The beauty of NP: guaranteed short solutions.
The effectiveness of SAT solving: fast solutions in practice.
“NP is the new P!”
![Page 7: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/7.jpg)
5/40
Course Overview
![Page 8: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/8.jpg)
6/40
Course ReportsThe second half of the course consists of a project
I A group of 2/3 students work on a research question
I The results will be presented in a scientific report
I Several have been published in journals and at conferences
Paul Herwig, Marijn Heule, Martijn van Lambalgen,and Hans van Maaren: A New Method to ConstructLower Bounds for Van der Waerden Numbers (2007).The Electronic Journal of Combinatorics 14 (R6).
Peter van der Tak, Antonio Ramos, and Marijn Heule:Reusing the Assignment Trail in CDCL Solvers (2011).Journal on Satisfiability, Boolean Modeling andComputation 7(4): 133-138.
Christiaan Hartman, Marijn Heule, Kees Kwekkeboom,and Alain Noels: Symmetry in Gardens of Eden (2013).The Electronic Journal of Combinatorics 20 (P16).
![Page 9: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/9.jpg)
7/40
Introduction
Terminology
Basic Solving Techniques
Solvers and Benchmarks
![Page 10: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/10.jpg)
8/40
Introduction
Terminology
Basic Solving Techniques
Solvers and Benchmarks
![Page 11: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/11.jpg)
9/40
Diplomacy Problem
”You are chief of protocol for the embassy ball. Thecrown prince instructs you either to invite Peru or toexclude Qatar. The queen asks you to invite eitherQatar or Romania or both. The king, in a spitefulmood, wants to snub either Romania or Peru orboth. Is there a guest list that will satisfy the whimsof the entire royal family?”
(p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
![Page 12: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/12.jpg)
9/40
Diplomacy Problem
”You are chief of protocol for the embassy ball. Thecrown prince instructs you either to invite Peru or toexclude Qatar. The queen asks you to invite eitherQatar or Romania or both. The king, in a spitefulmood, wants to snub either Romania or Peru orboth. Is there a guest list that will satisfy the whimsof the entire royal family?”
(p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
![Page 13: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/13.jpg)
10/40
Truth Table
F := (p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
p q r falsifies eval(F )0 0 0 (q ∨ r) 00 0 1 — 10 1 0 (p ∨ q) 00 1 1 (p ∨ q) 01 0 0 (q ∨ r) 01 0 1 (r ∨ p) 01 1 0 — 11 1 1 (r ∨ p) 0
![Page 14: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/14.jpg)
11/40
Slightly Harder Example
Slightly Harder Example 1
What are the solutions for the following formula?
(a ∨ b ∨ c) ∧(a ∨ b ∨ c) ∧(b ∨ c ∨ d) ∧(b ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧(a ∨ b ∨ d)
a b c d0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
a b c d1 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
![Page 15: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/15.jpg)
11/40
Slightly Harder Example
Slightly Harder Example 1
What are the solutions for the following formula?
(a ∨ b ∨ c) ∧(a ∨ b ∨ c) ∧(b ∨ c ∨ d) ∧(b ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧(a ∨ b ∨ d)
a b c d0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
a b c d1 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
![Page 16: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/16.jpg)
12/40
Pythagorean Triples Problem (I) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
32 + 42 = 52 62 + 82 = 102 52 + 122 = 132 92 + 122 = 152
82 + 152 = 172 122 + 162 = 202 152 + 202 = 252 72 + 242 = 252
102 + 242 = 262 202 + 212 = 292 182 + 242 = 302 162 + 302 = 342
212 + 282 = 352 122 + 352 = 372 152 + 362 = 392 242 + 322 = 402
Best lower bound: a bi-coloring of [1, 7664] s.t. there is nomonochromatic Pythagorean Triple [Cooper & Overstreet 2015].
Myers conjectures that the answer is No [PhD thesis, 2015].
![Page 17: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/17.jpg)
12/40
Pythagorean Triples Problem (I) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
32 + 42 = 52 62 + 82 = 102 52 + 122 = 132 92 + 122 = 152
82 + 152 = 172 122 + 162 = 202 152 + 202 = 252 72 + 242 = 252
102 + 242 = 262 202 + 212 = 292 182 + 242 = 302 162 + 302 = 342
212 + 282 = 352 122 + 352 = 372 152 + 362 = 392 242 + 322 = 402
Best lower bound: a bi-coloring of [1, 7664] s.t. there is nomonochromatic Pythagorean Triple [Cooper & Overstreet 2015].
Myers conjectures that the answer is No [PhD thesis, 2015].
![Page 18: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/18.jpg)
13/40
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
![Page 19: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/19.jpg)
13/40
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
![Page 20: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/20.jpg)
13/40
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
![Page 21: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/21.jpg)
13/40
Pythagorean Triples Problem (II) [Ronald Graham, early 80’s]
Will any coloring of the positive integers with red and blueresult in a monochromatic Pythagorean Triple a2 + b2 = c2?
A bi-coloring of [1, n] is encoded using Boolean variables xiwith i ∈ {1, 2, . . . , n} such that xi = 1 (= 0) means that i iscolored red (blue). For each Pythagorean Triple a2 + b2 = c2,two clauses are added: (xa ∨ xb ∨ xc) and (xa ∨ xb ∨ xc).
Theorem ([Heule, Kullmann, and Marek (2016)])
[1, 7824] can be bi-colored s.t. there is no monochromaticPythagorean Triple. This is impossible for [1, 7825].
4 CPU years computation, but 2 days on cluster (800 cores)
200 terabytes proof, but validated with verified checker
![Page 22: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/22.jpg)
14/40
Media: “The Largest Math Proof Ever”
![Page 23: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/23.jpg)
15/40
Introduction
Terminology
Basic Solving Techniques
Solvers and Benchmarks
![Page 24: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/24.jpg)
16/40
Introduction: SAT question
Given a CNF formula,does there exist an assignmentto the Boolean variablesthat satisfies all clauses?
![Page 25: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/25.jpg)
17/40
Terminology: Variables and literals
Boolean variable xiI can be assigned the Boolean values 0 or 1
LiteralI refers either to xi or its complement x iI literals xi are satisfied if variable xi is assigned to 1 (true)
I literals x i are satisfied if variable xi is assigned to 0 (false)
![Page 26: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/26.jpg)
18/40
Terminology: Clauses
ClauseI Disjunction of literals: E.g. Cj = (l1 ∨ l2 ∨ l3)
I Can be falsified with only one assignment to its literals:All literals assigned to false
I Can be satisfied with 2k − 1 assignment to its k literals
I One special clause - the empty clause (denoted by ⊥) -which is always falsified
![Page 27: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/27.jpg)
19/40
Terminology: Formulae
FormulaI Conjunction of clauses: E.g. F = C1 ∧ C2 ∧ C3
I Is satisfiable if there exists an assignment satisfying allclauses, otherwise unsatisfiable
I Formulae are defined in Conjunction Normal Form (CNF)and generally also stored as such - also learned information
I Any propositional formula can be efficiently transformedinto CNF [Tseitin ’70]
![Page 28: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/28.jpg)
20/40
Terminology: Assignments
AssignmentI Mapping of the values 0 and 1 to the variablesI ϕ ◦ F results in a reduced formula Freduced:
I all satisfied clauses are removedI all falsified literals are removed
I satisfying assignment ↔ Freduced is empty
I falsifying assignment ↔ Freduced contains ⊥I partial assignment versus full assignment
![Page 29: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/29.jpg)
21/40
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C ∨ x x̄ ∨ DC ∨ D
Examples for F := (p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
I (q ∨ p) ./ (p ∨ r) = (q ∨ r)
I (p ∨ q) ./ (q ∨ r) = (p ∨ r)
I (q ∨ r) ./ (r ∨ p) = (q ∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
![Page 30: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/30.jpg)
21/40
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C ∨ x x̄ ∨ DC ∨ D
Examples for F := (p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
I (q ∨ p) ./ (p ∨ r) = (q ∨ r)
I (p ∨ q) ./ (q ∨ r) = (p ∨ r)
I (q ∨ r) ./ (r ∨ p) = (q ∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
![Page 31: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/31.jpg)
21/40
Resolution
The most commonly used inference rule in propositional logicis the resolution rule (the operation is denoted by ./)
C ∨ x x̄ ∨ DC ∨ D
Examples for F := (p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)
I (q ∨ p) ./ (p ∨ r) = (q ∨ r)
I (p ∨ q) ./ (q ∨ r) = (p ∨ r)
I (q ∨ r) ./ (r ∨ p) = (q ∨ p)
Adding (non-redundant) resolvents until fixpoint, is a completeproof procedure. It produces the empty clause if and only ifthe formula is unsatisfiable
![Page 32: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/32.jpg)
22/40
Tautology
A clause C is a tautology if it containsfor some variable x , both the literals x and x .
Slightly Harder Example 2
Compute all non-tautological resolvents for:
(a ∨ b ∨ c) ∧ (a ∨ b ∨ c) ∧(b ∨ c ∨ d) ∧ (b ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧ (a ∨ c ∨ d) ∧(a ∨ b ∨ d)
Which resolvents remain after removing the supersets?
![Page 33: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/33.jpg)
23/40
Introduction
Terminology
Basic Solving Techniques
Solvers and Benchmarks
![Page 34: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/34.jpg)
24/40
SAT solving: Unit propagation
A unit clause is a clause of size 1
UnitPropagation (ϕ,F):
1: while ⊥ /∈ F and unit clause y exists do2: expand ϕ by adding y = 1 and simplify F3: end while4: return ϕ,F
![Page 35: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/35.jpg)
25/40
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧
(x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
![Page 36: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/36.jpg)
25/40
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧
(x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
ϕ = {x1=1}
![Page 37: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/37.jpg)
25/40
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧
(x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
ϕ = {x1=1, x2=1}
![Page 38: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/38.jpg)
25/40
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧
(x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
ϕ = {x1=1, x2=1, x3=1}
![Page 39: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/39.jpg)
25/40
Unit Propagation: Example
Funit := (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2) ∧ (x1 ∨ x3 ∨ x6) ∧ (x1 ∨ x4 ∨ x5) ∧
(x1 ∨ x6) ∧ (x4 ∨ x5 ∨ x6) ∧ (x5 ∨ x6)
ϕ = {x1=1, x2=1, x3=1, x4=1}
![Page 40: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/40.jpg)
26/40
SAT Solving: DPLL
Davis Putnam Logemann Loveland [DP60,DLL62]
Recursive procedure that in each recursive call:I Simplifies the formula (using unit propagation)I Splits the formula into two subformulas
I Variable selection heuristics (which variable to split on)I Direction heuristics (which subformula to explore first)
![Page 41: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/41.jpg)
27/40
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
![Page 42: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/42.jpg)
27/40
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
![Page 43: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/43.jpg)
27/40
DPLL: Example
FDPLL := (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2 ∨ x3) ∧(x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (x1 ∨ x3)
x3
0 1
x2
x1 x3
0 1
0 1 1 0
![Page 44: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/44.jpg)
28/40
DPLL: Slightly Harder Example
Slightly Harder Example 3
Construct a DPLL tree for:
(a ∨ b ∨ c) ∧ (a ∨ b ∨ c) ∧(b ∨ c ∨ d) ∧ (b ∨ c ∨ d) ∧(a ∨ c ∨ d) ∧ (a ∨ c ∨ d) ∧(a ∨ b ∨ d)
![Page 45: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/45.jpg)
29/40
SAT Solving: Decision and Implications
Decision variablesI Variable selection heuristics and direction heuristics
I Play a crucial role in performance
Implied variablesI Assigned by reasoning (e.g. unit propagation)
I Maximizing the number of implied variables is animportant aspect of look-ahead SAT solvers
![Page 46: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/46.jpg)
30/40
SAT Solving: Clauses ↔ assignments
I A clause C represents a set of falsified assignments, i.e.those assignments that falsify all literals in C
I A falsifying assignment ϕ for a given formula representsa set of clauses that follow from the formula
I For instance with all decision variablesI Important feature of conflict-driven SAT solvers
![Page 47: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/47.jpg)
31/40
Introduction
Terminology
Basic Solving Techniques
Solvers and Benchmarks
![Page 48: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/48.jpg)
32/40
SAT Solving Paradigms
Conflict-drivenI search for short refutation, complete
I examples: lingeling, glucose, CaDiCaL
Look-aheadI extensive inference, complete
I examples: march, OKsolver, kcnfs
Local searchI local optimizations, incomplete
I examples: probSAT, UnitWalk, Dimetheus
![Page 49: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/49.jpg)
33/40
Progress of SAT Solvers
![Page 50: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/50.jpg)
34/40
Applications: Industrial
I Model checkingI Turing award ’07 Clarke, Emerson, and Sifakis
I Software verification
I Hardware verification
I Equivalence checking
I Planning and scheduling
I Cryptography
I Car configuration
I Railway interlocking
![Page 51: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/51.jpg)
35/40
Applications: Crafted
Combinatorial challenges and solver obstruction instances
I Pigeon-hole problems
I Tseitin problems
I Mutilated chessboard problems
I Sudoku
I Factorization problems
I Ramsey theory
I Rubik’s cube puzzles
![Page 52: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/52.jpg)
36/40
Random k-SAT: Introduction
I All clauses have length k
I Variables have the same probability to occur
I Each literal is negated with probability of 50%
I Density is ratio Clauses to Variables
![Page 53: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/53.jpg)
37/40
Random 3-SAT: % satisfiable, the phase transition
1 2 3 4 5 6 7 80
25
50
75
100
5040302010
variables
clause-variable density
![Page 54: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/54.jpg)
38/40
Random 3-SAT: exponential runtime, the threshold
1 2 3 4 5 6 7 80
1,000
2,000
3,000
4,000
5,000
5040302010
variables
clause-variable density
![Page 55: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/55.jpg)
39/40
SAT Game
SAT Gameby Olivier Roussel
http://www.cs.utexas.edu/~marijn/game/
![Page 56: Introduction to Automated Reasoning and Satisfiabilitymheule/15816-f19/slides/introduction.pdf · crown prince instructs you either to invite Peru or to exclude Qatar. The queen asks](https://reader036.vdocuments.us/reader036/viewer/2022070107/60221d1a5baf256e860e0297/html5/thumbnails/56.jpg)
40/40
Introduction to Automated Reasoningand Satisfiability
Marijn J.H. Heule
http://www.cs.cmu.edu/~mheule/15816-f19/
Automated Reasoning and Satisfiability, September 3, 2019