Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science
-
Upload
eaton-guzman -
Category
Documents
-
view
33 -
download
0
description
Transcript of Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science
Stefan Van Baelen, David Urting, Yolande BerbersK.U.LeuvenDepartment of Computer ScienceCelestijnenlaan 200 AB-3001 LeuvenBelgiumhttp://www.cs.kuleuven.ac.be
The SEESCOA The SEESCOA Composer Tool:Composer Tool:
Using Contracts for Using Contracts for Component Composition and Component Composition and
Run-Time MonitoringRun-Time Monitoring
UML 2002
SIVOES-MONA workshop
October 1, 2002
2
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
OutlineOutline
Goals of the SEESCOA Project
Components & Collaborations
Contracts for Components & Collaborations
The SEESCOA Run-Time Component System
The SEESCOA CCOM Composer Tool
Future Work
3
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Enable CBD for RT Embedded Systems
Developing applications by hierarchical (de)composition of components
Adding QoS specification contracts onto scenarios (resource constraint contracts)
Development of a run-time component system supporting loose coupling of component
Code generation for SEESCOA component system
Monitoring resource contracts at run-time
Active scheduler based on resource contracts
For higher-end embedded systems
Goals of the SEESCOA ProjectGoals of the SEESCOA Project
4
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
What is a SEESCOA component ?
A logically highly cohesive, lowly coupled, documented software module that can be used as a unit of development, reuse, composition and adaptation.
It provides dedicated functionality through well-defined interfaces.
It can be instantiated and is statefull at run-timeComponent blueprint (class-like) vs. instance (object-like)
Examplea collection of objects accessible through one or more
facades, and providing a factory to instantiate them
5
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
SEESCOA component modeling & hierarchical (de)composition is based on ROOM/UML-RT Components = black boxes accessible through ports
Component blueprint (class) can define a number of port blueprints (classes)
Ports define a bi-directional asynchronous interface to a component
Port specification on 3 levels
Syntactical level (in/outgoing message names & params)
Semantic level (message spec., pre & postconditions)
Synchronization level (MSC for the port)
3 #
Settings control Read-out
1 Master control Sampler
6
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
Synchronization level MSC = extended UML Sequence Diagram Allows specification of loops, alternative & optional messages
Allows specification of message hooks
Sending time of message (S)
Receival time of message (R)
Beginning of activation (B)
End of activation (E)
Return value passing = distinct message
:Sampler :Env
S
S
R start
R update
B
E
LOOP
OPT
S R resend
R S request
7
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
Component instances can have a number of port instances, to which other component/port instances can be connected
MSC’s of connected components must be compliant (MSC conformance checking)Mapping of names (resolving name mismatches)
Mapping of LOOP / OPT / ALT blocks
“Unified” collaboration MSC as a result
settings control
read-out
master control
sampler
master
secondary
reader 1
reader 2
8
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
MSC conformance checking
a
c1 env
d
ALT
OPT
LOOP
e
a/a’
c1 c2
d/d’LOOP
b
c
b/b’
a’
env c2
b’
LOOP
d’
e’
LOOP
c’
e/e’
c/c’
Resulting MSC associated with the connector
9
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
Connectors are mostly binary
But multi-connectors can also be modeled
producer
consumer
mediator
start
mediator producer consumer
ok
LOOP
OPT
send
deliver
LOOP
10
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Components & CollaborationsComponents & Collaborations
UML SEESCOA Profile
Meta-model extension
Plus additional restrictions (inheritance, features, …)
S_Component
Classifier
Port
1 0..n1 0..n
Instance
S_Component Instance Port Instance
0..n1
Connection
0..12..n0..n1 2..n 0..1
11
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Contracts for Components & Contracts for Components & CollaborationsCollaborations
QoS contracts can be attached to components & connectors
Timing contracts on a collection of connectors
Memory contracts on a component Can be seen as contract between component & the
component system, restricting the dynamic memory usage of the component
cons MW prod
Timing ContractMemory Contract
read-out sampling
Timing Contract
reader 1
12
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Contracts for Components & Contracts for Components & CollaborationsCollaborations
QoS contracts
Based on Real-Time Logic (RTL)Time-stamped events: occurrence relation
R(event, occurrence, time)
Can make use of message hooksSending/Receival of message
Beginning/End of activationmsg.B[] - msg.S[] < 10 ms
:Sampler :Env
S
S
R start
R update
B
E
LOOP
OPT
S R resend
R S request
13
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Contracts for Components & Contracts for Components & CollaborationsCollaborations
QoS contracts & LOOP / ALT / OPT constructs
Occurrence maps to MSC loopping.S[i+1] - ping.S[I] <= 50 ms
Nesting of MSC loops supported“*” (all occurrences)
response.S[*][1] - request.S[*][1] <= 10 ms
ALT & OPT expressions have meaning if event occurred“-” (any one occurrence)
env c2
LOOP
requestresponse
LOOP
env c2
LOOP
ping
14
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Contracts for Components & Contracts for Components & CollaborationsCollaborations
Typical QoS contracts supported by templates
Deadline constraints (worst-case duration): b[]-a[] <= t
Lower-bound timing constraints: b[]-a[]>= t
Periodicity constraints: period*(i-1) <b[i]-a[]< period*i
15
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
The SEESCOA Run-Time The SEESCOA Run-Time Component SystemComponent System
Components send messages via component system
Component system is responsible for starting/stopping/swapping components
Component system is responsible for message delivery
No direct component interaction => loose coupling
Each component has its own message queue
Messages run to completion per component
Active components simulated by self-directed messages
16
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
The SEESCOA Run-Time The SEESCOA Run-Time Component SystemComponent System
QoS constraint monitor layer within component system Gathers timing information of specified events.
External RTL checker analyses information Restricted intrusion
sampling
QoS Monitor Layer
reader 1
SEESCOA Component System
eventoccurrencereporting
RTL Checker
17
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
The SEESCOA CCOM The SEESCOA CCOM Composer ToolComposer Tool
Specification of components, ports & MSC’s
Specification of connections
Specification of timing contracts
Code Generation for component connection & interaction
Code Generation for contract checking (monitor)
18
SIV
OE
S-M
ON
A W
orks
hop
UM
L 20
02, 0
1/10
/200
2
Future WorkFuture Work
Active component scheduler
Based on timing contracts
Memory constraints
Specification & monitoring
Memory resource broker
Run-time component system
Distributed QoS Monitor