extending dpll based qbf solvers to handle free variables
play

Extending DPLL-Based QBF Solvers to Handle Free Variables Will - PowerPoint PPT Presentation

Extending DPLL-Based QBF Solvers to Handle Free Variables Will Klieber , Mikol a s Janota, Joao Marques-Silva, Edmund Clarke July 9, 2013 1 Open QBF Closed QBF: All variables quantified; answer is True or False. Open QBF: Contains


  1. Extending DPLL-Based QBF Solvers to Handle Free Variables Will Klieber , Mikol´ aˇ s Janota, Joao Marques-Silva, Edmund Clarke July 9, 2013 1

  2. Open QBF ◮ Closed QBF: All variables quantified; answer is True or False. ◮ Open QBF: Contains free (unquantified) variables. ◮ Goal: Find equivalent propositional formula. ◮ E.g., given ∃ x. x ∧ ( y ∨ z ) , return y ∨ z . 2

  3. Open QBF ◮ Closed QBF: All variables quantified; answer is True or False. ◮ Open QBF: Contains free (unquantified) variables. ◮ Goal: Find equivalent propositional formula. ◮ E.g., given ∃ x. x ∧ ( y ∨ z ) , return y ∨ z . ◮ Applications: symbolic MC, synthesis from formal spec, etc. 2

  4. Outline ◮ Na¨ ıve Algorithm ◮ Introduce sequents that generalize clauses for open QBF in CNF (without ghost variables) ◮ Experimental results ◮ Ghost variables : see paper. 3

  5. Na¨ ıve Algorithm ◮ Notation: “ ite( x, φ 1 , φ 2 ) ” is a formula with an if-then-else : ite( x, φ 1 , φ 2 ) = ( x ∧ φ 1 ) ∨ ( ¬ x ∧ φ 2 ) 4

  6. Na¨ ıve Algorithm ◮ Notation: “ ite( x, φ 1 , φ 2 ) ” is a formula with an if-then-else : ite( x, φ 1 , φ 2 ) = ( x ∧ φ 1 ) ∨ ( ¬ x ∧ φ 2 ) ◮ Recursively Shannon-expand on free variables: Φ = ite( x, Φ | x = True , Φ | x = False ) 4

  7. Na¨ ıve Algorithm ◮ Notation: “ ite( x, φ 1 , φ 2 ) ” is a formula with an if-then-else : ite( x, φ 1 , φ 2 ) = ( x ∧ φ 1 ) ∨ ( ¬ x ∧ φ 2 ) ◮ Recursively Shannon-expand on free variables: Φ = ite( x, Φ | x = True , Φ | x = False ) ◮ Base case (no more free variables): Give to closed-QBF solver. 4

  8. Na¨ ıve Algorithm function solve( Φ ) { 1. if ( Φ has no free variables) 2. 3. return closed qbf solve( Φ ); 7. } 5

  9. Na¨ ıve Algorithm function solve( Φ ) { 1. if ( Φ has no free variables) 2. 3. return closed qbf solve( Φ ); 4. x := (a free variable in Φ ) ; 5. return ite(x, solve( Φ | x = True ), 6. solve( Φ | x = False )); 7. } 5

  10. Na¨ ıve Algorithm function solve( Φ ) { 1. if ( Φ has no free variables) 2. 3. return closed qbf solve( Φ ); 4. x := (a free variable in Φ ) ; 5. return ite(x, solve( Φ | x = True ), 6. solve( Φ | x = False )); 7. } Builds OBDD if: 1. same branch order, 2. formula construction is memoized, and 3. ite( x, φ, φ ) is simplified to φ . 5

  11. Na¨ ıve Algorithm ◮ Na¨ ıve Algorithm: ◮ Similar to DPLL in terms of branching. ◮ But lacks many optimizations that make DPLL fast: ◮ Non-chronological backtracking ◮ Clause learning ◮ Our open-QBF technique: ◮ Extend existing closed-QBF algorithm to allow free variables. 6

  12. Preliminaries ◮ Prenex Form: Q 1 � x 1 ...Q n � x n . φ where φ has no quantifiers. 7

  13. Preliminaries ◮ Prenex Form: Q 1 � x 1 ...Q n � x n . φ where φ has no quantifiers. ◮ In ∀ x. ∃ y. φ , we say that y is downstream of x . ◮ ∃ y occurs inside scope of ∀ x . 7

  14. Preliminaries ◮ Prenex Form: Q 1 � x 1 ...Q n � x n . φ where φ has no quantifiers. ◮ In ∀ x. ∃ y. φ , we say that y is downstream of x . ◮ ∃ y occurs inside scope of ∀ x . ◮ Free variables are upstream of all quantified variables. 7

  15. Preliminaries ◮ Prenex Form: Q 1 � x 1 ...Q n � x n . φ where φ has no quantifiers. ◮ In ∀ x. ∃ y. φ , we say that y is downstream of x . ◮ ∃ y occurs inside scope of ∀ x . ◮ Free variables are upstream of all quantified variables. ◮ We identify assignment π with the set of literals made true by π . ◮ E.g., identify { ( e 1 , True ) , ( u 2 , False ) } with { e 1 , ¬ u 2 } . 7

  16. Preliminaries ◮ Prenex Form: Q 1 � x 1 ...Q n � x n . φ where φ has no quantifiers. ◮ In ∀ x. ∃ y. φ , we say that y is downstream of x . ◮ ∃ y occurs inside scope of ∀ x . ◮ Free variables are upstream of all quantified variables. ◮ We identify assignment π with the set of literals made true by π . ◮ E.g., identify { ( e 1 , True ) , ( u 2 , False ) } with { e 1 , ¬ u 2 } . ◮ Substitution: Φ | π substitutes assigned variables with values (even if bound by quantifier, which gets deleted). 7

  17. QBF as a Game ◮ Existential variables are owned by Player ∃ . ◮ Universal variables are owned by Player ∀ . ◮ Players assign variables in quantification order. ◮ The goal of Player ∃ is to make Φ be true. ◮ The goal of Player ∀ is to make Φ be false. 8

  18. Properties of Clauses and Cubes ◮ Motivate definition of sequents. ◮ If π falsifies all literals in clause C in CNF Φ , then Φ | π = False. 9

  19. Properties of Clauses and Cubes ◮ Motivate definition of sequents. ◮ If π falsifies all literals in clause C in CNF Φ , then Φ | π = False. ◮ If π falsifies all existential literals in clause C in CNF Φ and doesn’t satisfy any universal literals in C , then Φ | π = False. 9

  20. Properties of Clauses and Cubes ◮ Motivate definition of sequents. ◮ If π falsifies all literals in clause C in CNF Φ , then Φ | π = False. ◮ If π falsifies all existential literals in clause C in CNF Φ and doesn’t satisfy any universal literals in C , then Φ | π = False. ◮ If π satisfies all universal literals in a cube C in a DNF Φ and doesn’t falsify any existential literals in C , then Φ | π = True. 9

  21. Properties of Clauses and Cubes ◮ Motivate definition of sequents. ◮ If π falsifies all literals in clause C in CNF Φ , then Φ | π = False. ◮ If π falsifies all existential literals in clause C in CNF Φ and doesn’t satisfy any universal literals in C , then Φ | π = False. ◮ If π satisfies all universal literals in a cube C in a DNF Φ and doesn’t falsify any existential literals in C , then Φ | π = True. ◮ Tautological clauses learned via long-distance resolution? (Assuming ∀ -reduction is done only on-the-fly, during unit prop.) 9

  22. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . 10

  23. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . ◮ E.g., �{ e } , { u }� matches { e } and { e, u } , 10

  24. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . ◮ E.g., �{ e } , { u }� matches { e } and { e, u } , but does not match {} or { e, ¬ u } . 10

  25. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . ◮ E.g., �{ e } , { u }� matches { e } and { e, u } , but does not match {} or { e, ¬ u } . ◮ � L now , { ℓ, ¬ ℓ }� matches π only if π doesn’t assign ℓ . 10

  26. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . ◮ Definition. “ � L now , L fut � | = (Φ ⇔ ψ ) ” means “for all assignments π that match � L now , L fut � , Φ | π is logically equivalent to ψ | π unless π is a don’t-care assignment”. 11

  27. � L now , L fut � Sequents ◮ Definition. A game-state specifier is a pair � L now , L fut � consisting of two sets of literals, L now and L fut . ◮ Definition. We say that � L now , L fut � matches assignment π iff: 1. for every literal ℓ in L now , ℓ | π = True, and 2. for every literal ℓ in L fut , either ℓ | π = True or ℓ �∈ vars( π ) . ◮ Definition. “ � L now , L fut � | = (Φ ⇔ ψ ) ” means “for all assignments π that match � L now , L fut � , Φ | π is logically equivalent to ψ | π unless π is a don’t-care assignment”. ◮ Without ghost literals: No assignments are don’t-care. ◮ With ghost literals: Some assignments are don’t-care. 11

  28. Correspondence of Sequents to Clauses and Cubes ◮ Consider a QBF with existential literals e 1 ... e n and universal literals u 1 ... u m . ◮ Clause ( e 1 ∨ ... ∨ e n ∨ u 1 ∨ ... ∨ u m ) in CNF Φ in corresponds to sequent �{¬ e 1 , ..., ¬ e n } , {¬ u 1 , ..., ¬ u m }� | = (Φ in ⇔ False ) . 12

Recommend


More recommend