Presentation is loading. Please wait.

Presentation is loading. Please wait.

Experiences with QBF Solvers Sharad Malik Princeton University BMC Workshop Edinburgh July 11, 2005.

Similar presentations


Presentation on theme: "Experiences with QBF Solvers Sharad Malik Princeton University BMC Workshop Edinburgh July 11, 2005."— Presentation transcript:

1 Experiences with QBF Solvers Sharad Malik Princeton University BMC Workshop Edinburgh July 11, 2005

2 Acknowledgements n Daijue Tang n Yinlei Yu n Zhaohui Fu n Yogesh Mahajan n Darsh Ranjan n Lintao Zhang (now at Microsoft Research)

3 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis

4 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis

5 Problem Formulation n Quantified Boolean Formula F: Q 1 X 1 ······ Q n X n  where Q i (i=1,···, n) is either  or ,  is a propositional formula n Example:  u  e(u+e’)(u’+e)  e 4 e 5  u 1 u 2 u 3  e 1 e 2 e 3 f(e 1,e 2,e 3,e 4,e 5,u 1,u 2,u 3 ) n QBF Problem: Is F satisfiable? n P-Space Complete, theoretically harder than NP-Complete problems such as SAT. Quantification Level 1 Quantification Level n

6 Motivations n QBF has practical applications: u AI Planning u Sequential Circuit Verification n QBF has some similarities with SAT u Modern SAT solvers are very efficient and widely used in many fields u May be able to leverage SAT techniques

7 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis

8 Basic QBF Algorithms n Resolution based Plaisted ’ s Algorithm n Search based

9 a + b + g + h’ + f a + b + g + h’ Resolution n Resolution of a pair of clauses with exactly ONE incompatible variable a + b + c’ + fg + h’ + c + f

10 Resolution Based QBF Algorithm false [BKF95] Hans Kleine Buning, Marek Karpinski, and Andreas Flogel. Resolution for Quantified Boolean Formulas. Information and Computation 117(1): 12-18 (1995). [Biere05]A. Biere. Resolve and Expand. In Proc. 7th Intl. Conf. on Theory and Applications of Satisfiability Testing (SAT'04), Lecture Notes in Computer Science (LNCS), Springer 2005.Resolve and ExpandLecture Notes in Computer Science (LNCS)

11 Plaisted’s Algorithm cut: e 2 e 3 enumerate conflict assignments of u 1 e 1 through DPLL search [PBZ03] David A. Plaisted, Armin Biere, Yunshan Zhu, A satisfiability procedure for quantified Boolean formulae, Discrete Applied Mathematics 130 (2003) 291-328.

12 Search Based QBF Algorithms n Work by gradually assigning variables n A partial assignment  [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)An Algorithm to Evaluate Quantified Boolean Formulae

13 Search Based QBF Algorithms n Work by gradually assigning variables n A partial assignment  u Undetermined F Continue search [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)An Algorithm to Evaluate Quantified Boolean Formulae

14 Search Based QBF Algorithms n Work by gradually assigning variables n A partial assignment  u Undetermined u Conflict F Backtrack F Record the reason [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)An Algorithm to Evaluate Quantified Boolean Formulae

15 Search Based QBF Algorithms n Work by gradually assigning variables n A partial assignment  u Undetermined u Conflict u Satisfied F Backtrack F Determine the covered satisfying space [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)An Algorithm to Evaluate Quantified Boolean Formulae

16 Search Based QBF Algorithms n Work by gradually assigning variables n A partial assignment  u Undetermined u Conflict u Satisfied n The majority of QBF solvers are search based, the DPLL algorithm is an example of this

17 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) Unknown True (1) False(0)

18 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 Unknown True (1) False(0)

19 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 Unknown True (1) False(0)

20 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 Unknown True (1) False(0) Conflictin g Node

21 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 Unknown True (1) False(0) Backtrack

22 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 e = 0 Unknown True (1) False(0)

23 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 e = 0 u = 1 Unknown True (1) False(0) Satisfying Node

24 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 e = 0 u = 1 Unknown True (1) False(0) Backtrack

25 Basic DPLL Flow for QBF  e  y (e + y)(e’ + y’) e = 1 u = 1 e = 0 u = 1 u = 0 Unknown True (1) False(0)

26 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 e = 0 u = 1 u = 0 Unknown True (1) False(0)

27 Basic DPLL Flow for QBF  e  u (e + u)(e’ + u’) e = 1 u = 1 e = 0 u = 1 u = 0 False Unknown True (1) False(0)

28 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0)

29 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1

30 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1 e = 1

31 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1 e = 1e = 0

32 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1 e = 1e = 0

33 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1 e = 1e = 0 u = 0 e = 1

34 Basic DPLL Flow for QBF  u  e (u + e)(u’ + e’) Unknown True (1) False(0) u = 1 e = 1e = 0 u = 0 e = 1 True

35 Naïve DPLL Based Approach n Works on a CNF database n Backtracking is chronological n No learning is possible u In contrast, learning is critical for efficient SAT

36 Quaffle’s Approach n A new data structure for the database n New deduction rules for this data structure n Conflict driven learning and satisfaction driven learning n Non-chronological backtracking by assertion

37 Outline n QBF u QBF algorithms u Satisfiability driven learning [ZM02] u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis [ZM02] L. Zhang and S. Malik. Towards Symmetric Treatment of Conflicts And Satisfaction in Quantified Boolean Satisfiability Solver. In Proc. of 8th International Conference on Principles and Practice of Constraint Programming (CP2002).Towards Symmetric Treatment of Conflicts And Satisfaction in Quantified Boolean Satisfiability Solver.

38 CNF/DNF/ACNF/ADNF Let  = C 1 C 2 …C m = S 1 + S 2 +…+ S n Then:  = (C 1 C 2 …C m + S 1 + S 2 +…+ S n ) = C 1 C 2 …C m (S 1 + S 2 +…+ S n ) = (C 1 C 2 …C m +  AnySubset{ S 1, S 2,…,S n }) = (  AnySubset{ C 1,C 2,…,C m })(S 1 + S 2 +…+ S n )

39 ACNF n Definition: A Propositional formula  is said to be in Augmented CNF (ACNF) if u  = C 1 C 2 …C m + S 1 + S 2 +……+ S k u Where C i ’s are clauses, and S j ’s are cubes. u Each S j is contained in the clause term C 1 C 2 …C m. i.e.  i  {1,2…k}, S i  C 1 C 2 …C m n In ACNF, cubes are redundant n Example: f= a’b’c’+a’bc+ab’c+abc’ [DNF] = (a’+b’+c’)(a’+b+c)(a+b’+c)(a+b+c’) [CNF] = (a’+b’+c’)(a’+b+c)(a+b’+c)(a+b+c’) + a’b’c’+ ab’c [ACNF]

40 Clause Deduction Example F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula free literal true literal false literal

41 Clause Deduction Example F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) free literal true literal false literal Free literals are all univeral, conflicting clause! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula

42 Clause Deduction Example F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) free literal true literal false literal If u 1 and u 2 have higher quantification level than e 2,unit clause! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula

43 Clause Deduction Example free literal true literal false literal Implication! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) If u 1 and u 2 have higher quantification level than e 2,unit clause!

44 Deduction and Search Space Pruning Unknown True (1) False(0)

45 Deduction and Search Space Pruning Unknown True (1) False(0)

46 Deduction and Search Space Pruning Unknown True (1) False(0) Conflict Unit Clause

47 Cube Deduction Example F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) + e 3 e 4 ’u 3 +… free literal true literal false literal e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula

48 Cube Deduction Example free literal true literal false literal Free literals are all existential, satisfying cube! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) + e 3 e 4 ’u 3 +…

49 Cube Deduction Example free literal true literal false literal If e 3 has higher quantification level than u 3, unit cube! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) + e 3 e 4 ’u 3 +…

50 Cube Deduction Example free literal true literal false literal If e 3 has higher quantification level than u 3, unit cube! Implication! e 1, e 2, e 3 …… existential literals Try to satisfy the formula u 1, u 2, u 3 …… universal literals Try to falsify the formula F = (…)(…)(e 1 +e 2 ’+u 1 +u 2 ’)(…) + e 3 e 4 ’u 3 +…

51 Asymmetry between conflict and satisfaction n Conflict occurs when u A clause has all existential literals evaluate to false, and no universal literal evaluates to true n Satisfaction occurs when u A cube has all universal literals evaluate to true and no existential literal evaluate to false u All clauses are satisfied n Asymmetry exists because in ACNF, the clause term contains all the information about the propositional formula while the cubes may not.

52 Satisfiability Induced Cubes (a + b + x)(c + y’)(a + b’ + y’)(a + x’ + y’) + xy’ free literal true literal false literal

53 Satisfiability Induced Cubes (a + b + x)(c + y’)(a + b’ + y’)(a + x’ + y’) + xy’ free literal true literal false literal Satisfying assignment : {a=1, b=0, c=X, x=0, y=0}

54 Satisfiability Induced Cubes (a + b + x)(c + y’)(a + b’ + y’)(a + x’ + y’) + xy’ free literal true literal false literal Satisfying assignment : {a=1, b=0, c=X, x=0, y=0} Cover Set: {a, y’}

55 Satisfiability Induced Cubes (a + b + x)(c + y’)(a + b’ + y’)(a + x’ + y’) + xy’ free literal true literal false literal Satisfying assignment : {a=1, b=0, c=X, x=0, y=0} Cover Set: {a, y’} + ay’

56 Satisfaction Driven Learning and Backtracking Stop? Satisfying Cube Consensus Choose a literal, get its antecedent Add the resulting cube to database, backtrack Exist Satisfying Cube? Satisfaction Induced Cube Y N Y N

57 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution [ZM02] u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis [ZM02] L. Zhang and S. Malik. Conflict Driven Learning in a Quantified Boolean Satisfiability Solver. In Proc. of International Conference on Computer Aided Design. (ICCAD2002)Conflict Driven Learning in a Quantified Boolean Satisfiability Solver

58 Conflict Driven Learning and Backtracking 1: 2: 3: 4: 5: 6: 7: Quantification Level... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)...

59 Conflict Driven Learning and Backtracking 1:......... 2: 3: 4: 5: 6: 7:... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)...

60 Conflict Driven Learning and Backtracking 1:......... 2:......... 3: 4: 5: 6: 7:... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)...

61 Conflict Driven Learning and Backtracking: An Example... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: 7:

62 Conflict Driven Learning and Backtracking: An Example... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: 7:

63 Conflict Driven Learning and Backtracking: An Example 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: e 1 7:... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... Unit Clause e 2 is implied

64 Conflict Driven Learning and Backtracking: An Example... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... Conflicting e 1 (1)+e 3 (5) +u 1 ’(4)+e 4 (5) 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: e 1 e 2 7:

65 Conflict Driven Learning and Backtracking: An Example Assert e 1 =1@3 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: 7:... e 1 (1)+e 2 (3)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... e 1 (1)+e 3 (5) +u 1 ’(4)+e 4 (5)

66 Complications: Tautology Clause 1: 2: 3: 4: 5: 6: 7:... e 1 (1)+e 2 (3)+u 1 (4)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)...

67 Complications: Tautology Clause Conflicting e 1 (1)+e 3 (5) +u 1 (4)+u 1 ’(4)+e 4 (5) Tautology Distance > 1 !!! 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: e 1 e 2 7:... e 1 (1)+e 2 (3)+u 1 (4)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)...

68 Conflict Driven Learning with Tautology Clause Assert e 1 =1@3... e 1 (1)+e 2 (3)+u 1 (4)+e 3 (5) e 1 (1)+e 2 ’(3)+u 1 ’(4)+e 4 (5)... e 1 (1)+e 3 (5) +u 1 (4)+u 1 ’(4)+e 4 (5) 1:......... 2:......... 3:... e 3... e 4... 4:......... 5:......... 6: 7:

69 Quaffle Run Time Num. VarsNum. ClsNaïveBJCDLFull TOILET06.1.iv.122941046734.517.418.2374.16 TOILET06.1.iv.1132111441576.365.5239.51221.45 CHAIN15v.1614257483*3.193.15142.21 CHAIN16v.1716178638*6.96.82472.38 CHAIN17v.1818209892*14.9914.851794.35 impl1666130182.66136.470.970.02 impl18741461349.031445.763.880.02 impl2082162 * *15.510.02 R3…3…50_8.F150375*1.310.290.05 R3…3...50_9.T15037541.481.020.870.02 logn…A2137065592**125.85193.88 logn…B11871178750*342.958.268.18 BLOCKS4ii.6.383815061**367.54591.95 *Experiments are conducted on a Dell PowerEdge 1600sc PIII 1133Mhz machine with 1 G memory running Linux.

70 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers [YM05] n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis [YM05] Yinlei Yu and Sharad Malik, "Validating the result of a Quantified Boolean Formula(QBF) solver: Theory and practice", Proc. Asian and South Pacific Design Automation Conference, pp. 1047-1051, January 18-21, 2005."Validating the result of a Quantified Boolean Formula(QBF) solver: Theory and practice"

71 Motivation n SAT solver results can be checked either by satisfying assignment or by an independent resolution based verifier [ZM03] u Produces unsatisfiable core as a byproduct u Several applications for the unsatisfiable core F Abstraction refinement, FPGA routing, extracting interpolants… n Need corresponding certification for QBF solvers n Extraction of unsatisfiable cores for QBF [ZM03] L. Zhang and S. Malik, Validating SAT Solvers Using an Independent Resolution-Based Checker: Practical Implementations and Other Applications, Proc. DATE2003.

72 QBF Solving Algorithm Universal cube (1)  QBF instance is SATISFIABLE T u1u1 u2u2 F T u2u2 1 FT 01 0  u 1 u 2  e 1 (u 1 + u 2 + e 1 ’) (u 1 + u 2 ’ + e 1 ) (u 1 ’ + u 2 + e 1 ) (u 1 ’ + e 1 ) (u 1 ’*u 2 ’) + (u 1 ’*u 2 ) + (u 1 ) (u 1 ’) + (u 1 ) (1) e1e1 e1e1 e1e1

73 Verifying Satisfiable QBF Results (u 1 ’*u 2 ’) + (u 1 ’*u 2 ) + (u 1 ) (u 1 ’) + (u 1 ) (1) e1e1 T u1u1 u2u2 e1e1 T u2u2 1 e1e1 T Verifier checks all the related satisfying assignments in the solution trace. Rebuilds the consensus tree to generate the final universal cube.  u 1 u 2  e 1 (u 1 + u 2 + e 1 ’) (u 1 + u 2 ’ + e 1 ) (u 1 ’ + u 2 + e 1 ) (u 1 ’ + e 1 )

74 QBF Solving Algorithm (Cont’d) 0 u1u1 e2e2 e1e1 F 1 0 0 F 1 e2e2 0 e1e1 F 0 T 1 Pure universal clause  QBF instance is UNSATISFIABLE  u 1  e 1 e 2 (u 1 ’ + e 1 + e 2 ’) (u 1 ’ + e 1 + e 2 ) (u 1 ’ + e 1 ’) (u 1 + e 2 ) (u 1 + e 2 )(u 1 ’+e 1 +e 2 )(u 1 ’+e 1 +e 2 ’)(u 1 ’+e 1 ’) (u 1 ’+e 1 ) (u 1 ’+e 1 ’) (u 1 ’)

75 QBF Solving Algorithm (Cont’d) (u 1 + e 2 )(u 1 ’+e 1 +e 2 )(u 1 ’+e 1 +e 2 ’)(u 1 ’+e 1 ’) (u 1 ’+e 1 ) (u 1 ’+e 1 ’) (u 1 ’) 0 u1u1 e2e2 e1e1 F 1 0 0 F 1 e2e2 0 e1e1 F 0 T 1 Verification by rebuilding the clause resolution tree based on the solution trace.  u 1  e 1 e 2 (u 1 ’ + e 1 + e 2 ’) (u 1 ’ + e 1 + e 2 ) (u 1 ’ + e 1 ’) (u 1 + e 2 )

76 Unsatisfiable QBF Core Only some of the clauses are used in the proof. This part is the unsatisfiable core of the QBF problem. Core:  u 1  e 1 e 2 (u 1 ’ + e 1 + e 2 ’) (u 1 ’ + e 1 + e 2 ) (u 1 ’ + e 1 ’)  u 1  e 1 e 2 (u 1 ’ + e 1 + e 2 ’) (u 1 ’ + e 1 + e 2 ) (u 1 ’ + e 1 ’) (u 1 + e 2 ) (u 1 ’ + e 1 ) (u 1 ’ + e 1 ’) (u 1 ’)

77 Results Instance Name Orig. Clause # Core Clause # Core Size as % of total #Iterations Blocks3i.4.42,9281254.273 Blocks3i.5.32,89240614.0413 Blocks3ii.4.32,5331074.222 Blocks3ii.5.22,7071615.957 Blocks3iii.41,433463.213 Blocks4ii.6.315,0613402.2611 Blocks4ii.7.215,0471,66411.0630* Blocks4iii.69,6612032.104 lognBwLarge A1 62,820770.121 lognBwLarge B1 178,7501200.061 Toilet2.1.iv.3702028.571 Toilet6.1.iv.111,04662659.855 Toilet7.1.iv.131,49192962.312 Average:22,803371.115.236.4 The run time and trace sizes for verifying QBF instance The core size of Block4ii.7.2.qdimacs With iterations of core extraction Final core size for many QBF cases

78 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis n Circuit Based Quantification u Basic idea u Ordering u Node resynthesis n Future Work

79 Motivation: 2QBF n 2QBF: QBF with two levels of quantification u  u 1 u 2 …u m  e 1 e 2 …e n CNF (u 1 …u m e 1 …e n ) n QBF solvers cannot handle practical sized problem as of now n SAT is NP-complete, QBF is PSPACE-complete, and 2QBF is NP NP - complete u 2QBF may be simpler than QBF u 2QBF may be better able to leverage SAT search techniques U 2 m Universal Assignments 1 11 … 1 u 1,u 2,…,u m e 1,e 2,…,e n 00 …

80 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis

81 The State Space Diameter Problem S0S0 S2S2 S1S1 S3S3 S5S5 S4S4 diameter = 3 Start from the initial states, the minimum number of steps needed to visit every reachable state S0S0 initial state: S 0 S2S2 S1S1 step 1: S 1, S 2 S4S4 S3S3 step 2: S 3, S 4 S5S5 step 3: S 5

82 S2S2 S1S1 Why Bother with the State Space Diameter Problem n Bounded model checking (BMC) n Circuit state space diameter completes BMC n Can be formulated as QBF instances n Provides insights to sequential verification problems in general SjSj SiSi S i, S j : sets of states state transition relation T S0S0 S0S0 S 0 : the set of initial states Does property P hold for the system? S2S2 S1S1 S3S3 S3S3 useful for falsification, but incomplete for verification

83 QBF Formulation: Huffman Model Inputs Combinational Logic Outputs State Sequential Feedback Loop

84 QBF Formulation: Time Frame Expansion Inputs Combinational Logic Outputs State Inputs Combinational Logic Outputs State Inputs Combinational Logic Outputs State n Behavior over 3 cycles

85 Circuit Constructed for the Diameter Problem Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Combinational Logic I1’I1’ O1’O1’ Combinational Logic In’In’ On’On’

86 Some Terminology for the Formulations Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Combinational Logic I1’I1’ O1’O1’ Combinational Logic In’In’ On’On’ Variables: V 1 Circuit consistency condition: C(V 1 )

87 Some Terminology for the Formulations Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Combinational Logic I1’I1’ O1’O1’ Combinational Logic In’In’ On’On’ Variables: V 2 Circuit consistency condition: C(V 2 )

88 2QBF Formulation Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Combinational Logic I1’I1’ O1’O1’ Combinational Logic In’In’ On’On’ C(V 1 ) C(V 2 )

89 Other Formulations State space diameter: d n<d: (1) and (2) are false; (3) (4) and (5) are true; n  d: (1) and (2) are true; (3) (4) and (5) are false. n Why bother with different formulations? u Different formulations might have different impact on the performance of an algorithm

90 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms [RTM04] u Analysis [RTM04] Darsh P. Ranjan, Daijue Tang, Sharad Malik: A Comparative Study of 2QBF Algorithms. SAT 2004Darsh P. RanjanDaijue Tang SAT 2004

91 2QBF Algorithms Studied [RTM04] n DPLL search based, utilize the zchaff SAT solver u Algorithm I: Quaffle like, assign universal variables first u Algorithm II: no restriction in decision order w.r.t. variable quantification order n Resolution based u No simplification, just Q-resolution u With complete two-level minimization (using ESPRESSO) at each resolution step

92 Coverage Cubes and Blocking Clauses (u 1 + u 2 + e 1 ) (u 3 + e 2 ’)(u 1 +e 1 ’+e 2 ’)(u 1 ’+u 2 ’+e 2 ) (u 1 + u 2 + e 1 ) (u 3 + e 2 ’)(u 1 +e 1 ’+e 2 ’)(u 1 ’+u 2 ’+e 2 ) satisfying assignment : {u 1 =1, u 2 =0, u 3 =X, e 1 =0, e 2 =0} satisfying cube: {u 1 =1, u 2 =0, e 2 =0} select a set of literals that satisfy all clauses coverage cube for the universal Boolean space: u 1  u 2 ’ blocking clause: u 1 ’ + u 2 prevents revisiting the already searched space

93 Example for Algorithm I universal assignment: u 1 =0, u 2 =0 SAT assignment: u 1 =0, u 2 =0, e 1 =1, e 2 =1 satisfying cube (cover set): u 1 =0, e 1 =1, e 2 =1 coverage cube: u 1 =0 universal assignment: u 1 =1, u 2 =0 SAT assignment: u 1 =1, u 2 =0, e 1 =0, e 2 =0 satisfying cube (cover set): u 1 =1, e 1 =0, e 2 =0 coverage cube: u 1 =1 no more universal assignment left, instance is true

94 Algorithm I universal variable space (u 1,u 2,…,u m ) SAT assignmentuniversal assignment coverage cube all variable space (u 1,u 2,…,u m,e 1,e 2,…,e n ) 1 2 satisfying cube (cover set) 3 4 5 U 1 … u 1,u 2,…,u m e 1,e 2,…,e n

95 Example for Algorithm II SAT assignment: u 1 =0, e 1 =1, e 2 =1, u 2 =0 blocking clause: (u 1 + e 1 ’ + e 2 ’) coverage cube: u 1 =0 SAT assignment: u 1 =1, e 1 =0, e 2 =0, u 2 =0 coverage cube: u 1 =1 blocking clause: (u 1 + e 1 ’ + e 2 ’) The entire universal space is covered, instance is true

96 Algorithm II universal variable space (u 1,u 2,…,u m ) SAT assignment, no need to respect quantification order to get that 1 blocking clause 2 3 all variable space (u 1,u 2,…,u m,e 1,e 2,…,e n ) coverage cube 4

97 Resolution Based Algorithm n First resolve out existential variables n After resolving out all existential variables u An empty clause (a clause with no literal or consisting only of universal variables)  false u An empty set of clauses  true n Has the memory blowup problem n Alleviate by simplifying the propositional part after each resolution step

98 Example for Resolution Based Algorithm resolve out e 1 empty set of clause instance is true simplify resolve out e 2

99 Experimental Results >400 Res w/o simp >400 4.29 208.6 25.04 2.19 Res w/ simp >400 298.8634** >400 2.55 30.7518.23294.270.803 Depth s1423 s1488 >400 0.22 0.27 Quaffle >400 2.1115 0.24>4000.151 0.250.260.151 SempropAlg. IIAlg. ICircuit 0.36(10) 0.01(100) Res w/o simp 169.09(6) 0.25(100) Res w/ simp 200 (10 instances) 100 (100 instances) 0.01(100)>400(0)16.22(98)0(100) >400(0) Quaffle 23.99(10)>400(0)160(6) SempropAlg. IIAlg. I # of clauses (100 vars, 5 lits/clause) * The tests were done on an Intel Pentium III 933 MHz machine with 1GB of RAM running linux. ** Improves on previous diameter lower bound of 26

100 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis [TYRM04] [TYRM04] Daijue Tang, Yinlei Yu, Darsh Ranjan, Sharad Malik: Analysis of Search Based Algorithms for Satisfiability of Quantified Boolean Formulas Arising from Circuit State Space Diameter Problems. SAT 2004Daijue TangYinlei YuDarsh RanjanSAT 2004

101 Analysis of Search Based QBF Evaluation true any satisfying partial assignment p S n+1 … … … … … … S0’S0’ Sn’Sn’ =1 1 1 1 every bit in S n+1 must be assigned complete assignment for the state variables of S n+1

102 Analysis of Search Based QBF Evaluation any satisfying partial assignment reachable state space of S n+1 minterm Boolean space of I 1 I 2 · · ·I n cube complete assignment for the state variables of S n+1

103 Analysis of Search Based QBF Evaluation reachable state space of S n+1 minterm Boolean space of I 1 I 2 · · ·I n cube minterm cube distinct states non-overlapping sets of cubes

104 Analysis of Search Based QBF Evaluation reachable state space of S n+1 minterm Boolean space of I 1 I 2 · · ·I n minterm Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Impossible!

105 Analysis of Search Based QBF Evaluation reachable state space of S n+1 minterm Boolean space of I 1 I 2 · · ·I n cube minterm cube need to cover the entire universal space Need to enumerate every S n+1 (1) is true

106 Purely SAT based Combinational Logic I1I1 O1O1 Combinational Logic InIn OnOn Combinational Logic I n+1 O n+1 Combinational Logic I1’I1’ O1’O1’ Combinational Logic In’In’ On’On’ Simple path from S 0 to S n+1 Enumerate states here using SAT With certain circuit modification:

107 Outline n QBF u QBF algorithms u Satisfiability driven learning u Long distance resolution u Validating QBF solvers n 2QBF u Sequential circuit state space diameter problem u 2QBF algorithms u Analysis


Download ppt "Experiences with QBF Solvers Sharad Malik Princeton University BMC Workshop Edinburgh July 11, 2005."

Similar presentations


Ads by Google