Skip to main content
Log in

On Preprocessing Techniques and Their Impact on Propositional Model Counting

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

Abstract

This paper is concerned with preprocessing techniques for propositional model counting. We have considered several elementary preprocessing techniques: backbone identification, occurrence reduction, vivification, as well as equivalence, AND and XOR gate identification and replacement. All those techniques have been implemented in a preprocessor pmc, freely available on the Web. In order to assess the benefits which can be gained by taking advantage of pmc, we performed many experiments, based on benchmarks coming from several data sets. More precisely, we made a differential evaluation of each elementary preprocessing technique in order to evaluate its impact on the number of variables of the instance, its size, as well as the treewidth of its primal graph. We also considered two combinations of preprocessings: \( eq \), based on equivalence-preserving techniques only, and \({\#eq}\), which additionally exploits techniques preserving only the number of models. Several approaches to model counting have also been considered downstream in our experiments: “direct” model counters, including the exact ones Cachet, sharpSAT, and an approximate one SampleCount, as well as the compilation-based model counters C2D, Dsharp, SDD and cnf2obdd have been used. The experimental results we have obtained show that each elementary preprocessing technique is useful, and that some synergetic effects can be achieved by combining them.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31
Fig. 32
Fig. 33
Fig. 34
Fig. 35
Fig. 36
Fig. 37
Fig. 38
Fig. 39
Fig. 40
Fig. 41
Fig. 42
Fig. 43
Fig. 44
Fig. 45
Fig. 46
Fig. 47
Fig. 48
Fig. 49
Fig. 50
Fig. 51
Fig. 52
Fig. 53
Fig. 54
Fig. 55
Fig. 56
Fig. 57
Fig. 58
Fig. 59
Fig. 60
Fig. 61
Fig. 62
Fig. 63
Fig. 64

Similar content being viewed by others

Notes

  1. In weighted model counting (WMC), each literal is associated with a real number, the weight of an interpretation is the product of the weights of the literals it sets to true, and the weight of a formula is the sum of the weights of its models. Accordingly, WMC amounts to model counting when each literal has weight 1.

  2. d-DNNF is the language of deterministic, decomposable negation normal form formulae; this language supports the model counting query in polynomial time [15].

  3. Literals are degenerate AND gates and degenerate XOR gates; however \(\mathtt {equivSimpl}\) may detect equivalences that would not be detected by \(\mathtt {ANDgateSimpl}\) or by \(\mathtt {XORgateSimpl}\); this explains why \(\mathtt {equivSimpl}\) is used.

  4. “Solved” means that the number of models has been found for all methods but SampleCount, and that an approximation has been computed when SampleCount is considered.

  5. We made similar measurements with the other model counters considered in the paper, and got similar observations. The corresponding results are available from the authors on demand.

  6. Similarly, it is easy to check that the Equivalent Literal Substitution (ELS) technique which consists in computing first the strongly connected components of the binary implication graph of \(\Sigma \), then in replacing in \(\Sigma \) every literal by a representative of its equivalence class is less effective than \(\mathtt {equivSimpl}\).

References

  1. Aloul, F.A., Markov, I.L., Sakallah, K.A.: MINCE: a static global variable-ordering heuristic for SAT search and BDD manipulation. J. UCS 10(12), 1562–1596 (2004)

    Google Scholar 

  2. Apsel, U., Brafman, R.I.: Lifted MEU by weighted model counting. In: Proceedings of AAAI’12 (2012)

  3. Audemard, G., Lagniez, J.-M., Simon, L.: Just-in-time compilation of knowledge bases. In: Proceedings of IJCAI’13, pp. 447–453 (2013)

  4. Audemard, G., Simon, L.: Predicting learnt clauses quality in modern SAT solver. In: Proceedings of IJCAI’09, pp. 399–404 (2009)

  5. Bacchus, F., Winter, J.: Effective preprocessing with hyper-resolution and equality reduction. In: Proceedings of SAT’04, pp. 341–355 (2004)

  6. Bayardo, R.J., Jr. Schrag, R.: Using CSP look-back techniques to solve real-world SAT instances. In: Proceedings of AAAI’97, pp. 203–208 (1997)

  7. Biere, A.: Lingeling essentials, a tutorial on design and implementation aspects of the the SAT solver lingeling. In: Proceedings of POS’14. Fifth Pragmatics of SAT Workshop, a Workshop of the SAT 2014 Conference, Part of FLoC 2014 During the Vienna Summer of Logic, pp. 88 (2014)

  8. Biere, A., Heule, M., van Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability, vol. 185 of Frontiers in Artificial Intelligence and Applications. IOS Press (2009)

  9. Bordeaux, L., Janota, M., Marques-Silva, J., Marquis, P.: On unit-refutation complete formulae with existentially quantified variables. In: Proceedings of KR’12, pp. 75–84 (2012)

  10. Bordeaux L., Marques-Silva, J.: Knowledge compilation with empowerment. In: Proceedings of SOFSEM’12, pp. 612–624 (2012)

  11. Boufkhad, Y., Grégoire, E., Marquis, P., Mazure, B., Saïs, L.: Tractable cover compilations. In: Proceedings of IJCAI’97, pp. 122–127 (1997)

  12. Boufkhad, Y., Roussel, O.: Redundancy in random SAT formulas. In: Proceedings of AAAI’00, pp. 273–278 (2000)

  13. Chang, C.L., Lee, R.C.T.: Symbolic Logic and Mechanical Theorem Proving. Academic Press, New York (1973)

    MATH  Google Scholar 

  14. Chavira, M., Darwiche, A.: On probabilistic inference by weighted model counting. Artif. Intell. 172(6–7), 772–799 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  15. Darwiche, A.: Decomposable negation normal form. J. ACM 48(4), 608–647 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  16. Darwiche, A.: New advances in compiling cnf into decomposable negation normal form. In: Proceedings of ECAI’04, pp. 328–332 (2004)

  17. Darwiche, A.: SDD: A new canonical representation of propositional knowledge bases. In: Proceedings of IJCAI’11, pp. 819–826 (2011)

  18. Davis, M., Logemann, G., Loveland, D.: A machine program for theorem-proving. J. ACM 5(7), 394–397 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  19. Davis, M., Putnam, H.: A computing procedure for quantification theory. J. ACM 7(3), 201–215 (1960)

    Article  MathSciNet  MATH  Google Scholar 

  20. del Val, A.: Tractable databases: How to make propositional unit resolution complete through compilation. In: Proceedings of KR’94, pp. 551–561 (1994)

  21. Domshlak, C., Hoffmann, J.: Fast probabilistic planning through weighted model counting. In: Proceedings of ICAPS’06, pp. 243–252 (2006)

  22. Een, N., Biere, A.: Effective preprocessing in SAT through variable and clause elimination. In: Proceedings of SAT’05, pp. 61–75 (2005)

  23. Fargier, H., Marquis, P.: Extending the knowledge compilation map: Krom, Horn, affine and beyond. In: Proceedings of AAAI’08, pp. 442–447, (2008)

  24. Freemann, J.W.: Improvement to Propositional Satisfiability Search Algorithms. PhD thesis, University of Pennsylvania (1995)

  25. Gomes, C.P., Hoffmann, J.: A. Sabharwal, and B. Selman. From sampling to model counting. In: Proceedings of IJCAI’07, pp. 2293–2299 (2007)

  26. Han, H., Somenzi, F.: Alembic: An efficient algorithm for CNF preprocessing. In: Proceedings of DAC’07, pp. 582–587 (2007)

  27. Heule, M., Järvisalo, M., Biere, A.: Clause elimination procedures for CNF formulas. In: Proceedings of LPAR’10, pp. 357–371 (2010)

  28. Heule, M., Järvisalo, M., Biere, A.: Covered clause elimination. In: Proceedings of LPAR’10, pp. 41–46 (2010)

  29. Heule, M., Järvisalo, M., Biere, A.: Efficient cnf simplification based on binary implication graphs. In: Proceedings of SAT’11, pp. 201–215 (2011)

  30. Heule, M., Järvisalo, M., Lonsing, F., Seidl, M., Biere, A.: Clause elimination for SAT and QSAT. J. Artif. Intell. Res. (JAIR) 53, 127–168 (2015)

    MathSciNet  MATH  Google Scholar 

  31. Huang, J., Darwiche, A.: Using DPLL for efficient OBDD construction. In: Theory and Applications of Satisfiability Testing, 7th International Conference, SAT 2004, Vancouver, BC, Canada, May 10–13, 2004, Revised Selected Papers, pp. 157–172 (2004)

  32. Järvisalo, M., Biere, A., Heule, M.: Simulating circuit-level simplifications on CNF. J. Autom. Reason. 49(4), 583–619 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  33. Järvisalo, M., Heule, M., Biere, A.: Inprocessing rules. In Proceedings of IJCAR’12, pp. 355–370 (2012)

  34. Kullmann, O.: On a generalization of extended resolution. Discrete Appl. Math. 96–97, 149–176 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  35. Liberatore, P.: Redundancy in logic I: CNF propositional formulae. Artif. Intell. 163(2), 203–232 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  36. Loveland, D.W.: Automated Theorem Proving: A Logical Basis. Noth-Holland, Amsterdam (1978)

    MATH  Google Scholar 

  37. Lynce, I., Marques-Silva, J.: Probing-based preprocessing techniques for propositional satisfiability. In: Proceedings ICTAI’03, pp. 105–110 (2003)

  38. Manthey, N.: Coprocessor 2.0 —a flexible CNF simplifier—(tool presentation). In: Proceedings of SAT’12, pp. 436–441 (2012)

  39. Manthey, N.: Solver Description of RISS 2.0 and PRISS 2.0. Technical report, TU Dresden, Knowledge Representation and Reasoning (2012)

  40. Marques, J.P.: Silva and K.A. Sakallah. GRASP— a new search algorithm for satisfiability. In Proceedings of ICCAD’96, pp. 220–227 (1996)

  41. Monasson, R., Zecchina, R., Kirkpatrick, S., Selman, B., Troyansky, L.: Determining computational complexity from characteristic ‘phase transitions’. Nature 33, 133–137 (1999)

    MathSciNet  MATH  Google Scholar 

  42. Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S. (2001) Chaff: engineering an efficient SAT solver. In: Proceedings of DAC’01, pp. 530–535

  43. Muise, C.J., McIlraith, S.A., Beck, J.C., Hsu, E.I.: Dsharp: fast d-DNNF compilation with sharpSAT. In: Proceedings of AI’12, pp. 356–361 (2012)

  44. Ostrowski, R., Grégoire, É., Mazure, B., Saïs, L.: Recovering and exploiting structural knowledge from CNF formulas. In: Proceedings of CP’02, pp. 185–199 (2002)

  45. Palacios, H., Bonet, B., Darwiche, A., Geffner, H.: Pruning conformant plans by counting models on compiled d-DNNF representations. In: Proceedings of ICAPS’05, pp. 141–150 (2005)

  46. Piette, C., Hamadi, Y., Saïs, L.: Vivifying propositional clausal formulae. In: Proceedings of ECAI’08, pp. 525–529 (2008)

  47. Robertson, N., Seymour, P.D.: Graph minors. III. Planar tree-width. J. Comb. Theory Ser. B 36(1), 49–64 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  48. Roth, D.: On the hardness of approximate reasoning. Artif. Intell. 82(1–2), 273–302 (1996)

    Article  MathSciNet  Google Scholar 

  49. Samer, M., Szeider, S.: Algorithms for propositional model counting. J. Discrete Algorithms 8(1), 50–64 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  50. Sang, T., Bacchus, F., Beame, P., Kautz, H.A., Pitassi, T.: Combining component caching and clause learning for effective model counting. In: Proceedings of SAT’04 (2004)

  51. Sang, T., Beame, P., Kautz, H.A.: Performing Bayesian inference by weighted model counting. In: Proceedings of AAAI’05, pp. 475–482 (2005)

  52. Subbarayan, S., Bordeaux, L., Hamadi, Y.: Knowledge compilation properties of tree-of-BDDs. In Proceedings of AAAI’07, pp. 502–507 (2007)

  53. Subbarayan, S., Pradhan, D.K.: NiVER: non increasing variable elimination resolution for preprocessing SAT instances. In: Proceedings of SAT’04, pp. 276–291 (2004)

  54. Thurley, M.: SharpSAT—counting models with advanced component caching and implicit BCP. In: Proceedings of SAT’06, pp. 424–429 (2006)

  55. Toda, T., Tsuda, K.: BDD construction for all solutions SAT and efficient caching mechanism. In: Proceedings of SAC’15, Track on Constraint Solving and Programming and Knowledge Representation and Reasoning (CSP-KR) (2015)

  56. Van Gelder, A.: Toward leaner binary-clause reasoning in a satisfiability solver. Ann. Math. Artif. Intell. 43(1), 239–253 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  57. Valiant, L.G.: The complexity of computing the permanent. Theor. Comput. Sci. 8, 189–201 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  58. Zhang, H., Stickel, M.E.: An efficient algorithm for unit propagation. Proc. ISAIM 96, 166–169 (1996)

    Google Scholar 

  59. Zhang, L., Madigan, C.F., Moskewicz, M.W., Malik, S.: Efficient conflict driven learning in Boolean satisfiability solver. In: Proceedings of ICCAD’01, pp. 279–285 (2001)

Download references

Acknowledgments

This work has been partially supported by the project BR4CP ANR-11-BS02-008 of the French National Agency for Research.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pierre Marquis.

Additional information

This is a revised and extended version of the conference paper “Preprocessing for Propositional Model Counting”, which appeared in the proceedings of AAAI’14, pp. 2688–2694, 2014.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lagniez, JM., Marquis, P. On Preprocessing Techniques and Their Impact on Propositional Model Counting. J Autom Reasoning 58, 413–481 (2017). https://doi.org/10.1007/s10817-016-9370-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-016-9370-8

Keywords

Navigation