Chapter 4 The Reactis Top-Level Window
The next several chapters of this manual contain detailed
descriptions of different components of Reactis. This
chapter concentrates on the functionality available in the top-level
window when Simulator is turned off, or disabled. Simulator
is disabled when Reactis is first invoked; it may also be explicitly
turned off by clicking button
(window
item 12 in Figure 4.1).
Clicking button
(window
item 13) turns Simulator on; the functionality of the enabled
mode is described in Chapter 7.
| Figure 4.1: The Reactis top-level window. |
4.1 Labeled Window Items
An annotated screen shot of the Reactis top-level window may be
found in Figure 4.1. This section describes the
functionality of the numbered items in this figure, while the section
following discusses the workings of the pull-down menus.
The numbers below refer to the labels in Figure 4.1.
- The model hierarchy panel shows the subsystems in
the model and how they are related. Clicking the + to the
left an item displays the subsystems of the item. Clicking on
an item causes the diagram for the item to be displayed in the
main panel (window item 2). Pressing the
“F2” key causes the parent of the currently displayed system
to be displayed. Hovering in the hierarchy panel over a child
of the currently displayed system causes the child to be
highlighted in the main panel.
Right-clicking on an item in the hierarchy panel causes a pop-up
menu to be displayed with two enabled entries Coverage Tracking and
Copy System Path and several disabled entries. The disabled
menu items become enabled when Simulator is enabled and are described
in Chapter 7.
The Coverage Tracking entry lets you enable or disable coverage
tracking for the given subsystem. If you disable coverage tracking for a
subsystem, Reactis Tester will not attempt to exercise targets
within the subsystem when generating tests and Simulator will not
display coverage information for targets in the subsystem. See
Section 4.3 for details.
The Copy System Path entry causes the path of the selected
subsystem to be copied to the clipboard. When Reactis uncovers
an issue in your model, the copied system path can help you easily
navigate to the appropriate subsystem in the Simulink editor to
resolve the problem. To do so:
-
In the hierarchy panel, right-click on the subsystem of interest
and select Copy System Path
- Start MATLAB and open your model in Simulink
- At the MATLAB prompt type
open_system('
- Paste in the system path from the clipboard
- Type
'); and hit return
- The subsystem of interest will be displayed in the Simulink
editor
-
The main panel displays the currently selected Simulink subsystem,
Stateflow diagram, or C code (if you are using Reactis for C Plugin). You
may interact with the diagram
in a number of different ways using the mouse including hovering
over model items, double-clicking on items, or right-clicking
in various parts of the panel. Note that some operations in the
main panel are only available when Simulator is enabled. See
Chapter 7 for a description of those operations.
The following mouse operations are available when Simulator is disabled:
-
Hovering...
-
over a From or Goto block will cause it and its associated
block(s) to be highlighted in yellow.
- over a Data Store Read, Data Store Write or Data Store
block will cause it and its associated block(s)
to be highlighted in yellow.
- over a Validator objective will cause its wiring
information to be drawn in blue arrows from the data
items monitored to the objective.
- over a top-level input port that is controlled by a virtual
source (see Section 9.1.3) will show a
blue arrow indicating the virtual source block that is
controlling this input port.
- Clicking...
-
on a signal line in a Simulink system
highlights the signal in yellow. This makes it easy to trace a signal
back to the point where it was generated and forwards to the point where
it is consumed (used by a block to compute a new value). The
highlighting flows through (backward and forward) the following blocks
that do not modify a signal value: Inport, Outport, Subsystem, From,
Goto, Data Store Write, Data Store Read.
- in empty space removes signal highlighting.
- Double Clicking...
-
on a Simulink block will display the block’s parameters.
- on a Simulink subsystem will cause the subsystem diagram
to be displayed in the main panel.
- on a Stateflow state will cause the state’s diagram
to be displayed in the main panel.
- on a Simulink S-Function block with an associated .rsm file
(for more details about .rsm files see Chapter 16)
will cause the .rsm file to be displayed in the main panel.
- on a From, Goto or Goto Tag Visibility block will open a dialog
listing all matching From and Goto blocks in your model (see
Section 4.4).
- on a Data Store Read/Write/Memory block will open a dialog
listing all matching blocks in your model (see
Section 4.4).
- on a top-level input port will
bring up a type editor window to modify that port’s type.
- on a configuration variable in the Configuration Variable Panel
(see Section 4.5)
will bring up a type editor window to modify that variable’s type.
- on a Validator expression objective will open the parameter
dialog for that objective.
- Right Clicking...
Causes different pop-up menus to be displayed. The contents of the menu
vary based on where the click occurs and whether or not Simulator is
enabled. A summary of the menu items available when Simulator is
disabled follows. For descriptions of the menu entries available when
Simulator is enabled, see Section 7.1. Right-Click Location | Menu Entries (when Simulator is disabled) |
Simulink signals, Simulink blocks, Stateflow variables | -
Add To Test Points
- Add the data item to the
list of test points which may be
associated with a model, stored in the model’s .rsi file,
and viewed from the Reactis Info File Editor. Test
points are internal data items that Reactis treats as
virtual outputs; specifically, the tool records
values for test points in test suites and Reactis
Simulator flags any differences between the values
computed by a model for a test point and those stored
in a test suite. For more details on test points please
see Section 5.1.3.
|
White space in Stateflow state or Simulink subsystem |
-
Paste
- Insert the user-defined target or assertion from the clipboard at the current mouse location.
- Add User Defined Target
- Create new user defined target (see section 9.3).
- Add Assertion
- Create new Assertion (see section 9.3).
|
White space at top-level of model |
-
Paste
- Insert the user-defined target, assertion, or virtual source from the clipboard at the current mouse location.
- Add User Defined Target
- Create new user defined target (see section 9.3).
- Add Assertion
- Create new Assertion (see section 9.3).
- Add Virtual Source
- Create new virtual source (see section 9.3).
|
Validator objective (i.e. User defined target, assertion or virtual source) | -
Cut
- Cut the objective and copy it to the clipboard.
- Copy
- Copy the objective to the clipboard.
- Edit Properties...
- Edit properties of the objective.
(see section 9.3).
- Remove
- Remove the objective from the model.
- Enable/Disable
- Enable or disable the objective.
|
Simulink top-level input port that is wired to virtual source | -
Enable/Disable control by virtual source
- Enable or disable whether this port
should be controlled by its associated virtual source. If control is disabled,
Reactis will control the input values to the port directly. If control is enabled,
the input values generated by the associated virtual source will be used.
|
Simulink S-Function block | These items are visible only if “Enable white-box analysis of C code”
is enabled in the “Reactis for C” tab of the Reactis settings dialog.
Note that you will need a license for the Reactis for C Plugin in order to use this
functionality. For more information see Chapter 16.-
Assign RSM File...
- Create a new RSM file or assign an existing RSM file to
this S-Function.
- Edit RSM File...
- Edit the RSM file assigned to this S-Function.
- Remove RSM File...
- Remove the assignment of an RSM file to this S-Function.
|
Simulink block | -
View Block Parameters
- Display Simulink block parameters.
|
Top-level input port or configuration variable in Configuration
Variable Panel (see Section 4.5) | - Edit Type
- Modify type of top-level input port or configuration variable
(see Section 5.4).
|
Simulink subsystem or Stateflow diagram | -
Extract Subsystem
- Extract a subsystem and save it in a separate
model file (see section 4.6).
Selecting this item causes the selected subsystem
and any components related to the triggering of the subsystem to
be extracted from the model and inserted into a new model.
Reactis may then be applied to the newly extracted subsystem.
Usage of this feature is described in more detail below in
Section 4.6.
- View Block Parameters
- Display Simulink block parameters.
|
When a diagram is too big to display completely in the main
panel, scroll bars appear for repositioning the diagram.
Alternatively the diagram may be repositioned by left-clicking
and dragging in the panel or by using the cursor keys. If your
mouse includes a scroll wheel, then you may scroll vertically by
clicking in the main panel and then using the scroll wheel.
Left-clicking and dragging in the panel while holding down the control
key defines a “print region” that can be used for printing parts of
a model. The print region is represented as a shaded blue box; it may
be removed using the File -> Remove Print Region menu entry or
pressing the escape key.
Finally, pressing the F2 key within this panel causes the
parent of the currently displayed subsystem to be displayed, pressing
F3 zooms in, and pressing F4 zooms out.
- Load a new model into Reactis.
- Undo an operation (add, edit, remove, move) on a Validator
objective. See Chapter 9 for a description of Validator
objectives.
- Redo last undone operation (add, edit, remove, move) on a Validator
objective. See Chapter 9 for a description of Validator
objectives.
- Zoom in.
- Zoom out.
- Fit to page.
- Go back in the history of displayed subsystems.
- Go forward in the history of displayed subsystems.
- Display the parent of the currently displayed subsystem.
- Disable Reactis Simulator.
- Enable Reactis Simulator.
This section describes the top-level menu items available when
Simulator is disabled. The menu items available when Simulator
is enabled are described in Chapter 7.
Some menu entries also have keyboard shortcuts that enable the relevant
operations to be invoked from the keyboard. These shortcuts are displayed to
the right of the relevant entries in the menus.
-
File menu.
- The file menu contains the following entries.
-
Open Model...
- Load a new model into Reactis.
- Close Model.
- Close the currently displayed model.
- Reload Model.
- Reload the currently displayed model.
- Select Info File...
- Specify a Reactis Info File (.rsi file) to be
used with the current model. See Chapter 5 for a
discussion of editing .rsi files with the Reactis Info File Editor.
.rsi files store information that Reactis associates
with a model including inport constraints, configuration variable settings,
Validator objectives, outport tolerances, and other settings.
- Extract Info File...
- Extract an .rsi file from an .rtp file
.
Reactis Tester may be configured to store launch parameters and
the .rsi file used for a given run in a Reactis Tester Parameter
file (.rtp file). Selecting this menu item retrieves the .rsi file
from the .rtp file.
- Save Info File.
- Save the current .rsi file.
- Save Info File As...
- Rename and save the current .rsi file.
- Print...
- Open a print dialog for model printing.
Section 4.7 explains this feature in more detail.
- Remove Print Region.
- Clear the selected printing
region in the main panel. You may select a region of a model
for printing by left-clicking and dragging in the panel while
holding down the control key. The resulting selection is
highlighted within a blue box. Selecting this menu item removes
the blue box.
- Settings...
-
Opens dialog to adjust Reactis settings.
Section 4.8 describes the use of this dialog.
- Defaults...
-
Opens dialog to specify default settings to be used when creating new
.rsi files. Currently the dialog only includes coverage settings that
specify which coverage criteria are used for a model and how the coverage
criteria are configured (e.g. multi-block versus traditional MC/DC). Whenever
a new .rsi file is created, these settings are imported into the model-specific
coverage settings section of the new .rsi file. Subsequently the
model-specific coverage settings for a model are modified using the
Info File Editor. See Section 4.9 for more details
on the Defaults dialog.
- Exit Reactis.
- Exit Reactis.
- Edit menu.
-
This menu includes entries used to manipulate .rsi files and an
entry to launch a model search function. .rsi files
contain constraints on the values assumed by top-level
inports, details related to Validator objectives, and other model
information maintained by Reactis. Note that .rsi files may
be modified only when Simulator is disabled. Therefore, when
Simulator is enabled the first five menu items are disabled,
and the last ten launch the Info File Editor in a read-only
mode (the information may be viewed but not changed).
-
Undo.
- Undo an operation (add, edit, remove, move) on a Validator
objective.
- Redo.
- Redo last undone operation (add, edit, remove, move) on a Validator
objective.
- Cut.
- Cut the currently selected Validator objective and place it in the
clipboard.
- Copy.
- Copy the currently selected Validator objective to the clipboard.
- Paste.
- Paste a Validator objective from the clipboard
to the current subsystem. To paste an objective to a specific
position, right-click on that position in your model and select Paste from the context menu.
- Find...
-
Perform a text search of your model for strings matching a pattern
you specify. Two types of patterns are currently supported. If the
search pattern includes a colon (:), then the text before the colon
corresponds to a Simulink block parameter name and the text after
the colon corresponds to a value for that parameter. For example
the pattern
BlockType:Inport will initiate a search for
all input ports in the model. If the search string contains
no colon, then the search will examine Simulink block names,
Stateflow state names and actions, Validator objective names,
configuration variable names, and C code (if you are using the
Reactis for C Plugin). The scope of the search (the parts of the model examined for a
match) is determined by the subsystem displayed when the search is
launched. The scope consists of the currently displayed subsystem
and all of its descendant’s (child subsystems, their children and so
forth). Note that the search scope does not change if the search
pattern is modified. The scope changes only when the search dialog
is dismissed and a new search is launched. To search the entire model
select the top-level and launch a search.
| The following ten entries invoke the Info File
Editor to the tab specified by the menu entry. The Info File Editor is
described in more detail in Chapter 5. |
-
Inport Types...
- Constrain
the values generated for top-level inports during test generation.
- Configuration Variables...
-
Specify workspace data items that may change in between tests but not
during a test.
- Test Points...
- Manipulate test
points for observing model behavior. Test points are internal
data items that Reactis treats as virtual outputs;
specifically, the tool records values for test points in test
suites and, when executing a test suite, Reactis Simulator
flags any differences between the values computed by a model
for a test point and those stored in a test suite.
- Outport Tolerances...
- Specify a tolerance for each outport of a
model. When executing a test suite on the model in Reactis Simulator, an
outport tolerance specifies the maximum acceptable difference between the
value computed by the model for the outport and the value stored in a test
suite for the outport.
- Coverage...
- Specify the set of coverage criteria to be used
when working with a model in Reactis. If a criterion is disabled:
-
the criterion will not be targeted by Tester when generating tests, and
- Simulator will not include the targets from the criterion
in the Coverage Summary dialog, the Coverage Report Browser, and
the highlighting in the main panel.
- Validator Objectives...
- Displays
a centralized list of all Validator objectives in your model and allows you to
monitor, edit, and remove them.
- C Code...
- Displays a list of all locations in your
model where C code is used. For more information, see
Chapter 16.
- Callbacks...
- Specify fragments of
MATLAB code to execute before and/or after a model is loaded.
Note that these operations are distinct from the similar Simulink
callbacks.
- Search Path...
- Specify model-specific
search path.
- Dependencies...
- Specify files on
which a model depends.
- View menu.
- The following are the menu entries that are enabled when
Simulator is disabled. The other elements of the menu are only enabled
when Simulator is enabled. See Section 7.2
for descriptions of these items.
-
Back.
- Go back in the history of displayed subsystems.
- Forward.
- Go forward in the history of displayed subsystems.
- Go to Parent.
- Cause the parent of the currently displayed
subsystem to be displayed in the main panel.
- Zoom In.
- Same as labeled window item 6.
- Zoom Out.
- Same as labeled window item
7.
- Zoom to Fit.
- Fit to page; same as labeled window item
8.
- Expand Tree.
- Causes the entire tree in the model hierarchy panel
to be expanded.
- Collapse Tree.
- Causes the entire tree in the model hierarchy panel
to be collapsed.
- Select Label Font Type...
- Select font for labels in Simulink / Stateflow
diagrams.
- Select Label Font Size...
- Select size of font for labels in
Simulink / Stateflow diagrams. If a negative value is entered, the font size given
in the model will be scaled by (the absolute value of) the entry. For
example, enter -1 to use the font size from the model; use -0.9 to scale
the font from the model down by 10 percent; use -1.1 to scale the font
from the model up by 10 percent.
- Select C Source Font...
- Select font for displaying C source
code in the main panel when using Reactis for C Plugin.
- Select Line Styles...
- Select styles and colors for drawing
various Simulink / Stateflow diagram items.
- Show Recent Errors...
- Display recent error messages encountered
for the current model.
- Clear Recent Errors.
- Remove all entries from the list of recent errors.
- Use classic toolbar.
- Use the version of the toolbar that existed prior to V2010.2.
- Simulate menu.
- Only one menu entry is enabled when Simulator is
disabled, and it is described below. The remaining elements of the
menu are only enabled
when Simulator is enabled, and are described in Section
7.2.
-
Simulator on/off.
- Toggles whether Simulator is enabled
or disabled. Implements the same behavior as labeled window items
12 and 13 in Figure 4.1.
- Test Suite menu.
- The following menu entries are enabled when
Simulator is disabled. The remaining elements of the menu are only
enabled when Simulator is enabled, and are described in Section
7.2.
-
Create...
- Launch Reactis Tester.
See Chapter 8 for details.
- Browse...
- Launches the Test-Suite Browser by first opening a
file-selection dialog to allow you to indicate which test suite
is to be browsed.
See Chapter 11 for details.
- Validate menu.
- Since Validator objectives may only
be modified when Simulator is disabled, the first six entries
are disabled when Simulator is active. Depending on the state of
the main panel, these entries might be enabled when Simulator is
disabled. See Chapter 9 for more details.
- Add Assertion
- Add an assertion to the system currently displayed in
the main panel. The sub-menu enables you to specify whether the assertion
should be an expression, a diagram, or a timer. This menu item is enabled
when the subsystem currently displayed in the main panel is a Simulink
diagram, but disabled when it is Stateflow diagram; to add assertions into
Stateflow diagrams, right-click in the diagram.
- Add User-Defined Target
- Add a user-defined target to the system
currently displayed in the main panel. The sub-menu enables you to specify
whether the target should be an expression, a diagram, or a timer. This menu
item is enabled when the subsystem currently displayed in the main panel is a
Simulink diagram, but disabled when it is a Stateflow diagram; to add
user-defined targets into Stateflow diagrams, right-click in the diagram.
- Add Virtual Source
- Add a virtual source. The sub-menu enables you
to specify whether the target should be an expression or a diagram. This
menu item is enabled when the subsystem currently displayed is the top level
system, but disabled when the focus is at a deeper level.
- Edit Objective...
- Edit the currently selected Validator
objective. This menu item is disabled if no objective is selected.
- Remove Objective.
- Remove the currently selected Validator
objective. This menu item is disabled if no objective is selected.
- Disable/Enable Objective.
- Disable or enable the currently selected
Validator objective. This menu item is disabled if no objective is selected.
- Check Assertions...
- Launch Reactis Validator to search for
assertion violations. See Chapter 9 for details.
- Coverage menu.
- No items are enabled when Simulator is disabled.
- Window menu.
- Enables user to switch between different models currently
loaded in Reactis.
- Help menu.
-
The Help menu contains the following entries.
- Contents.
- Go to the table of contents in the
documentation.
- Index.
- Go to the index in the documentation.
- Frequently Asked Questions.
- Go to the Frequently Asked Questions
section of the documentation.
- Release Notes.
- Display the release notes for the current
Reactis version.
- Top Level Window.
- Go to the section of the documentation that
describes the Reactis top-level window.
- Check for Updates...
- Query the Reactive Systems website to check
if a newer version of Reactis is available.
- About.
- Open a dialog displaying the Reactis
version and other configuration information. The dialog includes
a Copy To Clipboard button to transfer the information to
the Windows Clipboard. When requesting assistance, sending this
information to Reactive Systems via email often facilitates the
efficient delivery of support.
4.3 Enabling and Disabling Coverage Tracking for a Subsystem
When testing your complete model, there may be a portion of your model that
has already been tested (perhaps from a library). You may prefer to disregard
the already-tested component in new tests you generate. This section describes
a Reactis feature that lets you do this by disabling coverage tracking for
a given subsystem. Turning off coverage tracking for a subsystem has the following
effects:
-
Tester will not attempt to cover targets within the subsystem
- Simulator will not track coverage for targets in the subsystem,
so the targets will not be:
-
included in the Coverage Summary dialog,
- included in reports displayed or exported by the Coverage Report Browser,
- highlighted in the main panel
When Simulator is disabled, you can enable or disable coverage tracking for a
subsystem by right-clicking on the subsystem in the Reactis hierarchy panel
and selecting the Coverage Tracking entry which has the following
sub-menus:
-
Enable
- Enable coverage tracking for targets in the subsystem.
- Disable
- Disable coverage tracking for targets in the subsystem.
- Inherit
- The coverage tracking for the subsystem is the same
as its parent’s setting.
- Reset...
- Set the coverage tracking setting for the subsystem and all
its descendants to ’inherited’.
By default, coverage tracking is enabled for the top-level of the model and
set to inherit for all other subsystems. As shown in
Figure 4.2, visual cues in the hierarchy panel
indicate the current coverage tracking setting for each subsystem.
An X mark on the icon to the left of a subsystem name indicates that
coverage tracking is disabled, whereas a check mark indicates that
coverage tracking is enabled. If the icon has neither a check nor an
X, then the subsystem is set to inherit its coverage tracking setting.
If a subsystem currently has coverage tracking disabled or it inherits
a disabled setting, then the subsystem name is grayed out (drawn in
a lighter color).
| Figure 4.2: Visual cues indicate the current coverage
tracking settings. Above, coverage tracking is disabled for CruiseMDL
(indicated by X mark) and enabled for DesiredSpeed (indicated by check mark).
Several subsystems have no X mark but have grayed out names to indicate that
they inherit a disabled setting. |
4.4 List of Matching From/Goto or Data Store Blocks
| Figure 4.3: The list of matching From/Goto or Data Store blocks. |
This dialog comes up after double-clicking on a From, Goto,
Goto Tag Visibility or Data Store Read/Write/Memory block in
Reactis. It lists all other such blocks in your model that match the
double-clicked block.
In this dialog you can:
- Double-click on a row to have Reactis highlight the block in the main
panel. If the block is located in a different subsystem than the one currently
displayed, Reactis will switch to that subsystem.
- Click on a column header to re-sort the table by the values of
that column.
- Click on the Close button to close the dialog.
4.5 Configuration Variable Panel
If you have defined configuration variables for your model (see
Section 5.1.2), Reactis will include an entry
“Configuration Variables” in the top-level of the hierarchy panel.
Clicking on this entry displays a block in the main panel for each
currently defined configuration variable. This panel allows you
to view and manipulate configuration-variable information.
Double-clicking on a configuration variable when Simulator is
disabled opens the type editor dialog to specify a constraint for the
configuration variable. When Simulator is enabled and at the start
of a simulation run (no steps have been taken), double-clicking on the
configuration variable opens a dialog to specify a value for the
variable.
When Coverage -> Show Details is selected in Simulator,
information on boundary value coverage for configuration variables is
conveyed in the panel. A block is highlighted in red if it has any
uncovered boundary value targets. See Section 6.3.2.1
for a description of the boundary value targets associated with a configuration
variable. Hovering over the variable in this panel displays test and step
in which exercised targets were covered.
4.6 Extracting Subsystems
It is sometimes useful to apply Reactis to individual subsystems
within a larger model. For example, if a given model is closed-loop,
with a controller connected to a plant, then isolating the controller
subsystem may be needed in order to generate tests for the
controller. In other cases, very large models might require
subsystem-at-a-time analysis. Reactis enables such analysis by
providing a facility to extract subsystems from models. This feature
isolates a subsystem, optionally along with portions of the model
involved in triggering the subsystem, and stores the result as a new
model in a separate .mdl file.
When extracting a subsystem, Reactis retains the hierarchical
structure of the original model. That is, the original subsystem
interfaces enclosing the extracted subsystem are retained, although
the input and output ports connected to these interfaces are altered
to coincide with those of the extracted subsystems. Retaining the
model hierarchy in this fashion facilitates the inclusion of
triggering mechanisms and Data Store Memory blocks in the extracted
model.
| Figure 4.4: The Extract Subsystem dialog. |
The subsystem extraction utility is invoked by loading a model into Reactis,
then right-clicking on the Simulink subsystem or Stateflow chart to be
extracted and selecting the Extract Subsystem entry in the pop-up menu.
This causes the Extract Subsystem dialog shown in
Figure 4.4 to appear. Using the dialog you can specify
the name of the file in which to store the extracted model and whether the
triggering mechanism should be included.
The Port settings section lets you specify if information (type and
sample rate) from the original model should be propagated to the top-level ports
of the extracted subsystem. Note that when this information is not propagated,
the types and sample rates inferred for the ports of the extracted subsystem may
differ from those inferred in the original model (since type and sample rate
information has been removed in the extracted model). When the propagation is
enabled, for each port P of the subsystem being extracted, the extraction
routine:
-
Traces the signal connected to P up one level in the hierarchy to a port P′
- Records the type/rate inferred for P′ in the original model
- Explicitly sets the type/rate for P′ in the extracted model
The following limitations apply:
-
If the type of P′ is a virtual bus then the type will not propagate.
- If P′ has multiple sample rates or is triggered by an irregular mechanism
such as a Stateflow chart then the sample rate will not propagate.
When you click Extract, Reactis will extract the subsystem, save
it under its new name, open a new Reactis window, and load the extracted
model. Note that the extracted subsystem is saved as a standard .mdl file,
making it easy to edit the extracted model using Simulink if changes to new
model are necessary.
If you select Extract subsystem and triggering mechanism
then portions of the original model outside the subsystem of interest,
but involved in the triggering of that subsystem will be included in the
extracted model. More precisely, if the extracted subsystem
-
is a triggered subsystem,
- is located within a triggered subsystem, or
- contains one or more triggered subsystems whose triggers
are connected to something outside the extracted subsystem
then Reactis determines which portions of the model residing
outside of the extracted subsystem should be retained in order to
trigger the extracted subsystem properly. This ensures that the
simulation times during which the extracted subsystem is executed
match those of the subsystem before it was extracted.
If the extracted subsystem references Data Store Memory blocks located
outside the extracted subsystem, Reactis will keep those Data Store
Memory blocks. However, Reactis will not keep any Data Store Write
blocks outside the extracted subsystem.
Note that the extraction tool can extract parts of a
model even if Reactis reports errors when trying to run it. This
enables Reactis to be used on models that contain Simulink
features that are unsupported by Reactis, as long as those features
are not used in the extracted subsystem. For example, one may
extract a discrete-time controller subsystem from a model that
includes a continuous-time plant.
4.7 Printing Models
| Figure 4.5: The Print dialog. |
Reactis includes a flexible facility for printing models. Upon
selecting menu item File -> Print...
the print dialog shown in Figure 4.5 appears.
The radio buttons and check-boxes in the Print Range section of the
dialog specify which portions of the model should be printed as follows.
-
Selection.
- Prints only the portion of the model located within
the current print region in the main panel. If no print region is defined,
this entry is disabled. A print
region is selected by left-clicking and dragging in the main panel
while holding down the control key.
The print region is cleared by selecting menu item
File -> Remove Print Region.
- Current system.
- Prints only the system currently displayed in the
main panel.
- Current system and above.
- Prints the system currently displayed in the
main panel and all systems between the current system and the top-level
system in the current model. Each such system is printed on a separate
sheet of paper.
- Current system and below.
- Prints the system currently displayed
together
with all its subsystems, sub-subsystems, etc. Each
system is printed on a separate sheet of paper.
- Whole model.
- Prints the whole model.
- Expand unique library links.
- When checked, library
blocks referenced by the model will be printed. Note that each
library block is printed only once, even though some blocks might
be referenced multiple times by a model.
- Look under masks.
- When checked, masked subsystems
will be printed.
The following radio buttons and check-boxes in the Frame section
specify whether a frame should be printed
on each page, and if so what content should be included in the frame.
-
No frame.
- When checked, no frame is printed.
- Frame.
- When checked, a frame is printed.
- Include system name.
- When checked, the name of the system
is printed in the upper left part of the page
frame.
- Include print date.
- When checked, the date the model was printed
is included in the bottom left corner of the frame on each page.
- Include page number
- When checked, the page number is printed
in the bottom right corner of the frame on each page.
- Include file name.
- When checked, the name of the .mdl file
containing the model and the folder containing the file is printed in
the bottom left corner of each page.
The remaining buttons in the print dialog work as follows.
-
Help.
- Display print dialog help.
- Page Setup...
- Invokes a dialog that allows the user to
specify paper size and margins, and whether printing should
be portrait or landscape.
- Preview.
- Open a viewer to display what will be printed.
- Print...
- Begin printing.
- Close.
- Close the dialog (and cancel printing).
4.8 Reactis Settings
Selecting File -> Settings... invokes the Reactis Settings dialog,
which allows you to adjust the behavior of Reactis. The settings are
partitioned into seven tabbed panes each described in detail below:
General, Reactis for C,
MATLAB, Path, Files, User Info, and
License.
4.8.1 General Settings
The General settings tab shown in Figure 4.6
includes the following items.
| Figure 4.6: The Settings dialog with General tab selected. |
- GUI Language.
- Language used in the Reactis GUI.
- Documentation Language.
- Language used for the in-tool
Reactis help.
- Model file encoding.
- Character encoding used by .mdl files.
- On integer overflow.
-
Integer overflow can occur during the evaluation of some blocks.
These blocks typically have a SaturateOnIntegerOverflow parameter.
When set to ’on’, this parameter specifies that the block should evaluate
to the maximum value for the type on overflow and the minimum value
on underflow. When SaturateOnIntegerOverflow is set to ’off’
Simulink uses the model parameter IntegerOverflowMsg
1 to determine
how overflows are handled. There are three possible settings:
-
none.
- Return the wrapped around value 2.
- warning.
- Return the wrapped around value but also issue a warning.
- error.
- Raise an error and halt simulation.
Reactis gives users a way to override the IntegerOverflowMsg parameter
with the ’On Integer Overflow’ setting which may have one of three possible
values:
-
Wrap over.
- Return the wrapped around value.
- Produce error.
- Raise an error and halt simulation or test-generation.
In the case of interrupted test-generation, Reactis Tester returns
a test suite that includes a test leading to the overflow.
- Inherit from model settings.
- Use the IntegerOverflowMsg setting
from the model; however, Reactis does not currently generate warnings.
When IntegerOverflowMsg is set to ’warning’, Reactis behaves as
if it is set to ’none’.
- When detecting Inf or NaN values.
-
Inf (Infinity) and NaN (not-a-number) are values that can arise during
floating point computations as a model executes. These result from
unexpected inputs to a mathematical operation; for example, dividing by zero or
taking the square root of a negative number. Often, these values indicate
a modeling error that should be corrected.
To help detect such errors, Simulink offers a setting to specify
what happens if such an Inf or Nan value is detected.
3
There are three possible settings:
-
none.
- Continue with simulation, possibly propagating the Inf/NaN value
through the model.
- warning.
- Continue with simulation, but produce a warning.
- error.
- Raise an error and halt simulation.
Reactis gives the user a way to override the Simulink Inf/NaN behavior.
The Reactis When detecting Inf or NaN values setting may have one
of three possible values:
-
No action.
- Continue simulation or test-generation.
- Produce error.
- Raise an error and halt simulation or test-generation.
In the case of interrupted test-generation, Reactis Tester returns
a test suite that includes a test leading to the Inf/NaN.
- Inherit from model settings.
- Use the Simulink setting
from the model; however, Reactis does not currently generate warnings.
When the Simulink setting is ’warning’, Reactis behaves as
if it is set to ’none’.
- Conditional input branch execution.
-
Conditional input branch execution is an optimization that causes
some blocks in a model not to execute when they are not necessary
to compute the outputs of the model. Please see Section 15.1
for a description of this optimization. The options for this menu are:
-
On
- Use conditional input branch execution.
- Off
- Do not use conditional input branch execution.
- Inherit from model settings
- Enable or disable conditional
input branch execution according to the settings in the .mdl file.
- When Detecting Stateflow Outport Merge.
-
This setting configures Reactis to issue a warning
or error when a model contains a particular configuration
of Stateflow charts and merge blocks that can yield
unexpected behavior. Note that even for models with this
unexpected behavior, Reactis implements the same semantics
as the MathWorks Simulink / Stateflow engine.
We now describe how the unexpected behavior can occur. If an outport of a
Stateflow chart is directly connected to a merge block and the outport is
read within the chart, then an unexpected back-propagation of values from
outside the chart into the chart via the outport can occur. This setting
enables you to configure Reactis to produce a warning or error when such
a construct is detected. The example in Figure 4.7
shows a model in which this back-propagation occurs.
| Figure 4.7: Unexpected back-propagation of a value
through an outport of a Stateflow diagram. In this example,
the value output by the digital clock is propagated back into Chart2
via out1. The value is then output on out2, yielding the matching
scopes for the clock and out2. |
- Stateflow infinite loop timeout (seconds).
-
Maximum time for Reactis to compute a simulation
step. If the computation of a simulation step takes longer,
Reactis assumes there is an infinite loop; the simulation
is then terminated and an error message printed.
- Relative tolerance for output differences.
-
When running a test suite, Reactis Simulator
compares the top-level outputs and values for test points
produced by the model to those stored
in the test suite and produces a warning if a difference is detected.
Since minor differences for floating point values due to small
rounding errors are common, a relative tolerance can be specified here
that will be used when comparing floating point values. To require an
exact match, the tolerance can be set to 0. Note, that
the global tolerance specified here can be overridden for a particular
outport or test point as described in Sections 5.1.4 and
5.1.3.
- Create and use cache files (with extension ’.mwi’).
-
Instructs Reactis to
create a file containing intermediate information it has computed about a
model. These files can significantly improve subsequent load times. If you
modify your model, Reactis will detect the changes and re-generate the .mwi
file. Clicking the Flush Cache button causes the cache to be
emptied. Subsequently intermediate information will be recomputed as needed.
Note, however, that .mwi files are not deleted on disk.
- Propagate set_param changes by saving the model to a temporary
file.
- Models using self-modification
commands (e.g.
set_param, add_block ,etc. ) could previously
cause problems because Reactis would not see the changes made by them. This
setting has been added to deal with this scenario. If this setting is
enabled, Reactis will cause Simulink to apply all the changes to the model,
then automatically save them to a temporary file. Reactis then imports the
temporary model file, allowing Reactis to see the applied changes. - When creating a test suite, also create a parameters file
(extension .rtp).
-
Instructs Reactis Tester to store launch parameters and
the .rsi file used for a given run in a Reactis Tester
Parameter file (.rtp file
). Subsequently:
-
the .rsi file may be extracted from the .rtp file by selecting
File -> Extract Info File...;
- the Tester parameters may be loaded into the Tester launch
dialog by clicking the Load button.
Re-running Tester with the same .rsi file and same parameters on
the same model will regenerate the test suite produced by the original
Tester run. - Use new fixed-step sample time computation.
- Enabling this option
will slightly change the way Reactis computes time values for models
configured to use the fixed-step solver, especially those with sample times
that have poor floating point representations such as 0.1, 0.01 or similar.
The new behavior makes the rounding errors in the Reactis sample time
computations line up better with Simulink’s rounding errors for such models.
Note that after enabling this option, test suites created with the legacy
approach employed prior to Reactis V2010 can show different behavior in
cases where a small change in sample time can cause the model to
significantly change its execution.
- Ignore ToFile and ToWorkspace blocks.
-
Checking this box enables Reactis to process models that include
these blocks by ignoring them. If not checked, Reactis reports an
error whenever it simulates a model containing such blocks.
- Short-circuit Simulink boolean operators.
- Checking
this box indicates that evaluation of logic blocks should be
short-circuited, i.e. should be halted as soon as its output value
has been determined. For example, once one input to an AND block
has been found to be false, it is known that the output of the AND
block should be false; if this box is checked, then the remaining
inputs are not examined. Short-circuiting affects coverage
analysis and reporting for Condition, Decision and MC/DC coverage
metrics, as unexamined inputs are treated as “don’t care”
points. More information about coverage may be found in
Chapter 6.
- Short-circuit Stateflow boolean operators.
- Checking
this box indicates that boolean operators in Stateflow guards
should be short-circuited. See the previous item for a discussion
of short-circuiting.
- Automatically check for updates (once a day).
- Instructs
Reactis to check once per day whether updates to Reactis are
available for download. If updates are found you will be asked
if you would like to download and install the patch. Note: this
feature can be disabled at install time; in which case this checkbox
will not appear in the dialog.
- Enable logging.
- Enable logging, specify a log level, and indicate
the file to which the log should be written. Note that logging degrades
performance and can create very large log files; therefore, it is typically
only used to diagnose problems. The log level string will be provided by
the Reactis support team if you are asked to create a log file.
4.8.2 Reactis for C Settings
This tab is used to enable and configure Reactis for C Plugin. Please see Section
16.2 for details.
4.8.3 MATLAB Settings
Reactis sometimes invokes MATLAB during simulation, test-generation,
and validation. The MATLAB settings tab, shown in
Figure 4.8, enables you to configure some
aspects of how Reactis invokes MATLAB .
| Figure 4.8: The Settings dialog with MATLAB selected. |
-
Use MATLAB version.
- If you have multiple versions of MATLAB installed,
this pull-down menu may be used to specify the version of MATLAB that Reactis
will invoke. Each installation of MATLAB that Reactis automatically detects
will have an entry in the menu. The menu includes two additional entries:
-
None specified (use Windows path)
- When this entry is selected, Reactis
will invoke the version of MATLAB that appears first in the Windows path.
- Custom
- When this entry is selected, Reactis will invoke the version of
MATLAB that appears in the MATLAB root text entry box (just below this menu
in the MATLAB tab of the settings dialog).
- Use MATLAB root.
- This text entry box becomes enabled when the
Custom entry of the MATLAB version menu is selected. By
entering a folder name (directly or by clicking the button to the
right and using the file-selection dialog), you specify a
folder containing the MATLAB installation which Reactis should
use. This configuration is typically only used for a custom MATLAB
installation that Reactis is unable to detect automatically.
- Reuse existing MATLAB command windows.
- When Reactis invokes
MATLAB , it will use this option to determine whether to reuse to existing
MATLAB instances, or invoke new ones. This may help compatibility in some
situations.
- MATLAB start up timeout (seconds).
- When Reactis
invokes MATLAB , it will wait this long for a response
indicating a successful invocation before assuming that MATLAB
will not start properly.
- Prepend Reactis search path to MATLAB path.
- When this box
is checked, every time Reactis launches MATLAB it will prepend
the Reactis search path to the MATLAB path.
- Execute startup.m and pathdef.m scripts in model folder.
- When
this box is checked, every time Reactis launches MATLAB it will
look for pathdef.m and startup.m files residing in the same folder as
the model. If a pathdef.m file is found, Reactis will set the MATLAB
path according its contents. If a startup.m file is found, Reactis will
direct MATLAB to execute it prior to loading the model.
4.8.4 Path Settings
The Path tab of the Settings dialog, shown in
Figure 4.9, enables you to specify the
list of folders in which Reactis will search for files such as
Simulink model libraries (.mdl), MATLAB scripts (.m), and S-Functions
(.dll, .mexw32, .m). The order in which folders are listed in the
dialog specifies the search order (from top to bottom).
Note that Reactis also gives users the capability to define model-specific
search paths which consist of a list of folders to be
searched when loading a given model. The model-specific path is set
using the Reactis Info File Editor as described in Chapter
5. When searching for files, the complete
search path is constructed by prepending the model-specific path to
the global path.
The buttons labeled in the figure work as follows.
| Figure 4.9: The Settings dialog with Path tab selected. |
-
Add a new folder to the list.
- Open a dialog to edit the currently selected folder.
- Remove the currently selected folder(s) from the list.
- Select all folders in the list.
- Copy the currently selected folder(s) to the clipboard.
- Paste from the clipboard to the list.
- Invoke MATLAB , query the MATLAB path, and add each
folder in the MATLAB path to the list.
- Move the currently selected folder up one spot in the list.
- Move the currently selected folder down one spot in the list.
- Move the currently selected folder to the top of the list.
- Move the currently selected folder to the bottom of the list.
- Produce warning if multiple instances of a library are found in the search path.
4.8.5 Files Settings
The Files tab, shown in Figure 4.10,
enables you to specify the folder where Reactis should store files
that it creates and uses. These files include Reactis Info (.rsi),
Reactis Profile (.rsp), and Reactis Cache (.mwi) files. The
setting also determines the default location (which you can override)
for Reactis test suite (.rst) and coverage report (.html) files.
If you choose to specify a subfolder, then the folder name entered
in the textbox is relative to the model folder. The special string
%MODELNAME% may be included in the subfolder name and will be
replaced by the base name of the model file.
For example, for a model cruise.mdl located in a folder
c:\models, a subfolder string of reactis\%MODELNAME%
will cause the files associated with cruise.mdl to be stored in
c:\models\reactis\cruise.
| Figure 4.10: Specify the folder where Reactis should
store files that it creates and uses. |
4.8.6 User Info Settings
The User Info settings tab is shown in Figure 4.11.
When Reactis is configured to use a remote license server as described in the
next section, information contained in this panel is submitted to the server
when Reactis is started, and available to all users who have access to the
server.
The list of users occupying licenses at a given time may be obtained
using the License tab of the Settings dialog as
described below, or using the standalone License Monitor utility
included in the Reactis distribution. This utility may be invoked
by selecting Reactis V2011.2 -> License Manager -> License Monitor
from the Windows Start menu.
| Figure 4.11: The Settings dialog with User Info tab selected. |
4.8.7 License Settings
The License tab, shown in Figure 4.12, enables
you to query and specify license configuration information. The first two
sections display the MAC address of the machine on which Reactis is running
and the location of a local license file if one is in use.
The third section of the tab displays a list of servers running the Reactis
License Manager. When Reactis is invoked, this list will be searched from
top to bottom for an available license. The lowest portion of the tab displays
a list of users currently using licenses for the License Manager/product
currently selected License servers list.
| Figure 4.12: The Settings dialog with License tab selected. |
Each of the window items labeled in Figure 4.12
is interpreted and used as follows.
- Information about the contents of the local license file.
If there is a problem with the license file, then a description
of the error condition is listed here. If no problem exists, then
a list of licensed products and their expiration dates is given.
- This is the list of servers running the Reactis License Manager.
Each entry in the list includes the following:
-
Host
- The name or IP address of the server running the License Manager.
- Status
- The status of the connection to the License Manager.
For each product managed by the server:
-
Product
- Name of the product (Reactis, Reactis for C Plugin, or Reactis for C).
- Total
- The total number of licenses for the product.
- In Use
- The number of currently occupied licenses for the product.
- Add a new License Manager to the list.
- Remove the currently selected License Manager from the list.
- Move the currently selected License Manager up one spot in the list,
down one spot in the list, to the top of the list, or to the bottom of the list.
- Information regarding the currently selected License Manager is displayed
here. If there is a problem with the connection to the License Manager,
then a description of the error condition is listed here. If no problem
exists, then for each license currently occupied, this section lists:
-
IP Address.
- The IP address of the computer on which the Reactis
application occupying the license is running.
- Name.
- The contents of the Name field in the User Info
settings tab of the person occupying the license.
- Phone.
- The contents of the Phone field in the User Info
settings tab of the person occupying the license.
- Duration.
- The length of the time this computer has been
holding the license.
4.9 Reactis Defaults
The Defaults dialog lets you specify default settings to be used when
creating new .rsi files. Whenever a new .rsi file is created, these settings
are imported into the new .rsi file. Subsequently the settings for a model are
modified using the Info File Editor.
Currently the dialog includes a single tab for specifying
defaults for coverage-related settings. The different coverage criteria supported
by Reactis are defined in Chapter 6. The default setting
(which can be overridden by the model-specific coverage settings) for each
criterion can be either enabled or disabled. Additionally, you can set the
default mode of operation for several of the criteria (CSEPT, MC/DC, and Boundary
Value) that support different modes of operation. For a description of the
meaning of these settings see 5.1.5.