Lune

ASE2020Top-tier venue

TestMC: Testing Model Counters using Differential and Metamorphic Testing

Muhammad Usman, Wenxi Wang, Sarfraz Khurshid

Abstract

Model counting is the problem for finding the number of solutions to a formula over a bounded universe. This is a classic problem in computer science that has seen many recent advances in techniques and tools that tackle it. These advances have led to applications of model counting in many domains, e.g., quantitative program analysis, reliability, and security. Given the sheer complexity of the underlying problem, today's model counters employ sophisticated algorithms and heuristics, which result in complex tools that must be heavily optimized. Therefore, establishing the correctness of implementations of model couuters necessitates rigorous testing. This experience paper presents an empirical study on testing industrial strength model counters by applying the principles of differential and metamorphic testing together with bounded exhaustive input generation and input minimization. We embody these principles in the TestMC framework, and apply it to test four model counters, including three state-of-the-art model couuters from three different classes. Specifically, we test the exact model counters projMC and dSharp, the probabilistic exact model couuter Ganak, and the probabilistic approximate model counter ApproxMC. As subjects, we use three complementary test suites of input formulas. One suite consists of larger formulas that are derived from a wide range of real-world software design problems. The second suite consists of a bounded exhaustive set of small formulas that TestMC generated. The third suite consists offormulas generated using an off-the-shelf CNF fuzzer. TestMC found bugs in three of the four subject model counters. The bugs led to crashes, segmentation faults, incorrect model counts, and resource exhaustion by the solvers. Two of the tools were corrected subsequent to the bug reports we submitted based on our study, whereas the bugs we reported in the third tool were deemed by the tool authors to not require a fix.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Dependency-Aware Metamorphic Testing of Datalog Engines cites Skeletal approximation enumeration for SMT solver testing
  • Dependency-Aware Metamorphic Testing of Datalog Engines cites Metamorphic testing of Datalog engines
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Metamorphic testing of Datalog enginesMuhammad Numair Mansur, Maria Christakis, Valentin WüstholzFSE 2021 · 25 citations
  2. Perfect is the enemy of test oracleAli Reza Ibrahimzada, Yigit Varli, Dilara Tekinoglu, Reyhaneh JabbarvandFSE 2022 · 23 citations
  3. Skeletal approximation enumeration for SMT solver testingPeisen Yao, Heqing Huang, Wensheng Tang, Qingkai Shi et al.FSE 2021 · 20 citations
  4. Dependency-Aware Metamorphic Testing of Datalog EnginesMuhammad Numair Mansur, Valentin Wüstholz, Maria ChristakisISSTA 2023 · 10 citations
  5. SymMC: approximate model enumeration and counting using symmetry information for Alloy specificationsWenxi Wang, Yang Hu, Kenneth L. McMillan, Sarfraz KhurshidFSE 2022

Builds on1

  1. A study of the learnability of relational properties: model counting meets machine learning (MCML)Muhammad Usman, Wenxi Wang, Marko Vasic, Kaiyuan Wang et al.PLDI 2020 · 5 citations

Related papers

  1. The Power of Literal Equivalence in Model CountingYong Lai, Kuldeep S. Meel, Roland H. C. YapAAAI 2021 · 19 citations
  2. Towards Real-Time Approximate CountingYash Pote, Kuldeep S. Meel, Jiong YangAAAI 2025 · 3 citations
  3. Rounding Meets Approximate Model CountingJiong Yang, Kuldeep S. MeelCAV 2023 · 8 citations
  4. Formally Certified Approximate Model CountingYong Kiam Tan, Jiong Yang, Mate Soos, Magnus O. Myreen et al.CAV 2024 · 1 citation
  5. Engineering an Efficient Probabilistic Exact Model CounterMate Soos, Kuldeep S. MeelCAV 2025 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines