QRATPre+: Effective QBF Preprocessing via Strong Redundancy Properties

04/29/2019 ∙ by Florian Lonsing, et al. ∙ 0

We present version 2.0 of QRATPre+, a preprocessor for quantified Boolean formulas (QBFs) based on the QRAT proof system and its generalization QRAT+. These systems rely on strong redundancy properties of clauses and universal literals. QRATPre+ is the first implementation of these redundancy properties in QRAT and QRAT+ used to simplify QBFs in preprocessing. It is written in C and features an API for easy integration in other QBF tools. We present implementation details and report on experimental results demonstrating that QRATPre+ improves upon the power of state-of-the-art preprocessors and solvers.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The application of preprocessing prior to the actual solving process is crucial for the performance of most of the quantified Boolean formula (QBF) solvers [17, 19, 20]. Preprocessors aim at decreasing the complexity of a given formula with respect to the number of variables, the number of clauses, or the number of quantifier blocks. Contrary to complete QBF solvers, preprocessors are incomplete but can detect redundant parts of the given formula by applying resource-restricted reasoning. Bloqqer [6] and HQSpre [25] are leading preprocessors which show their power in the yearly QBFEVAL competitions111http://www.qbflib.org/index_eval.php in potentially almost doubling the number of instances solved by certain state-of-the-art solvers. These tools apply a diverse set of redundancy elimination techniques.

We present QRATPre+ 2.0,222QRATPre+ is licensed under GPLv3: https://lonsing.github.io/qratpreplus/ a QBF preprocessor based on the proof system [18]. QRATPre+ processes QBFs in prenex conjunctive normal form (PCNF) and eliminates redundant clauses and universal literals. Redundancy checking relies on redundancy properties defined by the proof system, which is a generalization of the (quantified resolution asymmetric tautology) proof system [7, 9]. is a lifting of (D)RAT [11, 24] from the propositional to the QBF level, and it simulates virtually all simplification rules applied in state-of-the-art QBF preprocessors. This is made possible by strong redundancy properties.

However, the strong redundancy properties of have not been applied to preprocess QBFs so far. With QRATPre+ we close this gap and leverage the power of and for QBF preprocessing. Compared to the initially released version 1.0, version 2.0 comes with a more modularized code base and a C API that allows to easily integrate QRATPre+ in other tools. QRATPre+ currently applies only rewrite rules of the and proof systems that remove either clauses or universal literals from a PCNF. That is, it does not attempt to add redundant parts with the aim to potentially enable further simplifications later on. Despite this fact, experimental results with benchmarks from QBFEVAL’18 clearly indicate the effectiveness of QRATPre+. It improves on state-of-the-art preprocessors, such as Bloqqer and HQSpre, and solvers in terms of formula size reduction and solved instances, respectively.

2 Redundancy Checking for Preprocessing

QRATPre+ eliminates redundant clauses and universal literals within clauses from a QBF in PCNF. Redundancy checking in QRATPre+ relies on redundancy properties defined by the proof system. We present only informally and refer to related work instead [18].

Let be a PCNF with prefix , where are quantifier blocks (qblocks) consisting of a quantifier and a block (i.e., set) of variables. We write for . Index is the nesting level of qblock and of the variables in . Formula is in CNF, where is a clause in containing literal . We consider only PCNFs without tautological clauses of the form for some propositional variable .

Given a clause in , checking whether or the literal is redundant requires to consider all clauses in the resolution neighborhood of with respect to , cf. [11, 12, 13]. This is illustrated in Fig. 1. Given and some , we first compute the outer resolvent of and on literal  [9]. Then we determine the maximum nesting level of variables appearing in . Based on we construct the PCNF by converting all universal quantifiers in the subprefix to existential ones. The resulting PCNF is an abstraction of .

We add the negation of the outer resolvent , which is a set of unit clauses, to the abstraction to obtain the formula . Finally, we check whether a conflict, i.e., the empty clause , is derived by applying QBF unit propagation (QBCP) [3, 5, 15, 26] to . If so, which we denote by , then the current outer resolvent has the quantified asymmetric tautology (QAT) [18] redundancy property.

If all possible outer resolvents of and clauses in the resolution neighborhood of with respect to literal have the property, then clause has the redundancy property on literal . In this case, either or is redundant, depending on whether is existential or universal, respectively. Note that in general, for every outer resolvent , the index for which the abstraction is constructed may be different.

Eliminating redundant clauses or universal literals via the above workflow is denoted by and , respectively. In QRATPre+, we apply the and rewrite rules for preprocessing. The redundancy property [9] differs from  [18] in that for always a full abstraction with is constructed, regardless of the actual maximum nesting level of variables in the current outer resolvent . Moreover, relies on QBCP which includes the universal reduction operation [14] to temporarily shorten clauses during propagation. This way, potentially more conflicts are derived. In contrast to that, applies propositional unit propagation to abstractions where all variables are existential. Due to that, the redundancy property is more general and stronger than .

Figure 1: Redundancy checking of clause based on . The resolution neighborhood of consists of the clauses with shown on top. The boxes indicate the pair of clauses for which the current outer resolvent is computed.

3 Implementation Details

Algorithm 1 shows the high-level workflow implemented in QRATPre+. To limit the computational costs of the relative expensive techniques and , which are based on QBCP, we apply cheaper ones first to reduce the formula size upfront. In quantified blocked clause elimination (QBCE) [1], which is a restriction of , it is checked whether every outer resolvent (cf. Fig. 1) contains a pair of complementary literals. Blocked literal elimination (BLE) [8] is a restriction of and, like , checks for complementary literals in outer resolvents. Before checking whether some clause has the property, we check whether it has the property. This is done analogously to checking whether an outer resolvent has the property in testing (cf. Section 2). checking is necessary in the workflow since it is not subsumed by .

During clause elimination, all clauses found redundant in the current PCNF  are cleaned up lazily in one pass after an application of a technique. In

Input:    PCNF .
Output: Simplified PCNF .
1 ;
2 do
       // clause elimination
3       ;
4       ;
5       ;
       // literal elimination
6       ;
7       ;
9while  changed;
Algorithm 1 QRATPre+ workflow.

literal elimination, redundant literals are cleaned up eagerly since clauses are shortened, which increases chances to detect conflicts in QBCP.

If the redundancy check fails for some clause with literal and clause in the resolution neighborhood of , we mark as a witness for that failure. If a witness is found redundant then all clauses in , for all literals , are scheduled for being checked in the next iteration as has prevented at least one of these clauses from being detected before. This witness-based scheduling potentially avoids superfluous redundancy checks. In our experiments the median number of clauses being checked in a run of QRATPre+ on a given PCNF was only by a factor of 3.3 larger than the initial number of clauses in the PCNF.

We maintain the index indicating the maximum nesting level of variables in the current outer resolvent being tested (cf. Fig. 1). Any variable with an index smaller than is treated as an existential one during QBCP. This way, abstractions are constructed implicitly. For QBCP, we implemented standard two-literal watching [4]. However, when assignments are retracted after deriving a conflict, then in general the literal watchers have to be restored to literals which are existential in the input PCNF rather than in the current abstraction. Restoring literal watchers in our implementation is necessary to maintain certain invariants, in contrast to, e.g., QBCP in QCDCL solvers.

Compared to version 1.0, version 2.0 of QRATPre+ comes with a C API that allows for easy integration in other tools. The API provides functions to import and export PCNFs and to configure the preprocessing workflow. Options include switches to toggle the individual redundancy tests in the main loop, user-defined limits, and shuffling the orderings in which clauses are tested. Shuffling may affect the result of preprocessing since the , and rewrite rules are not confluent. In the default configuration, QRATPre+ does not shuffle clauses and applies rewrite rules until saturation.

4 Experiments

QRATPre+ improves on state-of-the-art preprocessors and solvers in terms of formula size reduction and solved instances. We ran experiments with the preprocessors Bloqqer v37 [6] and HQSpre 1.3 [25], and the solvers CAQE (commit-ID 9b95754 on GitHub) [22, 23], RAReQS 1.1 [10], Ijtihad v2 [2], Qute 1.1 [21], and DepQBF 6.03 [16]. The solvers implement different solving paradigms, e.g., QCDCL (Qute and DepQBF), expansion (RAReQS and Ijtihad), and clausal abstraction (CAQE).

The following experiments were run on a cluster of Intel Xeon CPUs (E5-2650v4, 2.20 GHz) running Ubuntu 16.04.1. We used the 463 instances from the PCNF track of QBFEVAL’18. In all our experiments, we allowed 600s CPU time and 7 GB of memory for each call of Bloqqer, HQSpre, or QRATPre+. For formulas where Bloqqer or HQSpre exceeded these limits, we considered the original, unpreprocessed formula. In contrast to Bloqqer and HQSpre, we implemented a soft time limit in QRATPre+ which, when exceeding the limit, allows to print the preprocessed formula with identified redundant parts being removed.

Table 1 shows the effect of preprocessing by QRATPre+ (Q), Bloqqer (B), HQSpre (H), and combinations, where QRATPre+ is called before (QB, QH) or after

#cl 79 78 23 70 69 18 17
#qb 92 22 17 21 22 59 17
#l 82 85 27 80 77 20 21
#l 73 95 74 82 86 44 53
Table 1: Effect of preprocessing.

(BQ, HQ) Bloqqer or HQSpre. The table shows average numbers of clauses (#cl), qblocks (#qb), existential (#l) and universal literals (#l) as a percentage relative to the original benchmark set. Except for qblocks, QRATPre+ considerably further reduces the formula size when combined with both Bloqqer (B vs. QB and BQ) and HQSpre (H vs. QH and HQ). These results include solved instances: QRATPre+, Bloqqer, and HQSpre solve 18, 74, and 158 original instances, respectively. The preprocessors timed out on 12 (HQSpre), 38 (Bloqqer), and 59 (QRATPre+, soft time limit) original instances.

The application of computationally inexpensive techniques like and to shrink the PCNF before applying more expensive ones like and pays off. With the original workflow (Algorithm 1 and column Q in Table 1), QRATPre+ spends 96s on average per instance, compared to 120s when disabling and , where it exceeds the time limit on 77 instances.

Shuffling the ordering of clauses before applying and in Algorithm 1 based on five different random seeds hardly had any effect on the aggregate data in column Q in Table 1, except for an increase in eliminated universal literals by one percent. When using the redundancy property of , which is weaker than the one of , by constructing full abstractions (cf. Section 2), we observed a moderate decrease of all four metrics by one percent each.

Solver S U Time
CAQE 151 107 44 11 586K
DepQBF 149 87 62 50 592K
RAReQS 147 115 32 4 588K
Ijtihad 132 111 21 2 609K
Qute 98 79 19 6 665K
(a) Original instances.
Solver S U Time
CAQE 211 135 76 29 487K
RAReQS 178 120 58 9 533K
DepQBF 165 83 82 33 562K
Ijtihad 156 111 45 1 562K
Qute 137 92 45 9 598K
(b) QRATPre+ only (Q).
Solver S U Time
CAQE 269 150 119 24 383K
RAReQS 258 159 99 7 399K
Ijtihad 200 128 72 4 482K
DepQBF 198 99 99 21 501K
Qute 189 114 75 2 512K
(c) Bloqqer only (B).
Solver S U Time
CAQE 290 169 121 37 347K
RAReQS 260 163 97 5 390K
Ijtihad 216 140 76 2 456K
DepQBF 210 107 103 21 481K
Qute 197 119 78 2 493K
(d) QRATPre+ and Bloqqer (QB).
Solver S U Time
CAQE 322 183 139 21 290K
RAReQS 292 180 112 2 317K
DepQBF 270 160 110 20 364K
Qute 253 161 92 3 390K
Ijtihad 249 167 82 0 394K
(e) HQSpre only (H).
Solver S U Time
CAQE 325 188 137 14 279K
RAReQS 303 189 114 3 304K
DepQBF 271 158 113 20 362K
Qute 263 170 93 2 377K
Ijtihad 245 166 79 0 407K
(f) HQSpre and QRATPre+ (HQ).
Table 2: QBFEVAL’18: solved instances (S), unsatisfiable (), satisfiable (), and uniquely solved ones (U), and total CPU time in kiloseconds (K) including time outs.

Tables (a)a to (f)f show the numbers of instances solved after preprocessing with different combinations of QRATPre+, Bloqqer, and HQSpre. We used a limit of 1800s CPU time and 7 GB of memory for solving. Times for preprocessing are not included in the times reported in the tables. Preprocessing by QRATPre+ increases the number of solved instances in most cases, except for Ijtihad on instances preprocessed with HQSpre and QRATPre+ (Tables (e)e and (f)f). Similar to formula size reduction shown in Table 1, the ordering of whether to apply QRATPre+ before or after Bloqqer or HQSpre has an impact on solving performance. Interestingly, for all solvers the combination BQ (Bloqqer before QRATPre+) results in a decrease of solved instances compared to QB (QRATPre+ before Bloqqer). We made similar observations for combinations with HQSpre (QH and HQ).333We refer to the appendix for results with combinations BQ and QH.

5 Conclusion

We presented version 2.0 of QRATPre+, a preprocessor for QBFs in PCNF that is based on strong redundancy properties of clauses and universal literals defined by the proof system [18]. is a generalization of the proof system [7, 9]. QRATPre+ is the first implementation of the and redundancy properties for applications in QBF preprocessing. As such, the techniques implemented in QRATPre+ are orthogonal to techniques applied in state-of-the-art preprocessors like Bloqqer and HQSpre. Our experiments demonstrate a considerable performance increase of preprocessing and solving. QRATPre+ comes with a C API that allows easy integration into other tools.

We observed a sensitivity of solvers to the ordering in which QRATPre+ is coupled with other preprocessors. To better understand the interplay between redundancy elimination and the proof systems implemented in solvers, we want to further analyze this phenomenon. We used a simple but effective witness-based scheduling to avoid superfluous redundancy checks. However, with more sophisticated watched data structures the run time of QRATPre+ could be optimized. To enhance the power of redundancy checking, it could be beneficial to selectively add redundant formula parts to enable additional simplifications afterwards.


  • [1] Biere, A., Lonsing, F., Seidl, M.: Blocked Clause Elimination for QBF. In: CADE. LNCS, vol. 6803, pp. 101–115. Springer (2011)
  • [2] Bloem, R., Braud-Santoni, N., Hadzic, V., Egly, U., Lonsing, F., Seidl, M.: Expansion-Based QBF Solving Without Recursion. In: FMCAD. pp. 1–10. IEEE (2018)
  • [3] Cadoli, M., Giovanardi, A., Schaerf, M.: An Algorithm to Evaluate Quantified Boolean Formulae. In: AAAI. pp. 262–267. AAAI Press / The MIT Press (1998)
  • [4] Gent, I.P., Giunchiglia, E., Narizzano, M., Rowley, A.G.D., Tacchella, A.: Watched Data Structures for QBF Solvers. In: SAT. LNCS, vol. 2919, pp. 25–36. Springer (2004)
  • [5] Giunchiglia, E., Narizzano, M., Tacchella, A.: Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas. JAIR 26, 371–416 (2006). https://doi.org/10.1613/jair.1959
  • [6] Heule, M., Järvisalo, M., Lonsing, F., Seidl, M., Biere, A.: Clause Elimination for SAT and QSAT. JAIR 53, 127–168 (2015). https://doi.org/10.1613/jair.4694
  • [7] Heule, M., Seidl, M., Biere, A.: A Unified Proof System for QBF Preprocessing. In: IJCAR. LNCS, vol. 8562, pp. 91–106. Springer (2014)
  • [8] Heule, M., Seidl, M., Biere, A.: Blocked Literals Are Universal. In: NASA Formal Methods. LNCS, vol. 9058, pp. 436–442. Springer (2015)
  • [9]

    Heule, M., Seidl, M., Biere, A.: Solution Validation and Extraction for QBF Preprocessing. J. Autom. Reasoning

    58(1), 97–125 (2017)
  • [10] Janota, M., Klieber, W., Marques-Silva, J., Clarke, E.: Solving QBF with Counterexample Guided Refinement. Artif. Intell. 234, 1–25 (2016)
  • [11] Järvisalo, M., Heule, M., Biere, A.: Inprocessing Rules. In: IJCAR. LNCS, vol. 7364, pp. 355–370. Springer (2012). https://doi.org/10.1007/978-3-642-31365-3
  • [12] Kiesl, B., Seidl, M., Tompits, H., Biere, A.: Super-Blocked Clauses. In: IJCAR. LNCS, vol. 9706, pp. 45–61. Springer (2016)
  • [13] Kiesl, B., Seidl, M., Tompits, H., Biere, A.: Blockedness in Propositional Logic: Are You Satisfied With Your Neighborhood? In: IJCAI. pp. 4884–4888. ijcai.org (2017)
  • [14] Kleine Büning, H., Karpinski, M., Flögel, A.: Resolution for Quantified Boolean Formulas. Inf. Comput. 117(1), 12–18 (1995). https://doi.org/10.1006/inco.1995.1025
  • [15] Letz, R.: Lemma and Model Caching in Decision Procedures for Quantified Boolean Formulas. In: TABLEAUX. LNCS, vol. 2381, pp. 160–175. Springer (2002)
  • [16] Lonsing, F., Egly, U.: DepQBF 6.0: A Search-Based QBF Solver Beyond Traditional QCDCL. In: CADE. LNCS, vol. 10395, pp. 371–384. Springer (2017)
  • [17] Lonsing, F., Egly, U.: Evaluating QBF Solvers: Quantifier Alternations Matter. In: CP. LNCS, vol. 11008, pp. 276–294. Springer (2018)
  • [18] Lonsing, F., Egly, U.: : Generalizing by a More Powerful QBF Redundancy Property. In: IJCAR. LNCS, vol. 10900, pp. 161–177. Springer (2018)
  • [19] Lonsing, F., Seidl, M., Van Gelder, A.: The QBF Gallery: Behind the Scenes. Artif. Intell. 237, 92–114 (2016)
  • [20] Marin, P., Narizzano, M., Pulina, L., Tacchella, A., Giunchiglia, E.: Twelve Years of QBF Evaluations: QSAT Is PSPACE-Hard and It Shows. Fundam. Inform. 149(1-2), 133–158 (2016)
  • [21] Peitl, T., Slivovsky, F., Szeider, S.: Dependency Learning for QBF. In: SAT. LNCS, vol. 10491, pp. 298–313. Springer (2017)
  • [22] Rabe, M.N., Tentrup, L.: CAQE: A Certifying QBF Solver. In: FMCAD. pp. 136–143. IEEE (2015)
  • [23] Tentrup, L.: On Expansion and Resolution in CEGAR Based QBF Solving. In: CAV. LNCS, vol. 10427, pp. 475–494. Springer (2017)
  • [24] Wetzler, N., Heule, M., Hunt, W.A.J.: DRAT-trim: Efficient Checking and Trimming Using Expressive Clausal Proofs. In: SAT. LNCS, vol. 8561, pp. 422–429. Springer (2014)
  • [25] Wimmer, R., Reimer, S., Marin, P., Becker, B.: HQSpre - An Effective Preprocessor for QBF and DQBF. In: TACAS. LNCS, vol. 10205, pp. 373–390. Springer (2017)
  • [26] Zhang, L., Malik, S.: Conflict Driven Learning in a Quantified Boolean Satisfiability Solver. In: ICCAD. pp. 442–449. ACM / IEEE Computer Society (2002)

Appendix 0.A Appendix

0.a.1 Additional Experimental Data

Solver S U Time
CAQE 284 165 119 35 358K
RAReQS 257 161 96 5 399K
DepQBF 204 102 102 17 490K
Ijtihad 197 127 70 3 490K
Qute 184 111 73 1 515K
(a) Bloqqer and QRATPre+ (BQ).
Solver S U Time
CAQE 308 183 125 16 303K
RAReQS 283 178 105 7 340K
DepQBF 251 149 102 23 398K
Qute 244 159 85 3 410K
Ijtihad 231 159 72 2 428K
(b) QRATPre+ and HQSpre (QH).
Table 3: QBFEVAL’18: solved instances (S), unsatisfiable (), satisfiable (), and uniquely solved ones (U), and total CPU time in kiloseconds (K) including time outs.