Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3324884.3416563acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
research-article

TestMC: testing model counters using differential and metamorphic testing

Published: 27 January 2021 Publication History

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 counters 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 counters from three different classes. Specifically, we test the exact model counters projMC and dSharp, the probabilistic exact model counter 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 of formulas 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.

References

[1]
2019. Alloy 4 Download Webpage. http://alloy.lcs.mit.edu/alloy/download.html.
[2]
Bestoun Ahmed. 2016. Test Case Minimization Approach Using Fault Detection and Combinatorial Optimization Techniques for Configuration-Aware Structural Testing. Journal of Engineering Science and Technology 12 (05 2016), 737--753.
[3]
Özgür Akgün, Ian P. Gent, Christopher Jefferson, Ian Miguel, and Peter Nightingale. 2018. Metamorphic Testing of Constraint Solvers. In Principles and Practice of Constraint Programming. 727--736.
[4]
Cyrille Artho, Armin Biere, and Martina Seidl. 2013. Model-Based Testing for Verification Back-Ends. In Tests and Proofs. 39--55.
[5]
Cyrille Artho, Martina Seidl, Quentin Gros, Eun-Hye Choi, Takashi Kitamura, Akira Mori, Rudolf Ramler, and Yoriyuki Yamagata. 2015. Model-Based Testing of Stateful APIs with Modbat. 30th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2015), 858--863.
[6]
Cyrille Valentin Artho, Armin Biere, Masami Hagiya, Eric Platon, Martina Seidl, Yoshinori Tanabe, and Mitsuharu Yamamoto. 2013. ModBat: A Model-Based API Tester for Event-Driven Systems. In Hardware and Software: Verification and Testing, Valeria Bertacco and Axel Legay (Eds.). 112--128.
[7]
Abdulbaki Aydin, Lucas Bang, and Tevfik Bultan. 2015. Automata-Based Model Counting for String Constraints. In Computer Aided Verification. 255--272.
[8]
Rehan Abdul Aziz, Geoffrey Chu, Christian J. Muise, and Peter J. Stuckey. 2015. #∃SAT: Projected Model Counting. In SAT.
[9]
Fahiem Bacchus and Toby Walsh. 2005. A non-CNF DIMACS style.
[10]
Armin Biere. [n.d.]. Lingeling and Friends at the SAT Competition 2011. Technical Report.
[11]
Armin Biere. [n.d.]. Picosat essentials. Journal on Satisfiability, Boolean Modeling and Computation (JSAT ([n. d.]), 2008.
[12]
A. Biere, A. Biere, M. Heule, H. van Maaren, and T. Walsh. 2009. Handbook of Satisfiability: Volume 185 Frontiers in Artificial Intelligence and Applications.
[13]
Nikolaj Bjørner. 2016. SMT Solvers: Foundations and Applications. Dependable Software Systems Engineering 45 (2016), 24.
[14]
Dmitry Blotsky, Federico Mora, Murphy Berzish, Yunhui Zheng, Ifaz Kabir, and Vijay Ganesh. 2018. StringFuzz: A Fuzzer for String Solvers. In Computer Aided Verification, Hana Chockler and Georg Weissenbacher (Eds.). Springer International Publishing, Cham, 45--51.
[15]
Robert Brummayer and Armin Biere. 2009. Fuzzing and Delta-debugging SMT Solvers. In Proceedings of the 7th International Workshop on Satisfiability Modulo Theories (Montreal, Canada) (SMT '09). ACM, New York, NY, USA, 1--5.
[16]
Robert Brummayer and Matti Järvisalo. 2010. Testing and Debugging Techniques for Answer Set Solver Development. CoRR abs/1007.3223 (2010). arXiv:1007.3223 http://arxiv.org/abs/1007.3223
[17]
Robert Brummayer, Florian Lonsing, and Armin Biere. 2010. Automated Testing and Debugging of SAT and QBF Solvers. In Theory and Applications of Satisfiability Testing - SAT 2010, Ofer Strichman and Stefan Szeider (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 44--57.
[18]
Supratik Chakraborty, Kuldeep S. Meel, and Moshe Y. Vardi. 2016. Algorithmic Improvements in Approximate Counting for Probabilistic Inference: From Linear to Logarithmic SAT Calls. In Proceedings of International Joint Conference on Artificial Intelligence (IJCAI).
[19]
Harald Cichos, Sebastian Oster, Malte Lochau, and Andy Schürr. 2011. Model-Based Coverage-Driven Test Suite Generation for Software Product Lines. In Model Driven Engineering Languages and Systems, Jon Whittle, Tony Clark, and Thomas Kühne (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 425--439.
[20]
Edmund M. Clarke, Jr., Orna Grumberg, and Doron A. Peled. 1999. Model Checking. MIT Press.
[21]
Nadia Creignou, Uwe Egly, and Martina Seidl. 2012. A Framework for the Specification of Random SAT and QSAT Formulas. In Tests and Proofs, Achim D. Brucker and Jacques Julliand (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 163--168.
[22]
Adnan Darwiche. 2000. On the tractable counting of theory models and its application to belief revision and truth maintenance. CoRR cs.AI/0003044 (2000). http://arxiv.org/abs/cs.AI/0003044
[23]
Martin Davis, George Logemann, and Donald Loveland. 1962. A Machine Program for Theorem-proving. Commun. ACM 5, 7 (July 1962), 394--397.
[24]
Carmel Domshlak and Jörg Hoffmann. 2011. Probabilistic Planning via Heuristic Forward Search and Weighted Model Counting. CoRR abs/1111.0044 (2011). arXiv:1111.0044 http://arxiv.org/abs/1111.0044
[25]
Saikat Dutta, Owolabi Legunsen, Zixin Huang, and Sasa Misailovic. 2018. Testing Probabilistic Programming Systems. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Lake Buena Vista, FL, USA) (ESEC/FSE 2018). ACM, New York, NY, USA, 574--586.
[26]
Antonio Filieri, Corina S. Păsăreanu, and Willem Visser. 2013. Reliability Analysis in Symbolic Pathfinder. In ICSE. 622--631.
[27]
Ian P. Gent, Chris Jefferson, and Ian Miguel. 2006. MINION: A Fast, Scalable, Constraint Solver. In Proceedings of the 2006 Conference on ECAI 2006: 17th European Conference on Artificial Intelligence August 29 -- September 1, 2006, Riva Del Garda, Italy. IOS Press, Amsterdam, The Netherlands, The Netherlands, 98--102. http://dl.acm.org/citation.cfm?id=1567016.1567043
[28]
Muhammad Ali Gulzar, Yongkang Zhu, and Xiaofeng Han. 2019. Perception and Practices of Differential Testing. In Proceedings of the 41st International Conference on Software Engineering: Software Engineering in Practice (Montreal, Quebec, Canada) (ICSE-SEIP '19). IEEE Press, Piscataway, NJ, USA, 71--80.
[29]
Jianmin Guo, Yu Jiang, Yue Zhao, Quan Chen, and Jiaguang Sun. 2018. DLFuzz: Differential Fuzzing Testing of Deep Learning Systems. CoRR abs/1808.09413 (2018). arXiv:1808.09413 http://arxiv.org/abs/1808.09413
[30]
Klaus Havelund and Thomas Pressburger. 2000. Model checking java programs using java pathfinder. International Journal on Software Tools for Technology Transfer 2, 4 (2000), 366--381.
[31]
Daniel Jackson. 2002. Alloy: A Lightweight Object Modeling Notation. ACM Transactions on Software Engineering and Methodology (TOSEM) 11, 2 (April 2002).
[32]
Daniel Jackson. 2012. Software Abstractions: Logic, Language, and Analysis. The MIT Press.
[33]
Tomasz Kuchta, Thibaud Lutellier, Edmund Wong, Lin Tan, and Cristian Cadar. 2018. On the correctness of electronic documents: studying, finding, and localizing inconsistency bugs in PDF readers and files. Empirical Software Engineering 23, 6 (01 Dec 2018), 3187--3220.
[34]
Jean-Marie Lagniez and Pierre Marquis. 2019. A Recursive Algorithm for Projected Model Counting. Proceedings of the AAAI Conference on Artificial Intelligence 33 (07 2019), 1536--1543.
[35]
Daniel Lehmann and Michael Pradel. 2018. Feedback-directed Differential Testing of Interactive Debuggers. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Lake Buena Vista, FL, USA) (ESEC/FSE 2018). ACM, New York, NY, USA, 610--620.
[36]
William M. McKeeman. 1998. Differential Testing for Software. DIGITAL TECHNICAL JOURNAL 10, 1 (1998), 100--107.
[37]
Christian Muise, Sheila Mcilraith, J. Beck, and Eric Hsu. 2012. Dsharp: Fast d-DNNF Compilation with sharpSAT.
[38]
Juan Antonio Navarro Pérez and Andrei Voronkov. 2005. Generation of Hard Non-Clausal Random Satisfiability Problems. Proceedings of the National Conference on Artificial Intelligence 1, 436--442.
[39]
Joseph P. Near and Daniel Jackson. 2016. Finding Security Bugs in Web Applications Using a Catalog of Access Control Patterns. In Proceedings of the 38th International Conference on Software Engineering (Austin, Texas) (ICSE '16). ACM, New York, NY, USA, 947--958.
[40]
Aina Niemetz, Mathias Preiner, and Armin Biere. 2014. Boolector 2.0. JSAT 9 (2014), 53--58.
[41]
Aina Niemetz, Mathias Preiner, and Armin Biere. 2017. MODEL-BASED API TESTING FOR SMT SOLVERS.
[42]
Eugene Nudelman, Kevin Leyton-Brown, Holger H. Hoos, Alex Devkar, and Yoav Shoham. 2004. Understanding Random SAT: Beyond the Clauses-to-Variables Ratio. In Principles and Practice of Constraint Programming - CP 2004, Mark Wallace (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 438--452.
[43]
Spencer Pearson, José Campos, René Just, Gordon Fraser, Rui Abreu, Michael D. Ernst, Deric Pang, and Benjamin Keller. 2017. Evaluating and Improving Fault Localization. In Proceedings of the 39th International Conference on Software Engineering (Buenos Aires, Argentina) (ICSE '17). IEEE Press, Piscataway, NJ, USA, 609--620.
[44]
Quoc-Sang Phan and Pasquale Malacaria. 2014. Abstract Model Counting: A Novel Approach for Quantification of Information Leaks. In Proceedings of the 9th ACM Symposium on Information, Computer and Communications Security (Kyoto, Japan) (ASIA CCS '14). ACM, New York, NY, USA, 283--292.
[45]
Dan Roth. 1996. On the Hardness of Approximate Reasoning. Artif. Intell. 82, 1--2 (April 1996), 273--302.
[46]
Sergio Segura, Amador Durán, Ana B. Sánchez, Daniel Le Berre, Emmanuel Lonca, and Antonio Ruiz-Cortés. 2015. Automated Metamorphic Testing of Variability Analysis Tools. Softw. Test. Verif. Reliab. 25, 2 (March 2015), 138--163.
[47]
Sergio Segura, Gordon Fraser, Ana B. Sánchez, and Antonio Ruiz Cortés. 2016. A Survey on Metamorphic Testing. IEEE Trans. Software Eng. 42, 9 (2016), 805--824.
[48]
Shubham Sharma, Subhajit Roy, Mate Soos, and Kuldeep S. Meel. 2019. GANAK: A Scalable Probabilistic Exact Model Counter. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19. International Joint Conferences on Artificial Intelligence Organization, 1169--1176.
[49]
Mate Soos. 2014. CryptoMiniSat v4. SAT Competition (2014), 23.
[50]
Kevin Sullivan, Jinlin Yang, David Coppit, Sarfraz Khurshid, and Daniel Jackson. 2004. Software Assurance by Bounded Exhaustive Testing. SIGSOFT Softw. Eng. Notes 29, 4 (July 2004), 133--142.
[51]
Gecode Team. 2006. Gecode: Generic constraint development environment. http://www.gecode.org
[52]
Marc Thurley. 2006. sharpSAT - Counting Models with Advanced Component Caching and Implicit BCP. In Theory and Applications of Satisfiability Testing - SAT 2006, Armin Biere and Carla P. Gomes (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 424--429.
[53]
Muhammad Usman, Wenxi Wang, Marko Vasic, Kaiyuan Wang, Haris Vikalo, and Sarfraz Khurshid. 2020. A Study of the Learnability of Relational Properties: Model Counting Meets Machine Learning (MCML). In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) (PLDI 2020). Association for Computing Machinery, New York, NY, USA, 1098--1111.
[54]
Mark Utting, Alexander Pretschner, and Bruno Legeard. 2012. A Taxonomy of Model-based Testing Approaches. Softw. Test. Verif. Reliab. 22, 5 (Aug. 2012), 297--312.
[55]
Wenxi Wang, Muhammad Usman, Alyas Almaawi, Kaiyuan Wang, Kuldeep S. Meel, and Sarfraz Khurshid. 2020. A Study of Symmetry Breaking Predicates and Model Counting. In TACAS.
[56]
Pamela Zave. 2017. Reasoning About Identifier Spaces: How to Make Chord Correct. IEEE Transactions on Software Engineering 43, 12 (2017), 1144--1156.
[57]
Andreas Zeller. 1999. Yesterday, My Program Worked. Today, It Does Not. Why?. In Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering (Toulouse, France) (ESEC/FSE-7). Springer-Verlag, Berlin, Heidelberg, 253--267. http://dl.acm.org/citation.cfm?id=318773.318946
[58]
Andreas Zeller and Ralf Hildebrandt. 2002. Simplifying and Isolating Failure-Inducing Input. IEEE Trans. Softw. Eng. 28, 2 (Feb. 2002), 183--200.
[59]
A. Zeller and R. Hildebrandt. 2002. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering 28, 2 (Feb 2002), 183--200.
[60]
Chengyu Zhang, Ting Su, Yichen Yan, Fuyuan Zhang, Geguang Pu, and Zhendong Su. 2019. Finding and Understanding Bugs in Software Model Checkers. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Tallinn, Estonia) (ESEC/FSE 2019). ACM, New York, NY, USA, 763--773.

Cited By

View all
  • (2022)SymMC: approximate model enumeration and counting using symmetry information for Alloy specificationsProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549161(1209-1220)Online publication date: 7-Nov-2022
  • (2022)Perfect is the enemy of test oracleProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549086(70-81)Online publication date: 7-Nov-2022
  • (2021)QuantifyML: How Good is my Machine Learning Model?Electronic Proceedings in Theoretical Computer Science10.4204/EPTCS.348.6348(92-100)Online publication date: 21-Oct-2021
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ASE '20: Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering
December 2020
1449 pages
ISBN:9781450367684
DOI:10.1145/3324884
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

  • IEEE CS

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 January 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. delta debugging
  2. differential testing
  3. metamorphic testing
  4. model counting

Qualifiers

  • Research-article

Funding Sources

Conference

ASE '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 82 of 337 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)32
  • Downloads (Last 6 weeks)7
Reflects downloads up to 24 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2022)SymMC: approximate model enumeration and counting using symmetry information for Alloy specificationsProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549161(1209-1220)Online publication date: 7-Nov-2022
  • (2022)Perfect is the enemy of test oracleProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549086(70-81)Online publication date: 7-Nov-2022
  • (2021)QuantifyML: How Good is my Machine Learning Model?Electronic Proceedings in Theoretical Computer Science10.4204/EPTCS.348.6348(92-100)Online publication date: 21-Oct-2021
  • (2021)Skeletal approximation enumeration for SMT solver testingProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468540(1141-1153)Online publication date: 20-Aug-2021
  • (2021)Syntax‐based metamorphic relation prediction via the bagging frameworkExpert Systems10.1111/exsy.1290239:6Online publication date: 15-Dec-2021
  • (2020)A Study of Symmetry Breaking Predicates and Model CountingTools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-030-45190-5_7(115-134)Online publication date: 25-Apr-2020

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media