Journal of Automated Reasoning

, Volume 58, Issue 4, pp 413–481 | Cite as

On Preprocessing Techniques and Their Impact on Propositional Model Counting

  • Jean-Marie Lagniez
  • Pierre Marquis


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.


Propositional model counting #SAT Preprocessing Knowledge compilation 



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


  1. 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. 2.
    Apsel, U., Brafman, R.I.: Lifted MEU by weighted model counting. In: Proceedings of AAAI’12 (2012)Google Scholar
  3. 3.
    Audemard, G., Lagniez, J.-M., Simon, L.: Just-in-time compilation of knowledge bases. In: Proceedings of IJCAI’13, pp. 447–453 (2013)Google Scholar
  4. 4.
    Audemard, G., Simon, L.: Predicting learnt clauses quality in modern SAT solver. In: Proceedings of IJCAI’09, pp. 399–404 (2009)Google Scholar
  5. 5.
    Bacchus, F., Winter, J.: Effective preprocessing with hyper-resolution and equality reduction. In: Proceedings of SAT’04, pp. 341–355 (2004)Google Scholar
  6. 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)Google Scholar
  7. 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)Google Scholar
  8. 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)Google Scholar
  9. 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)Google Scholar
  10. 10.
    Bordeaux L., Marques-Silva, J.: Knowledge compilation with empowerment. In: Proceedings of SOFSEM’12, pp. 612–624 (2012)Google Scholar
  11. 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)Google Scholar
  12. 12.
    Boufkhad, Y., Roussel, O.: Redundancy in random SAT formulas. In: Proceedings of AAAI’00, pp. 273–278 (2000)Google Scholar
  13. 13.
    Chang, C.L., Lee, R.C.T.: Symbolic Logic and Mechanical Theorem Proving. Academic Press, New York (1973)MATHGoogle Scholar
  14. 14.
    Chavira, M., Darwiche, A.: On probabilistic inference by weighted model counting. Artif. Intell. 172(6–7), 772–799 (2008)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Darwiche, A.: Decomposable negation normal form. J. ACM 48(4), 608–647 (2001)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Darwiche, A.: New advances in compiling cnf into decomposable negation normal form. In: Proceedings of ECAI’04, pp. 328–332 (2004)Google Scholar
  17. 17.
    Darwiche, A.: SDD: A new canonical representation of propositional knowledge bases. In: Proceedings of IJCAI’11, pp. 819–826 (2011)Google Scholar
  18. 18.
    Davis, M., Logemann, G., Loveland, D.: A machine program for theorem-proving. J. ACM 5(7), 394–397 (1962)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Davis, M., Putnam, H.: A computing procedure for quantification theory. J. ACM 7(3), 201–215 (1960)MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    del Val, A.: Tractable databases: How to make propositional unit resolution complete through compilation. In: Proceedings of KR’94, pp. 551–561 (1994)Google Scholar
  21. 21.
    Domshlak, C., Hoffmann, J.: Fast probabilistic planning through weighted model counting. In: Proceedings of ICAPS’06, pp. 243–252 (2006)Google Scholar
  22. 22.
    Een, N., Biere, A.: Effective preprocessing in SAT through variable and clause elimination. In: Proceedings of SAT’05, pp. 61–75 (2005)Google Scholar
  23. 23.
    Fargier, H., Marquis, P.: Extending the knowledge compilation map: Krom, Horn, affine and beyond. In: Proceedings of AAAI’08, pp. 442–447, (2008)Google Scholar
  24. 24.
    Freemann, J.W.: Improvement to Propositional Satisfiability Search Algorithms. PhD thesis, University of Pennsylvania (1995)Google Scholar
  25. 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)Google Scholar
  26. 26.
    Han, H., Somenzi, F.: Alembic: An efficient algorithm for CNF preprocessing. In: Proceedings of DAC’07, pp. 582–587 (2007)Google Scholar
  27. 27.
    Heule, M., Järvisalo, M., Biere, A.: Clause elimination procedures for CNF formulas. In: Proceedings of LPAR’10, pp. 357–371 (2010)Google Scholar
  28. 28.
    Heule, M., Järvisalo, M., Biere, A.: Covered clause elimination. In: Proceedings of LPAR’10, pp. 41–46 (2010)Google Scholar
  29. 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)Google Scholar
  30. 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)MathSciNetMATHGoogle Scholar
  31. 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)Google Scholar
  32. 32.
    Järvisalo, M., Biere, A., Heule, M.: Simulating circuit-level simplifications on CNF. J. Autom. Reason. 49(4), 583–619 (2012)MathSciNetCrossRefMATHGoogle Scholar
  33. 33.
    Järvisalo, M., Heule, M., Biere, A.: Inprocessing rules. In Proceedings of IJCAR’12, pp. 355–370 (2012)Google Scholar
  34. 34.
    Kullmann, O.: On a generalization of extended resolution. Discrete Appl. Math. 96–97, 149–176 (1999)MathSciNetCrossRefMATHGoogle Scholar
  35. 35.
    Liberatore, P.: Redundancy in logic I: CNF propositional formulae. Artif. Intell. 163(2), 203–232 (2005)MathSciNetCrossRefMATHGoogle Scholar
  36. 36.
    Loveland, D.W.: Automated Theorem Proving: A Logical Basis. Noth-Holland, Amsterdam (1978)MATHGoogle Scholar
  37. 37.
    Lynce, I., Marques-Silva, J.: Probing-based preprocessing techniques for propositional satisfiability. In: Proceedings ICTAI’03, pp. 105–110 (2003)Google Scholar
  38. 38.
    Manthey, N.: Coprocessor 2.0 —a flexible CNF simplifier—(tool presentation). In: Proceedings of SAT’12, pp. 436–441 (2012)Google Scholar
  39. 39.
    Manthey, N.: Solver Description of RISS 2.0 and PRISS 2.0. Technical report, TU Dresden, Knowledge Representation and Reasoning (2012)Google Scholar
  40. 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)Google Scholar
  41. 41.
    Monasson, R., Zecchina, R., Kirkpatrick, S., Selman, B., Troyansky, L.: Determining computational complexity from characteristic ‘phase transitions’. Nature 33, 133–137 (1999)MathSciNetMATHGoogle Scholar
  42. 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–535Google Scholar
  43. 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)Google Scholar
  44. 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)Google Scholar
  45. 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)Google Scholar
  46. 46.
    Piette, C., Hamadi, Y., Saïs, L.: Vivifying propositional clausal formulae. In: Proceedings of ECAI’08, pp. 525–529 (2008)Google Scholar
  47. 47.
    Robertson, N., Seymour, P.D.: Graph minors. III. Planar tree-width. J. Comb. Theory Ser. B 36(1), 49–64 (1984)MathSciNetCrossRefMATHGoogle Scholar
  48. 48.
    Roth, D.: On the hardness of approximate reasoning. Artif. Intell. 82(1–2), 273–302 (1996)MathSciNetCrossRefGoogle Scholar
  49. 49.
    Samer, M., Szeider, S.: Algorithms for propositional model counting. J. Discrete Algorithms 8(1), 50–64 (2010)MathSciNetCrossRefMATHGoogle Scholar
  50. 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)Google Scholar
  51. 51.
    Sang, T., Beame, P., Kautz, H.A.: Performing Bayesian inference by weighted model counting. In: Proceedings of AAAI’05, pp. 475–482 (2005)Google Scholar
  52. 52.
    Subbarayan, S., Bordeaux, L., Hamadi, Y.: Knowledge compilation properties of tree-of-BDDs. In Proceedings of AAAI’07, pp. 502–507 (2007)Google Scholar
  53. 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)Google Scholar
  54. 54.
    Thurley, M.: SharpSAT—counting models with advanced component caching and implicit BCP. In: Proceedings of SAT’06, pp. 424–429 (2006)Google Scholar
  55. 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)Google Scholar
  56. 56.
    Van Gelder, A.: Toward leaner binary-clause reasoning in a satisfiability solver. Ann. Math. Artif. Intell. 43(1), 239–253 (2005)MathSciNetCrossRefMATHGoogle Scholar
  57. 57.
    Valiant, L.G.: The complexity of computing the permanent. Theor. Comput. Sci. 8, 189–201 (1979)MathSciNetCrossRefMATHGoogle Scholar
  58. 58.
    Zhang, H., Stickel, M.E.: An efficient algorithm for unit propagation. Proc. ISAIM 96, 166–169 (1996)Google Scholar
  59. 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)Google Scholar

Copyright information

© Springer Science+Business Media Dordrecht 2016

Authors and Affiliations

  1. 1.CRIL-CNRS and Université d’ArtoisLensFrance

Personalised recommendations