View
224
Download
1
Tags:
Embed Size (px)
Citation preview
1
Design Methods for Reactive Systems, R.J. WieringaPart IV: Behavior Notations
Jens Bæk Jørgensen, University of Aarhus
4
behaviour descriptions – basics
Roadmap: Find required system behaviour by Analyzing required system services or Modeling desired environment behavior
Make behaviour descriptions of Desired behaviour of composite system Desired behaviour of SuD itself Assumed behaviour of environment
Format of behaviour descriptions Lists and tables Diagrams (Mealy diagrams and statecharts)
5
State transitions lists and tables – basics
Range from informal to formalCan be used at system level down to component or
software object level Different kinds of lists and tables
Event lists Stimulus-response lists State transition tables Decision tables
6
State transitions lists and tables – event lists
List of event descriptions and, for each event, a description of its effect
Example: Assumed device behaviour in environment of elevator controller Light on(b): If b is not already in state On(b), then it enters
state On(b); otherwise, nothing changes Light off(b): If b is not already in state Off(b), then it enters
state Off(b); otherwise, nothing changes
7
State transitions lists and tables – event list for desired subject domain behaviour for an elevator cage
Event: A passenger pushes a destination button in cage c Desired effect
The request is confirmed to the passenger by lighting up the button If c is idle at another floor, its motor starts in the direction of the
requested floor. While c moves, its location indicator is set to the current floor. When c arrives at the requested floor, it stops and its doors open
If c is idle at the requested floor, its doors are opened When no one has passed the doors for some time, the doors close
Compare with a corresponding service description
8
State transitions lists and tables – effect descriptions
Transactional Description of one state transition Intermediate states abstracted away (i.e., atomic) Passage of time abstracted away (instantaneous)
Scenario Description of several state transitions With intermediate states (i.e. not atomic) Progress of time
To transform a scenario description into a transactional list, we introduce states
9
State transitions lists and tables – state transition table (STT) for elevator controller
General format of STT entry:(event, current state, actions, next state)
13
State transition diagrams – Mealy diagram for desired behaviour of heating tank controller; with variables and interface description
15
State transition diagrams – statecharts
Extends Mealy diagrams with State reactions State hierarchy Parallelism
Harel, 1987 Part of UML
UML state machines UML activity diagrams
Execution and code generation supported by tools, e.g. Statemate Rhapsody IBM Rational Rose Real Time
26
Guidelines – training information system example: desired stimulus-response behaviour of the system
Assumptions?How to make the system engineering argument?
27
Guidelines – finding states and events
Finding states Look for states in which the behaviour is waiting for
something to occur Look for modes of behaviour (e.g. normal-standby-
emergency etc.)
Finding events Look for named events, condition changes, temporal
events to which the system must respond Look for desired effects of the system. What triggers the
system to produce such an effect?
Deal with parallelism and hierarchy …
29
Guidelines – through desired causality to system transactions: steps in the road map
Identify business solution goals Identify solution activities in subject domain and user
workflow Identify desired event-action pairs in subject domain
and user workflowMap to stimulus-response pairs of SuD; introduce
connection domain if necessaryRefine to transactions by introducing SuD states