49
I Motivation I Propositional Logic and Satisfiability I Proof Theory and SAT Solving I Beyond Resolution I Conclusion Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 1 SAT Solver as coNP Solver – Beyond Resolution Norbert Manthey International Center for Computational Logic Technische Universit¨ at Dresden Germany

SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

  • Upload
    haanh

  • View
    310

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

I Motivation

I Propositional Logic and Satisfiability

I Proof Theory and SAT Solving

I Beyond Resolution

I Conclusion

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 1

SAT Solver as coNP Solver – Beyond Resolution

Norbert MantheyInternational Center for Computational LogicTechnische Universitat DresdenGermany

Page 2: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Motivation

Why is solving SAT interesting?

Who benefits from improved SAT solvers?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 2

Page 3: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Applications of SAT Solving

I Many industrial applications have the complexityNP

I Satisfiability Testing (SAT) isNP-complete

I There are many industrial problems that are successfully solved with modernsolvers

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 3

Page 4: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Applications of SAT Solving

I Many industrial applications have the complexityNP

I Satisfiability Testing (SAT) isNP-complete

I There are many industrial problems that are successfully solved with modernsolvers

I Translating applications directly into SAT

. (Bounded) Model Checking

. Planning

. Periodic Event Scheduling

. Termination Analysis

. Bioinformatics

. Hardware and Software Verification

. Information Flow Quantification

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 4

Page 5: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Applications of SAT Solving

I Many industrial applications have the complexityNP

I Satisfiability Testing (SAT) isNP-complete

I There are many industrial problems that are successfully solved with modernsolvers

I Using (incremental) SAT solvers as back-end

. Optimization variant of SAT: MaxSAT

. SAT Modulo Theories

. Constraint Satisfaction Problem

. Minimum Unsatisfiable Subformula Extraction

. Minimum Correction Subset Extraction

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 5

Page 6: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Applications of SAT Solving

I Many industrial applications have the complexityNP

I Satisfiability Testing (SAT) isNP-complete

I There are many industrial problems that are successfully solved with modernsolvers

I SAT solvers usually build the backbone . . .

. ISABELLE uses NITPICK

. NITPICK uses KODKOD

. KODKOD uses MINISAT (or another SAT solver)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 6

Page 7: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Propositional Logic and Satisfiability

Preliminaries and definitions.

Properties of propositional logic proofs.

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 7

Page 8: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Propositional Logic

I Let V be the set of variables

V = {a, b, ...} which can be mapped to the truth values {>,⊥}

I Literals are positive or negative variables:

the complement of a literal x , or ¬x is the literal ¬x , or x , respectively.

I A clause

is a disjunction of literals C1 = (a ∨ ¬b ∨ c)

I A formula in conjunctive normal form (CNF)

is a conjunction of clauses F = (C1 ∧ C2 ∧ . . . )

I Clauses and formulas can be represented as sets

I A resolvent C = C1 ⊗ C2 of two clauses C1 and C2 is defined as:C := {(C1 \ {x}) ∪ (C2 \ {¬x})}

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 8

Page 9: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Propositional Logic

I An interpretation J maps variables truth values.

I The value of a formula F under an interpretation J is evaluated according topropositional logic.

I A formula F is satisfied by an interpretation J, if J maps F to>.

Such a satisfying interpretation J is called model.

I A formula F is unsatisfiable, if there exists no J that maps F to>.

I A formula F is called a tautology, if F is equivalent to>

I Let TAUT be the set of all tautological formulas

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 9

Page 10: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Satisfiability Testing (SAT Problem)

I SAT Problem: Given a formula F , is there a model J for the formula?

I Complexity: NP complete

I Algorithms:

Theoretically, non-deterministic algorithms

Practically:

Truth table

DPLL Algorithm

CDCL Algorithm and with learning, restarts and simplification

I If F is satisfiable, a good heuristic finds the solution in linear time

I However, what happens if a search decision leads to an unsatisfiablesub-formula?

. What about complexity here?

I . . . and what about the complexity of showing unsatisfiability?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 10

Page 11: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Satisfiability Testing (SAT Problem)

I SAT Problem: Given a formula F , is there a model J for the formula?

I Complexity: NP complete

I Algorithms:

Theoretically, non-deterministic algorithms

Practically:

Truth table

DPLL Algorithm

CDCL Algorithm and with learning, restarts and simplification

I If F is satisfiable, a good heuristic finds the solution in linear time

I However, what happens if a search decision leads to an unsatisfiablesub-formula?

. What about complexity here?

I . . . and what about the complexity of showing unsatisfiability?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 11

Page 12: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Satisfiability Testing (SAT Problem)

I SAT Problem: Given a formula F , is there a model J for the formula?

I Complexity: NP complete

I Algorithms:

Theoretically, non-deterministic algorithms

Practically:

Truth table

DPLL Algorithm

CDCL Algorithm and with learning, restarts and simplification

I If F is satisfiable, a good heuristic finds the solution in linear time

I However, what happens if a search decision leads to an unsatisfiablesub-formula?

. What about complexity here?

I . . . and what about the complexity of showing unsatisfiability?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 12

Page 13: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Satisfiability Testing (SAT Problem)

I SAT Problem: Given a formula F , is there a model J for the formula?

I Complexity: NP complete

I Algorithms:

Theoretically, non-deterministic algorithms

Practically:

Truth table

DPLL Algorithm

CDCL Algorithm and with learning, restarts and simplification

I If F is satisfiable, a good heuristic finds the solution in linear time

I However, what happens if a search decision leads to an unsatisfiablesub-formula?

. What about complexity here?

I . . . and what about the complexity of showing unsatisfiability?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 13

Page 14: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory and SAT Solving

Why do we need proofs and proof theory?

How strong are current SAT solvers?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 14

Page 15: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory

I Usual question in applications: Is my problem sound?

I More formal: F ∈ TAUT ?

I More easily: ¬F ∈ ¬TAUT ?

I . . . or: ¬F ≡ ⊥ ?

I Complexity: coNP

I How to show the unsatisfiability of a formula?

. Truth table, DPLL, CDCL, general resolution, . . .

. Basically, show that F |= ( )

. Can the check be done in a linear number of steps?

. Are there any lower or upper bounds known?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 15

Page 16: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory

I Usual question in applications: Is my problem sound?

I More formal: F ∈ TAUT ?

I More easily: ¬F ∈ ¬TAUT ?

I . . . or: ¬F ≡ ⊥ ?

I Complexity: coNP

I How to show the unsatisfiability of a formula?

. Truth table, DPLL, CDCL, general resolution, . . .

. Basically, show that F |= ( )

. Can the check be done in a linear number of steps?

. Are there any lower or upper bounds known?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 16

Page 17: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory - Proof Properties

I Resolution style proofs P = (C1, C2, C3, . . . ( )) for a formula F :

. P := P ∪ {C0 | C ∈ F}, assign the depth 0 to each clause of F

. Resolution: Cmaxh+1i := ⊗{Ch

j | j < i, Cj ∈ ForCj ∈ P}

. Length: the number of resolvents before ( ) is derived

. Width: the maximum size of intermediate resolvents

. Space: the maximum number of clauses used for a resolution step

. Height: the maximum depth of a clause in a proof

I Upper bounds:

. Length: possible number of clauses for the given variables (2n+1 − 1)

. Space: n + 2, where n is the number of variables in the formula F

I Lower bounds:

. This is an open question.

I In this talk, lets consider length only, because it relates to run time

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 17

Page 18: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory - Proof Properties

I Resolution style proofs P = (C1, C2, C3, . . . ( )) for a formula F :

. P := P ∪ {C0 | C ∈ F}, assign the depth 0 to each clause of F

. Resolution: Cmaxh+1i := ⊗{Ch

j | j < i, Cj ∈ ForCj ∈ P}

. Length: the number of resolvents before ( ) is derived

. Width: the maximum size of intermediate resolvents

. Space: the maximum number of clauses used for a resolution step

. Height: the maximum depth of a clause in a proof

I Upper bounds:

. Length: possible number of clauses for the given variables (2n+1 − 1)

. Space: n + 2, where n is the number of variables in the formula F

I Lower bounds:

. This is an open question.

I In this talk, lets consider length only, because it relates to run time

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 18

Page 19: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory - Proof Properties

I Resolution style proofs P = (C1, C2, C3, . . . ( )) for a formula F :

. P := P ∪ {C0 | C ∈ F}, assign the depth 0 to each clause of F

. Resolution: Cmaxh+1i := ⊗{Ch

j | j < i, Cj ∈ ForCj ∈ P}

. Length: the number of resolvents before ( ) is derived

. Width: the maximum size of intermediate resolvents

. Space: the maximum number of clauses used for a resolution step

. Height: the maximum depth of a clause in a proof

I Upper bounds:

. Length: possible number of clauses for the given variables (2n+1 − 1)

. Space: n + 2, where n is the number of variables in the formula F

I Lower bounds:

. This is an open question.

I In this talk, lets consider length only, because it relates to run time

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 19

Page 20: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Theory - Proof Properties

I Resolution style proofs P = (C1, C2, C3, . . . ( )) for a formula F :

. P := P ∪ {C0 | C ∈ F}, assign the depth 0 to each clause of F

. Resolution: Cmaxh+1i := ⊗{Ch

j | j < i, Cj ∈ ForCj ∈ P}

. Length: the number of resolvents before ( ) is derived

. Width: the maximum size of intermediate resolvents

. Space: the maximum number of clauses used for a resolution step

. Height: the maximum depth of a clause in a proof

I Upper bounds:

. Length: possible number of clauses for the given variables (2n+1 − 1)

. Space: n + 2, where n is the number of variables in the formula F

I Lower bounds:

. This is an open question.

I In this talk, lets consider length only, because it relates to run time

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 20

Page 21: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Resolution Style Proof Systems

I A proof system outputs a unsatisfiability proof for an unsatisfiable formula F

I Treelike Resolution is a variant of general resolution

. Derived resolvents Ci can be put into a tree-like dependence scheme

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 21

Page 22: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Proof Systems - the Overall Picture

I Hence, CDCL can be considered more powerful than DPLL

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 22

Page 23: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Beyond Resolution

What else does theory provide?

Which techniques are currently used in leading SAT solvers?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 23

Page 24: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Resolution as Proof SystemI Pigeonhole principle: n + 1 pigeons cannot size in n holes

I CNF formula: xi,j represents pigeon i sitting in hole j

. In each hole there is a pigeon (at-least-one)∨1≤j≤n xij for all pigeons 1 ≤ i ≤ n + 1

. In each hole, there cannot be two pigeons (at-most-hole)

¬xij ∨ ¬xi′ j for all pigeon pairs 1 ≤ i < i′ ≤ n + 1, and 1 ≤ j ≤ n

I Proof, for 3 pigeons and 2 holes (n = 2):

(x22 ∨ x32)⊗ (¬x31 ∨ ¬x22) = (x32 ∨ ¬x31)

(x32 ∨ ¬x31)⊗ (x31 ∨ x12) = (x32 ∨ x12)

(x32 ∨ x12)⊗ (¬x21 ∨ ¬x32) = (x12 ∨ ¬x21)

(x12 ∨ ¬x21)⊗ (¬x21 ∨ ¬x12) = (¬x21)

. . . (propagating the unit in the formula)

· · · = ( ), in total, 11 simple resolutions are required

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 24

Page 25: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Resolution as Proof SystemI Pigeonhole principle: n + 1 pigeons cannot size in n holes

I CNF formula: xi,j represents pigeon i sitting in hole j

. In each hole there is a pigeon (at-least-one)∨1≤j≤n xij for all pigeons 1 ≤ i ≤ n + 1

. In each hole, there cannot be two pigeons (at-most-hole)

¬xij ∨ ¬xi′ j for all pigeon pairs 1 ≤ i < i′ ≤ n + 1, and 1 ≤ j ≤ n

I Proof, for 3 pigeons and 2 holes (n = 2):

(x22 ∨ x32)⊗ (¬x31 ∨ ¬x22) = (x32 ∨ ¬x31)

(x32 ∨ ¬x31)⊗ (x31 ∨ x12) = (x32 ∨ x12)

(x32 ∨ x12)⊗ (¬x21 ∨ ¬x32) = (x12 ∨ ¬x21)

(x12 ∨ ¬x21)⊗ (¬x21 ∨ ¬x12) = (¬x21)

. . . (propagating the unit in the formula)

· · · = ( ), in total, 11 simple resolutions are required

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 25

Page 26: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Automatizability

I How to find such a proof?

I Does there exist an algorithm to find a short proof, if there exists one?

I . . . so that the generated proof is polynomial in the size of the shortest proof?

I Some results from the literature:

. Truth Tables are automatizable.

. Tree-Like Resolution is automatizable in quasi-polynomial time ( nO(log n) )

. Resolution is not automatizable, unless FTP = W[P].

. Extended Resolution is not automatizable, unless RSA is insecure.

I In this talk, look at existing SAT algorithms

namely the ones proposed for CDCL solvers

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 26

Page 27: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Automatizability

I How to find such a proof?

I Does there exist an algorithm to find a short proof, if there exists one?

I . . . so that the generated proof is polynomial in the size of the shortest proof?

I Some results from the literature:

. Truth Tables are automatizable.

. Tree-Like Resolution is automatizable in quasi-polynomial time ( nO(log n) )

. Resolution is not automatizable, unless FTP = W[P].

. Extended Resolution is not automatizable, unless RSA is insecure.

I In this talk, look at existing SAT algorithms

namely the ones proposed for CDCL solvers

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 27

Page 28: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Automatizability

I How to find such a proof?

I Does there exist an algorithm to find a short proof, if there exists one?

I . . . so that the generated proof is polynomial in the size of the shortest proof?

I Some results from the literature:

. Truth Tables are automatizable.

. Tree-Like Resolution is automatizable in quasi-polynomial time ( nO(log n) )

. Resolution is not automatizable, unless FTP = W[P].

. Extended Resolution is not automatizable, unless RSA is insecure.

I In this talk, look at existing SAT algorithms

namely the ones proposed for CDCL solvers

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 28

Page 29: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Automatizability

I How to find such a proof?

I Does there exist an algorithm to find a short proof, if there exists one?

I . . . so that the generated proof is polynomial in the size of the shortest proof?

I Some results from the literature:

. Truth Tables are automatizable.

. Tree-Like Resolution is automatizable in quasi-polynomial time ( nO(log n) )

. Resolution is not automatizable, unless FTP = W[P].

. Extended Resolution is not automatizable, unless RSA is insecure.

I In this talk, look at existing SAT algorithms

namely the ones proposed for CDCL solvers

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 29

Page 30: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Elimination - Resolution Inside SAT Solvers

I Formula simplifications reduce the number of variables - developed 2005

I (Bounded) Variable Elimination

. S = Sx ⊗ S¬x , the set of all pairwise resolvents

. replaces Sx ∪ S¬x with S

if |Sx ∪ S¬x | ≤ |S|,. Number of clauses and variables decreases

. F := (F \ (Sx ∪ S¬x )) ∪ S

. Implementation tries replacement for all variables x (sometimes multipletimes)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 30

Page 31: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Elimination - Resolution Inside SAT Solvers

I Formula simplifications reduce the number of variables - developed 2005

I (Bounded) Variable Elimination

. S = Sx ⊗ S¬x , the set of all pairwise resolvents

. replaces Sx ∪ S¬x with S

if |Sx ∪ S¬x | ≤ |S|,. Number of clauses and variables decreases

. F := (F \ (Sx ∪ S¬x )) ∪ S

. Implementation tries replacement for all variables x (sometimes multipletimes)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 31

Page 32: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Elimination as Preprocessing

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

bve-b

enchm

ark

plain-benchmark

run time comparison

run time

I Riss without (638) and with applying variable elimination before search (755)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 32

Page 33: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Elimination on the Pigeonhole Problem

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

bve-p

h

plain-ph

run time comparison

run time

5

10

15

20

25

30

35

40

I Riss without (10) and with variable elimination (10)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 33

Page 34: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

The Cutting Planes Proof System

I Reason on cardinality constraints∑

i ai xi ≤ c, instead of clauses

I Follow two rules:

. Linear combination of already existing constraints

. divide a sum by some integer d:∑

idaid exi ≤ d c

d e

I Pigeonhole for n pigeons:

.∑

1≤j≤n xij ≥ 1 for all pigeons 1 ≤ i ≤ n + 1

.∑

1≤i≤n+1 xij ≤ 1 for all holes 1 ≤ i ≤ n

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 34

Page 35: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

The Cutting Planes Proof System

I Reason on cardinality constraints∑

i ai xi ≤ c, instead of clauses

I Follow two rules:

. Linear combination of already existing constraints

. divide a sum by some integer d:∑

idaid exi ≤ d c

d e

I Pigeonhole for n pigeons:

.∑

1≤j≤n xij ≥ 1 for all pigeons 1 ≤ i ≤ n + 1

.∑

1≤i≤n+1 xij ≤ 1 for all holes 1 ≤ i ≤ n

I Formula (for n = 2):

. 1 ≤ x11 + x12, 1 ≤ x21 + x22 and 1 ≤ x31 + x32

. x11 + x21 + x31 ≤ 1

. x12 + x22 + x32 ≤ 1

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 35

Page 36: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

The Cutting Planes Proof System

I Reason on cardinality constraints∑

i ai xi ≤ c, instead of clauses

I Pigeonhole for n pigeons:

.∑

1≤j≤n xij ≥ 1 for all pigeons 1 ≤ i ≤ n + 1

.∑

1≤i≤n+1 xij ≤ 1 for all holes 1 ≤ i ≤ n

I Formula (for n = 2):

. 1 ≤ x11 + x12, 1 ≤ x21 + x22 and 1 ≤ x31 + x32

. x11 + x21 + x31 ≤ 1

. x12 + x22 + x32 ≤ 1

I Proof:

. x21 + x31 ≤ x12 (from 1 ≤ x11 + x12 and (x11 + x21 + x31 ≤ 1)

. 1 + x31 ≤ x12 + x22 ( with 1 ≤ x21 + x22)

. 2 ≤ x12 + x22 + x32 ( with 1 ≤ x31 + x32)

. 1 ≤ 0 ( with x12 + x22 + x32 ≤ 1)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 36

Page 37: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Cutting Planes Inside SAT Solvers

I Used as formula simplification (also during search again) in Lingeling and Riss

I Needs to find cardinality constraints within the formula

. Pattern matching

. Limited to naive encodings of at-most-one and at-most-two, at-least-one

I Given the constraints C, perform elimination, as BVE on the constraints

. S := Sx + S¬x , pairwise linear combination

. C := (C \ (Sx ∪ S¬x )) ∪ S

if |S| ≤ |Sx ∪ S¬x |

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 37

Page 38: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Cutting Planes as Preprocessing

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

fm-b

enchm

ark

plain-benchmark

run time comparison

run time

I Riss without (638) and with using cutting planes as preprocessing (623)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 38

Page 39: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Cutting Planes on the Pigeonhole Problem

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

fm-p

h

plain-ph

run time comparison

run time

5

10

15

20

25

30

35

40

I Riss without (10) and with cutting planes (38)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 39

Page 40: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Extended Resolution Inside SAT Solvers

I Use extended resolution to improve learned clauses (resolvents in the proof)

I Published as extended clause learning

. Given a long learned clause C = (l1 ∨ l′1 ∨ l2 · · · ∨ ln)

introduce a fresh variable x

with the clauses for x ↔ (l1 ∨ l′1)

and learn C′ = (x ∨ l2 ∨ · · · ∨ ln) instead

I Or restricted extended resolution

. Given two learned clauses C = (¬l1 ∨ l2 ∨ · · · ∨ ln), C′ = (¬l′1 ∨ l2 ∨ · · · ∨ ln)

introduce a fresh variable x

with the clauses for ¬x ↔ (¬l1 ∧ ¬l′1) (which is equal to x ↔ (l1 ∨ l′1))

and replace C and C′ with C′′ = (¬x ∨ l2 ∨ · · · ∨ ln)

I The disjunction (l1 ∨ l′1) could be replaced with x in the whole formula

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 40

Page 41: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Extended Resolution As Formula Simplification

I Use extended resolution to improve encoded instance

I Published as Bounded Variable Addition

I Opposite operation of variable elimination

I Initially, used to decrease the number of clauses inside the formula

. let x be a fresh variable

. S = Sx ⊗ S¬x , the set of all pairwise resolvents

. replaces S with Sx ∪ S¬x

if |S| ≥ |Sx ∪ S¬x |. Number of clauses decreases, and number of variables increases

. F := (F \ S) ∪ (Sx ∪ S¬x )

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 41

Page 42: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Extended Resolution As Formula Simplification

I How to find S, such that there exists an Sx and S¬x ?

. Pattern matching for x ↔∧

i li – AND-gates

. Pattern matching for x ↔ l1 ⊕ l2 – XOR-gates

. Pattern matching for x ↔ ITE(s, t, f ) – If-then-else-gates

I Let F = (a ∨ c) ∧ (b ∨ c) ∧ (a ∨ d) ∧ (b ∨ d) ∧ (a ∨ e) ∧ (b ∨ e)

I Then, let x be fresh, and lets have the clauses (x ∨ a) and (x ∨ b)

I BVA generates the formulaF ′ = (¬x ∨ c) ∧ (¬x ∨ d) ∧ (¬x ∨ e) ∧ (x ∨ a) ∧ (x ∨ b)

I With respect to the common variables, F ′ and F are equivalent

I F can be generated from F ′ by variable elimination

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 42

Page 43: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Extended Resolution in SAT Solving

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

rer-

benchm

ark

plain-benchmark

run time comparison

run time

I Riss without (638) and with using extended resolution (638, ecl: 559)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 43

Page 44: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Addition as Preprocessing

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

bvaA

-benchm

ark

plain-benchmark

run time comparison

run time

I Riss (638) vs. variable addition (AND-gate: 748, ITE-gate: 698, XOR-gate: 664)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 44

Page 45: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Variable Addition on the Pigeonhole Problem

0.1

1

10

100

1000

10000

0.1 1 10 100 1000 10000

bvaA

-ph

plain-ph

run time comparison

run time

5

10

15

20

25

30

35

40

I Riss (10) vs. variable addition (AND-gate: 11, ITE-gate: 10, XOR-gate: 10)

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 45

Page 46: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Conclusion

What is it all about?

What is expected for the next solver generation?

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 46

Page 47: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Conclusion

I There are reasoning techniques that are stronger than resolution

I Theoretical results are not yet well integrated

I Their practical relevance is not well understood

I Integrating more powerful reasoning into CDCL SAT solvers is a hot researchtopic

I Basically, the tools are available — however, understanding and goodheuristics are missing

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 47

Page 48: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Future Work

I All presented techniques are implemented in our SAT solver Riss

. Left out here, but also there (with similar picture)

II Parity reasoning via Gaussian elimination

II Reencoding parts of the formula

I How to deal with all these techniques?

. When to use which technique, how long, how often, on which variables?

. The system gives a provides a good portfolio because of its diversity

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 48

Page 49: SAT Solver as coNP Solver – Beyond Resolution · Norbert Manthey SAT Solver as coNP Solver – Beyond Resolution 24. Resolution as Proof System I Pigeonhole principle: n+ 1 pigeons

Thank you for your attention

Many thanks to Jakob NordstrA¶m and Olaf Beyersdorff for all the questions about proof theory.

Norbert MantheySAT Solver as coNP Solver – Beyond Resolution 49

SAT Solver as coNP Solver – Beyond Resolution

Norbert MantheyInternational Center for Computational LogicTechnische Universitat DresdenGermany