3.2 Validating Models with ValidatorThe advanced model-validation capabilities of Reactis are implemented in Reactis
Validator. Validator searches for defects and inconsistencies in models. The
tool enables users to formulate a requirement as an assertion, attach the
assertion to a model, and perform an automated search for a simulation of the
model that leads to a violation of the assertion. If Validator finds an
assertion violation, it returns a test that leads to the problem. This test may
then be executed in Reactis Simulator to gain an understanding of the sequence
of events that leads to the problem. Validator also offers an alternative usage
under which the tool searches for tests that exercise user-defined coverage
targets. The tool enables the early detection of design errors and
inconsistencies and reduces the effort required for design reviews.
| Figure 7: Reactis Validator automates functional testing. |
Figure 7 shows how engineers use Validator. First, a model is
instrumented with assertions to be checked and user-defined coverage targets. In
the following discussion we shall refer to such assertions and coverage targets
as Validator objectives. The tool is then invoked on the instrumented model to
search for assertion violations and paths leading to the specified coverage
targets. The output of a Validator run is a test suite that includes tests
leading to objectives found during the analysis. Validator objectives may be
added to any Simulink system or Stateflow diagram in a model. Two mechanisms for formulating objectives in Simulink models are supported:
Expression objectives are C-like boolean expressions.
Diagram objectives are Simulink / Stateflow observer diagrams. Diagram objectives are attached to a model using the Reactis GUI to specify a
Simulink system from a library and “wire” it into the model. The diagrams are
created using Simulink and Stateflow in the same way standard models are built.
After adding a diagram objective to a model, the diagram will be included in the
model’s hierarchy tree, just as library links are in a model. Note that the
diagram objectives are stored in a separate library and the .mdl file containing
the controller model remains unchanged. Because of its sophisticated model-debugging capabilities, the Reactis tool
suite provides significant added value to the market-leading MathWorks
Simulink/Stateflow modeling environment. The great virtue of model-level
debugging is that it enables engineers to debug a software design before any
source code is generated. The earlier logic errors are detected, the less costly
they are to fix.
|