Main Content

Check model object names

Check ID: mathworks.hism.hisl_0032

Check model object names.

Description

This check verifies that the following Simulink® element and System Composer™ architecture model object names comply with your own modeling guidelines or the high-integrity modeling guidelines. The check also verifies that the model object does not use a reserved name.

Simulink model elements:

  • Blocks

  • Signals

  • Parameters

  • Buses

  • Stateflow® objects

System Composer architecture model objects:

  • Components

  • Ports

  • Connectors

  • Interfaces

  • Stereotypes

Reserved names:

  • MATLAB® keywords

  • Reserved keywords for C, C++, and code generation. For a complete list, see Reserved Keywords (Simulink Coder)

  • int8, uint8

  • int16, uint16

  • int32, uint32

  • int64, uint64

  • inf, Inf

  • NaN, nan

  • eps

  • intmin, intmax

  • realmin, realmax

  • pi

  • infinity

  • Nil

Note

In some cases, the Model Advisor reports an issue in multiple subchecks of this check.

Available with Simulink Check™.

Input Parameters

To specify the naming standard and model object names that the check flags, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check model object names. In the Input Parameters pane, select the check boxes of model element names for which you want to apply a naming rule. For example, the Block naming standard check box corresponds to Simulink block names.

    Note

    The System Composer object naming standard check box applies to all System Composer architecture model objects.

    If you do not want the check to verify any model object name, then unselect all check boxes.

  2. Use the default regular expression or enter a custom regular expression in the text box beside a model element name. For example, to create your own naming standard for Stateflow objects, enter the required regular expression in the Regular expression for prohibited Stateflow objects names box.

    The default expression (^.{32,}$)|([^a-zA-Z_0-9])|(^\d)|(^ )|(__)|(^_)|(_$) verifies that model object names:

    • Use these characters: a-z, A-Z, 0-9, and the underscore (_).

    • Do not start with a number.

    • Do not use underscores at the beginning or end of a string.

    • Do not use more than one consecutive underscore.

    • Use strings that are less than 32 characters.

  3. Click Apply.

  4. Save the configuration. When you run the check using this configuration, the check uses the input parameters that you specified.

Results and Recommended Actions

ConditionRecommended Action
The model object names do not comply with the naming standard specified in the input parameters.Update the model object names to comply with your own guidelines or the high-integrity guidelines.

Capabilities and Limitations

  • Does not run on library models.

  • Does not analyze content of library linked blocks. By default, the input parameter Follow links is set to on.

  • Does not analyze content in masked subsystems. By default, the input parameter Look under masks is set to all.

  • Allows exclusions of blocks and charts.

See Also