Automated test generation and error localisation for Simulink/Stateflow modelled systems using extended automata

Model-based development frameworks for cyber-physical systems (CPSs) such as Simulink and Stateflow are popular for many applications. For safety and security concerns, verification and testing/validation must be performed on the model-based CPS designs. In this study, the authors present an automatic test generation approach for model-based CPS designs in Simulink/Stateflow based on its translation to input/output extended finite automata (I/O-EFA) developed in the authors’ prior works. The test generation problem requires identifying the executable paths of the I/O-EFA model and also generating a test input for those paths. To execute a path, a certain sequence of other paths must be executed first, which they automatically identify. The approach is implemented by applying two different techniques, model checking and constraint solving. Both test generation implementations are validated by a case study. The results show that both implementations can generate test cases, while the implementation based on constraint solving is in general faster. The approach is further extended to requirements-based test generation. These tests are then used for validation purposes, and the failed versus passed tests are used to localise the fault to plausible Simulink/Stateflow blocks using the notion of fault-seed used in their earlier work. The approaches are applied on a bounded counter and a thermal control of a house as two different case studies.

[1]  Lionel C. Briand,et al.  Automated Test Suite Generation for Time-Continuous Simulink Models , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[2]  Ilan Beer,et al.  Efficient Detection of Vacuity in Temporal Model Checking , 2001, Formal Methods Syst. Des..

[3]  Shriram Krishnamurthi,et al.  Automated Fault Localization Using Potential Invariants , 2003, ArXiv.

[4]  Arnaud Gotlieb,et al.  Automatic test data generation using constraint solving techniques , 1998, ISSTA '98.

[5]  Pierre Wolper,et al.  Reasoning About Infinite Computations , 1994, Inf. Comput..

[6]  Alex Groce,et al.  Establishing flight software reliability: testing, model checking, constraint-solving, monitoring and learning , 2014, Annals of Mathematics and Artificial Intelligence.

[7]  Paul Gastin,et al.  Fast LTL to Büchi Automata Translation , 2001, CAV.

[8]  Daniel Kroening,et al.  Test-case generation for embedded simulink via formal concept analysis , 2011, 2011 48th ACM/EDAC/IEEE Design Automation Conference (DAC).

[9]  Kenneth R. Butts,et al.  Simulation-guided approaches for verification of automotive powertrain control systems , 2015, 2015 American Control Conference (ACC).

[10]  Ofer Strichman,et al.  Bounded model checking , 2003, Adv. Comput..

[11]  Ratnesh Kumar,et al.  Model-based automatic test generation for Simulink/Stateflow using extended finite automaton , 2012, 2012 IEEE International Conference on Automation Science and Engineering (CASE).

[12]  Ratnesh Kumar,et al.  Modeling Simulink Diagrams Using Input/Output Extended Finite Automata , 2009, 2009 33rd Annual IEEE International Computer Software and Applications Conference.

[13]  Stavros Tripakis,et al.  Translating discrete-time simulink to lustre , 2003, TECS.

[14]  Leonardo Mendonça de Moura,et al.  Generating efficient test sets with a model checker , 2004, Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004..

[15]  Bruno Marre,et al.  Test sequences generation from LUSTRE descriptions: GATEL , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[16]  Alex Groce,et al.  Error explanation and fault localization with distance metrics , 2005 .

[17]  Sriram Sankaranarayanan,et al.  A trajectory splicing approach to concretizing counterexamples for hybrid systems , 2013, 52nd IEEE Conference on Decision and Control.

[18]  Ratnesh Kumar,et al.  Reduction of automated test generation for Simulink/Stateflow to reachability and its novel resolution , 2013, 2013 IEEE International Conference on Automation Science and Engineering (CASE).

[19]  Daniel Kroening,et al.  Mutation-Based Test Case Generation for Simulink Models , 2009, FMCO.

[20]  S. Ramesh,et al.  An integrated test generation tool for enhanced coverage of Simulink/Stateflow models , 2012, 2012 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[21]  Lionel C. Briand,et al.  SimCoTest: A Test Suite Generation Tool for Simulink/Stateflow Controllers , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[22]  Sriram Sankaranarayanan,et al.  S-TaLiRo: A Tool for Temporal Logic Falsification for Hybrid Systems , 2011, TACAS.

[23]  Stavros Tripakis,et al.  Defining and translating a "safe" subset of simulink/stateflow into lustre , 2004, EMSOFT '04.

[24]  Thanh Binh Nguyen,et al.  A Novel Fitness function of metaheuristic algorithms for test data generation for simulink models based on mutation analysis , 2016, J. Syst. Softw..

[25]  Corina S. Pasareanu,et al.  Symbolic PathFinder: symbolic execution of Java bytecode , 2010, ASE.

[26]  Mark Harman,et al.  Transition coverage testing for simulink/stateflow models using messy genetic algorithms , 2011, GECCO '11.

[27]  Steven P. Reiss,et al.  Fault localization with nearest neighbor queries , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[28]  Darren D. Cofer,et al.  Software model checking takes off , 2010, Commun. ACM.

[29]  Ratnesh Kumar,et al.  Semantic Translation of Simulink Diagrams to Input/Output Extended Finite Automata , 2012, Discret. Event Dyn. Syst..

[30]  H. Cleve,et al.  Locating causes of program failures , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[31]  Tarik Nahhal,et al.  Coverage-guided test generation for continuous and hybrid systems , 2009, Formal Methods Syst. Des..

[32]  Ratnesh Kumar,et al.  Stateflow to Extended Finite Automata Translation , 2011, 2011 IEEE 35th Annual Computer Software and Applications Conference Workshops.

[33]  Pierre Wolper,et al.  Simple on-the-fly automatic verification of linear temporal logic , 1995, PSTV.

[34]  Sriram Sankaranarayanan,et al.  Multiple shooting, CEGAR-based falsification for hybrid systems , 2014, EMSOFT '14.

[35]  S. Ramesh,et al.  Randomized directed testing (REDIRECT) for Simulink/Stateflow models , 2008, EMSOFT '08.

[36]  Richard Lippmann,et al.  Testing static analysis tools using exploitable buffer overflows from open source code , 2004, SIGSOFT '04/FSE-12.

[37]  Alexandre Donzé,et al.  Breach, A Toolbox for Verification and Parameter Synthesis of Hybrid Systems , 2010, CAV.

[38]  Zohar Manna,et al.  A Decision Algorithm for Full Propositional Temporal Logic , 1993, CAV.

[39]  Ratnesh Kumar,et al.  Robustness of Simulink/Stateflow Model Against Implementation Imperfections , 2015, ADHS.

[40]  Ratnesh Kumar,et al.  Recursive Modeling of Stateflow as Input/Output-Extended Automaton , 2014, IEEE Transactions on Automation Science and Engineering.

[41]  Michael D. Ernst,et al.  Selecting Predicates for Implications in Program Analysis , 2002 .

[42]  Mohamed Taha Bennani,et al.  SimAutoGen Tool: Test Vector Generation from Large Scale MATLAB/Simulink Models , 2016, FORTE.

[43]  Sarfraz Khurshid,et al.  Test input generation with java PathFinder , 2004, ISSTA '04.

[44]  Andreas Zeller,et al.  Isolating cause-effect chains from computer programs , 2002, SIGSOFT FSE.