a non prenex non clausal qbf solver with game state
play

A Non-Prenex, Non-Clausal QBF Solver with Game-State Learning Will - PowerPoint PPT Presentation

A Non-Prenex, Non-Clausal QBF Solver with Game-State Learning Will Klieber , Samir Sapra, Sicun Gao, Edmund Clarke Carnegie Mellon University July 13, 2010 1/19 Preview Non-prenex, non-clausal QBF solver (DPLL-based). Game-state


  1. A Non-Prenex, Non-Clausal QBF Solver with Game-State Learning Will Klieber , Samir Sapra, Sicun Gao, Edmund Clarke Carnegie Mellon University July 13, 2010 1/19

  2. Preview ◮ Non-prenex, non-clausal QBF solver (DPLL-based). ◮ Game-state learning ◮ Reformulation of clause/cube learning, extended to non-prenex case. ◮ Ghost literals ◮ Symmetric propagation technique, exploits structure of non-prenex, non-clausal instances. 2/19

  3. Why study QBF? ◮ Practical problems naturally expressed in QBF. ◮ Formal verification: e.g., Bounded Model Checking ◮ SAT solvers: success in formal verification. ◮ Hopefully QBF solvers too. 3/19

  4. Semantics φ | x = T : plug in T (true) for x . E.g., ( x ∨ y ) | x = T = ( T ∨ y ) = T . ◮ ◮ [ ∀ x . φ ] = [ φ | x = T ] ∧ [ φ | x = F ] (universal quantifier) ◮ [ ∃ x . φ ] = [ φ | x = T ] ∨ [ φ | x = F ] (existential quantifier) QBF Solver: ◮ Input formula: InFmla ◮ Assume each variable quantified exactly once in InFmla . ◮ No free variables. ◮ InFmla evaluates to either T or F . ◮ Goal: determine the truth value of InFmla . 4/19

  5. QBF as a Game ◮ Existential variables are owned by Player E . Universal variables are owned by Player U . ◮ Players assign variables in quantification order. ◮ Start with outermost quantified (leftmost). ◮ Player E ’s goal: Make InFmla be true. Player U ’s goal: Make InFmla be false. ◮ To make this more precise: reduction (next slide). 5/19

  6. Reduction of a Formula ◮ Let “ π ” denote a (partial) assignment of values to variables. ◮ To construct the reduction of f under π (denoted “ f | π ”): ◮ For each variable x in π : ◮ Delete quantifier of x . ◮ Replace occurrences with assigned value. 6/19

  7. Reduction of a Formula ◮ Let “ π ” denote a (partial) assignment of values to variables. ◮ To construct the reduction of f under π (denoted “ f | π ”): ◮ For each variable x in π : ◮ Delete quantifier of x . ◮ Replace occurrences with assigned value. ◮ Example: ◮ f = ( ∃ e 1 . ∀ u 2 . e 1 ∧ u 2 ) , π = { e 1 : True } ◮ Reduction: f | π = ( ∀ u 2 . True ∧ u 2 ) ◮ We say “ P wins f under π ” iff P has a winning strategy for f | π . ◮ Player E wins f under π iff f | π is true. ◮ Player U wins f under π iff f | π is false. 6/19

  8. Quantification Order ◮ Don’t need strict outer-to-inner. ◮ Block of one type of quantifier. ∃ e 1 ∃ e 2 ∃ e 3 ∀ u 4 ∀ u 5 . f ◮ We say { e 1 , e 2 , e 3 } are ready , while { u 4 , u 5 } are unready (under the empty assignment). 7/19

  9. Quantification Order ◮ Don’t need strict outer-to-inner. ◮ Block of one type of quantifier. ∃ e 1 ∃ e 2 ∃ e 3 ∀ u 4 ∀ u 5 . f ◮ We say { e 1 , e 2 , e 3 } are ready , while { u 4 , u 5 } are unready (under the empty assignment). ◮ Definition: An unassigned variable is ready iff its quantifier is not within the scope of the quantifier of an unassigned variable owned by the opposing player. ◮ E.g., ∃ e 4 . � ( ∃ e 5 . f ) ∧ ( ∀ u 6 . h ) � ◮ e 4 and e 5 are ready, while u 6 is unready. 7/19

  10. Representation of Formulas ◮ Negation-Normal Form (NNF) ◮ Logical operators: AND, OR, NOT. ◮ Negations are pushed inward by De Morgan’s; occur only in front of variables. ◮ Literal: a variable or its negation. ◮ Prenex: All quantifiers at beginning. ∀ x ∃ y ∀ z . (( x ∧ y ) ∨ ( y ∧ z )) � �� � � �� � matrix prefix ◮ Early QBF solvers: Prenex CNF (Conjunctive Normal Form) ◮ Prenexing is harmful (since it limits the branching order). ◮ Converting to CNF is harmful (since Player E ’s variables are conflated with gate variables). 8/19

  11. Representation of Formulas (cont.) ◮ Gate variables: label each conjunction/disjunction. ◮ Prime gate vars: include quantifier prefix. ◮ Input variables: original (non-gate) variables. g 1 g 2 � �� � � �� � � [ ∃ e 11 ∀ u 21 � ∃ e 10 ( e 10 ∧ e 11 ∧ u 21 )] ∧ [ ∀ u 22 ∃ e 30 ( e 10 ∧ u 22 ∧ e 30 )] � �� � � �� � g ′ g ′ 1 2 9/19

  12. Representation of Formulas (cont.) ◮ Gate variables: label each conjunction/disjunction. ◮ Prime gate vars: include quantifier prefix. ◮ Input variables: original (non-gate) variables. g 1 g 2 � �� � � �� � � [ ∃ e 11 ∀ u 21 � ∃ e 10 ( e 10 ∧ e 11 ∧ u 21 )] ∧ [ ∀ u 22 ∃ e 30 ( e 10 ∧ u 22 ∧ e 30 )] � �� � � �� � g ′ g ′ 1 2 ◮ Quantified subformulas (e.g., g ′ 1 , g ′ 2 ): subgames. ◮ Subgames g ′ 1 and g ′ 2 are independent after e 10 assigned. ◮ Implementation: Pure NNF is not required. A quantifier-free subformula can be represented in circuit form. 9/19

  13. Representation of Current Assignment ◮ During solving process, we assign values to the input variables. ◮ We write “ CurAsgn ” to denote the current assignment. ◮ CurAsgn may be represented by the set of literals assigned true. ◮ E.g., { e 1 = T , e 2 = F } may be represented by { e 1 , ¬ e 2 } . 10/19

  14. Top-level algorithm /* Goal: Find out who wins InFmla (under empty asgn). */ 1. while (true) { while ( don’t know who wins InFmla under CurAsgn ) { 2. / Pick a ready literal. 3. DecideLit(); / / Detect forced literals. 4. Propagate(); / 5. } 6. ... 7. ... 8. ... 9. ... 10. } 11/19

  15. Top-level algorithm /* Goal: Find out who wins InFmla (under empty asgn). */ 1. while (true) { while ( don’t know who wins InFmla under CurAsgn ) { 2. / Pick a ready literal. 3. DecideLit(); / / Detect forced literals. 4. Propagate(); / 5. } Learn so that we don’t repeat same decisions again ; 6. if ( we learned who wins InFmla under ∅ ) return; 7. 8. Backtrack(); / / Remove recent literals from CurAsgn ; / Learned information will force a literal. 9. Propagate(); / 10. } Optional modification: Target in on a subgame when independent. 11/19

  16. Game-State Learning – Motivation ◮ Reformulation of clause/cube learning, extended to non-prenex. ◮ For prenex CNF: merely cosmetic differences between game-state learning and clause/cube learning. ∃ e 1 ∃ e 3 ∀ u 4 ∃ e 5 ∃ e 7 . ( e 1 ∨ e 3 ∨ u 4 ∨ e 5 ) ∧ ( e 1 ∨ ¬ e 3 ∨ ¬ u 4 ∨ e 7 ) ∧ ... � �� � � �� � g 1 g 2 ◮ g 1 : If { e 1 , e 3 , u 4 , e 5 } are false, then U wins. 12/19

  17. Game-State Learning – Motivation ◮ Reformulation of clause/cube learning, extended to non-prenex. ◮ For prenex CNF: merely cosmetic differences between game-state learning and clause/cube learning. ∃ e 1 ∃ e 3 ∀ u 4 ∃ e 5 ∃ e 7 . ( e 1 ∨ e 3 ∨ u 4 ∨ e 5 ) ∧ ( e 1 ∨ ¬ e 3 ∨ ¬ u 4 ∨ e 7 ) ∧ ... � �� � � �� � g 1 g 2 ◮ g 1 : If { e 1 , e 3 , u 4 , e 5 } are false, then U wins. ◮ g 1 : If {¬ e 1 , ¬ e 3 , ¬ u 4 , ¬ e 5 } are true, then U wins. 12/19

  18. Game-State Learning – Motivation ◮ Reformulation of clause/cube learning, extended to non-prenex. ◮ For prenex CNF: merely cosmetic differences between game-state learning and clause/cube learning. ∃ e 1 ∃ e 3 ∀ u 4 ∃ e 5 ∃ e 7 . ( e 1 ∨ e 3 ∨ u 4 ∨ e 5 ) ∧ ( e 1 ∨ ¬ e 3 ∨ ¬ u 4 ∨ e 7 ) ∧ ... � �� � � �� � g 1 g 2 ◮ g 1 : If { e 1 , e 3 , u 4 , e 5 } are false, then U wins. ◮ g 1 : If {¬ e 1 , ¬ e 3 , ¬ u 4 , ¬ e 5 } are true, then U wins. ◮ g 1 : If {¬ e 1 , ¬ e 3 , ¬ e 5 } are true and ¬ u 4 is non-false, then U wins. (“non-false”: “true or unassigned”) 12/19

  19. Game-State Learning – Motivation ◮ Reformulation of clause/cube learning, extended to non-prenex. ◮ For prenex CNF: merely cosmetic differences between game-state learning and clause/cube learning. ∃ e 1 ∃ e 3 ∀ u 4 ∃ e 5 ∃ e 7 . ( e 1 ∨ e 3 ∨ u 4 ∨ e 5 ) ∧ ( e 1 ∨ ¬ e 3 ∨ ¬ u 4 ∨ e 7 ) ∧ ... � �� � � �� � g 1 g 2 ◮ g 1 : If { e 1 , e 3 , u 4 , e 5 } are false, then U wins. ◮ g 1 : If {¬ e 1 , ¬ e 3 , ¬ u 4 , ¬ e 5 } are true, then U wins. ◮ g 1 : If {¬ e 1 , ¬ e 3 , ¬ e 5 } are true and ¬ u 4 is non-false, then U wins. (“non-false”: “true or unassigned”) ◮ Game-state sequent: “ 〈{¬ e 1 , ¬ e 3 , ¬ e 5 } , {¬ u 4 }〉 | = ( U wins InFmla ) ” ◮ Can learn who wins a subgame. 12/19

  20. Game-State Sequents ◮ Consider a subgame f (a quantified subformula). ◮ “ 〈 L now , L fut 〉 | = ( P wins f ) ” means “Player P wins f whenever: 1. every literal in L now is true, and 2. every literal in L fut is non-false (i.e., true or unassigned) (i.e., every literal in L fut can be true in the future).” 13/19

  21. Game-State Sequents ◮ Consider a subgame f (a quantified subformula). ◮ “ 〈 L now , L fut 〉 | = ( P wins f ) ” means “Player P wins f whenever: 1. every literal in L now is true, and 2. every literal in L fut is non-false (i.e., true or unassigned) (i.e., every literal in L fut can be true in the future).” ◮ L now may contain both input literals and gate literals; L fut may contain only input literals. 13/19

Recommend


More recommend