Recommended Naming Conventions

While UML and SysML allow a wide variety of characters and formats in names, Behavior Execution Engine requires slightly stricter naming of model elements because of those elements' Java delegate implementations and because of how Behavior Execution Engine interprets state machine expressions.

Special characters

Behavior Execution Engine permits spaces and any other special characters in model names. However, it replaces these with underscore '_' characters in their corresponding Java delegate auto-implementations and in interfaces. This includes any character that is not valid in Java identifiers, even numeric characters (0-9) when they are the first character in an identifier. Due to this replacement, any blocks, properties, or operations that are identical except for special characters will conflict with each other during execution.

Recommendations

For consistency with Java:

  • Avoid special characters and spaces in model names.
  • Start all block names with a capital letter.
  • Start all property and operation names with a lowercase letter.

For expression readability:

  • Name signal event operations according to the pattern sendXSignal, where X is the name of the SysML signal that the operation's Java delegate implementation sends. You should also add a parameter to the operation for the block that will receive the signal, unless the operation just sends the signal to its owning block.
  • Start boolean and BooleanValue properties and operations with is or similar auxiliary verbs so that they express boolean statements. For example, you should name a property describing the activity of a system something like isActive, canActivate, or hasActivated, and you should name an operation that determines the line of sight between the owning object and a target something like hasSightTo(target).