SCCP/x: a compilation profile to support testing and verification of optimized code

Embedded systems are often used in safety-critical environments. Thus, thorough testing of them is mandatory. A quite active research area is the automatic test-case generation for testing embedded systems. To achieve high retargetability of the testing framework, thetest-case generation has to be done at source-code level. However, it is challenging to guarantee that the test-cases obtained from the source code are also valid at the object-code level, since even in safety-critical domains programs are optimized during compilation, i.e., the compiler may also introduce new control-flow decisions to the program. In this paper we address the issue of how to guarantee the preservation of structural code coverage of test data during the optimizing compilation of the program. We analyze the formal program properties that have to be maintained to preserve different structural testing coverages, like branch coverage or modified condition/decision coverage. Based on this we describe a compilation profile that can be integrated into a compiler to allow the enforcement of structural code-coverage preservation. This work was motivated by current research activities to generate test data automatically from the source code, for example, for measurement-based timing analysis of real-time programs.

[1]  Guillem Bernat,et al.  WCET analysis of probabilistic hard real-time systems , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..

[2]  Raimund Kirner,et al.  Measurement-based worst-case execution time analysis , 2005, Third IEEE Workshop on Software Technologies for Future Embedded and Ubiquitous Systems (SEUS'05).

[3]  George C. Necula,et al.  Translation validation for an optimizing compiler , 2000, PLDI '00.

[4]  Raimund Kirner Formal Requirements for Structural Code-Coverage Preservation of Code Optimization: The SCCP/x Framework ⁄ , 2007 .

[5]  Rolf Ernst,et al.  Segment-Wise Timing and Power Measurement in Software Emulation , 2001 .

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

[7]  Robert W. Floyd,et al.  Assigning meaning to programs , 1967 .

[8]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[9]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[10]  David F. Bacon,et al.  Compiler transformations for high-performance computing , 1994, CSUR.

[11]  Steven P. Miller,et al.  Applicability of modified condition/decision coverage to software testing , 1994, Softw. Eng. J..

[12]  John Joseph Chilenski,et al.  An Investigation of Three Forms of the Modified Condition Decision Coverage (MCDC) Criterion , 2001 .

[13]  Hoyt Lougee,et al.  SOFTWARE CONSIDERATIONS IN AIRBORNE SYSTEMS AND EQUIPMENT CERTIFICATION , 2001 .

[14]  Raimund Kirner,et al.  Automatic timing model generation by CFG partitioning and model checking , 2005, Design, Automation and Test in Europe.

[15]  Amir Pnueli,et al.  VOC: A Translation Validator for Optimizing Compilers , 2002, COCV@ETAPS.