Test generation for large automotive models

Modeling tools such as Statemate, Simulink and Stateflow are widely used in the automotive industry to specify low level requirements and design. Systematic testing of models to achieve structural coverage such as state coverage, transition coverage or modified condition decision coverage (MCDC) helps in early defect detection. Automatic generation of test data can help in reducing the cost and improving the quality of systematic testing. Test data can be automatically generated either 1) directly from the models or 2) from the code generated from these models. In this paper we argue for and recommend the second approach. We propose generating test data from C, a formalism-independent intermediate language, as it is widely used in the embedded domain and most modeling tools have C code generators. Accurate representation of floating point number type is possible in C (that being the representation in the final executable) and there are various analysis tools that are available for C. A major challenge in using code to generate test data is scalability. To overcome this problem, we built a tool that combines available static slicing and model-checking techniques to generate test data. We conducted experiments to check if this tool can generate test data for large complex models from the automotive domain. To demonstrate formalism independence and scalability we chose industry size Statemate as well as Simulink/Stateflow models. The set up and the findings of these experiments are also presented in this paper. We successfully generated test data for code sizes as large as 50KLOC and detected several bugs in four already tested industry models thus proving the benefits of this approach.

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

[2]  César Muñoz,et al.  An Overview of SAL , 2000 .

[3]  Padmanabhan Krishnan,et al.  Effectiveness of Random Testing of Embedded Systems , 2012, 2012 45th Hawaii International Conference on System Sciences.

[4]  Daniel Kroening,et al.  Mixed abstractions for floating-point arithmetic , 2009, 2009 Formal Methods in Computer-Aided Design.

[5]  Jonathan P. Bowen,et al.  Experimental evaluation of the variation in effectiveness for DC, FPC and MC/DC test criteria , 2003, 2003 International Symposium on Empirical Software Engineering, 2003. ISESE 2003. Proceedings..

[6]  David Harel,et al.  Modeling Reactive Systems With Statecharts : The Statemate Approach , 1998 .

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

[8]  Isil Dillig,et al.  An overview of the saturn project , 2007, PASTE '07.

[9]  J Hayhurst Kelly,et al.  A Practical Tutorial on Modified Condition/Decision Coverage , 2001 .

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

[11]  Daniel Kroening,et al.  SATABS: SAT-Based Predicate Abstraction for ANSI-C , 2005, TACAS.

[12]  Mark Harman,et al.  An overview of program slicing , 2001, Softw. Focus.

[13]  Prasad Bokil,et al.  Automatic Test Data Generation for C Programs , 2009, 2009 Third IEEE International Conference on Secure Software Integration and Reliability Improvement.

[14]  Benjamin Monate,et al.  A Value Analysis for C Programs , 2009, 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation.

[15]  Daniel Kroening,et al.  A Tool for Checking ANSI-C Programs , 2004, TACAS.

[16]  David Harel,et al.  Rhapsody: A Complete Life-Cycle Model-Based Development System , 2002, IFM.

[17]  Shrawan Kumar,et al.  Static program analysis of large embedded code base: an experience , 2011, ISEC.

[18]  Jonathan Jacky,et al.  Model-Based Testing of Web Applications Using NModel , 2009, TestCom/FATES.

[19]  Stefan Kowalewski,et al.  Model checking C source code for embedded systems , 2009, International Journal on Software Tools for Technology Transfer.

[20]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1988, SIGP.

[21]  Thomas A. Henzinger,et al.  Software Verification with BLAST , 2003, SPIN.

[22]  Ravindra Metta,et al.  Scaling up Model-checking , 2007 .