White Papers > Finding Bugs in C Code with Reactis for C

Download: PDF  


7  Synergy with Reactis for Simulink

Combining Reactis for C with Reactis for Simulink in a model-based development process produces synergistic benefits.

Engineers performing model-based design using Simulink/ Stateflow 1 as a design tool and C as an implementation language can benefit significantly from using Reactis for C in combination with its sibling product, Reactis for Simulink.

This diagram
shows a Simulink/Stateflow model, which is passed to Reactis for Simulink.
Reactis for Simulink generates a test suite, which is then passed to
Reactis for C. Reactis for C accepts the test suite and a C program as
input. The output of Reactis for C is a set of tests which lead to 
cases where the program behaves differently than the model.
Figure 18: Validating a C program developed from a Stateflow/Simulink model.

Synergistic benefits occur when test suites are shared between both versions of Reactis. There are two basic use-case scenarios. The first case is shown in Figure 18, which depicts the work-flow in a typical model-based development environment. In this scenario, the conformance of an implementation to a model can be checked by generating a test suite using Reactis for Simulink, and then testing the implementation against the test suite with Reactis for C.

This diagram shows legacy C code,
which is passed as an input to Reactis for C.
Reactis for C produces a test suite as output.
The test suite and a Simulink/Stateflow model are used as inputs to
Reactis for Simulink, which produces a second test suite as output.
The second test suite contains all test cases in which the model's
output differs from the legacy C code.
Figure 19: Validating a Stateflow/Simulink model developed from legacy C code.

Figure 19 shows the work-flow when using both Reactis products to support the reverse engineering of models from legacy C code. In this scenario, the conformance of the model to the legacy implementation can be checked by generating a test suite from the implementation using Reactis for C, and then testing the model against the test suite using Reactis for Simulink.