Extending DPLL-Based QBF Solvers to Handle Free Variables
Will Klieber, Mikol´ aˇ s Janota, Joao Marques-Silva, Edmund Clarke
July 9, 2013
1
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
◮ 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
◮ 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
◮ Na¨
◮ Introduce sequents that generalize clauses for open QBF in CNF
◮ Experimental results ◮ Ghost variables: see paper.
3
◮ Notation: “ite(x, φ1, φ2)” is a formula with an if-then-else:
4
◮ Notation: “ite(x, φ1, φ2)” is a formula with an if-then-else:
◮ Recursively Shannon-expand on free variables:
4
◮ Notation: “ite(x, φ1, φ2)” is a formula with an if-then-else:
◮ Recursively Shannon-expand on free variables:
◮ Base case (no more free variables): Give to closed-QBF solver.
4
5
5
5
◮ Na¨
◮ 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
◮ Prenex Form: Q1
7
◮ Prenex Form: Q1
◮ In ∀x.∃y. φ, we say that y is downstream of x.
◮ ∃y occurs inside scope of ∀x.
7
◮ Prenex Form: Q1
◮ 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
◮ Prenex Form: Q1
◮ 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 {(e1, True), (u2, False)} with {e1, ¬u2}.
7
◮ Prenex Form: Q1
◮ 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 {(e1, True), (u2, False)} with {e1, ¬u2}. ◮ Substitution: Φ|π substitutes assigned variables with values
7
◮ 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
◮ Motivate definition of sequents. ◮ If π falsifies all literals in clause C in CNF Φ, then Φ|π = False.
9
◮ 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
9
◮ 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
◮ If π satisfies all universal literals in a cube C in a DNF Φ and
9
◮ 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
◮ If π satisfies all universal literals in a cube C in a DNF Φ and
◮ Tautological clauses learned via long-distance resolution?
9
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
10
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
◮ E.g., {e}, {u} matches {e} and {e, u},
10
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
◮ E.g., {e}, {u} matches {e} and {e, u},
10
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
◮ E.g., {e}, {u} matches {e} and {e, u},
◮ Lnow, {ℓ, ¬ℓ} matches π only if π doesn’t assign ℓ.
10
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
◮ Definition. “Lnow, Lfut |
11
◮ Definition. A game-state specifier is a pair Lnow, Lfut
◮ Definition. We say that Lnow, Lfut matches assignment π iff:
◮ Definition. “Lnow, Lfut |
◮ Without ghost literals: No assignments are don’t-care. ◮ With ghost literals: Some assignments are don’t-care.
11
◮ Consider a QBF with existential literals e1 ... en and
◮ Clause (e1 ∨ ... ∨ en ∨ u1 ∨ ... ∨ um) in CNF Φin corresponds to
12
◮ Consider a QBF with existential literals e1 ... en and
◮ Clause (e1 ∨ ... ∨ en ∨ u1 ∨ ... ∨ um) in CNF Φin corresponds to
◮ Cube (e1 ∧ ... ∧ en ∧ u1 ∧ ... ∧ um) in DNF Φin corresponds to
12
◮ Consider a QBF with existential literals e1 ... en and
◮ Clause (e1 ∨ ... ∨ en ∨ u1 ∨ ... ∨ um) in CNF Φin corresponds to
◮ Cube (e1 ∧ ... ∧ en ∧ u1 ∧ ... ∧ um) in DNF Φin corresponds to
◮ Sequents generalize clauses/cubes because
12
◮ “Lnow, Lfut |
◮ “Lnow, Lfut |
13
1
1 |
2
2 |
1
2
1 ∪ Lfut 2 ∪ {r, ¬r} |
14
15
15
15
◮ Let seq be a sequent Lnow, Lfut |
◮ If there is a literal ℓ ∈ Lnow such that
16
◮ Let seq be a sequent Lnow, Lfut |
◮ If there is a literal ℓ ∈ Lnow such that
◮ Propagation ensures that the solver never re-explores areas of the
16
17
17
17
1
1 |
2
2 |
1
1
1 ∪ Lfut 2 )
1
2
1 ∪ Lfut 2 |
18
1
1 |
2
2 |
1
1
1 ∪ Lfut 2 )
1
2
1 ∪ Lfut 2 ∪ {¬r} |
19
◮ Our solver: GhostQ. ◮ Compared to computational-learning solver from:
◮ Benchmarks (from same paper): synthesis from formal
20
21
22
◮ DPLL-based solver for open QBF. ◮ Sequents generalize clauses and cubes. ◮ Generates proof certificates. ◮ Our solver produces unordered BDDs.
◮ Unordered because of unit propagation. ◮ In our experience, often larger than OBDDs.
◮ More details: preprint of CP 2013 paper on Will Klieber’s website.
23