Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

18
Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science Celestijnenlaan 200 A B-3001 Leuven Belgium http://www.cs.kuleuven.ac.be The SEESCOA The SEESCOA Composer Tool: Composer Tool: Using Contracts for Using Contracts for Component Composition Component Composition and Run-Time Monitoring and Run-Time Monitoring UML 2002 SIVOES-MONA workshop October 1, 2002

description

The SEESCOA Composer Tool: Using Contracts for Component Composition and Run-Time Monitoring. UML 2002 SIVOES-MONA workshop October 1, 200 2. Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science Celestijnenlaan 200 A B-3001 Leuven Belgium - PowerPoint PPT Presentation

Transcript of Stefan Van Baelen, David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

Page 1: 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

Page 2: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 3: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 4: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 5: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 6: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 7: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 8: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 9: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 10: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 11: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 12: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 13: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 14: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 15: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 16: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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

Page 17: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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)

Page 18: Stefan Van Baelen,  David Urting, Yolande Berbers K.U.Leuven Department of Computer Science

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