Resolve Errors and Warnings for Test Sequence Block Legacy Semantics
R2026bIssue
The legacy semantics that Test Sequence blocks currently use will be replaced by
semantics that are compatible with Stateflow®. As a result of this change, you might see different Simulink®
Coverage™ and Simulink
Design Verifier™ results. In most cases, this change will not
affect the behavior of Test Sequence blocks.
However, if a Test Sequence block uses a symbol that is read in a transition or
when condition, and is written in the parent step (or parent
of the parent step) of that transition or when condition, the
behavior might be different. For legacy semantics, the transition condition of the
child step is evaluated before the parent step. For semantics compatible with
Stateflow, the transition condition of the child step is evaluated after
executing the parent step.
Possible Solutions
This step from a Test Sequence shows the legacy case where the
Output1 symbol is written in parent
step_2 and read in the when condition of
child step_2_1. When you load or compile a model with blocks
that use legacy semantics, if this pattern is not detected, then those blocks are
updated automatically to use semantics compatible with Stateflow. If the pattern is found, a warning is displayed and those blocks with
the detected pattern are not updated.

The examples show how to update Test Sequence blocks that use legacy semantics so they behave the same and produce the same simulation results as semantics compatible with Stateflow blocks. In most cases, you can update the blocks by moving code from the parent step to the child step.
This example shows how to update the Test Sequence block by moving the
throttle, throttle_act,
speed, and speed_act writes from the
Test_Scenarios parent step to the
Test_Overspeed and Test_EGO_Fault
child steps.
This image shows the legacy semantics.

This image shows the updated semantics that are compatible with Stateflow.

This example shows how to update the Test Sequence block by moving the
Output1 write from the step_2 parent
step to the step_2_1 and step_2_2 child
steps.
This image shows the legacy semantics.

This image shows the updated semantics that are compatible with Stateflow.

After you update a block, use
sltest.testsequence.setProperty(<blockpath>,'Semantics','StateflowCompatible')
to save the semantics setting. Changing the setting prevents future warnings about
the semantics for that block.