Creating a Behavior Model

The behavior model describe the control structure of a system. This can be things like sequence of operations, object states and object interactions. Furthermore, this modelling layer can also be called Dynamic Modelling.The activity of creating a behavioural model is commonly known as behavioural modelling.

Behavior models coordinate a set of what we will call steps. These are called states, actions, or subactivities in UML. Such a specification requires that at least two questions be answered for each step:

  • When should each step be taken?
  • When are the inputs to each step determined?

Three traditional categories of behavior model provide the following answers :

1. Control flow model : It takes each step when another step (or steps) is complete, perhaps taking into account other conditions, but without regard to the availability of inputs. Inputs are determined during the transitions between steps, but are not required to start a step. No restrictions are placed on how inputs are determined. For example, the postal delivery person starts rounds after getting to work, regardless of whether mail needs delivery, because there may be mail to pick up. Control flow is the oldest and most popular form of behavior model

2. Data flow model : The Data flow takes each step when other steps provide its inputs. Inputs are determined by being passed directly from outputs of other steps. For example, in "just-in-time" manufacturing, each assembly step is carried out when the parts arrive from other assemblies. Data flow is the basis of functional languages, such as Lisp when it is used without side effects, and is related to Petri Nets, a behavior model that incorporates queuing features.

3. State machine model : The state machines take each step based on when events occur in the environment of the behavior being performed. The inputs to each step are calculated as part of the step itself. For example, in a vending machine, depositing money causes the amount to be displayed to the buyer. State machines are the basis of Harel state charts and UML's behavioral models.

Next Topic :