Institut für Technische Informatik, Technische Universität Wien, Treitlstraße 3/182/1, A-1040 Wien, Austria
Copyright © 2009 Raimund Kirner. This is an open access article distributed under the
Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Abstract
Embedded systems are often used in safety-critical
environments. Thus, thorough testing of them is
mandatory. To achieve a required structural code-coverage
criteria it is beneficial to derive the test data
at a higher program-representation level than machine
code. Higher program-representation levels include, beside
the source-code level, languages of domain-specific
modeling environments with automatic code generation.
For a testing framework with automatic generation
of test data this will enable high retargetability of
the framework. In this article we address the challenge of ensuring
that the structural code coverage achieved at a higher
program representation level is preserved during the
code generations and code transformations down to machine
code. We define the formal properties that have
to be fullfilled by a code transformation to guarantee
preservation of structural code coverage. Based on
these properties we discuss how to preserve code coverage
achieved at source-code level. Additionally, we discuss
how structural code coverage at model level could
be preserved. The results presented in this article are
aimed toward the integration of support for preserving
structural code coverage into compilers and code generators.