Model-based mutant equivalence detection using automata language equivalence and simulations

Abstract Mutation analysis is a popular technique for assessing the strength of test suites. It relies on the mutation score, which indicates their fault-revealing potential. Yet, there are mutants whose behaviour is equivalent to the original system, wasting analysis resources and preventing the satisfaction of a 100% mutation score. For finite behavioural models, the Equivalent Mutant Problem (EMP) can be transformed to the language equivalence problem of non-deterministic finite automata for which many solutions exist. However, these solutions are quite expensive, making computation unbearable when used for tackling the EMP. In this paper, we report on our assessment of a state-of-the-art exact language equivalence tool and two heuristics we proposed. We used 12 models, composed of (up to) 15,000 states, and 4710 mutants. We introduce a random and a mutation-biased simulation heuristics, used as baselines for comparison. Our results show that the exact approach is often more than ten times faster in the weak mutation scenario. For strong mutation, our biased simulations can be up to 1000 times faster for models larger than 300 states, while limiting the error of misclassifying non-equivalent mutants as equivalent to 8% on average. We therefore conclude that the approaches can be combined for improved efficiency.

[1]  A. Jefferson Offutt,et al.  Experimental results from an automatic test case generator , 1993, TSEM.

[2]  William E. Howden,et al.  Weak Mutation Testing and Completeness of Test Sets , 1982, IEEE Transactions on Software Engineering.

[3]  Bernhard K. Aichernig,et al.  Model-Based Mutation Testing of an Industrial Measurement Device , 2014, TAP@STAF.

[4]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[5]  Christel Baier,et al.  Principles of model checking , 2008 .

[6]  Robert Feldt,et al.  Heuristic Model Checking using a Monte-Carlo Tree Search Algorithm , 2015, GECCO.

[7]  Jacques Klein,et al.  Assessing Software Product Line Testing Via Model-Based Mutation: An Application to Similarity Testing , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops.

[8]  Yves Le Traon,et al.  An Empirical Study on Mutation, Statement and Branch Coverage Fault Revelation That Avoids the Unreliable Clean Program Assumption , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[9]  Orna Kupferman,et al.  Verification of Fair Transition Systems , 1998, Chic. J. Theor. Comput. Sci..

[10]  Thomas Hérault,et al.  Approximate Probabilistic Model Checking , 2004, VMCAI.

[11]  A. Jefferson Offutt,et al.  Using compiler optimization techniques to detect equivalent mutants , 1994, Softw. Test. Verification Reliab..

[12]  A. Jefferson Offutt,et al.  A mutation carol: Past, present and future , 2011, Inf. Softw. Technol..

[13]  Mark Harman,et al.  Using program slicing to assist in the detection of equivalent mutants , 1999, Softw. Test. Verification Reliab..

[14]  Bernhard K. Aichernig,et al.  Model-based mutation testing via symbolic refinement checking , 2015, Sci. Comput. Program..

[15]  Håkan L. S. Younes,et al.  Probabilistic Verification of Discrete Event Systems Using Acceptance Sampling , 2002, CAV.

[16]  Mike Papadakis,et al.  Employing second‐order mutation for isolating first‐order equivalent mutants , 2015, Softw. Test. Verification Reliab..

[17]  Paulo César Masiero,et al.  Mutation testing applied to validate specifications based on statecharts , 1999, Proceedings 10th International Symposium on Software Reliability Engineering (Cat. No.PR00443).

[18]  Radek Pelánek,et al.  Properties of state spaces and their applications , 2008, International Journal on Software Tools for Technology Transfer.

[19]  William E. Howden,et al.  Reliability of the Path Analysis Testing Strategy , 1976, IEEE Transactions on Software Engineering.

[20]  Lori L. Pollock,et al.  Configuring effective navigation models and abstract test cases for web applications by analysing user behaviour , 2013, Softw. Test. Verification Reliab..

[21]  Damien Pous,et al.  Checking NFA equivalence with bisimulations up to congruence , 2013, POPL.

[22]  Paul Pettersson,et al.  Tools and Algorithms for the Construction and Analysis of Systems: 28th International Conference, TACAS 2022, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022, Munich, Germany, April 2–7, 2022, Proceedings, Part II , 1998, TACAS.

[23]  Robert Feldt,et al.  Generating structured test data with specific properties using nested Monte-Carlo search , 2014, GECCO.

[24]  Orna Kupferman,et al.  Verification of Fair Transisiton Systems , 1996, CAV.

[25]  Siau-Cheng Khoo,et al.  QUARK: Empirical Assessment of Automaton-based Specification Miners , 2006, 2006 13th Working Conference on Reverse Engineering.

[26]  Yves Le Traon,et al.  Sound and Quasi-Complete Detection of Infeasible Test Requirements , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[27]  Neil Walkinshaw,et al.  Automated Comparison of State-Based Software Models in Terms of Their Language and Structure , 2013, TSEM.

[28]  Mark Harman,et al.  Multi Objective Higher Order Mutation Testing with Genetic Programming , 2009, 2009 Testing: Academic and Industrial Conference - Practice and Research Techniques.

[29]  Dana Angluin,et al.  Two notions of correctness and their relation to testing , 1982, Acta Informatica.

[30]  Yves Le Traon,et al.  Trivial Compiler Equivalence: A Large Scale Empirical Study of a Simple, Fast and Effective Equivalent Mutant Detection Technique , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[31]  M. R. Woodward,et al.  Errors in algebraic specifications and an experimental mutation testing tool , 1993, Softw. Eng. J..

[32]  Luciano Baresi,et al.  An Introduction to Software Testing , 2006, FoVMT.

[33]  Michael D. Ernst,et al.  Are mutants a valid substitute for real faults in software testing? , 2014, SIGSOFT FSE.

[34]  Jean-François Raskin,et al.  Antichain Algorithms for Finite Automata , 2010, TACAS.

[35]  Fevzi Belli,et al.  Model-based mutation testing - Approach and case studies , 2016, Sci. Comput. Program..

[36]  Pierre-Yves Schobbens,et al.  Automata Language Equivalence vs. Simulations for Model-Based Mutant Equivalence: An Empirical Evaluation , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[37]  Pierre-Yves Schobbens,et al.  Featured Model-Based Mutation Analysis , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[38]  Gordon Fraser,et al.  Achieving scalable mutation-based generation of whole test suites , 2015, Empirical Software Engineering.

[39]  Kiyoshi Agusa,et al.  Error description on algebraic specification and its automatic addition , 1996, Systems and Computers in Japan.

[40]  Yves Le Traon,et al.  Sampling Program Inputs with Mutation Analysis: Going Beyond Combinatorial Interaction Testing , 2014, 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation.

[41]  Yves Le Traon,et al.  Mitigating the effects of equivalent mutants with mutant classification strategies , 2014, Sci. Comput. Program..

[42]  Fevzi Belli,et al.  Event-Based Mutation Testing vs. State-Based Mutation Testing - An Experimental Comparison , 2011, 2011 IEEE 35th Annual Computer Software and Applications Conference.

[43]  Yves Le Traon,et al.  Chapter Six - Mutation Testing Advances: An Analysis and Survey , 2019, Adv. Comput..

[44]  Ibrahim Habli,et al.  An Empirical Evaluation of Mutation Testing for Improving the Test Quality of Safety-Critical Software , 2013, IEEE Transactions on Software Engineering.

[45]  Bernhard K. Aichernig,et al.  Towards Symbolic Model-Based Mutation Testing: Pitfalls in Expressing Semantics as Constraints , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[46]  Gary McGraw,et al.  Software fault injection: inoculating programs against errors , 1997 .

[47]  Nicos Malevris,et al.  MEDIC: A static analysis framework for equivalent mutant identification , 2015, Inf. Softw. Technol..

[48]  Andreas Zeller,et al.  Covering and Uncovering Equivalent Mutants , 2013, Softw. Test. Verification Reliab..

[49]  Richard Torkar,et al.  Overcoming the Equivalent Mutant Problem: A Systematic Literature Review and a Comparative Experiment of Second Order Mutation , 2014, IEEE Transactions on Software Engineering.

[50]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[51]  Rupert Schlick,et al.  Mutation-driven Test Case Generation Using Short-lived Concurrent Mutants - First Results , 2016, ArXiv.

[52]  Cem Kaner,et al.  Foundations of Software Testing , 2013 .

[53]  Paolo Arcaini,et al.  Generating Tests for Detecting Faults in Feature Models , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[54]  Mike Papadakis,et al.  Mutation based test case generation via a path selection strategy , 2012, Inf. Softw. Technol..

[55]  A. Jefferson Offutt,et al.  Automatically detecting equivalent mutants and infeasible paths , 1997, Softw. Test. Verification Reliab..

[56]  Lionel C. Briand,et al.  Using Mutation Analysis for Assessing and Comparing Testing Coverage Criteria , 2006, IEEE Transactions on Software Engineering.

[57]  Elisabeth Jöbstl,et al.  Model-Based Mutation Testing with Constraint and SMT Solvers , 2014 .

[58]  Bernhard K. Aichernig,et al.  MoMut::UML Model-Based Mutation Testing for UML , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[59]  Mike Papadakis,et al.  Automatic Mutation Test Case Generation via Dynamic Symbolic Execution , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[60]  Radek Pelánek,et al.  Typical Structural Properties of State Spaces , 2004, SPIN.

[62]  Robert M. Hierons,et al.  Mutation testing from probabilistic and stochastic finite state machines , 2009, J. Syst. Softw..

[63]  Robert M. Hierons,et al.  Resolving the Equivalent Mutant Problem in the Presence of Non-determinism and Coincidental Correctness , 2016, ICTSS.

[64]  Timothy A. Budd,et al.  Program Testing by Specification Mutation , 1985, Comput. Lang..