Announcing Cradle-7.7 - start your free trial here

3SL Reference - State Transition Diagram (STD)

State Transition Diagram (STD)

State Transition Diagrams (STDs) are used along with specifications to define the functional detail for a system.

Unlike data processes, control processes have a specialised role: enforcing sequencing over environmental control stimuli to the system, and the internal operation of the system. A control process is defined on an STD that represents the definition of the control process as a finite-state-machine. The number of the STD is the same as the number of the control process it defines.

The finite-state-machine enters an initial state when activated, either notionally at system startup or when the control process is activated by an enable or trigger prompt. In entering this initial state, it may perform some actions, defined below.

Once in a state, the finite-state-machine may only enter another state by making a transition to the new state. A transition is only possible when its condition is satisfied, and in moving to the new state the finite-state-machine may perform zero or more actions. Every state must be the destination of at least one transition. A transition may cause the finite-state-machine to return to the same state, i.e. the old and new states resulting from a transition may be the same.

Transition conditions consist of one or more expressions combined with any of the operators AND, OR and NOT. The transition only occurs when the condition is true, that is, when the input event flow(s) is/are present. The finite-state-machine makes transitions between states in response to some internal (to the system) or external (from the environment) event. Environmental control-related events are often modelled as input event flows to a control process, that in turn cause transitions (and consequential actions) in the control process’s STD.

A transition action can take one of three forms:

  • The activation of a named output event flow from the parent control process
  • The control of a named process that is connected to the STD’s parent control process by a prompt originating from the control process. These actions can take one of the following forms:
  • ENABLE process name - enable the named process
  • ENABLE: process name - enable the named process
  • D: process name - disable the named process
  • DISABLE process name - disable the named process
  • DISABLE: process name - disable the named process
  • T: process name - trigger the named process
  • TRIGGER process name - trigger the named process
  • TRIGGER: process name - trigger the named process
  • The control of a named output event flow from the parent control process:
  • R: flow name - raise the named continuous flow
  • RAISE flow name - raise the named continuous flow
  • RAISE: flow name - raise the named continuous flow
  • L: flow name - lower the named continuous flow
  • LOWER flow name - lower the named continuous flow
  • LOWER: flow name - lower the named continuous flow
  • S: flow name - signal the named discrete flow
  • SIGNAL flow name - signal the named discrete flow
  • SIGNAL: flow name - signal the named discrete flow

You can put algebraic expressions in conditions and actions, e.g.:

I < 10

for a condition and

i++

for an action.

Elements of algebraic expressions are not consistency checked, e.g. we do not look for a data definition called I or i in the above examples. The presence of < > + - * / triggers something being recognised as an algebraic expression.

Note: Both conditions and actions are associated with transitions by the Cradle system, so the Cradle diagram requires that a transition must be selected before either of these types of object can be drawn. These are the only objects that have to be drawn in this manner.

STDs are not hierarchical. Their connectivity is:

Diagram of the connectivity of a State Transition Diagram

STDs are available in models in both in the Essential and Implementation Domains.