Search-based inference of polynomial metamorphic relations

Metamorphic testing (MT) is an effective methodology for testing those so-called ``non-testable'' programs (e.g., scientific programs), where it is sometimes very difficult for testers to know whether the outputs are correct. In metamorphic testing, metamorphic relations (MRs) (which specify how particular changes to the input of the program under test would change the output) play an essential role. However, testers may typically have to obtain MRs manually. In this paper, we propose a search-based approach to automatic inference of polynomial MRs for a program under test. In particular, we use a set of parameters to represent a particular class of MRs, which we refer to as polynomial MRs, and turn the problem of inferring MRs into a problem of searching for suitable values of the parameters. We then dynamically analyze multiple executions of the program, and use particle swarm optimization to solve the search problem. To improve the quality of inferred MRs, we further use MR filtering to remove some inferred MRs. We also conducted three empirical studies to evaluate our approach using four scientific libraries (including 189 scientific functions). From our empirical results, our approach is able to infer many high-quality MRs in acceptable time (i.e., from 9.87 seconds to 1231.16 seconds), which are effective in detecting faults with no false detection.

[1]  Elaine J. Weyuker,et al.  On Testing Non-Testable Programs , 1982, Comput. J..

[2]  Joseph Robert Horgan,et al.  A study of effective regression testing in practice , 1997, Proceedings The Eighth International Symposium on Software Reliability Engineering.

[3]  R. Eberhart,et al.  Empirical study of particle swarm optimization , 1999, Proceedings of the 1999 Congress on Evolutionary Computation-CEC99 (Cat. No. 99TH8406).

[4]  Michael D. Ernst,et al.  Dynamically discovering likely program invariants , 2000 .

[5]  José Javier Dolado,et al.  A Validation of the Component-Based Method for Software Size Estimation , 2000, IEEE Trans. Software Eng..

[6]  Conor Ryan,et al.  Automatic Re-engineering of Software Using Genetic Programming , 1999, Genetic Programming Series.

[7]  Rami Bahsoon,et al.  Empirical comparison of regression test selection algorithms , 2001, J. Syst. Softw..

[8]  Tsong Yueh Chen,et al.  Metamorphic testing of programs on partial differential equations: a case study , 2002, Proceedings 26th Annual International Computer Software and Applications.

[9]  Tsong Yueh Chen,et al.  Metamorphic testing and beyond , 2003, Eleventh Annual International Workshop on Software Technology and Engineering Practice.

[10]  Tsong Yueh Chen,et al.  Fault-based testing without the need of oracles , 2003, Inf. Softw. Technol..

[11]  Corina S. Pasareanu,et al.  Verification of Java Programs Using Symbolic Execution and Invariant Generation , 2004, SPIN.

[12]  Tsong Yueh Chen,et al.  Case studies on the selection of useful relations in metamorphic testing , 2004 .

[13]  Zongyuan Yang,et al.  Metamorphic Testing and Its Applications , 2004 .

[14]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[15]  Enrique Alba,et al.  Management of Software Projects with GAs , 2005 .

[16]  Shing-Chi Cheung,et al.  Towards a metamorphic testing methodology for service-oriented software applications , 2005, Fifth International Conference on Quality Software (QSIC'05).

[17]  Peng Wu,et al.  Iterative Metamorphic Testing , 2005, 29th Annual International Computer Software and Applications Conference (COMPSAC'05).

[18]  Haifeng Chen,et al.  Discovering likely invariants of distributed transaction systems for autonomic system management , 2006, 2006 IEEE International Conference on Autonomic Computing.

[19]  Manuvir Das,et al.  Perracotta: mining temporal API rules from imperfect traces , 2006, ICSE.

[20]  Johannes Mayer,et al.  An Empirical Study on the Selection of Good Metamorphic Relations , 2006, 30th Annual International Computer Software and Applications Conference (COMPSAC'06).

[21]  Jing J. Liang,et al.  Comprehensive learning particle swarm optimizer for global optimization of multimodal functions , 2006, IEEE Transactions on Evolutionary Computation.

[22]  Sarfraz Khurshid,et al.  Generating Representation Invariants of Structurally Complex Data , 2022 .

[23]  Riccardo Poli,et al.  Particle swarm optimization , 1995, Swarm Intelligence.

[24]  Joachim Wegener,et al.  Applying particle swarm optimization to software testing , 2007, GECCO '07.

[25]  Antonia Bertolino,et al.  Software Testing Research: Achievements, Challenges, Dreams , 2007, Future of Software Engineering (FOSE '07).

[26]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[27]  Maria Luisa Villani,et al.  Negotiation of Service Level Agreements: An Architecture and a Search-Based Approach , 2007, ICSOC.

[28]  Mark Harman,et al.  The Current State and Future of Search Based Software Engineering , 2007, Future of Software Engineering (FOSE '07).

[29]  Mark Harman,et al.  Pareto optimal search based refactoring at the design level , 2007, GECCO '07.

[30]  Gerardo Canfora,et al.  New Frontiers of Reverse Engineering , 2007, Future of Software Engineering (FOSE '07).

[31]  Nikolai Tillmann,et al.  DySy: dynamic symbolic execution for invariant inference , 2008, ICSE.

[32]  Juan de Lara,et al.  An Invariant-Based Method for the Analysis of Declarative Model-to-Model Transformations , 2008, MoDELS.

[33]  Laurie A. Williams,et al.  On guiding the augmentation of an automated test suite via mutation analysis , 2009, Empirical Software Engineering.

[34]  Baowen Xu,et al.  Application of Metamorphic Testing to Supervised Classifiers , 2009, 2009 Ninth International Conference on Quality Software.

[35]  David Lo,et al.  Mining scenario-based specifications with value-based invariants , 2009, OOPSLA Companion.

[36]  Gail E. Kaiser,et al.  Automatic system testing of programs without test oracles , 2009, ISSTA.

[37]  Shin Yoo,et al.  Search based data sensitivity analysis applied to requirement engineering , 2009, GECCO.

[38]  Tao Xie,et al.  Inferring Resource Specifications from Natural Language API Documentation , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[39]  Jian Pei,et al.  MAPO: Mining and Recommending API Usage Patterns , 2009, ECOOP.

[40]  Sergio Segura,et al.  Automated Test Data Generation on the Analyses of Feature Models: A Metamorphic Testing Approach , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[41]  Shinpei Hayashi,et al.  Search-Based Refactoring Detection from Source Code Revisions , 2010, IEICE Trans. Inf. Syst..

[42]  Gail E. Kaiser,et al.  Metamorphic testing techniques to detect defects in applications without test oracles , 2010 .

[43]  Patrice Godefroid,et al.  Proving memory safety of floating-point computations by combining static and dynamic program analysis , 2010, ISSTA '10.

[44]  Yu-Han Huang,et al.  Test Case Reduction Based on Program Invariant and Genetic Algorithm , 2010, 2010 6th International Conference on Wireless Communications Networking and Mobile Computing (WiCOM).

[45]  Zhendong Su,et al.  Perturbing numerical calculations for statistical analysis of floating-point program (in)stability , 2010, ISSTA '10.

[46]  Myra B. Cohen,et al.  Repairing GUI Test Suites Using a Genetic Algorithm , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[47]  Myra B. Cohen,et al.  Factors affecting the use of genetic algorithms in test suite augmentation , 2010, GECCO '10.

[48]  Yuriy Brun,et al.  Using dynamic execution traces and program invariants to enhance behavioral model inference , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[49]  Reiko Heckel,et al.  Search-Based Refactoring using Unfolding of Graph Transformation Systems , 2011, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[50]  Sergio Segura,et al.  Automated metamorphic testing on the analyses of feature models , 2011, Inf. Softw. Technol..

[51]  Liang Gao,et al.  Cellular particle swarm optimization , 2011, Inf. Sci..

[52]  Tim Menzies,et al.  Genetic Algorithms for Randomized Unit Testing , 2011, IEEE Transactions on Software Engineering.

[53]  Paolo Tonella,et al.  Symbolic search-based testing , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[54]  Giuliano Antoniol,et al.  An Approach for Search Based Testing of Null Pointer Exceptions , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[55]  Yuan Yuan,et al.  Test Case Generation Based on Program Invariant and Adaptive Random Algorithm , 2011 .

[56]  Andreas Zeller,et al.  Search-Based Program Analysis , 2011, SSBSE.

[57]  Giuliano Antoniol,et al.  The use of search‐based optimization techniques to schedule and staff software projects: an approach and an empirical study , 2011, Softw. Pract. Exp..

[58]  David Lo,et al.  Search-based fault localization , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[59]  Chongzhao Han,et al.  Binary particle swarm optimization with multiple evolutionary strategies , 2011, Science China Information Sciences.

[60]  Alison Pease,et al.  Discovery of invariants through automated theory formation , 2012, Formal Aspects of Computing.

[61]  Xuan Liu,et al.  A New Method for Constructing Metamorphic Relations , 2012, 2012 12th International Conference on Quality Software.

[62]  Sarfraz Khurshid,et al.  Regression mutation testing , 2012, ISSTA 2012.

[63]  Sebastian Hack,et al.  A dynamic program analysis to find floating-point accuracy problems , 2012, PLDI.

[64]  Gregg Rothermel,et al.  A Static Approach to Prioritizing JUnit Test Cases , 2012, IEEE Transactions on Software Engineering.

[65]  Andreas Zeller,et al.  Search-based system testing: high coverage, no false alarms , 2012, ISSTA 2012.

[66]  Gordon Fraser,et al.  Semi-automatic Search-Based Test Generation , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[67]  Deepak Kapur,et al.  Using dynamic analysis to discover polynomial and array invariants , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[68]  Gregg Rothermel,et al.  Bridging the gap between the total and additional test-case prioritization strategies , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[69]  Mark Harman,et al.  GPGPU test suite minimisation: search based software engineering performance improvement using graphics cards , 2013, Empirical Software Engineering.

[70]  James M. Bieman,et al.  Using machine learning techniques to detect metamorphic relations for programs without test oracles , 2013, 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE).

[71]  Paolo Tonella,et al.  Interactive requirements prioritization using a genetic algorithm , 2013, Inf. Softw. Technol..

[72]  Günther Ruhe,et al.  Search Based Software Engineering , 2013, Lecture Notes in Computer Science.

[73]  Zhendong Su,et al.  Automatic detection of floating-point exceptions , 2013, POPL.

[74]  Zhenbing Zeng,et al.  Exact safety verification of hybrid systems using sums-of-squares representation , 2011, Science China Information Sciences.

[75]  Alexander Egyed,et al.  SBSE4VM: Search Based Software Engineering for Variability Management , 2013, 2013 17th European Conference on Software Maintenance and Reengineering.

[76]  Axel Legay,et al.  Incremental Generation of Linear Invariants for Component-Based Systems , 2013, 2013 13th International Conference on Application of Concurrency to System Design.

[77]  Mark Harman,et al.  A Comprehensive Survey of Trends in Oracles for Software Testing , 2013 .

[78]  Deepak Kapur,et al.  Using dynamic analysis to generate disjunctive invariants , 2014, ICSE.

[79]  Sarfraz Khurshid,et al.  Feedback-driven dynamic invariant discovery , 2014, ISSTA 2014.