Skip to main content
Log in

Hashing-based approximate counting of minimal unsatisfiable subsets

  • Published:
Formal Methods in System Design Aims and scope Submit manuscript

Abstract

In many areas of computer science, we are given an unsatisfiable Boolean formula F in CNF, i.e. a set of clauses, with the goal to analyse the unsatisfiability. Examination of minimal unsatisfiable subsets (MUSes) of F is a kind of such analysis. While researchers in the past two decades focused mainly on techniques for explicit identification of MUSes, there have recently emerged various applications that do not require the explicit identification of MUSes. For instance, in the domain of diagnosis, it is often sufficient to count the number of MUSes. While in theory, one can simply count all MUSes by explicitly enumerating them, in practice, the complete explicit enumeration is often not possible for instances with a reasonably large number of MUSes. In this work, we describe our approximate MUS counting procedure called AMUSIC. Our approach avoids exhaustive MUS enumeration by combining the classical technique of universal hashing with advances in QBF solvers along with usage of union and intersection of MUSes to achieve runtime efficiency. Our prototype implementation of AMUSIC is shown to scale to instances that were clearly beyond the realm of enumeration-based approaches.

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
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Notes

  1. The computation of \(\texttt{UMU}_{F}\) and \(\texttt{IMU}_{F}\) is discussed in Sects. 4.5 and 4.6, respectively.

  2. Note that in our encoding, in Eq. (19), we use in a similar manner the variables S to introduce a set \(I_{S,K}\). However, we use S as activation variables (i.e., \(g \in I_{S,K}\) iff \(I(s_g) = 1\)), whereas here the variables R are used as relaxation variables (i.e., \(g \in I^-_{R,K}\) iff \(I(r_g) = 0\)). The purpose (and the effect) of the activation and relaxation variables is the same: they encode a subset of K.

  3. Note that we have also tried CAQE to solve the 2QBF encodings, however, it was slower than CADET.

  4. M. Y. Vardi, in his talk at BIRS CMO 18w5208 workshop, called on the SAT community to focus on scalable benchmarks in lieu of competition benchmarks. Also, see: https://gitlab.com/satisfiability/scalablesat (Accessed: December 31, 2021)

  5. Note that we have also tried running the algorithm with different values of \(\epsilon\) and \(\delta\). Briefly, setting a better tolerance and/or confidence slows down the computation since it requires to perform more iterations and compute more MUSes per iteration, however, it has (practically) only a small effect on the accuracy of the provided MUS count estimates. Namely, Fig. 5 shows that \(\epsilon = 0.8\) and \(\delta = 0.2\) already lead to a very good accuracy.

  6. The exact MUS counts can be determined from the patterns used to generate the benchmarks.

References

  1. Mu K (2019) Formulas free from inconsistency: an atom-centric characterization in Priest’s minimally inconsistent LP. J Artif Intell Res. 66:279–296

    Article  MathSciNet  MATH  Google Scholar 

  2. Arif MF, Mencía C, Ignatiev A, Manthey N, Peñaloza R, Marques-Silva J (2016) BEACON: an efficient sat-based tool for debugging EL+ ontologies. In: SAT. vol. 9710 of LNCS. Springer, pp 521–530

  3. Jannach D, Schmitz T (2016) Model-based diagnosis of spreadsheet programs: a constraint-based debugging approach. Autom Softw Eng 23(1):105–144

    Article  Google Scholar 

  4. Cohen O, Gordon M, Lifshits M, Nadel A, Ryvchin V (2010) Designers work less with quality formal equivalence checking. In: DVCon. Citeseer

  5. Ivrii A, Malik S, Meel KS, Vardi MY (2016) On computing minimal independent support and its applications to sampling and counting. Constraints. 9;21(1)

  6. Hunter A, Konieczny S (2008) Measuring inconsistency through minimal inconsistent sets. In: KR. AAAI Press, pp 358–366

  7. Thimm M (2018) On the evaluation of inconsistency measures. Meas Inconsist Inf 73

  8. Stern RT, Kalech M, Feldman A, Provan GM (2012) Exploring the duality in conflict-directed model-based diagnosis. In: AAAI. AAAI Press

  9. Liffiton MH, Malik A (2013) Enumerating infeasibility: finding multiple MUSes quickly. In: CPAIOR. vol. 7874 of LNCS. Springer, pp 160–175

  10. Bacchus F, Katsirelos G (2016) Finding a collection of MUSes incrementally. In: CPAIOR. vol. 9676 of LNCS. Springer, pp 35–44

  11. Bendík J, Černá I, Beneš N (2018) Recursive online enumeration of all minimal unsatisfiable subsets. In: ATVA. vol. 11138 of LNCS. Springer, pp 143–159

  12. Bendík J, Černá I (2020) Replication-guided enumeration of minimal unsatisfiable subsets. In: CP. vol. 12333 of LNCS. Springer, pp 37–54

  13. Bendík J, Černá I (2018) Evaluation of domain agnostic approaches for enumeration of minimal unsatisfiable subsets. In: LPAR. vol. 57 of EPiC series in computing. EasyChair, pp 131–142

  14. Narodytska N, Bjørner N, Marinescu M, Sagiv M (2018) Core-guided minimal correction set and core enumeration. In: IJCAI. ijcai.org, pp 1353–1361

  15. Bendík J, Meel KS (2020) Approximate counting of minimal unsatisfiable subsets. In: CAV (1). vol. 12224 of LNCS. Springer, pp 439–462

  16. Chakraborty S, Meel KS, Vardi MY (2013) A scalable approximate model counter. In: Proceedings of of CP, pp 200–216

  17. Chakraborty S, Meel KS, Vardi MY (2016) Algorithmic improvements in approximate counting for probabilistic inference: from linear to logarithmic SAT calls. In: Proceedings of IJCAI

  18. Chakraborty S, Meel KS, Vardi MY (2016) Algorithmic improvements in approximate counting for probabilistic inference: from linear to logarithmic SAT calls. In: IJCAI. IJCAI/AAAI Press, pp 3569–3576

  19. Soos M, Meel KS (2019) Bird: Engineering an efficient CNF-XOR sat solver and its applications to approximate model counting. In: Proceedings of the AAAI

  20. Soos M, Gocht S, Meel KS (2020) Tinted, detached, and lazy CNF-XOR solving and its applications to counting and sampling. In: Proceedings of international conference on computer-aided verification (CAV)

  21. Meel KS, Akshay S (2020) Sparse hashing for scalable approximate model counting: theory and practice. In: Proceedings of the 35th annual ACM/IEEE symposium on logic in computer science, pp 728–741

  22. Chen Z, Toda S (1995) The complexity of selecting maximal solutions. Inf Comput. 119(2):231–239

    Article  MathSciNet  MATH  Google Scholar 

  23. Marques-Silva J, Janota M (2014) On the query complexity of selecting few minimal sets. Electron Colloquium Comput Complex. 21:31

    Google Scholar 

  24. Soos M, Nohl K, Castelluccia C (2009) Extending SAT solvers to cryptographic problems. In: Kullmann O (ed) Proceedings of of SAT. vol. 5584 of LNCS. Springer, pp 244–257. Doi: 10.1007/978-3-642-02777-2_24

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

  26. Meyer AR, Stockmeyer LJ (1972) The equivalence problem for regular expressions with squaring requires exponential space. In: SWAT (FOCS). IEEE Computer Society, pp 125–129

  27. Sperner E (1928) Ein satz über untermengen einer endlichen menge. Mathematische Zeitschrift. 27(1):544–548

    Article  MathSciNet  MATH  Google Scholar 

  28. Grégoire É, Mazure B, Piette C (2006) Tracking MUSes and strict inconsistent covers. In: FMCAD. IEEE Computer Society, pp 39–46

  29. Belov A, Marques-Silva J (2011) Accelerating MUS extraction with recursive model rotation. In: FMCAD. FMCAD Inc., pp 37–40

  30. Bacchus F, Katsirelos G (2015) Using minimal correction sets to more efficiently compute minimal unsatisfiable sets. In: CAV (2). vol. 9207 of LNCS. Springer, pp 70–86

  31. Gomes CP, Sabharwal A, Selman B (2006) Near-uniform sampling of combinatorial spaces using XOR constraints. In: NIPS. MIT Press, pp 481–488

  32. de Kleer J, Williams BC (1987) Diagnosing multiple faults. Artif Intell 32(1):97–130

    Article  MATH  Google Scholar 

  33. Reiter R (1987) A theory of diagnosis from first principles. Artif Intell 32(1):57–95

    Article  MathSciNet  MATH  Google Scholar 

  34. Liffiton MH, Sakallah KA (2008) Algorithms for computing minimal unsatisfiable subsets of constraints. JAR. 40(1):1–33

    Article  MathSciNet  MATH  Google Scholar 

  35. Mencía C, Kullmann O, Ignatiev A, Marques-Silva J (2019) On Computing the union of MUSes. In: SAT. vol. 11628 of LNCS. Springer, pp 211–221

  36. Janota M, Marques-Silva J (2011) On Deciding MUS membership with QBF. In: CP. vol. 6876 of LNCS. Springer, pp 414–428

  37. Liffiton MH, Previti A, Malik A, Marques-Silva J (2016) Fast, flexible MUS enumeration. Constraints 21(2):223–250

    Article  MathSciNet  MATH  Google Scholar 

  38. Bendík J, Beneš N, Černá I, Barnat J (2016) Tunable online MUS/MSS enumeration. In: FSTTCS. vol. 65 of LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, pp 50:1–50:13

  39. Bendík J, Černá I (2020) MUST: minimal unsatisfiable subsets enumeration tool. In: TACAS (1). vol. 12078 of Lecture Notes in Computer Science. Springer, pp 135–152

  40. Bendík J, Meel KS (2021) Counting minimal unsatisfiable subsets. In: CAV (2). vol. 12760 of LNCS. Springer, pp 313–336

  41. Bailey J, Stuckey PJ (2005) Discovery of minimal unsatisfiable subsets of constraints using hitting set dualization. In: PADL. Springer, pp 174–186

  42. Marques-Silva J, Heras F, Janota M, Previti A, Belov A. On Computing Minimal Correction Subsets. In: IJCAI. IJCAI/AAAI; 2013. p. 615–622

  43. Previti A, Mencía C, Järvisalo M, Marques-Silva J (2018) Premise set caching for enumerating minimal correction subsets. In: AAAI. AAAI Press, pp 6633–6640

  44. Grégoire É, Izza Y, Lagniez J (2018) Boosting MCSes enumeration. In: IJCAI. ijcai.org, pp 1309–1315

  45. Bendík J, Černá I (2020) Rotation based MSS/MCS enumeration. In: LPAR. vol. 73 of EPiC series in computing. EasyChair, pp 120–137

  46. Bendík J (2021) On Decomposition of maximal satisfiable subsets. In: FMCAD. IEEE, pp 212–221

  47. Bendík J, Meel KS (2021) Counting maximal satisfiable subsets. In: Thirty-fifth AAAI conference on artificial intelligence (to appear)

  48. Belov A, Marques-Silva J (2012) MUSer2: an efficient MUS extractor. JSAT. 8:123–128

    MATH  Google Scholar 

  49. Belov A, Heule M, Marques-Silva J (2014) MUS extraction using clausal proofs. In: SAT. vol. 8561 of LNCS. Springer, pp 48–57

  50. Nadel A, Ryvchin V, Strichman O (2014) Accelerated deletion-based extraction of minimal unsatisfiable cores. JSAT. 9:27–51

    MathSciNet  MATH  Google Scholar 

  51. Monien B, Speckenmeyer E (1985) Solving satisfiability in less than 2n steps. Dis Appl Math. 10(3):287–295

    Article  MATH  Google Scholar 

  52. Kleine Büning H, Kullmann O (2009) Minimal unsatisfiability and autarkies. In: Handbook of Satisfiability. vol. 185 of FAIA. IOS Press, pp 339–401

  53. Kullmann O (2000) Investigations on autark assignments. Dis Appl Math 107(1–3):99–137

    Article  MathSciNet  MATH  Google Scholar 

  54. Marques-Silva J, Ignatiev A, Morgado A, Manquinho VM, Lynce I (2014) Efficient autarkies. In: ECAI. vol. 263 of FAIA. IOS Press, pp 603–608

  55. Kullmann O, Marques-Silva J (2015) Computing maximal autarkies with few and simple oracle queries. In: SAT. vol. 9340 of LNCS. Springer, pp 138–155

  56. Chakraborty S, Meel KS, Vardi MY (2014) Balancing scalability and uniformity in SAT witness generator. In: Proceedings of DAC

  57. Marques-Silva J, Lynce I (2011) On improving MUS extraction algorithms. In: SAT. vol. 6695 of LNCS. Springer, pp 159–173

  58. Rabe MN, Tentrup L (2015) CAQE: a certifying QBF solver. In: FMCAD. IEEE, pp 136–143

  59. Rabe MN, Tentrup L, Rasmussen C, Seshia SA (2018) Understanding and extending incremental determinization for 2QBF. In: CAV (2). vol. 10982 of LNCS. Springer, pp 256–274

  60. Lonsing F, Egly U (2019) QRATPre+: effective QBF preprocessing via strong redundancy properties. In: SAT. vol. 11628 of LNCS. Springer, pp 203–210

  61. Piotrow M (2020) UWrMaxSat: Efficient Solver for MaxSAT and Pseudo-Boolean Problems. In: 2020 IEEE 32nd International Conference on Tools with Artificial Intelligence (ICTAI). Los Alamitos, CA, USA: IEEE Computer Society, pp 132–136. https://doi.ieeecomputersociety.org/10.1109/ICTAI50040.2020.00031

  62. Ignatiev A, Morgado A, Marques-Silva J (2018) PySAT: a python toolkit for prototyping with SAT oracles. In: SAT. vol. 10929 of LNCS. Springer, pp 428–437

  63. Elffers J, Giráldez-Cru J, Gocht S, Nordström J, Simon L (2018) Seeking practical CDCL insights from theoretical SAT benchmarks. In: IJCAI international joint conferences on artificial intelligence organization, pp 1300–1308

  64. Meel KS, Shrotri AA, Vardi MY (2019) Not all FPRASs are equal: demystifying FPRASs for DNF-counting. Constraints An Int J. 24(3–4):211–233

    Article  MathSciNet  MATH  Google Scholar 

  65. Chakraborty S, Fremont DJ, Meel KS, Seshia SA, Vardi MY (2015) On parallel scalable uniform SAT witness generation. In: Proceedings of TACAS

  66. Guthmann O, Strichman O, Trostanetski A (2016) Minimal unsatisfiable core extraction for SMT. In: FMCAD. IEEE, pp 57–64

  67. Barnat J, Bauch P, Beneš N, Brim L, Beran J, Kratochvíla T (2016) Analysing sanity of requirements for avionics systems. Formal Aspects Comput. 28(1):45–63

    Article  MathSciNet  MATH  Google Scholar 

  68. Bendík J (2017) Consistency checking in requirements analysis. In: ISSTA. ACM, pp 408–411

  69. Ghassabani E, Gacek A, Whalen MW, Heimdahl MPE, Wagner LG (2017) Proof-based coverage metrics for formal verification. In: ASE. IEEE Computer Society, pp 194–199

  70. Bendík J, Ghassabani E, Whalen MW, Černá I (2018) Online enumeration of all minimal inductive validity cores. In: SEFM. vol. 10886 of LNCS. Springer, pp 189–204

Download references

Acknowledgements

This work was supported in part by National Research Foundation Singapore under its Campus for Research Excellence and Technological Enterprise (CREATE) programme, NRF Fellowship Programme [NRF-NRFFAI1-2019-0004] and Ministry of Education Singapore Tier 2 Grant [MOE-T2EP20121-0011], Ministry of Education Singapore Tier 1 Grant [R-252-000-B59-114].

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jaroslav Bendík.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bendík, J., Meel, K.S. Hashing-based approximate counting of minimal unsatisfiable subsets. Form Methods Syst Des (2023). https://doi.org/10.1007/s10703-023-00419-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10703-023-00419-w

Keywords

Navigation