2. Reactis Overview#

Reactis for Simulink is an automated test, verification, and debug tool which helps discover defects in Simulink models. Reactis for C does the same for C programs. Using the tools, engineers may:

  • Generate test suites from Simulink models or C code. The tests comprehensively exercise the model or program as measured by an assortment of structural coverage metrics.

  • Find run-time errors, such as memory errors, overflow errors, divide-by-zero errors, etc.

  • Interactively execute a model or program while tracking progress toward full coverage of a variety of coverage metrics, including MC/DC.

  • Perform functional tests to determine if a model or program can ever violate any of its requirements, including safety requirements.

  • Replay a specific execution sequence which triggers a defect in order to understand, diagnose, and fix a bug.

  • Perform back-to-back testing of models and code to ensure that they are functionally equivalent.

_images/reactisComponents_web.png

Fig. 2.1 The main components of Reactis.#

Reactis for Simulink and Reactis for C each consist of three basic components, as shown in Figure 2.1. These components are Simulator, Tester, and Validator.

2.1. Simulator#

_images/sim_labeled_web.png

Fig. 2.2 Reactis Simulator.#

Reactis Simulator is an interactive execution environment which supports debugging and visualization. In addition to basic debugging features, such as single-stepping and breakpoints, Simulator provides a number of advanced debugging features, including reverse-stepping and the ability to plot the values of a variable or signal over time. Simulator also performs a large number of runtime error checks as it executes a model/program, so that bugs which are hard to isolate (e.g., reading from heap memory which has been recycled) are immediately caught and execution is paused at the point where the error occurred. Furthermore, when an error occurs you can step backward while inspecting variable values, making it easier to trace an error back to its original source.

In addition to debugging, Simulator also allows you to visualize test coverage and inspect models or code. Colored annotations indicate the coverage status of all coverage targets in the model/code, including MC/DC targets. This makes it is easy to comprehend which parts of a program require additional testing.

2.2. Reactis Tester#

Reactis Tester uses a patented[1] technique known as guided simulation to generate test suites which exhaustively exercise a model or program. The test suites produced by Reactis are both comprehensive and compact. They are comprehensive in the sense that they attempt to cover as much of the program structure as possible, as measured by structural testing metrics including statement coverage, decision coverage, condition coverage, and modified condition/decision coverage (MC/DC). The test suites are compact because test steps which do not lead to covering a previously-uncovered target (such as a statement which was not executed during any of the previous tests) are pruned from test suite as it is generated.

2.3. Reactis Validator#

Reactis Validator allows you to perform functional testing of program requirements, including safety properties. When viewing a model in Reactis, you can annotate the model with assertions and user-defined targets. These annotations are stored in a separate file so that the underlying model is not modified. An assertion is a universal property which should always be true, such as requiring that the brake and cruise control of a vehicle never be engaged at the same time. A user-defined target is a property which should become true at least once during at least one test. For example, a target would be used to ensure that the vehicle speed reaches 75 miles per hour at least once during the test of a cruise control unit.