25. Model-Specific Parameters#

Reactis for Simulink stores information it uses for testing and validation in an .rsi file, rather than making any modification to the model (the .slx file). Such information, for example constraints on inputs, can be manipulated in the Reactis GUI using the Reactis Info File Editor.

The settings stored in an .rsi file are termed model-specific settings since they can be configured differently for each model you work with in Reactis. The Reactis Info File Editor includes a collection of panes (Harness, Inports, Configuration Variables, …) from which different types of model-specific settings can be manipulated.

This chapter describes model-specific parameters which can be manipulated with rsRsiSetParameterValue and rsRsiGetParameterValue.

Note that many model-specific settings can alternatively be manipulated by specialized functions described in the API documentation chapters whose names begin with Reactis Info File. For example rsRsiSetInputType lets you set an input constraint for a top-level input and is described in Reactis Info File - Inports.

You may also use the parameters described here to specify the default model-specific settings. These are the values Reactis uses when a new .rsi file is created. Also, if a new version of Reactis introduces a new parameter, then when upgrading an .rsi file created with a prior version of Reactis, the value for the new parameter will be the model-specific default. To manipulate default model-specific settings (as opposed to the model-specific settings in a particular .rsi file) use the functions rsGetParameterValue or rsSetParameterValue.

Each parameter described here can also be manipulated from the Reactis Info File Editor or the Default Model-Specific Settings dialog available in the Reactis GUI. The parameter names and allowed values are described below. The parameters are listed below in separate sections corresponding to the different panes of the Info File Editor.

25.1. General#

Parameters set using the General pane of the Reactis Info File Editor.

For a more detailed description of the functionality being controlled by the General parameters, see the Chapter 5 of the Reactis User’s Guide

Parameter Name

Allowed Values

Description

ConditionalInputExecution

‘off’, ‘on’, ‘inherit’

Enable/disable conditional input branch execution. When set to ‘inherit’ Reactis will use the setting given in the model.

InferBusElementNames

‘none’, ‘all’

Enable/disable a host of features introduced in V2012 to offer more user-friendly interactions with bus data types.

DoMWICaching

0, false, 1, true

Create and use cache files (files with extension .mwi) to greatly decrease start up time for Simulator and Tester if no changes to a model occur and the cache file can be used.

DoMWIBinaryCaching

0, false, 1, true

Create and use binary cache files (files with extension .mwib). For large models this can significantly improve Simulator startup time over regular (.mwi only) caching. ‘DoMWICaching’ must also be enabled for this parameter to take effect.

CreateTesterParameterFiles

0, false, 1, true

When creating a test suite, also create a parameters file (extension ’.rtp’).

UpdateModelInSimulink

0, false, 1, true

Enable/disable whether Reactis will cause Simulink to apply all the changes to the model made during initialization (e.g. set_param, add_block, etc.), then automatically save them to a temporary file, before importing the temporary version of the model (with changes applied).

UseNewFixedStepComputation

0, false, 1, true

Enable/disable fixed-step sample time computation introduced in V2010 to reduce rounding errors for sample times that have poor floating point representations such as 0.1, 0.01 or similar.

IgnoreToWorkspaceBlocks

0, false, 1, true

Ignore ToFile and ToWorkspace blocks.

ShortCircuitSLLogicBlocks

0, false, 1, true

Short-circuit Simulink boolean operators.

ShortCircuitSFExpressions

0, false, 1, true

Short-circuit Stateflow boolean operators.

PrependReactisPathToMatlabPath

0, false, 1, true

Before loading a model in MATLAB, prepend Reactis’ search path to MATLAB’s search path.

ExecuteMatlabStartupScripts

0, false, 1, true

Execute startup.m and pathdef.m scripts in model folder.

RemoveUnusedMatlabWorkspaceVars

0, false, 1, true

If enabled, Reactis will instruct MATLAB to delete any unused workspace variables after loading a model during import. This can significantly speed up import times for models that use a generic workspace setup from which only a few variables are actually used. However, in some cases MATLAB may remove variables that are actually used by the model which can lead to errors about undefined variables during import.

InheritParentRsiParameters

0, false, 1, true

If this option is enabled and the current model is referenced by another model, the referenced model will inherit import-related parameters such as Reactis callback functions and search path from the parent model.

LookupSpeedSettingMsg

‘none’, ‘warning’, ‘error’

This option determines the action taken by Reactis when encountering a N-D Lookup Table block whose Internal rule priority setting is set to Speed. If Reactis’ LookupSpeedSettingMsg option is set to error, Reactis will produce an error message when such such a table is encountered. If Reactis’ setting is set to warning, Reactis will produce a warning and proceed as if the table’s Internal rule priority setting was set to Precision. If set to none, Reactis will use Precision without producing a warning.

25.2. Error Checking#

The model-specific parameters related to error checking are listed in the table below. For a more detailed description of the functionality being controlled by the error-checking parameters, see the Chapter 5 of the Reactis User’s Guide.

Parameter Name

Allowed Values

Description

OnInputOutOfRange

‘none’, ‘warning’, ‘error’

This setting specifies what happens if an input value violates the constraint given for the input. For example, if a range constraint is given, what happens when a value outside the range is encountered.

OnConfigOutOfRange

‘none’, ‘warning’, ‘error’

This setting specifies what happens if an configuration variable value violates the constraint given for the variable. For example, if a range constraint is given, what happens when a value outside the range is encountered.

DeltaExceedsTypeRange

‘none’, ‘warning’, ‘error’

When specifying a delta input constraint, the allowed maximum change should not exceed the range for the input. This setting lets you configure how Reactis responds if you specify a maximum allowed change that is greater than the range of an input. For example, consider delta constraint: double [min,max] delta [dmin,dmax] a delta constraint size error occurs if dmin < -range or dmax > range where range = max - min. This setting lets you configure how Reactis responds to such errors. When starting Simulator or Tester with an .rsi file containing an delta constraint size error, Reactis will do the following according to this setting:

‘none’

means clip the delta constraint so it is not too big and produce no warning or error.

‘warning’

means clip the delta constraint and produce a warning.

‘error’

produce an error and stop test generation or simulation.

Tolerance

  • rtol

  • rel,rtol

  • abs,atol

  • min,rtol,atol

  • max,rtol,atol where rtol (relative tolerance) and atol (absolute tolerance) are doubles

When running a test suite in Reactis Simulator, the values of outputs and test points computed by the model are compared to those stored in the test suite. A warning is produced if the difference exceeds the tolerance given by this parameter.

Example Tolerance Values

0.01

Relative tolerance of 0.01 (i.e. 1% difference triggers warning)

rel,0.01

Same as above

abs,0.01

Absolute tolerance of 0.01 (i.e. difference > 0.01 triggers warning)

min,0.01,0.02

Difference flagged if either relative tolerance of 0.01 is exceeded or absolute tolerance of 0.02 is exceeded.

max,0.01,0.02

Difference flagged if both relative tolerance of 0.01 is exceeded and absolute tolerance of 0.02 is exceeded.

OnIntegerOverflow

‘none’, ‘warning’, ‘error’, ‘inherit’

Set integer overflow behavior. When set to ‘inherit’ Reactis will use the setting given in the model.

OnIntegerSaturation

‘none’, ‘warning’, ‘error’, ‘inherit’

Set integer saturation behavior. When set to ‘inherit’ Reactis will use the setting given in the model.

OnDetectInfNan

‘none’, ‘warning’, ‘error’, ‘inherit’

Configure how Reactis responds to Inf and NaN values. When set to ‘inherit’ Reactis will use the setting given in the model.

OnDetectInfNanConversion

‘none’, ‘error’, ‘inherit’

Configure how Reactis responds to conversion of an Inf or NaN value to an integer.

OnDetectSubnormal

‘none’, ‘warning’, ‘error’, ‘flushToZero’

Configure how Reactis responds to subnormal floating-point values. When set to ‘none’, Reactis will keep the subnormal value and continue test generation or simulation. When set to ‘warning’, Reactis will will keep the subnormal value, produce a warning and continue. When set to ‘flushToZero’ Reactis will replace the subnormal value with zero and continue. When set to ‘error’, Reactis will stop test generation or simulation.

OnShiftOutOfRange

‘none’, ‘error’, ‘inherit’

Configure how Reactis responds to a shift operation larger than the word size of the model.

OnCompareIncompatibleEnums

‘none’, ‘warning’, ‘error’

This setting specifies what should happen if a model compares an enumerated value against a value of a different enumerated type.

StateflowOutportMerge

‘none’, ‘error’, ‘warning’

What to do when detecting a Stateflow outport merge.

OnEventBroadcast

‘none’, ‘error’, ‘warning’

What to do when detecting an undirected local event broadcast in Stateflow.

OnMultipleEdgeEventTrigger

‘none’, ‘error’, ‘warning’

What to do when detecting multiple trigger event outputs.

StateflowLoopDetectionTimeout

double

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.

OnCIntegerOverflow

‘none’, ‘warning’, ‘error’

Set the behavior of the C-Plugin when overflow occurs during a signed integer computation.

OnCUnsignedIntegerOverflow

‘none’, ‘error’

Set the behavior of the C-Plugin when overflow occurs during an unsigned integer computation.

OnCIntegerConversionOverflow

‘none’, ‘error’, ‘inherit’

Set the behavior of the C-Plugin when an overflow occurs while converting an unsigned integer to a signed integer.

OnCFloatToUIntConversionOverflow

‘none’, ‘error’, ‘inherit’

Set the behavior of the C-Plugin when an overflow occurs while converting a floating-point value to an (signed or unsigned) integer.

OnCDetectInfNan

‘none’, ‘warning’, ‘error’, ‘inherit’

Configure how the C-Plugin responds of NaN/Inf values. When set to inherit, the C-Plugin uses the value of OnDetectInfNan.

OnCEmptyStruct

‘none’, ‘warning’, ‘error’

Configure how the C-Plugin responds to empty structures and unions.

OnCUndefinedFunctionCall

‘none’, ‘error’

Configure how the C-Plugin responds to calls to undefined functions.

OnCInvalidPointer

‘none’, ‘warning’, ‘error’

Set what happens when a pointer expression yields an invalid address.

CLoopDetectionTimeout

double

Maximum time for the C-Plugin to complete a call to an S-function or custom code function. If the computation takes longer, Reactis assumes there is an infinite loop; the simulation is then terminated and an error message printed. A value of zero disables the timeout.

OnTrigonometryInputOverflow

‘nan’, ‘saturate’, ‘tracksaturate’, ‘inherit’

Controls the output of the Simulink Trigonometry block’s ‘asin’ or ‘acos’ functions when the input is outside their domain (i.e. less than -1.0 or greater than 1.0). If set to ‘nan’, the function will output ‘nan’. If set to ‘saturate’, the input value will be saturated at -1.0 or 1.0 respectively. If set to ‘tracksaturate’, the input value will be saturated and a coverage target will track whether saturation has occurred or not. If set to ‘inherit’ then the behavior will be determined by the Trigonometry block’s ‘Remove Protection for out-of-range input’ setting.

25.3. Coverage Metrics#

The following parameters correspond to the Coverage Metrics pane of the Reactis Info File Editor. For a more detailed description of the functionality being controlled by the coverage parameters, see the Chapter 5 of the Reactis User’s Guide.

Parameter Name

Allowed Values

Description

CoverageCSEPTUseAncestors

0, false, 1, true

For a Stateflow state S, configure whether CSEPT defines PairStates(S) using all ancestors or just the parent of S. See the CSEPT section of the Reactis User’s Guide for details.

CoverageCSEPTUsePaths

0, false, 1, true

Configure how CSEPT constructs ExitTrans(S′):

true

use full transitions(sequences of segments).

false

use only the first segment of each transition.

See the CSEPT section of the Reactis User’s Guide for details.

CoverageMCDCCombineLogicOp

0, false, 1, true

Enable/disable Multi-Block MC/DC. See the MC/DC section of the Reactis User’s Guide for details.

CoverageMCCMaxNumConditions

positive integer

Set the maximum number of conditions that can be in a decision for which MCC coverage is tracked. If a decision has more conditions than the limit then MCC will not be tracked for that decision.

CoverageBoundary

0, false, 1, true

Enable/Disable Boundary coverage

CoverageBoundaryInputs

0, false, 1, true

Include boundary targets for top-level inputs in Boundary coverage

CoverageBoundaryConfigs

0, false, 1, true

Include boundary targets for configuration variables in Boundary coverage

CoverageBoundaryIntSat

0, false, 1, true

Include boundary targets for the upper and lower boundaries of blocks which are set to saturate on integer overflow.

CoverageBoundaryIntSatMid

0, false, 1, true

Include boundary targets for no saturation for blocks which are set to saturate on integer overflow.

CoverageBoundaryRelops

0, false, 1, true

Track boundary coverage for relational operators.

CoverageBoundaryRelopsFloat

0, false, 1, true

Track boundary value coverage for relational operators operating on floating point values.

CoverageBoundaryRelopsFloatEqual

0, false, 1, true

Track boundary value coverage for the ‘equal’ case of relational operators operating on floating point values.

CoverageBoundaryRelopsFloatEps

double or ‘next’

Relative tolerance to use when tracking boundary value coverage for relational operators operating on floating point values.

CoverageValidatorDiagramsInternal

0, false, 1, true

Toggles whether or not the targets within diagram-based Validator Objectives are tracked. The objective itself (assertion or UDT) is tracked even when the targets within the objective are not.

CDecisionMetric

‘ifwhilefor’, ‘branching’, ‘nonstatic’

Set the criteria used to decide if a C expression is a decision. The possible values are interpreted as follows:

ifwhilefor

Expressions which control if/while/for statements are decisions.

branching

Expressions which control if/while/for statements or the ? operator are decisions.

nonstatic

All non-trivial Boolean expressions except static initializers are decisions.

25.4. C Code#

Parameters set in the C Code pane of the Info File Editor.

Parameter Name

Allowed Values

Description

SFunctionCoverage

‘off’, ‘cumulative’, ‘separate’

Default S-Function source code coverage tracking behavior.

DoCCaching

0, false, 1, true

Create and use cache files for C code (files with extension ’.rso’).

25.5. Callbacks#

Parameters set in the Callbacks pane of the Info File Editor.

Parameter Name

Allowed Values

Description

PreLoadFcn

string

MATLAB commands to execute before loading the model.

PostLoadFcn

string

MATLAB commands to execute after loading the model but before type inference.

25.6. Search Path#

Parameters set in the Search Path pane of the Info File Editor.

Parameter Name

Allowed Values

Description

LibraryPath

string

Model-specific library search path. This gets added to the global search path when processing the model. It must be a semicolon-separated list of directories. Do not use quotes.