FAQ: Reactis for Simulink - Reactis Simulator

What is Reactis Simulator?

Reactis Simulator enables users to visualize execution of Simulink/Stateflow models. Simulator's user interface is similar to those of traditional debuggers from programming languages: it enables users to execute their models step-by-step (or even block-by-block), as well as set breakpoints. Simulator can also:

  • step backwards through a simulation
  • enable controlled replay of tests generated by ReactisTester
  • present a graphical display of different coverage criteria
  • fine-tune Tester-generated test suites.

How do I start Reactis Simulator?

Load your model in Reactis and then click the green button in the tool bar.

When I start Simulator on a large model it can take a while to start up. Is this to be expected?

Simulator startup consists of three phases: Model import, type inference and initialization. Model import and type inference may take a significant amount of time for large models. Watch the bottom left corner of the Reactis Window for status messages during Simulator startup. If caching is enabled for a model, the imported model will be stored in a file (with a .mwi suffix) which means that import can be skipped on subsequent invocations (if the no modifications were made to the model).

How can I view the current values of data items during a simulation run?

For any data item (Simulink block, signal or Stateflow variable), at any point during a simulation run, you can:

  • Hover over the data item in the diagram window. This will cause a pop-up to display the current value of the item.
  • Right-click on the data item and select Open Scope which will open a graph displaying the value.
  • right-click on the data item and select Add to Watched which will display in a table in the lower part of the simulator window.

How do I determine which parts of a model are not exercised by a test suite?

This can be done as follows:

  1. Load your model in Reactis.
  2. Start Simulator (click the green button in the tool bar).
  3. Load the test suite by selecting menu item Test Suite, Open...
  4. Ensure menu item Coverage, Show Details is selected. Unexercised portions of the model will be highlighted in red. Since no simulation steps have occurred yet, all targets will be red.
  5. In the steps to pause entry box in the tool bar (the entry box that contains a number), enter 0. This is a shorthand to indicate that the entire test suite should execute.
  6. Click the fast simulation button (>>) to execute all tests.
  7. Upon completion only parts of the model not exercised by the tests will be highlighted in red.

Alternatively, you could generate a test execution report as follows:

  1. Load your model in Reactis.
  2. Start Simulator (click the green button in the tool bar).
  3. Load the test suite by selecting menu item Test Suite, Open...
  4. Select Simulate, Fast Run with Report...
  5. In the launch dialog you can configure the report that will be produced after running the test suite. You can specify that this report include two types of coverage mappings:
    • map each coverage target to the test/step in which it is first covered, and/or
    • map each step in the test suite to the list of targets it covers for the first time.
    In addition to coverage information you can also include signal plots in the report.

How do I set a breakpoint?

Right-click on a Simulink block, Stateflow state, Stateflow transition, C source line, or Embedded MATLAB source line in the main panel and select Toggle Breakpoint. You can also right-click on a Simulink or Stateflow block in the model hierarchy display panel of the main Reactis window and select Toggle Breakpoint.

Why are some menu items and buttons on the tool bar sometimes disabled?

Reactis has two primary modes of operation. The current mode of operation depends on whether Simulator is enabled or disabled. Certain buttons are disabled in each of the modes. When Simulator is off, the buttons that control a simulation (play, fast forward, reverse step, ...) are not active. When Simulator is enabled, any buttons (and some menu items) related to modifying the .rsi file are disabled.

In the main window panel, when I right-click on an MC/DC target (Simulink logic block or Stateflow transition), why is the View Coverage Details menu item disabled?

This menu item becomes enabled only when Simulator is enabled and the Coverage, Show Details menu item is selected.

Why is there a blue rectangle in the main Reactis panel?

This rectangle appears when a region has been selected for printing (this is done in the main Reactis panel by holding down the CTRL key, left-clicking and dragging). To remove the rectangle, select menu item File, Remove Print Region , or press the Escape (ESC) key.

I created a test suite from a model using Reactis, but when I run the tests within Reactis, the output values are different than those stored in the tests. Why is this?


The probable explanation is that your model was modified after the tests were generated, but before they were run. In this case, feeding in the input values from the test might yield different responses from the model. To update a test suite so that the new model responses are recorded in the tests, load the model and test suite in Simulator and then select Test Suite, Update Outputs...

Another possible explanation for the differences is that the model contains an S-function that maintains its own state from one call to the next. (For example, the S-function might modify global or statically allocated variables.) During the test-generation process Reactis repeatedly restarts simulations from intermediate model configurations. In order to restore configurations for S-functions appropriately, Reactis must be able to extract any persistent state information the function might have. Reactis can do this if the S- function adheres to the constraints described in Chapter Preparing Models for Use with Reactis of the Reactis User's Guide and only uses storage allocated by mdlInitializeSizes() to store information between calls to the S-function.