Introduction Marijn J.H. Heule Warren A. Hunt Jr. The University - - PowerPoint PPT Presentation

introduction
SMART_READER_LITE
LIVE PREVIEW

Introduction Marijn J.H. Heule Warren A. Hunt Jr. The University - - PowerPoint PPT Presentation

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 90s) to 1,000,000 vars. and


slide-1
SLIDE 1

Introduction

Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin

Heule & Hunt (UT Austin) Introduction 1 / 28

slide-2
SLIDE 2

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

slide-3
SLIDE 3

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

slide-4
SLIDE 4

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

slide-5
SLIDE 5

Overview Introduction The Satisfiability problem Terminology SAT solving SAT benchmarks

Heule & Hunt (UT Austin) Introduction 3 / 28

slide-6
SLIDE 6

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

  • r 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

slide-7
SLIDE 7

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

  • r 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

slide-8
SLIDE 8

Truth Table F := (P ∨ ¬Q) ∧ (Q ∨ R) ∧ (¬R ∨ ¬P) P Q R falsifies ϕ ◦ F (Q ∨ R) 1 — 1 1 (P ∨ ¬Q) 1 1 (P ∨ ¬Q) 1 (Q ∨ R) 1 1 (¬R ∨ ¬P) 1 1 — 1 1 1 1 (¬R ∨ ¬P)

Heule & Hunt (UT Austin) Introduction 5 / 28

slide-9
SLIDE 9

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

slide-10
SLIDE 10

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) A B C D 1 1 1 1 1 1 1 1 1 1 1 1 A B C D 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Heule & Hunt (UT Austin) Introduction 6 / 28

slide-11
SLIDE 11

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

slide-12
SLIDE 12

Terminology: Variables and literals Boolean variable

can be assigned the Boolean values 0 or 1

Literal

refers either to xi or its complement ¬xi literals xi are satisfied if variable xi is assigned to 1 (true) literals ¬xi are satisfied if variable xi is assigned to 0 (false)

Heule & Hunt (UT Austin) Introduction 8 / 28

slide-13
SLIDE 13

Terminology: Clauses Clause

Disjunction of literals: E.g. Cj = (l1 ∨ l2 ∨ l3) Can be falsified with only one assignment to its literals: All literals assigned to false Can be satisfied with 2k − 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

slide-14
SLIDE 14

Terminology: Formulae Formula

Conjunction of clauses: E.g. F = C1 ∧ C2 ∧ C3 Is satisfiable if there exists an assignment satisfying all clauses,

  • therwise 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

slide-15
SLIDE 15

Terminology: Assignments Assignment

Mapping of the values 0 and 1 to the variables ϕ ◦ F results in a reduced formula Freduced: all satisfied clauses are removed all falsified literals are removed satisfying assignment ↔ Freduced is empty falsifying assignment ↔ Freduced contains ∅ partial assignment versus full assignment

Heule & Hunt (UT Austin) Introduction 11 / 28

slide-16
SLIDE 16

Resolution Given two clauses C1 = (x ∨ a1 ∨ · · · ∨ an) and C2 = (¬x ∨ b1 ∨ · · · ∨ bm), the resolvent of C1 and C2 (denoted by C1 ⊲ ⊳ C2) is R = (a1 ∨ · · ·∨ an ∨ b1 ∨ · · ·∨ bm)

Heule & Hunt (UT Austin) Introduction 12 / 28

slide-17
SLIDE 17

Resolution Given two clauses C1 = (x ∨ a1 ∨ · · · ∨ an) and C2 = (¬x ∨ b1 ∨ · · · ∨ bm), the resolvent of C1 and C2 (denoted by C1 ⊲ ⊳ C2) is R = (a1 ∨ · · ·∨ an ∨ b1 ∨ · · ·∨ bm) 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

slide-18
SLIDE 18

Resolution Given two clauses C1 = (x ∨ a1 ∨ · · · ∨ an) and C2 = (¬x ∨ b1 ∨ · · · ∨ bm), the resolvent of C1 and C2 (denoted by C1 ⊲ ⊳ C2) is R = (a1 ∨ · · ·∨ an ∨ b1 ∨ · · ·∨ bm) 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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

Sat solving: Unit propagation A unit clause is a clause of size 1 UnitPropagation (ϕ, F):

1: while ∅ /

∈ F and unit clause y exists do

2:

expand ϕ and simplify F

3: end while 4: return ϕ, F

Heule & Hunt (UT Austin) Introduction 14 / 28

slide-21
SLIDE 21

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)

Heule & Hunt (UT Austin) Introduction 15 / 28

slide-22
SLIDE 22

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}

Heule & Hunt (UT Austin) Introduction 15 / 28

slide-23
SLIDE 23

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}

Heule & Hunt (UT Austin) Introduction 15 / 28

slide-24
SLIDE 24

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}

Heule & Hunt (UT Austin) Introduction 15 / 28

slide-25
SLIDE 25

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}

Heule & Hunt (UT Austin) Introduction 15 / 28

slide-26
SLIDE 26

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

slide-27
SLIDE 27

DPLL: Example FDPLL := (x1 ∨ x2 ∨ ¬x3) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x1 ∨ ¬x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (¬x1 ∨ ¬x3)

Heule & Hunt (UT Austin) Introduction 17 / 28

slide-28
SLIDE 28

DPLL: Example FDPLL := (x1 ∨ x2 ∨ ¬x3) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x1 ∨ ¬x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (¬x1 ∨ ¬x3) x3 1

Heule & Hunt (UT Austin) Introduction 17 / 28

slide-29
SLIDE 29

DPLL: Example FDPLL := (x1 ∨ x2 ∨ ¬x3) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x1 ∨ ¬x2 ∨ x3) ∧ (x1 ∨ x3) ∧ (¬x1 ∨ ¬x3) x3 1 x2 x1 x3 1 1 1

Heule & Hunt (UT Austin) Introduction 17 / 28

slide-30
SLIDE 30

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)

Heule & Hunt (UT Austin) Introduction 18 / 28

slide-31
SLIDE 31

Sat solving: Decisions, implications Decision variables

Selected by the heuristics Play a crucial role in performance

Implied variables

Assigned by reasoning (e.g. unit propagation) Maximizing the number of implied variables is an important aspect of look-ahead Sat solvers

Heule & Hunt (UT Austin) Introduction 19 / 28

slide-32
SLIDE 32

SAT Solving: Clauses ↔ assignments

A clause C represents a set of falsified assignments, i.e. those assignments that falsify all literals in C A falsifying assignment ϕ for a given formula represents a set of clauses that follow from the formula For instance with all decision variables Important feature of conflict-driven Sat solvers

Heule & Hunt (UT Austin) Introduction 20 / 28

slide-33
SLIDE 33

SAT solvers Conflict-driven

”brute-force”, complete examples: zchaff, minisat, rsat

Look-ahead

lots of reasoning, complete examples: march, OKsolver, kcnfs

Local search

local optimazations, incomplete examples: WalkSAT, UnitWalk

Heule & Hunt (UT Austin) Introduction 21 / 28

slide-34
SLIDE 34

Applications: Industrial Model Checking

Turing award ’07 Clarke, Emerson, and Sifakis

Software Verification Hardware Verification Equivalence Checking Problems

Heule & Hunt (UT Austin) Introduction 22 / 28

slide-35
SLIDE 35

Applications: Crafted Combinatorial problems Sudoku Factorization problems

Heule & Hunt (UT Austin) Introduction 23 / 28

slide-36
SLIDE 36

Random k-Sat: Introduction All clauses have length k Variables have the same probability to occur Each literal is negated with probability of 50% Density is ratio Clauses to Variables

Heule & Hunt (UT Austin) Introduction 24 / 28

slide-37
SLIDE 37

Random 3-Sat: % satisfiable, the phase transition

1 2 3 4 5 6 7 8 25 50 75 100 50 40 30 20 10 variables clause-variable density

Heule & Hunt (UT Austin) Introduction 25 / 28

slide-38
SLIDE 38

Random 3-Sat: exponential runtime, the threshold

1 2 3 4 5 6 7 8

1,000 2,000 3,000 4,000 5,000

50 40 30 20 10 variables clause-variable density

Heule & Hunt (UT Austin) Introduction 26 / 28

slide-39
SLIDE 39

SAT game

SAT game

by Olivier Roussel http://www.cs.utexas.edu/~marijn/game/

Heule & Hunt (UT Austin) Introduction 27 / 28

slide-40
SLIDE 40

Introduction

Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin

Heule & Hunt (UT Austin) Introduction 28 / 28