Introduction Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin Heule & Hunt (UT Austin) Introduction 1 / 28
Motivation satisfiability solving From 100 variables, 200 clauses (early 90’s) to 1,000,000 vars. and 5,000,000 clauses in 15 years. Heule & Hunt (UT Austin) Introduction 2 / 28
Motivation satisfiability solving From 100 variables, 200 clauses (early 90’s) to 1,000,000 vars. and 5,000,000 clauses in 15 years. Applications: Hardware and Software Verification, Planning, Scheduling, Optimal Control, Protocol Design, Routing, Combinatorial problems, Equivalence Checking, etc. Heule & Hunt (UT Austin) Introduction 2 / 28
Motivation satisfiability solving From 100 variables, 200 clauses (early 90’s) to 1,000,000 vars. and 5,000,000 clauses in 15 years. Applications: Hardware and Software Verification, Planning, Scheduling, Optimal Control, Protocol Design, Routing, Combinatorial problems, Equivalence Checking, etc. SAT used to solve many other problems! Heule & Hunt (UT Austin) Introduction 2 / 28
Overview Introduction The Satisfiability problem Terminology SAT solving SAT benchmarks Heule & Hunt (UT Austin) Introduction 3 / 28
Introduction ”You are chief of protocol for the embassy ball. The crown prince instructs you either to invite Peru or to exclude Qatar . The queen asks you to invite either Qatar or Romania or both. The king, in a spiteful mood, wants to snub either Romania or Peru or both. Is there a guest list that will satisfy the whims of the entire royal family?” Heule & Hunt (UT Austin) Introduction 4 / 28
Introduction ”You are chief of protocol for the embassy ball. The crown prince instructs you either to invite Peru or to exclude Qatar . The queen asks you to invite either Qatar or Romania or both. The king, in a spiteful mood, wants to snub either Romania or Peru or both. Is there a guest list that will satisfy the whims of the entire royal family?” ( P ∨ ¬ Q ) ∧ ( Q ∨ R ) ∧ ( ¬ R ∨ ¬ P ) Heule & Hunt (UT Austin) Introduction 4 / 28
Truth Table F := ( P ∨ ¬ Q ) ∧ ( Q ∨ R ) ∧ ( ¬ R ∨ ¬ P ) falsifies ϕ ◦ F P Q R ( Q ∨ R ) 0 0 0 0 0 0 1 — 1 ( P ∨ ¬ Q ) 0 1 0 0 ( P ∨ ¬ Q ) 0 1 1 0 1 0 0 ( Q ∨ R ) 0 1 0 1 ( ¬ R ∨ ¬ P ) 0 1 1 0 — 1 1 1 1 ( ¬ R ∨ ¬ P ) 0 Heule & Hunt (UT Austin) Introduction 5 / 28
Slightly Harder Example 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 ) Heule & Hunt (UT Austin) Introduction 6 / 28
Slightly Harder Example What are the solutions for the following formula? A B C D A B C D ( A ∨ B ∨ ¬ C ) 0 0 0 0 1 0 0 0 ( ¬ A ∨ ¬ B ∨ C ) 0 0 0 1 1 0 0 1 ( B ∨ C ∨ ¬ D ) 0 0 1 0 1 0 1 0 ( ¬ B ∨ ¬ C ∨ D ) 0 0 1 1 1 0 1 1 ( A ∨ C ∨ D ) 0 1 0 0 1 1 0 0 ( ¬ A ∨ ¬ C ∨ ¬ D ) 0 1 0 1 1 1 0 1 ( ¬ A ∨ B ∨ D ) 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 Heule & Hunt (UT Austin) Introduction 6 / 28
Introduction: Sat question Given a CNF formula , does there exist an assignment to the Boolean variables that satisfies all clauses ? Heule & Hunt (UT Austin) Introduction 7 / 28
Terminology: Variables and literals Boolean variable can be assigned the Boolean values 0 or 1 Literal refers either to x i or its complement ¬ x i literals x i are satisfied if variable x i is assigned to 1 (true) literals ¬ x i are satisfied if variable x i is assigned to 0 (false) Heule & Hunt (UT Austin) Introduction 8 / 28
Terminology: Clauses Clause Disjunction of literals: E.g. C j = ( l 1 ∨ l 2 ∨ l 3 ) Can be falsified with only one assignment to its literals: All literals assigned to false Can be satisfied with 2 k − 1 assignment to its k literals One special clause - the empty clause (denoted by ∅ ) - which is always falsified Heule & Hunt (UT Austin) Introduction 9 / 28
Terminology: Formulae Formula Conjunction of clauses: E.g. F = C 1 ∧ C 2 ∧ C 3 Is satisfiable if there exists an assignment satisfying all clauses, otherwise unsatisfiable Formulae are defined in Conjunction Normal Form (CNF) and generally also stored as such - also learned information Heule & Hunt (UT Austin) Introduction 10 / 28
Terminology: Assignments Assignment Mapping of the values 0 and 1 to the variables ϕ ◦ F results in a reduced formula F reduced : all satisfied clauses are removed all falsified literals are removed satisfying assignment ↔ F reduced is empty falsifying assignment ↔ F reduced contains ∅ partial assignment versus full assignment Heule & Hunt (UT Austin) Introduction 11 / 28
Resolution Given two clauses C 1 = ( x ∨ a 1 ∨ · · · ∨ a n ) and C 2 = ( ¬ x ∨ b 1 ∨ · · · ∨ b m ), the resolvent of C 1 and C 2 (denoted by C 1 ⊲ ⊳ C 2 ) is R = ( a 1 ∨ · · ·∨ a n ∨ b 1 ∨ · · ·∨ b m ) Heule & Hunt (UT Austin) Introduction 12 / 28
Resolution Given two clauses C 1 = ( x ∨ a 1 ∨ · · · ∨ a n ) and C 2 = ( ¬ x ∨ b 1 ∨ · · · ∨ b m ), the resolvent of C 1 and C 2 (denoted by C 1 ⊲ ⊳ C 2 ) is R = ( a 1 ∨ · · ·∨ a n ∨ b 1 ∨ · · ·∨ b m ) Examples for F := ( P ∨ ¬ Q ) ∧ ( Q ∨ R ) ∧ ( ¬ R ∨ ¬ P ) ( P ∨ ¬ Q ) ⊲ ⊳ ( Q ∨ R ) = ( P ∨ R ) ( P ∨ ¬ Q ) ⊲ ⊳ ( ¬ R ∨ ¬ P ) = ( ¬ Q ∨ ¬ R ) ( Q ∨ R ) ⊲ ⊳ ( ¬ R ∨ ¬ P ) = ( Q ∨ ¬ P ) Heule & Hunt (UT Austin) Introduction 12 / 28
Resolution Given two clauses C 1 = ( x ∨ a 1 ∨ · · · ∨ a n ) and C 2 = ( ¬ x ∨ b 1 ∨ · · · ∨ b m ), the resolvent of C 1 and C 2 (denoted by C 1 ⊲ ⊳ C 2 ) is R = ( a 1 ∨ · · ·∨ a n ∨ b 1 ∨ · · ·∨ b m ) Examples for F := ( P ∨ ¬ Q ) ∧ ( Q ∨ R ) ∧ ( ¬ R ∨ ¬ P ) ( P ∨ ¬ Q ) ⊲ ⊳ ( Q ∨ R ) = ( P ∨ R ) ( P ∨ ¬ Q ) ⊲ ⊳ ( ¬ R ∨ ¬ P ) = ( ¬ Q ∨ ¬ R ) ( Q ∨ R ) ⊲ ⊳ ( ¬ R ∨ ¬ P ) = ( Q ∨ ¬ P ) Resolution, i.e., adding resolvents until fixpoint, is a complete proof procedure. It produces the empty clause if and only if the formula is unsatisfiable Heule & Hunt (UT Austin) Introduction 12 / 28
Tautology A clause C is a tautology if it contains for 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? Heule & Hunt (UT Austin) Introduction 13 / 28
Sat solving: Unit propagation A unit clause is a clause of size 1 UnitPropagation ( ϕ, F ): 1: while ∅ / ∈ F and unit clause y exists do expand ϕ and simplify F 2: 3: end while 4: return ϕ, F Heule & Hunt (UT Austin) Introduction 14 / 28
Unit propagation: Example F unit := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) Heule & Hunt (UT Austin) Introduction 15 / 28
Unit propagation: Example F unit := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 } Heule & Hunt (UT Austin) Introduction 15 / 28
Unit propagation: Example F unit := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 , x 2 =1 } Heule & Hunt (UT Austin) Introduction 15 / 28
Unit propagation: Example F unit := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 , x 2 =1 , x 3 =1 } Heule & Hunt (UT Austin) Introduction 15 / 28
Unit propagation: Example F unit := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 , x 2 =1 , x 3 =1 , x 4 =1 } Heule & Hunt (UT Austin) Introduction 15 / 28
Sat solving: DPLL Davis Putnam Logemann Loveland [DP60,DLL62] Simplify (Unit Propagation) Split the formula Variable Selection Heuristics Direction heuristics Heule & Hunt (UT Austin) Introduction 16 / 28
DPLL: Example F DPLL := ( x 1 ∨ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ) Heule & Hunt (UT Austin) Introduction 17 / 28
DPLL: Example F DPLL := ( x 1 ∨ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ) x 3 1 0 Heule & Hunt (UT Austin) Introduction 17 / 28
Recommend
More recommend