No anonymous type#
No anonymous type in the interface
Description#
Only named types shall be used in root operator / imported operator interfaces. Anonymous types (example int^3) shall be avoided. The rule applies to all the root operators, or to the root operators of the specified configuration.
The parameter allows defining the name of a configuration, with the following syntax: configuration=<name>
(default value: configuration=
).
Rationale#
Ensure user controlled naming of type declarations of root operators / imported operators.
Verification#
The rule registers to the inputs and outputs of a Scade model, and raises a violation for each variable declared with an anonymous type, when the owning operator is root or is imported.
Message: The type <type definition> shall not be anonymous
.
An operator is root if it doesn’t have any instance in the model.
The
configuration
parameter, when set, restricts the root operators to those specified for code generation.
Resolution#
Create a type with the same definition and use it in the variable’s declaration.
Customization#
N/A.