LI Implementation of MAAB 5.0 Rule na_0036
Checks variant conditions to heed rule na_0036. The implementation further restricts allowed conditions as hinted
by the examples in the MAAB 5.0 guideline as follows:
- Variant objects and variables must all reside in the base workspace, as most Matlab/Simulink releases do not
allow for placement in model-bound workspaces like model workspace, mask variables or data dictionaries.
- Only a single variable is allowed to be used in all conditions of a variant system (see also na_0037).
- Only the use of scalar variables is allowed in variant conditions.
- Only the use of boolean, numeric or Sumlink.IntEnumType variables is allowed in variant conditions.
- Only equality or only inequality might be tested in a variant condition, but no combination of those.
- Equality tests (==) might only be combined using or (||).
- Inequality (not equal, ~=) tests might only be combined using and (&&).
- There might only be one inequality test among all conditions.
- Only comparison to whole numbers, boolean literals or enumerated values of the compared variable type is
allowed.
This is to generally make conditions comprehensible and also to make the check available to older Matlab
releases, where no variable value space check functionality is available. However, with a default variant present
the check is always passed. Check will not fail if conditions overlap as this is not explicitly stated in the rule.
Thus there is no check if more than one variant could be active at the same time, only that there's always at least
one.
Exempted from the checks are all contents linked into the model from libraries listed in the
jExclLibs parameter.
Parameters