CAQE: A Certifying QBF Solver FMCAD Austin, Texas, September 29 2015 1 / 15 Markus N. Rabe 1 Leander Tentrup 2 1 University of California at Berkeley, 2 Saarland University
Quantified boolean formulas 2 / 15 ▶ TrueQBF is the prototypical PSPACE problem ▶ Compact version of SAT ▶ Verification/synthesis/artificial intelligence
Contribution - A QBF Algorithm 3 / 15 ▶ Simple and CEGAR-based ( ∼ 3K loc w/o SAT solver) ▶ Competitive performance ▶ Produces certificates ▶ Handles deep quantifier alternations
QBF - Example true This formula is true! z z false Case y z z Case y z y z y y z true Choose x 4 / 15 ∃ x ∀ y ∃ z : ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z )
QBF - Example Case y true z z Case y false z z This formula is true! 4 / 15 ∃ x ∀ y ∃ z : ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) Choose x = true : ∀ y ∃ z : ( y ∨ z ) ∧ ( y ∨ z )
This formula is true! QBF - Example 4 / 15 ∃ x ∀ y ∃ z : ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) Choose x = true : ∀ y ∃ z : ( y ∨ z ) ∧ ( y ∨ z ) Case y = true : ∃ z : z Case y = false : ∃ z : z
This formula is true! QBF - Example 4 / 15 ∃ x ∀ y ∃ z : ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) ∧ ( x ∨ y ∨ z ) Choose x = true : ∀ y ∃ z : ( y ∨ z ) ∧ ( y ∨ z ) Case y = true : ∃ z : z Case y = false : ∃ z : z
Clausal abstractions y z y x t b y t b t Construct one SAT solver per quantifier level. b t b t b y t b 5 / 15 ∃ x ∀ y ∃ z : ( x ∨ ∨ z ) ( x ∨ ∨ z ) ( x ∨ ∨ z )
Clausal abstractions y z y x t b y t b t Construct one SAT solver per quantifier level. b t b t b y t b 5 / 15 ∃ x ∀ y ∃ z : ( x ∨ ∨ z ) ( x ∨ ∨ z ) ( x ∨ ∨ z )
Clausal abstractions Construct one SAT solver per quantifier level. z y x t b y t b 5 / 15 t b y t b ∃ x ∀ y ∃ z : ( x ∨ b 1 ) ( t 1 → ( y → b 1 )) ( t 1 ∨ z ) ( x ∨ ∨ z ) ( x ∨ ∨ z )
Clausal abstractions Construct one SAT solver per quantifier level. x y z 5 / 15 ∃ x ∀ y ∃ z : ( x ∨ b 1 ) ( t 1 → ( y → b 1 )) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 → ( y → b 2 )) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 → ( y → b 3 )) ( t 3 ∨ z )
Clausal abstractions Construct one SAT solver per quantifier level. x y z 5 / 15 ∃ x ∀ y ∃ z : ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z )
Clausal abstractions Construct one SAT solver per quantifier level. 5 / 15 ∃ x ∀ y ∃ z : ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
clauses that have been satisfied already . Clausal abstractions - general case Let t be a assignment to the variables t i . Represents the (result, minimized assumptions, unsat core over assumptions) Return value: t Q n X n X m solve t Q n X n X m solve Two algorithms: 6 / 15 C i C i Given Q 1 X 1 . . . Q n X n : ∧ C i (( ∨ ) ) ∧ ∨ t i ∨ b i ϕ ∃ X m = l ∈ C i , level ( l )= m l ( ∧ ) ∧ ϕ ∀ X m = l ∈ C i , level ( l )= m ( l ∨ t i )
Clausal abstractions - general case C i (result, minimized assumptions, unsat core over assumptions) Return value: Two algorithms: Let t be a assignment to the variables t i . Represents the 6 / 15 C i Given Q 1 X 1 . . . Q n X n : ∧ C i (( ∨ ) ) ∧ ∨ t i ∨ b i ϕ ∃ X m = l ∈ C i , level ( l )= m l ( ∧ ) ∧ ϕ ∀ X m = l ∈ C i , level ( l )= m ( l ∨ t i ) clauses that have been satisfied already . ▶ solve ∃ ( ∃ X m . . . Q n X n : ψ, t ) ▶ solve ∀ ( ∀ X m . . . Q n X n : ψ, t )
Algorithm 6: 13: else 12: 11: 10: 9: 7: 8: 7 / 15 3: 2: while true do 4: 5: 1: procedure solve ∃ ( ∃ X . Ψ , t ) result , b , failed ← sat ( ϕ X , t ) if result = UNSAT then return UNSAT , _ , failed else if Ψ is propositional then return SAT , t , _ t b ← { t i | b i / ∈ b , 1 ≤ i ≤ k } result , t ′ , failed ′ ← solve ∀ (Ψ , t ∪ t b ) if result = UNSAT then ϕ X ← ϕ X ∧ ( ∨ t ∈ failed ′ ¬ b t ) return SAT , t ′ , _
Algorithm (2) 6: 10: else 9: 8: 7: 8 / 15 5: 4: 3: while true do 2: 1: procedure solve ∀ ( ∀ X . Ψ , t ) result , t ′ , failed ← sat ( ϕ X , t + ) if result = UNSAT then return SAT , failed , _ result , t ′′ , failed ′ ← solve ∃ (Ψ , t ′ ) if result = SAT then ϕ X ← ϕ X ∧ ( ∨ t ∈ t ′′ ¬ t ) return UNSAT , _ , failed ′
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments t 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∃ x ϕ ∀ y ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments refine! 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∀ y ∧ t 2 ϕ ∃ x ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∀ y ∧ t 2 ϕ ∃ x ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∀ y ∧ t 2 ϕ ∃ x ϕ ∃ z
Example (2) t Interface variable assumptions Interface variable assignments Variable assignments 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∀ y ∧ t 2 ϕ ∃ x ϕ ∃ z
Example (2) refine! Interface variable assumptions Interface variable assignments Variable assignments 9 / 15 ( x ∨ b 1 ) ( t 1 ∨ y ) ( t 1 ∨ z ) ( x ∨ b 2 ) ( t 2 ∨ y ) ( t 2 ∨ z ) ( x ∨ b 3 ) ( t 3 ∨ y ) ( t 3 ∨ z ) ϕ ∀ y ∧ t 2 ∧ t 3 ϕ ∃ x ϕ ∃ z
Certification t r SAT skolem.aig x SAT SAT t x SAT t 1 x SAT u d u d u d u u SAT u SAT 1 e 3 CAQE 2 cap2aig 3 check_strategy 4 p cnf 3 3 e 1 a 2 1 2 -3 0 u SAT -1 2 -3 0 -1 -2 3 0 p cap 3 3 d d 6 -3 u SAT d 4 5 3 10 / 15
Certification t r SAT skolem.aig x SAT SAT t x SAT t 1 x SAT u d u d u d u u SAT u SAT 1 e 3 CAQE 2 cap2aig 3 check_strategy 4 p cnf 3 3 e 1 a 2 1 2 -3 0 u SAT -1 2 -3 0 -1 -2 3 0 p cap 3 3 d d 6 -3 u SAT d 4 5 3 10 / 15
Certification p cap 3 3 skolem.aig r SAT u SAT 1 u SAT u SAT 4 5 3 1 u SAT 6 -3 d d d -1 -2 3 0 check_strategy -1 2 -3 0 2 cap2aig 3 CAQE 4 1 2 -3 0 p cnf 3 3 10 / 15 e 3 a 2 e 1 ↑ u ⟨∅ , { x 1 } , SAT ⟩ ↓ d ↑ u ⟨∅ , ∅ , SAT ⟩ ↙ d ↖ u ↗ u ↘ d ⟨{ t 3 } , { x 3 } , SAT ⟩ ⟨{ t 1 , t 2 } , { x 3 } , SAT ⟩
Certification -1 -2 3 0 skolem.aig r SAT u SAT 1 u SAT u SAT 4 5 3 d 6 -3 d d p cap 3 3 u SAT -1 2 -3 0 check_strategy 1 2 -3 0 CAQE 2 cap2aig 3 1 4 e 3 p cnf 3 3 10 / 15 a 2 e 1 ↑ u ✓ ⟨∅ , { x 1 } , SAT ⟩ ↓ d ↑ u ⟨∅ , ∅ , SAT ⟩ ↙ d ↖ u ↗ u ↘ d ⟨{ t 3 } , { x 3 } , SAT ⟩ ⟨{ t 1 , t 2 } , { x 3 } , SAT ⟩
Recommend
More recommend