Documente Academic
Documente Profesional
Documente Cultură
Tutorial Structure
Real-Time Systems and Architecture The ROOM Modeling Concepts Development Process Summary
SW Machine
SW Machine
SW Machine
SW Machine SW Machine
SW Machine
SW Machine
SW Agent
SW Agent
SW Agent
Sensor
Sensor
Effector
Effector
Physical Elements
Software Architectures
SW Machine
SW Machine
SW Machine
SW Machine
SW Machine SW Machine
SW Machine
SW Machine
SW Agent
SW Agent
SW Agent
Sensor
Sensor
Effector
Effector
Physical Elements
What is an Architecture?
Architecture: an abstract specication that constrains the structural and behavioral patterns of all system components
Key to proper construction and evolution
Functional Space
version N Architecture A
version 3
Behavior
dbase
console
Ready
dbase
timeout key resetDisplay displayMsg
dbase
enterKey
enterKey
Entering2ndStr
msc SuccessfulAccessScenario
KeypadDisplay
AccessController
GateController
PWDatabase
B!m
Translation errors
Oops!
Design changes
Ill show those ivory-tower types how to do it right...
Detail Modeling
Programming Languages
Implementation
Development Activity
Detail Modeling
Programming Languages
Analysis&Design
Implementation
10
ROOM
A method for developing software for real-time distributed systems
WILEY
11
Modeling in ROOM
initialize Ready
dbase
console
timeout key
resetDisplay
displayMsg
dbase
Entering1stStr WaitingForReset
user entrance2
dbase
Entering2ndStr
msc SuccessfulAccessScenario
KeypadDisplay
AccessController
GateController
PWDatabase
12
Why Object-Oriented?
The structural aspect of architectures tends to be object-based The object paradigm is a synergistic combination of proven, useful concepts
encapsulation, polymorphism, inheritance...
13
Real-Time Systems and Architecture The ROOM Modeling Concepts Development Process Summary
14
By relieving the mind of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race - Alfred N. Whitehead
15
Messages
Objects that carry information about some event
Signal
Fire
Location Street: Elm St. Number: 10
ACK
16
Message Priorities
A message in transit is assigned a priority that identies the signicance of its event
Fire
Location Street: Elm St. Number: 10
HIG PRI H OR IT Y
17
Object Types
ACTIVE PASSIVE
- messages - Detail Level data - actors - own execution thread (concurrent)
18
Actors
The active objects of ROOM are called actors
ENCAPSULATION SHELL
ACTOR
OUTGOING MESSAGE
Actors can send and receive messages through distinct interfaces called ports
19
Actor Interfaces
Each interface of an actor has a unique name and an associated protocol Different interfaces can use different protocols An actor can present different views of itself to different collaborators; e.g.:
controlIF
serviceIF1
serviceIF2
serviceIF3
20
Protocols
An extension of conventional interface concept based on message exchange sequences A protocol is dened by:
a set of valid message types and their directions of ow
21
msc Joke
StraightMan
22
Protocol Classes
Sometimes different actors use the same protocol denitions It is convenient to dene protocols independently of the actors that use them through protocol class specications Each port (actor interface) has a type that is dened by its protocol class Protocol classes represent reusable interface specications; this is the basis for a type of polymorphism available in ROOM
23
Actor Types
The collection of all interface types of an actor denes its type
controlIF
serviceIF1
serviceIF2
serviceIF3
24
user entrance2
dbase
database ctrlrs
25
Bindings
Abstract representations of established communication channels for exchanging messages between actors Only ports with compatible protocols can be bound
Usually, a protocol class and its conjugate
Bindings explicitly identify all valid causal linkages between actors Semantics of bindings are dened by the protocol classes of the ports
26
database ctrlrs
ctrlr gateCtrlr
dbase
dbase
27
As with protocols, it is often useful for multiple actors to share a common specication This is achieved through actor classes ROOM distinguishes between the class and the type of an actor
28
keypad
29
keypad
gate
dbase
30
Handle Message
31
Execution Paradigms
What happens if a new higher priority event arrives while the previous event is being processed?
Two options:
-
preemptive paradigm interrupts current event handling run-to-completion paradigm nishes handling the current event handling before moving on to the new event
32
ROOMcharts
ctrlr gateCtrlr
dbase
dbase
entryReq
invalid
Validating
valid
Handle Message
DoorOpen
33
The action specication belongs to the Detail Level and uses the programming level of choice (e.g., C++)
34
In addition to temporary variables that may be associated with an action, ROOMcharts also allow the denition of extended state variables Variables are passive objects used to store Detail Level information that needs to be retained between transitions
for example, instances of C++ object classes
35
Hierarchical States
Hierarchy is a means of dealing with complexity by focussing on only a manageable chunk at a time
key
initialize Ready
key
timeout
key
resetDisplay
displayMsg
EnteringKeys
Entering1stStr
WaitingForReset
key false
enterKey
enterKey
CP1
Entering2ndStr
true
enterKey
36
S1
e e S0 e
S1
=
S2 S2
e S0
S2
S2
Group transitions not only reduce visual clutter but often also identify higher-order events and provide hints about potential state aggregations
37
A1|B1
a1 a b2 a2
B1|A1
b1 b
A1
a2 a1
B1
b2 b1
A1|B2
B2|A1
a b
=
a2
A2|B1
a a1 b b2
B1|A2
b1
A2 A
B2 A2|B2
B2|A2
38
The rules of inheritance are not uniform in the three different hierarchies
39
user entrance1
dbase
dbase
database ctrlrs
dbase
40
Off
Off
off on
initialize on
off
On
On
41
on on
off
On
42
Replicated Structures
Useful for dealing with regular repeating structures
43
44
TelephoneX
TelephoneY
EQ1 EQ2
REPLICATED Actor
45
Generic Structures
Ability to dene a component as generic
Call
+
TelephoneX
+
TelephoneY
Any actor with a compatible type can be imported into the generic slot A single model represents a collection of possible variants
46
Layering
Layer relationships:
Directed hierarchical relationship For modeling widely-shared implementation services
E E
SharedService
SharedService
Reduces apparent complexity Communication model also based on protocols and port-like interfaces (Service Access Points (SAPs))
47
Real-Time Systems and Architecture The ROOM Modeling Concepts Development Process Summary
48
Derive structure
Requirements Spec
user user1 entrance1 keypad dbase console dbase
+ msc SuccessfulAccessScenario User key key key key entryReq validationReq valid unlock displayMsg timeout lock resetDisplay KeypadDisplay AccessController GateController PWDatabase
dbase
Compare MSCs
Structure Model
initialize Ready
Generated MSC
timeout
key
resetDisplay
displayMsg
Derive behavior
Entering1stStr
WaitingForReset
enterKey
enterKey
Entering2ndStr
Behavior Model
49
Real-Time Systems and Architecture The ROOM Modeling Concepts Development Process Summary
50
51
Modeling Structure
Use of graphical syntax for easier comprehension Abstractions for dealing with high-level (architectural) phenomena of large real-time systems
Protocol-based multiple interfaces Concurrent objects (actors) Dynamic structures Replicated structures
52
Modeling Behavior
High-level based on graphical syntax Uses hierarchical state machines
Chosen to allow powerful modeling capabilities while allowing for straightforward and efcient (automated) implementations
Priority-based event handling for dealing with realtime requirements Incorporates industry standard programming languages (e.g., C++) for detailed specs
53
Experience
Over a hundred different industrial projects have used ROOM
including complete automatic code generation
ROOM and ObjecTime are being used as a basis for teaching real-time systems in a number of undergraduate and graduate courses
54