Skip to main content
Log in

Quantifier Reordering for QBF

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

State-of-the-art procedures for evaluating quantified Boolean formulas often expect input formulas in prenex conjunctive normal form (PCNF). We study dependency schemes as a means of reordering the quantifier prefix of a PCNF formula while preserving its truth value. Dependency schemes associate each formula with a binary relation on its variables (the dependency relation) that imposes constraints on certain operations manipulating the formula’s quantifier prefix. We prove that known dependency schemes support a stronger reordering operation than was previously known. We present an algorithm that, given a formula and its dependency relation, computes a compatible reordering with a minimum number of quantifier alternations. In combination with a dependency scheme that can be computed in polynomial time, this yields a polynomial time heuristic for reducing the number of quantifier alternations of an input formula. The resolution-path dependency scheme is the most general dependency scheme introduced so far. Using an interpretation of resolution paths as directed paths in a formula’s implication graph, we prove that the resolution-path dependency relation can be computed in polynomial time.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

Notes

  1. Van Gelder [16] offers two definitions of resolution paths (Definitions 4.1 and 5.2). The first one does not lead to a dependency scheme, so we base our considerations on the second definition. We elaborate on this in Example 3.

References

  1. Atserias, A., Oliva, S.: Bounded-width QBF is PSPACE-complete. In: Portier, N., Wilke, T. (eds.) 30th International Symposium on Theoretical Aspects of Computer Science, STACS 2013, February 27–March 2, Kiel, Germany, Volume 20 of LIPIcs, pp. 44–54. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2013)

  2. Biere, A., Cimatti, A., Clarke, E.M., Zhu, Y.: Symbolic model checking without bdds. In: Cleaveland, R. (eds.) 5th International Conference in Tools and Algorithms for Construction and Analysis of Systems (TACAS ’99), Held as Part of the European Joint Conferences on the Theory and Practice of Software (ETAPS ’99), Amsterdam, The Netherlands, March 22–28, Proceedings, Volume 1579 of Lecture Notes in Computer Science, pp. 193–207. Springer, Berlin (1999)

  3. Biere, A., Lonsing, F.: Integrating dependency schemes in search-based QBF solvers. In: Strichman, O., Szeider, S. (eds.) Theory and Applications of Satisfiability Testing—(SAT 2010), Volume 6175 of Lecture Notes in Computer Science, pp. 158–171. Springer, Berlin (2010)

  4. Biere, A., Lonsing, F., Seidl, M.: Blocked clause elimination for QBF. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) International Conference on Automated Deduction—(CADE 23), Volume 6803 of Lecture Notes in Computer Science, pp. 101–115. Springer, Berlin (2011)

  5. Bjesse, P., Leonard, T., Mokkedem, A.: Finding bugs in an alpha microprocessor using satisfiability solvers. In: Berry, G., Comon, H., Finkel, A. (eds.) Computer Aided Verification: Proceedings of the 13th International Conference (CAV 2001), Paris, France, July 18–22, pp. 454–464 (2001)

  6. Kleine Büning, H., Karpinski, M., Flögel, A.: Resolution for quantified Boolean formulas. Inf. Comput. 117(1), 12–18 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  7. Kautz, H., Selman, B.: Pushing the envelope: planning, propositional logic, and stochastic search. In: Proceedings of the Thirteenth AAAI Conference on Artificial Intelligence (AAAI ’96), pp. 1194–1201. AAAI Press, Palo Alto (1996)

  8. Kleine Büning, H., Lettman, T.: Propositional Logic: Deduction and Algorithms. Cambridge University Press, Cambridge (1999)

    MATH  Google Scholar 

  9. Lonsing, F.: Dependency Schemes and Search-Based QBF Solving: Theory and Practice. Ph.D. thesis, Johannes Kepler University, Linz, Austria (2012)

  10. Prasad, A.G.M., Biere, A.: A survey of recent advances in SAT-based formal verification. Softw. Tools Technol. Transf. 7(2), 156–173 (2005)

    Article  Google Scholar 

  11. Pan, G., Vardi, M.Y.: Fixed-parameter hierarchies inside PSPACE. In: Proceedings of the 21th IEEE Symposium on Logic in Computer Science (LICS 2006), 12–15 August, Seattle, WA, USA, pp. 27–36. IEEE Computer Society, Los Alamitos (2006)

  12. Samer, M., Szeider, S.: Backdoor sets of quantified Boolean formulas. J. Autom. Reason. 42(1), 77–97 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  13. Slivovsky, F., Szeider, S.: Computing resolution-path dependencies in linear time. In: Cimatti, A., Sebastiani, R. (eds.) Theory and Applications of Satisfiability Testing—SAT 2012, Volume 7317 of Lecture Notes in Computer Science, pp. 58–71. Springer, Berlin (2012)

  14. Slivovsky, F., Szeider, S.: Variable dependencies and Q-resolution. In: Sinz, C., Egly, U. (eds.) Theory and Applications of Satisfiability Testing—SAT 2014, Volume 8561 of Lecture Notes in Computer Science, pp. 269–284. Springer, Berlin (2014)

  15. Stockmeyer, L.J.: The polynomial-time hierarchy. Theor. Comput. Sci. 3(1), 1–22 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  16. Van Gelder, A.: Variable independence and resolution paths for quantified Boolean formulas. In: Lee, J. (eds.) Principles and Practice of Constraint Programming—CP 2011, Volume 6876 of Lecture Notes in Computer Science, pp. 789–803. Springer, Berlin (2011)

Download references

Acknowledgments

This research was supported by the European Research Council (ERC), Project Complex Reason 239962.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Friedrich Slivovsky.

Appendix: Linear-Time Implementation of Algorithm 1

Appendix: Linear-Time Implementation of Algorithm 1

Proof

(of Lemma 3) Let D be a proto-dependency scheme and \(\varPhi \) be PCNF formula. Let \(n = |{ var }(\varPhi )|\) and \(m = |D_{\varPhi }|\). Consider an execution of Algorithm 1 on input \((\varPhi , D_{\varPhi })\). We are going to assume that \(G(\varPhi ,D)\) is represented by separate adjacency lists for outgoing and incoming edges (such a representation can be computed from \(\varPhi \) and \(D_{\varPhi }\) in linear time). By processing the vertices of \(G(\varPhi ,D)\) in reverse-topological order, we can compute the number of incoming edges \( in (x)\), as well as the length l(x) of a maximum-length path in \(G(\varPhi ,D)\) starting at x, for each \(x \in { var }(\varPhi )\). This can be done in time \(O(n+m)\). We can then compute the sets \(X_{\forall } = \{\,x \in { var }_{\forall }(\varPhi ) \;{:}\; in (x) = 0 \,\}\) and \(X_{\exists } = \{\,x \in { var }_{\exists }(\varPhi ) \;{:}\; in (x) = 0 \,\}\) of existentially and universally quantified variables without incoming edges in time O(n).

For each vertex x, we also store a flag \( active (x) \in \{0,1\}\) to encode the characteristic function of V(G) for the remaining (induced) subdigraph G of \(G(\varPhi ,D)\). To check whether \(V(G) \ne \emptyset \), we maintain a counter c that we initially set to n. Initially, \( active (x)\) is set to 1 for each \(x \in { var }(\varPhi )\). Finally, we sort the variables in \(\varPhi \) with respect to l(x), in decreasing order. Because \(0 \le l(x) \le n - 1\) for each \(x \in { var }(\varPhi )\), we can do this in linear time by creating a bin \(B_l\) for each l with \(0 \le l \le n - 1\), putting each \(x \in { var }(\varPhi )\) in bin \(B_{l(x)}\), and then emptying the bins in descending order. Let \(x_1 \ldots x_n\) be the corresponding sequence of variables. We maintain a pointer p to an element in this sequence that we set to 1 initially. The following properties hold: (1) \(x_p\) is the initial vertex of a longest path in G, (2) \(X_{\forall }\) and \(X_{\exists }\) are the sets of universally and existentially quantified variables without incoming edges in G, (3) \(c = |V(G)|\), and (4) \( active \) encodes the characteristic function of V(G). Moreover, (5) if \(x \in V(G)\) then l(x) is the length of a longest path in G starting from x, and (6) \( in (x)\) is the number of incoming edges for x.

To maintain these properties, we implement the while loop in the following way. Let \(Q = q(x_p)\). We set \(X := X_{Q}\) as well as \(X_{Q} := \emptyset \). We then go through X in an arbitrary order \(y_1, \ldots , y_{|X|}\) and do the following for each \(y_i\). We set \( active (y_i) := 0\), \(P^{\prime } := P^{\prime } Q y_i\), and decrement the counter c by one. For each \(y \in N^+_G(y_i)\) we set \( in (y) := in (y) - 1\). Whenever \( in (y)\) reaches 0 we add y to \(X_{q(y)}\). Finally, if \(c > 0\), we increase p until \( active (x_p) = 1\).

This implementation of the loop body maintains (3), (4), and (6). Let G and \(G^{\prime }\) denote the remaining subdigraphs before and after an execution of the loop, respectively. Similarly, let \(\alpha \) and \(\alpha ^{\prime }\) denote the values of variable \(\alpha \) before and after. Let \(\overline{\exists } = \forall \) and \(\overline{\forall } = \exists \). The set \(X_{\overline{q(x_p)}}^{\prime }\) contains the vertices in \(X_{\overline{q(x_p)}}\) plus any vertex in G all whose incoming edges are contained in X, which is just the set of vertices of \(G^{\prime }\) without incoming edges. There cannot be a vertex x in \(G^{\prime }\) such that x has no incoming edges and \(q(x) = q(x_p)\) (since the ones in G are contained in X and removal of X does not create new ones), so \(X_{q(x_p)}\) is indeed the empty set and (2) is maintained. Moreover, if \(x \in V(G^{\prime })\), then l(x) is still the length of a longest path in \(G^{\prime }\) starting at x: since \(G^{\prime }\) contains no additional edges, the length of a longest path starting from x cannot be bigger than l(x). Let \(xy_1 \ldots y_{l(x)}\) be a path in G. By assumption, \(x \in V(G^{\prime }) \subseteq V(G)\), so each \(y_i\) with \(i \in [l(x)]\) has an incoming edge in G and therefore \(y_i \notin X\). This means \(xy_1 \ldots y_{l(x)}\) is a path in \(G^{\prime }\), so l(x) is indeed the length of a longest path in \(G^{\prime }\) starting from x, and (5) is preserved. Because \(l(x_i) \ge l(x_j)\) for \(1 \le i < j \le n\), the vertex \(x_{p^{\prime }}\) is the initial vertex of a longest path in \(G^{\prime }\) (provided that \(V(G) \ne \emptyset \)), so (1) holds as well.

If G is acyclic then \(G^{\prime }\)—which is a subdigraph of G—is also acyclic. Accordingly, since \(G(\varPhi ,D)\) is acyclic by Lemma 1, at any time during the execution the remaining subdigraph of \(G(\varPhi , D)\) is acyclic. Thus the set X computed in the loop body and then removed from the digraph is always nonempty, so the algorithm must terminate. More specifically, every vertex \(v \in G(\varPhi ,D)\) is put into either \(X_{\forall }\) or \(X_{\exists }\) exactly once, and each outgoing edge of v is considered once in updating \( in \). The pointer p assumes each value in \(\{0, \ldots , n-1\}\) at most once. We conclude that the overall runtime is in \(O(n+m)\). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Slivovsky, F., Szeider, S. Quantifier Reordering for QBF. J Autom Reasoning 56, 459–477 (2016). https://doi.org/10.1007/s10817-015-9353-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-015-9353-1

Keywords

Navigation