Reactis for C V2019 Released

R Reactis® for C V2019 is now available for download. The new version includes a new instrumentation code mechanism that lets you virtually insert snippets of C code into your application's source files. The most common use case for instrumentation code is the addition of assertions and user-defined targets to check that your application satisfies its requirements. No modifications to your application C code are required to do so. In addition to the instrumentation code feature, V2019 also offers a revamped user-guided simulation mode, more flexibility in monitoring the values of structure and array elements, the ability to open scopes from the test suite browser, and all bug fixes since V2018.

Instrumentation Code

The new instrumentation code feature of V2019 lets you virtually insert snippets of C code into your program. When Reactis compiles an application that includes instrumentation code, it automatically integrates the instrumentation code with the application code. The instrumentation code and its location within your program are stored in the Reactis build file, so your source code need not be modified. Adding an assertion to a cruise control (to check that the brake always deactivates the cruise control) can be achieved as follows.

  1. Load your program in Reactis for C.
  2. Right-click on a line number in your code where the assertion should reside and select Add Instrumentation Code.
  3. In the resulting editor enter:
          reactis_assert(!(brake && *active));

The reactis_assert macro is defined in cruise_validator.h. If the argument to the macro (a C expression) ever evaluates to zero then an assertion violation is reported.

instrumentation code showing brake assertion

In addition to supporting the use of assertions and user-defined targets, instrumentation code can also be used to craft your test harness to include a plant or hardware emulation layer, or to specify dependencies between top-level inputs.

Revamped User-Guided Simulation

The user-guided simulation mode of Reactis Simulator lets you specify the top-level inputs to your code as it executes. This type of stepping is useful for debugging as well as for interactively constructing tests. As shown in the screenshot below, V2019 offers an enhanced Next Input Values dialog for controlling user-guided stepping.

V2019 Next Input Values dialog

Buttons for controlling the stepping are now available directly in the dialog. You can also now choose to include only a subset of the inputs in the dialog, or choose to add specified outputs, test points, or configuration variables to the dialog. Scopes can easily be opened for any subset of the signals in the dialog.

V2019 Next Input Values dialog scopes

To specify the next value an input should have, you can now give either a concrete value (previously supported) or an expression that can reference the previous values of inputs or the simulation time. This offers a convenient way to generate various types of signals. For example, to generate a ramp for input X, simply specify pre(X) + 1. Here pre(X) denotes the value X had in the previous simulation step. To generate a sine wave, just specify sin(t) (t is the simulation time).

Open Scopes from Test Suite Browser

For easier visualization of test data, you can now open scopes directly within the Test Suite Browser for any signals (inputs, outputs, test points) contained in a test suite.

open scopes from test suite browser

Monitoring Values of Structure and Array Elements

Individual structure members and array elements can now be added to the watched variable panel. The value of each selected element is displayed on a separate line the panel and is highlighted with a yellow background when it changes. Alternatively, you can select the entire structure or array and watch it as a single aggregate value.

Reactis is a registered trademark of Reactive Systems, Inc.

Best Regards,
The Reactis Team

Back to Communicator Archive