Chapter 5 Flashcards
Name the two types of behaviour models
- Control-flow oriented models:
Captured with state charts and activity diagrams - Data-flow oriented models
Note:
State charts model the functional states of a component and the transition between them.
State charts support the modelling of?
- Hierarchical state charts and
- Concurrent state charts
Explain Activity charts
They model an algorithm by defining the control flow, using modelling elements such as operations, branches etc
They can be used to model the methods of a passive component that receives an input and produces an output. The behaviour of active components can better be modelled using state charts ( components that are continuously active)
Activity chart with concurrent control flow
Fork modelling element is used to split the control flow into concurrent threads. The Join modelling element is used to synchronise the concurrent threads by combining them into a single common thread.
In state charts, a transition consists of four elements, namely
- The start and end state
- The trigger
- A guard
- An effect
In state charts, the trigger event types can be captured using 5 different event types in UML which are
- Signal event
- Change event
- Call event
- Time event
- Completion event
Hierarchical and concurrent state charts are modelled respectively by
OR-States which means that the component can either be in one state or another and AND-States which means that the component can be in one state and another state at the same time.
Two modeling elements of block diagram are
Blocks and connections.
In block diagrams, sources define
The entry point of data flow and only have output values.
In block diagram, sinks define
The exit points of data flow and only have inport values.
What is the difference between structure model and behavior model
Their difference lies in the aspect of the system that are to be modeled. Structure models focus on defining the structure of the system, the component’s internal behavior is not considered. They are at higher level of abstraction than behavior models.
The semantics of connections in data-flow oriented behavior models is often limited to mathematical relations.
What is hybrid models?
It is a behavior model that contains both data-flow oriented and control-flow oriented models in a single model.
The strength and weakness of control-flow oriented models
It’s strength lies in modeling state-based, discrete behavior and its weakness is modeling of continuous behavior.
The strength and weakness of data-flow oriented behavior model
It’s strength lies in modeling of continuous behavior and it’s weakness in modeling control-flow and state-based behavior.
Transition in state chart is defined by
- Trigger
- A guard
- Effect