The Model Language

Next: Arcs | Up: Table of Contents | Previous: Models

States

States in TML must be declared within a model. A state declaration begins with the state name, and consists of a (possibly empty) list of arcs. The state definition is terminated by the next state definition, or by the end of the model.

State names in TML are always enclosed in square brackets [..], and may consist of any printable characters other than the end of line and square brackets. Whitespace (except the newline) may be used in state names. All state names used in a single model must be unique.

Note     If you intend to export your models to a certain environment, such as GML, you must be sure to observe any constraints imposed by those environments. For example, do not use double- or single-quotation marks if you intend to import to GML.

Every model must include two special states: the [Enter] and [Exit] states. The [Enter] state represents the start or entry state of the model (the unique single source of the model graph). Likewise, the [Exit] state represents the end or final state of the model (the unique single sink of the model graph).

Model definitions should include the [Enter] state, but need not explicitly include the [Exit] state. This is because the [Exit] state cannot have any outgoing arcs, and thus its definition would necessarily be empty. The inclusion of the Exit state in a model definition is not an error, however.

The following is an example model which contains six states (the sixth state is the implicit [Exit] state).

model BigModelByStacy
  [Enter]
  [State 1]
  [State 2]
  [State 3]
  [Yet Another State]
end

Figure 1: A model with some states

Next: Arcs | Up: Table of Contents | Previous: Models