Reactive Systems logo

Automated Testing and Validation with Reactis®

July 28, 2014
The Reactis product line offers an array of capabilities to help
     you develop more robust embedded software at a lower cost.  Different
     versions of Reactis are available for either a model-based design
     process with Simulink and Stateflow or for a C-code based process.

Model-Based Design with Simulink® and Stateflow®

C Code Process

Products:
Reactis Logo
Products:
Reactis for C Logo Reactis for C
Tester
Generate tests automatically
  • Will unexpected inputs cause a runtime error?
  • How much of my model/code have I really tested?

Reactis Tester employs a patented technology called guided simulation to build test suites. The tool tracks several coverage criteria as it computes test data, and it uses uncovered elements of these criteria to influence the creation of subsequent tests.

generate tests from Simulink/Stateflow model

Coverage criteria include generic objectives such as Decision, Condition, and Modified Condition/Decision Coverage (MC/DC), Simulink-specific measures such as branch and subsystem, and Stateflow-specific metrics such as state, condition-action, and transition-action.

comparing code to a model

Testing code (auto-generated or hand-written) against your model is easy with Reactis:

  1. Generate tests from model
  2. Run tests on code
  3. Differences are automatically detected and flagged.
generate tests from C code

Coverage criteria include Statement, Decision, Condition, and Modified Condition/Decision Coverage (MC/DC).

As Reactis Tester generates tests it performs an array of checks to flag runtime errors in your C code. Memory errors are particularly easy to make in C and can be very hard to debug. A memory error occurs whenever a program reads-from or writes-to an invalid address. Memory errors are particularly common in C programs because the C programming language gives the programmer direct access to the program's memory, which can boost performance but also allows software defects to access arbitrary memory locations. Typical memory errors include out-of-bounds array indexes, buffer overruns, dangling heap pointers (accessing a region of heap-allocated memory after the memory has been freed), dangling stack pointers (accessing a pointer to a local variable of a function after the function has returned) and the use of pointers cast from incorrect numeric values. Reactis Tester not only detects these types of errors, it returns a test that can be executed in Reactis Simulator to pinpoint the underlying cause of the error.

Simulator
Simulate and debug
  • How do I understand, diagnose, and fix a bug?
debug Simulink models
  • Execute a block, single step, or multiple steps at a time.
  • Reverse execution.
  • To see data values, hover with the mouse, open a scope, or add to watched variables.
  • Unexercised parts of model are highlighted in red.
  • Generate detailed coverage reports.
  • Breakpoints.
  • When using the Reactis for C Plugin, its like having an advanced C debugger right in your Simulink environment. Debugging Simulink, Stateflow, and C code is all controlled from the same simple interface.
debug C code
  • Execute a single statement; step into, over, out of functions; execute a full step or multiple steps at a time.
  • Reverse execution.
  • To see data values, hover with the mouse, open a scope, or add to watched variables.
  • Unexercised parts of code are highlighted in red.
  • Generate detailed coverage reports.
  • Breakpoints.
Validator
Check requirements
  • Will the brake always deactivate the cruise control?

Validator, the model-validation component of Reactis, uses a test and check approach for verifying models or code. You first instrument your model/code with checks that monitor whether behavior is consistent with expectations. Validator then uses the test-generation component of Tester to create and run test data to see if any checks can be violated. These tests can then be used to diagnose the cause of any abnormal behavior detected.

search a model for requirements violations

Validator gives a user two ways to define a check: as simple textual expressions similar to the assert capabilities found in programming languages, or as a Simulink / Stateflow model. In the latter case, the model implementing the checks is intended to monitor the behavior of the controller model and raise flags if any violations are discovered.

search C code for requirements violations

Eliminating runtime errors is important, but only one step towards high-quality software. A program that does not crash, but does the wrong thing is also unacceptable. Reactis Validator gives you a way to formulate and perform checks that your program is operating properly. Checks are formulated in a way similar to the assert mechanism of C.

More Info
Videos
Simulink validate icon Model-Based Testing and Validation with Reactis (9 min)
s-function icon Testing C Code in Simulink Models using the Reactis for C Plugin (8 min)
Simulink navigation icon Navigating Simulink Models with Reactis (1 min)
c code icon Finding Bugs in C Code Using Reactis for C (19 min)
White Papers
Documentation
Newsletters