22
FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

Embed Size (px)

Citation preview

Page 1: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 1

MSC

Structuring MSCsUsing Message SequenceCharts for real systems

Page 2: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 2

Features

• Inline expressions – for alternatives, loops, exceptions and options

• MSC references – such that MSCs may be referenced within other MSCs

• MSC expressions – combining MSCs to express alternatives, parallel merge and loops

• Gates – flexible connection points between references/expressions and their surroundings

• HMSC – High level MSC for better better overview of MSC documents

• Substitution – generalizing MSCs wrt. message, instance and MSC names

• General ordering – when neither strict order nor no order is the situation

• MSC Document – declaring a collection of MSC and their data

• Inline expressions – for alternatives, loops, exceptions and options

• MSC references – such that MSCs may be referenced within other MSCs

• MSC expressions – combining MSCs to express alternatives, parallel merge and loops

• Gates – flexible connection points between references/expressions and their surroundings

• HMSC – High level MSC for better better overview of MSC documents

• Substitution – generalizing MSCs wrt. message, instance and MSC names

• General ordering – when neither strict order nor no order is the situation

• MSC Document – declaring a collection of MSC and their data

Page 3: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 3

Simple MSC in a nutshell

User AC System

msc User_accepted

Code

Door unlocked

Idle

OK

Card out

diagram frame

heading

condition

output event input event

instance

Unlock

message

message to environment

instance end

Page 4: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 4

MSC references

User AC System

msc Auto_Door

Opened

AutomaticDoor

User_Accepted

Idle

Unlock

Door open

actual gatemsc reference

Page 5: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 5

MSCs in MSC document

User AC System

Code

OK

msc User_accepted

UnlockCard out

Idle

Door unlocked

User AC System

Code

NOK

msc User_rejected

Card out

Idle

Idle

User AC System

msc Unlocked_reset

door

OpenedPush door

Door unlocked

Idle

Closed

Lock

door

Lock

User AC System

msc Unlocked_timeout

Door unlocked

Idle

User AC System

msc Unlocked_unclosed

door

OpenedPush door

Door unlocked

Idle

Alarm

door

Error

Page 6: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 6

High level MSC - HMSC

msc AC_System_Overview

Idle

Door unlocked

User_accepted

Unlocked_reset Unlocked_timeout

Unlocked_unclosed

User_rejected

hmsc startconnection point

alternative

restrictive condition

msc reference

Page 7: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 7

Restrictive conditions

User AC System

Code

OK

msc User_accepted

UnlockCard out

Idle

Door unlocked

• only for HMSC conditions

• only for global (initial and final) conditions

msc AC_System_Overview

Idle

Door unlocked

User_accepted

Unlocked_reset Unlocked_timeout

Unlocked_unclosed

User_rejected

Page 8: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 8

Reference expression

msc AC_System_Overview

Idle

Door unlocked

User_accepted

Unlocked_unclosedalt Unlocked_resetalt Unlocked_timeout

User_rejected

reference expression

Page 9: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 9

Gate application

msc Hki

gh

v

s2G

q

ts3

s3

explicitly named gatesexplicitly named gates implicitly named gateimplicitly named gate

Page 10: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 10

Gate definition

j

msc G

s1

s2

ki

Mh

g

explicitly named order gate definition

actual gate h of M which propa-gates to G with name h

actual message gate with implicit name out_s1

message gate defi-nition with implicit name in_s2

Page 11: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 11

Inline expressions

door

alt

msc Unlocked_IdleUser AC System

Door unlocked

Idle

doorLock

Push doorOpened

door

alt

door AlarmError

Lock

Closeddoor

alternativeeither this

or this

expression frame

operand separator

operator

gates propagate

Page 12: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 12

Exception and Option

door

exc

msc Unlocked_IdleUser AC System

Door unlocked

Idle

doorLock

Push door

Openeddoor

exc door AlarmError

opt Pull door

Lock

Closeddoor

exceptioneither this orcontinue themain road

optioneither this ornothing

Page 13: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 13

Loopmsc AC_System_Overview

User AC System

Idle

Idle

loop<inf>

alt

User_accepted

Unlocked_Idle

User_rejected

infinite loop

Page 14: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 14

Parallel merge

User_acceptedsubst Userby User1

User_acceptedsubst Userby User2

msc TwoUsersAccepted

Two parallel behaviours

Page 15: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 15

General order in one instance

msc User_accepted

Coregion

User AC System

Code

decomposed

Door unlocked

Idle

OK

Card out

Unlock

General order symbol

Page 16: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 16

Incomplete messages

User AC System

msc Unlocked_Idle

door

OpenedPush door

Door unlocked

Idle

Alarm

door

Error

altLockdoor

door

alt Closed

Lockdoor

Closed

Lost messageLost message

Page 17: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 17

Substitution

User

AC System

msc Auto_Door

Opened

AutomaticDoor

User_Accepted

Idle

Unlock

Door open

User AC System

msc Simple_Accepted

Unlock

Idle

PushButton

Door unlocked

Auto_Doorsubst User_Acceptedby Simple_Accepted

msc SimpleDoor

Page 18: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 18

Time constraints

Page 19: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 19

Method call

Page 20: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 20

Summary

ways to achieve overview:

•HMSC for over viewing large specifications

• Inline expressions for over viewing small variations

ways to combine MSCs:

•MSC references

•MSC gates

•MSC reference expressions

improved generalization mechanisms:

•Substitution of MSCs, message names, and instance names

ways to achieve overview:

•HMSC for over viewing large specifications

• Inline expressions for over viewing small variations

ways to combine MSCs:

•MSC references

•MSC gates

•MSC reference expressions

improved generalization mechanisms:

•Substitution of MSCs, message names, and instance names

Page 21: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 21

Remaining issues

MSC 2000 issues:

• Document diagrams

• Data

• Imperative conditions (when)

• Better decomposition rules

UML 2.0:

• Essentially the same

• Slightly different syntax

MSC 2000 issues:

• Document diagrams

• Data

• Imperative conditions (when)

• Better decomposition rules

UML 2.0:

• Essentially the same

• Slightly different syntax

Page 22: FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems

FDTFoil no 22

Realisation sof tware electronics mechanics

Deployment

Functionality (Structure Behaviour)

Descriptions

Performance … Dependability ….

Objects Properties

Tests… Measurements

Services … 1

objects properties

context

content

•••

•••

•••

•••

1

MSC is used to:

1. Precisely define behaviour properties such as:

• use cases

• interface behavior cases, protocol sequences

• service behaviors

2. Partially synthesise designs

3. Verify that designs satisfy specified behaviour properties

4. Describe test cases

5. Document simulation traces

6. Generally improve understanding and communication about interaction problems

1. Precisely define behaviour properties such as:

• use cases

• interface behavior cases, protocol sequences

• service behaviors

2. Partially synthesise designs

3. Verify that designs satisfy specified behaviour properties

4. Describe test cases

5. Document simulation traces

6. Generally improve understanding and communication about interaction problems

4,52

3 3