Software Engineering-Behavioural Modelling

Behavioral modeling is an operational principle for all requirements analysis methods. Yet, only extended versions of structured analysis provide a notation for this type of modeling. The state transition diagram represents the behavior of a system by depicting its states and the events that cause the system to change state. In addition, the STD indicates what actions (e.g., process activation) are taken as a consequence of a particular event.

A state is any observable mode of behavior. For example, states for a monitoring and control system for pressure vessels  might be monitoring state, alarm state, pressure release state, and so on. Each of these states represents a mode of behavior of the system. A state transition diagram indicates how the system moves from state to state.

To illustrate the use of the Hatley and Pirbhai control and behavioral extensions, consider software embedded within an office photocopying machine. A simplified representation of the control flow for the photocopier software is shown in the figure. Data flow arrows have been lightly shaded for illustrative purposes, but in reality they are not shown as part of a control flow diagram.

Control flows are shown entering and exiting individual processes and the vertical bar representing the CSPEC "window." For example, the paper feed status and start/stop events flow into the CSPEC bar. This implies that each of these events will cause some process represented in the CFD to be activated. If we were to examine the CSPEC internals, the start/stop event would be shown to activate/deactivate the manage copying process. Similarly, the jammed event (part of paper feed status) would activate perform problem diagnosis. It should be noted that all vertical bars within the CFD refer to the same CSPEC. An event flow can be input directly into a process as shown with repro fault. However, this flow does not activate the process but rather provides control information for the process algorithm.

A simplified state transition diagram for the photocopier software is shown in the figure. The rectangles represent system states and the arrows represent transitions between states. Each arrow is labeled with a ruled expression. The top value indicates the event(s) that cause the transition to occur. The bottom value indicates the action that occurs as a consequence of the event. Therefore, when the paper tray is full and the start button is pressed, the system moves from the reading commands state to the making copies state. Note that states do not necessarily correspond to processes on a one-to-one basis. For example, the state making copies would encompass both the manage copying and produce user displays processes.

Share this article :
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved