SAT and QBF: Trick or Treat - University of Pennsylvania

58

Transcript of SAT and QBF: Trick or Treat - University of Pennsylvania

Page 1: SAT and QBF: Trick or Treat - University of Pennsylvania
Page 2: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT and QBF: Trick or Treat

Sharad MalikPrinceton University

NSF Workshop November 14, 2008

Page 3: SAT and QBF: Trick or Treat - University of Pennsylvania

Th T i kThe Trick…

The daunting NP completenessThe daunting NP-completeness…

[GJ79]

Page 4: SAT and QBF: Trick or Treat - University of Pennsylvania

Th T tThe Treat…Large and vibrant SAT communityLarge and vibrant SAT community

SAT Portal www.satlive.orgSatlib Research InfrastructureSatlib Research Infrastructure

60K benchmarksSAT solver competitionsPublic domain solvers

Wide practical application of SAT M f d M M Mill d th l tMore from de Moura, McMillan and others later…

Emboldened researchers to attack harder problemsproblems

QBF and SMT

Page 5: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT S l C titiSAT Solver Competition

http://www-sr.informatik.uni-tuebingen.de/sat-race-2008/analysis.html

Page 6: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT S l C titiSAT Solver Competition

http://www-sr.informatik.uni-tuebingen.de/sat-race-2008/analysis.html

Page 7: SAT and QBF: Trick or Treat - University of Pennsylvania

Thi T lkThis TalkSuccessful application of diverse CS techniquesSuccessful application of diverse CS techniques

Logic (Deduction and Solving)SearchCachingRandomizationData structuresData structuresCache efficient algorithms

Open challenges…Limited understanding of why the algorithms workDynamic application of strategiesQBFQBF

Page 8: SAT and QBF: Trick or Treat - University of Pennsylvania

A k l d tAcknowledgements

For discussions:For discussions:Armin BierreDaniel Le BerreLaurent SimonOfer StrichmanLintao Zhangg

Page 9: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT Solvers: A C d d Hi tA Condensed History

Deductive/Formula SolvingDeductive/Formula Solving Davis-Putnam 1960 [DP]Iterative existential quantification by resolution

Backtrack SearchBacktrack SearchDavis, Logemann and Loveland 1962 [DLL]Search with unit propagation

C fli t D i Cl L i [CDCL]Conflict Driven Clause Learning [CDCL]GRASP, RelSat: Integrate a constraint learning procedure, 1996

Locality Based SearchEmphasis on exhausting local sub-spaces, e.g. Chaff, Berkmin, miniSATand others, 2000 onwardsAdded focus on efficient implementation

Boolean Constraint Propagation Decision HeuristicsBoolean Constraint Propagation, Decision Heuristics, …

Page 10: SAT and QBF: Trick or Treat - University of Pennsylvania

P bl R t tiProblem Representation

Conjunctive Normal FormConjunctive Normal FormRepresentation of choice for modern SAT solversEasy conversion of other representations to CNFEasy conversion of other representations to CNF

E.g. Circuit to CNF using the Tseitin Transformation

(a+b+c)(a’+b’+c)(a’+b+c’)(a+b’+c’)

Variables ClausesLiterals

Page 11: SAT and QBF: Trick or Treat - University of Pennsylvania

Deduction Workhorse I: R l tiResolution

Resolution of a pair of distance-one clausesResolution of a pair of distance one clauses

( + b + ’ + f) ( + h’ + + f)(a + b + c’ + f) (g + h’ + c + f)

a + b + g + h’ + fa + b + g + h’g

Resolvent implied by the original clauses, thus can be p y g ,added back to the CNF without changing the formula

Page 12: SAT and QBF: Trick or Treat - University of Pennsylvania

D i P t Al ithDavis Putnam Algorithm

Iterative existential quantification of variables [DP 60]Using resolution

(a + b) (a + b’) (a’ + c)(a’ + c’)(a + b + c)(b + c’ + d’)(b’ + e)

(a + c + e)(c’ + e + d) (a’ + c)(a’ + c’)(a)∃b, f

f

∃b, f

f

(a + e + d)

(a c)(a c )

(c)(c’)

(a)

∃{b,c}, f

∃b, f

∃{b,a}, f

1 ( )

SATUNSAT

Potential memory explosion problem!

∃{b,a,c}, f∃{b,c,a,e,d}, f

Potential memory explosion problem!

Page 13: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT Solvers: A C d d Hi tA Condensed History

DeductiveDeductive Davis-Putnam 1960 [DP]Iterative existential quantification by resolution

Backtrack SearchBacktrack SearchDavis, Logemann and Loveland 1962 [DLL]Search with unit propagation

C fli t D i Cl L i [CDCL]Conflict Driven Clause Learning [CDCL]GRASP, RelSat: Integrate a constraint learning procedure, 1996

Locality Based SearchEmphasis on exhausting local sub-spaces, e.g. Chaff, Berkmin, miniSATand others, 2001 onwardsAdded focus on efficient implementation

Boolean Constraint Propagation Decision HeuristicsBoolean Constraint Propagation, Decision Heuristics, …

Page 14: SAT and QBF: Trick or Treat - University of Pennsylvania

DLL S hDLL SearchSearch the decision tree for a satisfying assignmentUnit propagation to prune

h

a0 1

searchDeduction Workhorse II: Unit literal rule

b b0

01 1

literal ruleAll but one literal in a clause is assigned false

(v1=0 + v2=0 + v3=?)

c c c c00 001 1 1 1

(v1 0 + v2 0 + v3 ?)v3 must be 1 for the formula to be satisfiable

Unit propagation is the iterativeUnit propagation is the iterative application of this rule [DLL62]

Page 15: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT Solvers: A C d d Hi tA Condensed History

DeductiveDeductive Davis-Putnam 1960 [DP]Iterative existential quantification by resolution

Backtracking SearchBacktracking SearchDavis, Logemann and Loveland 1962 [DLL]Search with unit propagation

C fli t D i Cl L i [CDCL]Conflict Driven Clause Learning [CDCL]GRASP, RelSat: Integrate a constraint learning procedure, 1996

Locality Based SearchEmphasis on exhausting local sub-spaces, e.g. Chaff, Berkmin, miniSATand others, 2001 onwardsAdded focus on efficient implementation

Boolean Constraint Propagation Decision HeuristicsBoolean Constraint Propagation, Decision Heuristics, …

Page 16: SAT and QBF: Trick or Treat - University of Pennsylvania

C fli t D i L iConflict Driven Learningx1 + x4 x1 x1=0, x4=1[SS99,BS96]x1 + x3’ + x8’x1 + x8 + x12x2 + x11x7’ + x3’ + x9

x3 x3=1, x8=0, x12=1

[SS99,BS96]

x7 + x3 + x9x7’ + x8 + x9’x7 + x8 + x10’x7 + x10 + x12’

x2 x2=0, x11=1

x7 x7=1, x9= 0, 1x4=1x9=1

x9=0x3=1 x7=1

x8=0

x1=0

11 1x12=1

x2=0

x11=1 Implication graph: record history of unit implications

Page 17: SAT and QBF: Trick or Treat - University of Pennsylvania

C fli t D i L iConflict Driven Learningx1 + x4 x1 x1=0, x4=1x1 + x3’ + x8’x1 + x8 + x12x2 + x11x7’ + x3’ + x9

x3 x3=1, x8=0, x12=1x7 + x3 + x9x7’ + x8 + x9’x7 + x8 + x10’x7 + x10 + x12’

x2 x2=0, x11=1

x7 x7=1, x9=1x4=1x9=1

x3=1∧x7=1∧x8=0 → conflict

x9=0x3=1 x7=1

x8=0

x1=0

11 1 x3 1∧x7 1∧x8 0 → conflictx12=1

x2=0

x11=1

Page 18: SAT and QBF: Trick or Treat - University of Pennsylvania

C fli t D i L iConflict Driven Learningx1 + x4 x1 x1=0, x4=1x1 + x3’ + x8’x1 + x8 + x12x2 + x11x7’ + x3’ + x9

x3 x3=1, x8=0, x12=1x7 + x3 + x9x7’ + x8 + x9’x7 + x8 + x10’x7 + x10 + x12’

x2 x2=0, x11=1

x7 x7=1, x9=1x4=1x9=1

x9=0x3=1 x7=1

x8=0

x1=0

11 1 x3=1∧x7=1∧x8=0 → conflict

Add conflict clause: x3’+x7’+x8x12=1

x2=0

x11=1 x3 1∧x7 1∧x8 0 → conflict

Page 19: SAT and QBF: Trick or Treat - University of Pennsylvania

C fli t D i L ix1 + x4

Conflict Driven Learningx1 x1=0, x4=1

x1 + x3’ + x8’x1 + x8 + x12x2 + x11x7’ + x3’ + x9

x3 x3=1, x8=0, x12=1x7 + x3 + x9x7’ + x8 + x9’x7 + x8 + x10’x7 + x10 + x12’

x2 x2=0, x11=1

x3’+x7’+x8

x7 x7=1, x9=1x4=1x9=1

x9=0x3=1 x7=1

x8=0

x1=0

11 1 x3=1∧x7=1∧x8=0 → conflictx12=1

x2=0

x11=1

Add conflict clause: x3’+x7’+x8

x3 1∧x7 1∧x8 0 → conflict

Page 20: SAT and QBF: Trick or Treat - University of Pennsylvania

C fli t D i L ix1 + x4

Conflict Driven Learningx1 x1=0, x4=1

x1 + x3’ + x8’x1 + x8 + x12x2 + x11x7’ + x3’ + x9

x3 x3=1, x8=0, x12=1x7 + x3 + x9x7’ + x8 + x9’x7 + x8 + x10’x7 + x10 + x12’

x2 x2=0, x11=1

x3’+x7’+x8

x7 x7=1, x9=1x4=1x9=1

x9=0x3=1 x7=1

x8=0

x1=0

11 1Backtrack to the decision level of x3=1x12=1

x2=0

x11=1

Page 21: SAT and QBF: Trick or Treat - University of Pennsylvania

Wh t’ th bi d l?What’s the big deal?x1

Conflict clause: x1’+x3+x5’

Significantly prune the search space –

x1

x2

learned clause is useful forever!

Useful in generating future conflict

x3x3

4 4 clauses.

Very effective deduction/caching for search space pruning

x4 x4

x5x5x5 x5search space pruning.

Page 22: SAT and QBF: Trick or Treat - University of Pennsylvania

R t tRestartsAbandon the x

1current search tree and reconstruct a new one

x2

1 x2

x3new one

The clauses learned prior to the restart are x

x3

x

x3 x

1

3

the restart are still there after the restart and can help pruning the search space

44

x5

x5

x5

x5

x5

the search spaceAdds to robustness in the solversolverEffective randomization Conflict clause: x1’+x3+x5’[BS00,H07]

Page 23: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT Solvers: A C d d Hi tA Condensed History

DeductiveDeductive Davis-Putnam 1960 [DP]Iterative existential quantification by resolution

Backtracking SearchBacktracking SearchDavis, Logemann and Loveland 1962 [DLL]Search with unit propagation

C fli t D i Cl L i [CDCL]Conflict Driven Clause Learning [CDCL]GRASP, RelSat: Integrate a constraint learning procedure, 1996

Locality Based SearchEmphasis on exhausting local sub-spaces, e.g. Chaff, Berkmin, miniSATand others, 2001 onwardsAdded focus on efficient implementation

Boolean Constraint Propagation Decision HeuristicsBoolean Constraint Propagation, Decision Heuristics, …

Page 24: SAT and QBF: Trick or Treat - University of Pennsylvania

S ith Ch ff (2000)Success with Chaff (2000)First major instance: ToughFirst major instance: ToughIndustrial Processor Verification

Bounded Model Checking, 14 cycle behavior

Statistics1 million variables10 million literals initially10 million literals initially

200 million literals including added clauses30 million literals finally

4 illi l (i iti ll )4 million clauses (initially)200K clauses added

1.5 million decisions3 hour run time

[MMZ+01]

Page 25: SAT and QBF: Trick or Treat - University of Pennsylvania

Constants MatterMotivating Metrics: Decisions, Instructions, Cache Performance and Run Time

1dlx_c_mc_ex_bp_fNum Variables 776Num Clauses 3725Num Literals 10045

zChaff SATO GRASP# Decisions 3166 3771 1795

# Instructions 86.6M 630.4M 1415.9M

# L1/L2 24M / 1 7M 188M / 79M 416M / 153M# L1/L2 accesses

24M / 1.7M 188M / 79M 416M / 153M

% L1/L2 i

4.8% / 4.6% 36.8% / 9.7% 32.9% / 50.3%misses# Seconds 0.22 4.41 11.78

Page 26: SAT and QBF: Trick or Treat - University of Pennsylvania

U it P ti D i tUnit Propagation Dominateswhile(1) {

>80% of execution time!while(1) {

is_conflicting = propagate_unit();

if(!is conflicting) {if(!is_conflicting) {if (no_free_vars) return SATISFIABLE;make_decision(); // Decision Heuristic

}}if(is_conflicting) {

if (no_unforced_decisions) return UNSAT;new constraint = analyze conflict(); // Learningnew_constraint = analyze_conflict(); // Learning literal = last_assigned(new_constraint);backtrack_to(asserting_level(new_constraint));assign(invert(literal)); // Conflict Driven Assertion g ( ( )); //

}}

Page 27: SAT and QBF: Trick or Treat - University of Pennsylvania

Tracking fewer literals per clause?

A clause with 2 non false literals can neitherA clause with 2 non-false literals can neither be unit nor conflicting

SATO’s Head/Tail lists are based on this idea [HS96]SATO s Head/Tail lists are based on this idea [HS96]Chaff’s 2 literal watching develops it further [MMZ+01][ 0 ]

Has significant implications on the algorithmsNo updates needed on backtracking

Efficient Data Structures/Algorithms matter

Page 28: SAT and QBF: Trick or Treat - University of Pennsylvania

Memory Accesses: Different BCP Mechanisms

80

90

50

60

70

80

cces

s

2 Counters1 CounterCompact 1 Counter2 Lits Watch

30

40

50

Bill

ions

of A

2 Lits Watch

0

10

20

2dlx

barre

l6bm

c-gali

leo-9

bw_la

rge.d

c531

5

hano

i4

rand_

1

too_la

rge

Benchmarks

Page 29: SAT and QBF: Trick or Treat - University of Pennsylvania

Level 1 Data Cache Miss Rates: Different BCP Methods

Level 1 C ach e Miss R ates

20%

25% 2 C ounter1 C ounterC om pact 1 C ounter2 L it W atch

10%

15%

Mis

s R

ate

0%

5%

2dlx

barrel6

bmc-galile

o-9

bw_large.d

c5315

hanoi4

rand

_1

too_lar

ge

Benchm arks

Page 30: SAT and QBF: Trick or Treat - University of Pennsylvania

SAT Solvers: A C d d Hi tA Condensed History

DeductiveDeductive Davis-Putnam 1960 [DP]Iterative existential quantification by resolution

Backtracking SearchBacktracking SearchDavis, Logemann and Loveland 1962 [DLL]Search with unit propagation

C fli t D i Cl L i [CDCL]Conflict Driven Clause Learning [CDCL]GRASP,RelSat: Integrate a constraint learning procedure, 1996

Locality Based SearchEmphasis on exhausting local sub-spaces, e.g. Chaff, Berkmin, miniSATand others, 2001 onwardsAdded focus on efficient implementation

Boolean Constraint Propagation Decision HeuristicsBoolean Constraint Propagation, Decision Heuristics, …

Page 31: SAT and QBF: Trick or Treat - University of Pennsylvania

D i i H i tiDecision Heuristicswhile(1) {while(1) {

is_conflicting = propagate_unit();

if(!is conflicting) {if(!is_conflicting) {if (no_free_vars) return SATISFIABLE;make_decision(); // Decision Heuristic

}}if(is_conflicting) {

if (no_unforced_decisions) return UNSAT;new constraint = analyze conflict(); // Learningnew_constraint = analyze_conflict(); // Learning decision = last_unforced_decision(new_constraint);backtrack_to(decision); make forced decision(invert(decision));_ _ ( ( ));

}}

Page 32: SAT and QBF: Trick or Treat - University of Pennsylvania

L lit B d S hLocality Based Search

By focusing on a sub-space, the covered spaces tend to lcoalesce

More opportunities for resolution since most of the variables are common.

Page 33: SAT and QBF: Trick or Treat - University of Pennsylvania

Locality Based Search:D i i H i tiDecision Heuristics

Intuitions:Intuitions:Take a more local view of the problemDynamically identify important constraints and variablesE l l t t fli tExplore space close to recent conflicts

Not very compute-intensiveUse relatively simple data structuresUse relatively simple data structuresWidely Used

VSIDS (Variable State Independent Decaying Sum) in ChaffMiniSAT [ES03]Berkmin [GN02]VMTF in Seige [R04]g [ ]

Page 34: SAT and QBF: Trick or Treat - University of Pennsylvania

M D d tiMore DeductionFocused ResolutionFocused Resolution

Significant deduction to simplify the initial CNF instanceMinisat (SatElite) has efficient implementation [EB05]

Variable elimination by resolutionVariable elimination by resolutionKrom subsumption checksBackward subsumption checksEfficient hash based subsumption algorithmsp g

Hyper-resolution [B02]Interestingly, these techniques can also be used during the solving process itselfg p

VER – used in Resolve-Expand QBF solverKrom Subsumption – conflict clause minimization in Minisat

Page 35: SAT and QBF: Trick or Treat - University of Pennsylvania

Proof Certification and UnsatCCores

An UNSAT instance reduces to an emptyAn UNSAT instance reduces to an empty clause at the end of the deduction/search processprocessCan log the resolution trace and independently validate this proof ofindependently validate this proof of unsatisfiabilityAdditional value in diagnosing the cause ofAdditional value in diagnosing the cause of unsatisfiability

Unsat Core [ZM03]Unsat Core [ZM03]

Page 36: SAT and QBF: Trick or Treat - University of Pennsylvania

The Core as a Checker By-P d tProduct

Empty ClClause

Core Clauses

Original Clauses

Learned Clauses

Unsat Core may be a small fraction of the original clausesMultiple applications

Page 37: SAT and QBF: Trick or Treat - University of Pennsylvania

M lti th d d SATMulti-threaded SAT

Increasingly relevant with multi coreIncreasingly relevant with multi-core processingB i idBasic idea:

Divide search space among threadsSh l d l th dShare learned clauses across threads

Chip-multiprocessors make this reali iSAT i XT [LSB07] SAT [HJS08]pminiSAT, miraXT [LSB07], manySAT [HJS08]

Learned clauses retain relevance across threadsS l bilit ?Scalability?

Page 38: SAT and QBF: Trick or Treat - University of Pennsylvania

M lti th d d SATMulti-threaded SAT

http://www-sr.informatik.uni-tuebingen.de/sat-race-2008/analysis.html

Page 39: SAT and QBF: Trick or Treat - University of Pennsylvania

Q tifi d B l F lQuantified Boolean FormulasQuantification

Level 1

Quantified Boolean FormulaF: Q X ······ Q X ϕ

Level 1

Quantification Level n

F: Q1X1 ······ QnXn ϕwhere Qi (i=1,···, n) is either ∃ or ∀, ϕ is a propositional formulaExample:

∀u∃e(u+e’)(u’+e)∃e4e5∀u1u2u3∃e1e2e3 f(e1,e2,e3,e4,e5,u1,u2,u3)

QBF Problem:Is F satisfiable? P-Space Complete, theoretically harder than NP-Complete problems such as SAT [GJ79]problems such as SAT [GJ79]

Page 40: SAT and QBF: Trick or Treat - University of Pennsylvania

QBF S lQBF Solvers

Like SATLike SATSearch and Deduce

N t lik SATNot like SATProblem representationS hSearchDeduce

Page 41: SAT and QBF: Trick or Treat - University of Pennsylvania

Th QBF S h TThe QBF Search Tree∃e e ∀u u u ∃e e e f(e e e e e u u u )∃e4e5∀u1u2u3∃e1e2e3 f(e1,e2,e3,e4,e5,u1,u2,u3)Need multiple satisfying assignmentsN d t t k fli ti ll ti f i bNeed to track conflicting as well as satisfying sub-spaces

e4, e5

u1 u2 u3u1, u2, u3

e1, e2, e3

1 1 11111 1

Page 42: SAT and QBF: Trick or Treat - University of Pennsylvania

S h B d QBF Al ithSearch Based QBF Algorithms

Work by gradually assigning variablesWork by gradually assigning variablesA partial assignment ⇒

[KGS98]

Page 43: SAT and QBF: Trick or Treat - University of Pennsylvania

S h B d QBF Al ithSearch Based QBF Algorithms

Work by gradually assigning variablesWork by gradually assigning variablesA partial assignment ⇒

U d i dUndeterminedContinue search

Page 44: SAT and QBF: Trick or Treat - University of Pennsylvania

S h B d QBF Al ithSearch Based QBF Algorithms

Work by gradually assigning variablesWork by gradually assigning variablesA partial assignment ⇒

U d i dUndeterminedConflict

BacktrackBacktrackRecord the reason

Page 45: SAT and QBF: Trick or Treat - University of Pennsylvania

S h B d QBF Al ithSearch Based QBF Algorithms

Work by gradually assigning variablesWork by gradually assigning variablesA partial assignment ⇒

U d i dUndeterminedConflictS ti fi dSatisfied

BacktrackDetermine the covered satisfying space

Page 46: SAT and QBF: Trick or Treat - University of Pennsylvania

Impact on Problem R t tiRepresentationLet ϕ = C1 C2 C = S1 + S2 + + SLet ϕ = C1 C2…Cm = S1 + S2 +…+ Sn

Then:(C C C S S S )ϕ = (C1 C2…Cm + S1 + S2 +…+ Sn )

Combined Conjunctive Disjunctive Normal Form (CCDNF)

= C1 C2…Cm (S1 + S2 +…+ Sn)

= (C1 C2 C + ΣAnySubset{ S1 S2 S }) (C1 C2…Cm + ΣAnySubset{ S1, S2,…,Sn})Augmented CNF (ACNF)

(ΠA S b t{ C C C })(S S S )= (ΠAnySubset{ C1,C2,…,Cm})(S1+ S2 +…+ Sn)Augmented DNF

Page 47: SAT and QBF: Trick or Treat - University of Pennsylvania

Impact on Problem R t tiRepresentation

The disjunctive component can captureThe disjunctive component can capture satisfied parts of the solution subspace (ACNF) [ZM02](ACNF) [ZM02]

Recorded as cubes during the solution processf = (a’+b’+c’)(a’+b+c)(a+b’+c)(a+b+c’) + a’b’c’+ ab’cf (a +b +c )(a +b+c)(a+b +c)(a+b+c ) + a b c + ab c

Satisfaction cubeanalogous to conflict clause

The solver terminates when an empty clause (UNSAT) or a tautology cube (SAT) is obtained.

analogous to conflict clause

Page 48: SAT and QBF: Trick or Treat - University of Pennsylvania

Impact on Problem R t tiRepresentation

Can avoid searching irrelevant parts of theCan avoid searching irrelevant parts of the space (CCDNF) [Z06]

1 c=1a=1b

When a=1, values in this circuit are irrelevantCNF would continue to search for consistent assignments

Page 49: SAT and QBF: Trick or Treat - University of Pennsylvania

Impact on Problem R t tiRepresentation

QBF from Games [SAG+06]QBF from Games [SAG+06]Alternating universal and existential quantificationFormula structureFormula structure

TrU → (I and TrE and GE)TrU : Transition rules for U varsTrU : Transition rules for U varsI: Initial AxiomsGE: Goal axioms for E

Dual DNF CNF representationDNF for TrU, CNF for the Rest

Page 50: SAT and QBF: Trick or Treat - University of Pennsylvania

Solving by Quantifier Eli i tiElimination

Resolution based solvers [BKF95]:Resolution based solvers [BKF95]:Eliminate quantifiers from inside out

Existential: Resolution with CNFCUniversal: Trivial with CNF

Resolve and Expand [B05a]Include non-internal universal quantifier elimination using q gexpansion (duplication)

Symbolic skolemization to eliminate existential quantifiersquantifiers

Skizzo [B05b]

Very sensitive to order of operationsGreater success compared to search based solvers

Page 51: SAT and QBF: Trick or Treat - University of Pennsylvania

QBF C titi SQBF Competition: SuccessLargest Solved Instances, QBF Eval 2008

Instance  Class  Solver (time)  totalVars  existsVars  forallVars  totalClauses  totalLits  existsAltern  forallAltern

c1_BMC_ quantor3.0(2p2_k1024  Fixed  4.72)  1110430 1110420 4 2812460 6641870 2 1

c1_BMC_p1_k1024  Fixed 

quantor3.0(47.51)  1110430 1110420 4 2812460 6641870 2 1

vonNeumann‐ripple‐carry‐12‐c Fixed

quantor3.0(1.8) 567460 567148 312 832132 1 2 1carry 12 c  Fixed  8)  567460 567148 312 832132 1 2 1

c1_BMC_p2_k512  Fixed 

quantor3.0(12.96)  566106 566102 4 1451240 3596820 2 1

c1_BMC_p1_k512  Fixed 

quantor3.0(24.54)  566106 566102 4 1451240 3596820 2 1

Page 52: SAT and QBF: Trick or Treat - University of Pennsylvania

QBF C titi Ch llQBF Competition: ChallengesSmallest Unsolved Instances, QBF Eval 2008

Instance  Class  totalVars existsVars  forallVars  totalClauses  totalLits  existsAltern  forallAltern

test4_quant_squaring2  Fixed  326 302 24 868 2208 2 1

test4_quant2  Fixed  326 302 24 868 2208 2 1

test3_quant4  Fixed  344 324 20 923 2419 2 1

test4_quant4  Fixed  446 422 24 1204 3120 2 1

C499.blif_0.10_0.20_0_1_out_exact  Fixed  838 826 12 2393 5702 2 1

Page 53: SAT and QBF: Trick or Treat - University of Pennsylvania

Thi T lkThis TalkSuccessful application of diverse CS techniquesSuccessful application of diverse CS techniques

Logic (Deduction and Solving)SearchCachingRandomizationData structuresData structuresCache efficient algorithms

Open challenges…Limited understanding of why the algorithms workDynamic application of strategiesQBFQBF

Page 54: SAT and QBF: Trick or Treat - University of Pennsylvania

SSummarySAT: Significant shift from theoretical interest to practicalSAT: Significant shift from theoretical interest to practical impact.Quantum leaps between generations of SAT solversPresence of drivers results in maximum progress.

Electronic design automation – primary driver and main beneficiarySoftware verification- the next frontier?Software verification- the next frontier?

Opens attack on even harder problemsSMT, Max-SAT, QBF…

Page 55: SAT and QBF: Trick or Treat - University of Pennsylvania

R fReferences[GJ79] Michael R Garey and David S Johnson Computers and[GJ79] Michael R. Garey and David S. Johnson, Computers and intractability: A guide to the theory of NP-completeness, W. H. Freeman and Company, San Francisco, 1979[DP 60] M. Davis and H. Putnam. A computing procedure for quantification theory. Journal of the ACM, 7:201–215, 1960[DLL62] M. Davis, G. Logemann, and D. Loveland. A machine program for theorem-proving. Communications of the ACM, 5:394–397, 1962[SS99] J P M Sil d K A S k ll h “GRASP A S h[SS99] J. P. Marques-Silva and Karem A. Sakallah, “GRASP: A Search Algorithm for Propositional Satisfiability”, IEEE Trans. Computers, C-48, 5:506-521, 1999. [BS97] R J Bayardo Jr and R C Schrag “Using CSP look-back[BS97] R. J. Bayardo Jr. and R. C. Schrag Using CSP look-back techniques to solve real world SAT instances.” Proc. AAAI, pp. 203-208, 1997[BS00] Luís Baptista and João Marques-Silva, “Using Randomization and gLearning to Solve Hard Real-World Instances of Satisfiability,” In Principles and Practice of Constraint Programming – CP 2000, 2000.

Page 56: SAT and QBF: Trick or Treat - University of Pennsylvania

R fReferences[H07] J Huang “The effect of restarts on the efficiency of clause learning ”[H07] J. Huang, The effect of restarts on the efficiency of clause learning, Proceedings of the Twentieth International Joint Conference on Automated Reasoning, 2007[MMZ+01] M. Moskewicz, C. Madigan, Y. Zhao, L. Zhang and S. Malik. Chaff: Engineering and efficient sat solver. In Proc., 38th Design Automation Conference (DAC2001), June 2001.[ZS96] H. Zhang, M. Stickel, “An efficient algorithm for unit-propagation” In Proceedings of the Fourth International Symposium on Artificial IntelligenceProceedings of the Fourth International Symposium on Artificial Intelligence and Mathematics,1996[ES03] N. Een and N. Sorensson. An extensible SAT solver. In SAT-2003[B02] F Bacchus “Exploring the Computational Tradeoff of more Reasoning[B02] F. Bacchus Exploring the Computational Tradeoff of more Reasoning and Less Searching”, Proc. 5th Int. Symp. Theory and Applications of Satisfiability Testing, pp. 7-16, 2002. [GN02] E.Goldberg and Y.Novikov. BerkMin: a fast and robust SAT-solver. gIn Proc., DATE-2002, pages 142–149, 2002.

Page 57: SAT and QBF: Trick or Treat - University of Pennsylvania

R fReferences[R04] L Ryan Efficient algorithms for clause-learning SAT solvers M Sc[R04] L. Ryan, Efficient algorithms for clause learning SAT solvers, M. Sc. Thesis, Simon Fraser University, 2002.[EB05] N. Eén and A. Biere. Effective Preprocessing in SAT through Variable and Clause Elimination, In Proceedings of SAT 2005[ZM03] L. Zhang and S. Malik, Validating SAT solvers using an independent resolution-based checker: practical implementations and other applications, In Proceedings of Design Automation and Test in Europe, 20032003.[LSB07] M. Lewis, T. Schubert, B. Becker, Multithreaded SAT Solving, In Proceedings of the 2007 Conference on Asia South Pacific Design Automation uto at o[HJS08] Youssef Hamadi, Said Jabbour, and Lakhdar Sais, ManySat: solver description, Microsoft Research-TR-2008-83[ZM02] L. Zhang and S. Malik, Towards a Symmetric Treatment of g ySatisfaction and Conflicts in Quantified Boolean Formula Evaluation, In Principles and Practice of Constraint Programming - CP 2002

Page 58: SAT and QBF: Trick or Treat - University of Pennsylvania

R fReferences[KGS98] M Cadoli A Giovanardi M Schaerf An Algorithm to Evaluate[KGS98] M. Cadoli, A. Giovanardi, M. Schaerf. An Algorithm to Evaluate Quantified Boolean Formulae. In Proc. of 16th National Conference on Artificial Intelligence (AAAI-98)[Z06] L. Zhang, Solving QBF with Combined Conjunctive and Disjunctive Normal Form, In Proc. of National Conference on Artificial Intelligence, 2006[SAG+06] Ashish Sabharwal , Carlos Ansotegui, Carla P. Gomes, Justin W. Hart and Bart Selman, QBF Modeling: Exploiting Player Symmetry for Simplicity and Efficiency In Theory and Applications ofSymmetry for Simplicity and Efficiency, In Theory and Applications of Satisfiability Testing - SAT 2006[BKF95] Hans Kleine Buning, Marek Karpinski, and Andreas Flogel. Resolution for Quantified Boolean Formulas. Information and Computation eso ut o o Qua t ed oo ea o u as o at o a d Co putat o117(1): 12-18 (1995).[B05a] A. Biere, Resolve and Expand, In Theory and Applications of Satisfiability Testing, 2005[B05b] Marco Benedetti, sKizzo: A Suite to Evaluate and Certify QBFs, In Proceedings of Automated Deduction – CADE-20, 2005