Lecture 18: Live Sequence Charts II

16
– 18 – 2017-01-24 – main – Software Design, Modelling and Analysis in UML Lecture 18: Live Sequence Charts II 2017-01-24 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Content – 18 – 2017-01-24 – Scontent – 2/66 Reflective Descriptions of Behaviour Interactions A Brief History of Sequence Diagrams Live Sequence Charts Abstract Syntax, Well-Formedness Semantics TBA Construction for LSC Body Cuts, Firedsets Signal / Attribute Expressions Loop / Progress Conditions Excursion: Büchi Automata Language of a Model Full LSCs Existential and Universal Pre-Charts Forbidden Scenarios LSCs and Tests The Plan – 18 – 2017-01-24 – Splan – 3/66 6.B 7.A 7.B Thu, 19. 1.: Live Sequence Charts I Firstly: State-Machines Rest, Code Generation Tue, 24. 1.: Live Sequence Charts II Thu, 26. 1.: Live Sequence Charts III Tue, 31. 1.: Tutorial 7 Thu, 2. 2.: Model Based/Driven SW Engineering Mon, 6. 2.: Inheritance Tue, 7. 2.: Meta-Modelling + Questions February, 17th: The Exam. Constructive Behavioural Modelling in UML: Discussion – 18 – 2017-01-24 – main – 4/66 Semantic Variation Points – 18 – 2017-01-24 – Ssemvar – 5/66 Pessimistic view: There are too many... For instance, allow absence of initial pseudo-states object may then “be” in enclosing state without being in any substate; or assume one of the children states non-deterministically (implicitly) enforce determinism, e.g. by considering the order in which things have been added to the CASE tool’s repository, or some graphical order (left to right, top to bottom) allow true concurrency etc. etc. Exercise: Search the standard for “semantical variation point”. Crane and Dingel (2007), e.g., provide an in-depth comparison of Statemate, UML, and Rhapsody state machines — the bottom line is: the intersection is not empty (i.e. some diagrams mean the same to all three communities) none is the subset of another (i.e. each pair of communities has diagrams meaning different things) Optimistic view: tools exist with complete and consistent code generation. good modelling-guidelines can contribute to avoiding misunderstandings. Reflective Descriptions of Behaviour – 18 – 2017-01-24 – main – 6/66

Transcript of Lecture 18: Live Sequence Charts II

Page 1: Lecture 18: Live Sequence Charts II

– 18 – 2017-01-24 – main –

Softw

are

Desig

n,

Modellin

gand

Analysis

inU

ML

Lectu

re18:

Live

Seq

uen

ceC

harts

II

2017-0

1-2

4

Pro

f.Dr.A

nd

reas

Po

de

lski,Dr.B

ern

dW

estp

hal

Alb

ert-Lu

dw

igs-Un

iversität

Freib

urg,G

erm

any

Co

nten

t

– 18 – 2017-01-24 – Scontent –

2/

66

•R

efle

ctiveD

escrip

tion

so

fB

eh

aviou

r

•In

teractio

ns

•A

Brie

fH

istory

of

Se

qu

en

ceD

iagrams

•L

iveS

eq

ue

nce

Ch

arts

•A

bstract

Sy

ntax,W

ell-Fo

rme

dn

ess

•S

em

antics

•T

BA

Co

nstru

ction

for

LSC

Bo

dy

•C

uts,F

ired

sets

•S

ignal/

Attrib

ute

Exp

ressio

ns

•Lo

op

/P

rogre

ssC

on

ditio

ns

•E

xcursio

n:B

üch

iAu

tom

ata

•Lan

gu

ageo

fa

Mo

de

l

•Fu

llLSC

s

•E

xisten

tialand

Un

iversal

•P

re-C

harts

•Fo

rbid

de

nS

cen

arios

•LS

Cs

and

Tests

Th

eP

lan

– 18 – 2017-01-24 – Splan –

3/

66

6.B

7.A7.B

•T

hu

,19

.1.:L

iveS

eq

ue

nce

Ch

artsI

•F

irstly:S

tate-M

achin

es

Re

st,Co

de

Ge

ne

ration

•Tu

e,

24

.1.:L

iveS

eq

ue

nce

Ch

artsII

•T

hu

,2

6.

1.:Live

Se

qu

en

ceC

harts

III•

•Tu

e,

31.

1.:Tuto

rial7•

•T

hu

,2

.2.:M

od

elB

ased

/D

riven

SW

En

gin

ee

ring

•M

on

,6

.2.:In

he

ritance

•Tu

e,

7.2.:M

eta-M

od

ellin

g+

Qu

estio

ns

Feb

ruary,17th

:Th

eE

xam.

Co

nstru

ctiveB

eha

viou

ral

Mo

dellin

gin

UM

L:

Discu

ssion

– 18 – 2017-01-24 – main –

4/

66

Sem

an

ticVa

riatio

nP

oin

ts

– 18 – 2017-01-24 – Ssemvar –

5/

66

Pe

ssimistic

view

:Th

ere

areto

om

any...

•Fo

rin

stance

,

•allo

wab

sen

ceo

fin

itialpse

ud

o-state

so

bje

ctm

ayth

en

“be”

ine

nclo

sing

statew

itho

ut

be

ing

inan

ysu

bstate

;o

rassu

me

on

eo

fth

ech

ildre

nstate

sn

on

-de

term

inistically

•(im

plicitly)e

nfo

rced

ete

rmin

ism,e

.g.b

yco

nsid

erin

gth

eo

rde

rin

wh

ichth

ings

have

be

en

add

ed

toth

eC

AS

Eto

ol’s

rep

osito

ry,o

rso

me

graph

icalord

er

(left

torigh

t,top

tob

otto

m)

•allo

wtru

eco

ncu

rren

cy

•e

tc.etc.

Exe

rcise:S

earch

the

stand

ardfo

r“se

man

ticalvariation

po

int”.

•C

rane

and

Din

gel(2

00

7),e.g.,p

rovid

ean

in-d

ep

thco

mp

arison

of

State

mate

,UM

L,an

dR

hap

sod

ystate

mach

ine

s—

the

bo

ttom

line

is:

•th

ein

terse

ction

isn

ot

em

pty

(i.e.so

me

diagram

sm

ean

the

same

toallth

ree

com

mu

nitie

s)

•n

on

eis

the

sub

set

of

ano

the

r(i.e

.each

pair

of

com

mu

nitie

sh

asd

iagrams

me

anin

gd

iffere

nt

thin

gs)

Op

timistic

view

:

•to

ols

exist

with

com

ple

tean

dco

nsiste

nt

cod

ege

ne

ration

.

•go

od

mo

de

lling-gu

ide

line

scan

con

tribu

teto

avoid

ing

misu

nd

erstan

din

gs.

Refl

ectiveD

escriptio

ns

of

Beh

avio

ur

– 18 – 2017-01-24 – main –

6/

66

Page 2: Lecture 18: Live Sequence Charts II

Co

nstru

ctivevs.

Refl

ectiveD

escriptio

ns

– 18 – 2017-01-24 – Sreflective –

7/

66

Hare

l(199

7)p

rop

ose

sto

distin

guish

con

structive

and

refle

ctived

escrip

tion

s:

•A

con

structive

de

scriptio

nte

llsu

sh

ow

thin

gsare

com

pu

ted

:

“Ala

ngua

geis

co

nstru

ctiv

eif

itco

ntrib

utesto

the

dyn

am

icsem

an

ticso

fth

em

od

el.

Th

at

is,itsco

nstructs

con

tain

info

rma

tion

need

edin

executing

the

mo

del

or

intra

nsla

ting

itin

toexecuta

ble

cod

e.”

•A

refle

ctived

escrip

tion

tells

us

wh

atsh

all(or

shalln

ot)b

eco

mp

ute

d:

“Oth

erla

ngua

gesa

rere

flectiv

eo

ra

sse

rtive,

an

dca

nb

eused

by

the

systemm

od

elerto

cap

turep

arts

of

the

thin

king

tha

tgo

into

build

ing

the

mo

del–

beh

avio

rin

cluded

–,

tod

erivea

nd

presen

tview

so

fth

em

od

el,statica

llyo

rd

uring

execution

,

or

toset

con

strain

tso

nb

eha

vior

inp

repa

ratio

nfo

rverifica

tion

.”

No

te:N

osh

arpb

ou

nd

aries!(W

ou

ldb

eto

oe

asy.)

Intera

ction

sa

sR

eflective

Descrip

tion

– 18 – 2017-01-24 – Sinteract –

8/

66

•In

UM

L,re

flective

(tem

po

ral)de

scriptio

ns

aresu

bsu

me

db

yin

teractio

ns.

AU

ML

mo

de

lM=

(C

D,S

M,O

D,I

)h

asa

set

of

inte

raction

sI

.

•A

nin

teractio

nI∈

Ican

be

(OM

Gclaim

:eq

uivale

ntly)d

iagram

me

das

•co

mm

un

ication

diag

ram(fo

rme

rlykn

ow

nas

collab

oratio

nd

iagram),

•tim

ing

diag

ram,o

r

•se

qu

en

ced

iagram

.

Fig

ure

14

.27

- Co

mm

un

icatio

n d

iag

ram

sd

M

:rs[k

]:B

s[u

]:B

1a:m

1

2:m

21b:m

3

1b.1

:m3

1b.1

.1:m

3,

1b.1

.1.1

:m2

Life

line

Me

ssa

ge

with

Seq

uen

ce

nu

mbe

r

Me

ssa

ge

s

(OM

G,2

00

7,5

15)

Fig

ure

14

.30 - C

om

pa

ct L

ifelin

e w

ith S

tate

s

sd

Use

rAcc_

Use

r

Idle

WaitC

ard

WaitA

cce

ss

Idle

{d..3

*d}

:User

Sta

te o

r co

nd

ition

Life

line

Dura

tion

Constra

int

(OM

G,2

00

7,5

22

)

Fig

ure

14

.31 - T

imin

g D

iag

ram

with

mo

re th

an

on

e L

ifelin

e a

nd

with

Mes

sag

es

sd

Use

rAcce

pte

d

Idle

WaitC

ard

WaitA

ccess

{t..t+3}

{d..3

*d}

:User

01

2t

HasC

ard

NoC

ard

:ACSystem

Code

Card

Out

{0..1

3}

OK

Unlo

ck

dt=

now

Sta

te o

r con

ditio

nL

ifelin

es

Du

ratio

n O

bse

rva

tion

Du

ratio

n C

onstra

ints

Tim

e O

bserv

atio

n

Tim

e C

on

stra

int

Me

ssa

ge

(OM

G,2

00

7,5

22

)

Fig

ure

14

.26

- Seq

uen

ce

Dia

gra

m w

ith tim

e a

nd

timin

g c

on

cep

ts

sd

Use

rAcce

pte

d

:User

:AC

Syste

m

Code d

=d

ura

tion

Ca

rdO

ut {0

..13}

OK

Un

lock

{d..3

*d}

t=n

ow

{t..t+3

}

Du

ratio

nC

on

stra

int

Tim

eO

bse

rva

tion

Tim

eC

on

stra

int

Du

ratio

nO

bse

rva

tion

(OM

G,2

00

7,5

13)

Intera

ction

sa

sR

eflective

Descrip

tion

– 18 – 2017-01-24 – Sinteract –

8/

66

•In

UM

L,re

flective

(tem

po

ral)de

scriptio

ns

aresu

bsu

me

db

yin

teractio

ns.

AU

ML

mo

de

lM=

(C

D,S

M,O

D,I

)h

asa

set

of

inte

raction

sI

.

•A

nin

teractio

nI∈

Ican

be

(OM

Gclaim

:eq

uivale

ntly)d

iagram

me

das

•co

mm

un

ication

diag

ram(fo

rme

rlykn

ow

nas

collab

oratio

nd

iagram),

•tim

ing

diag

ram,o

r

•se

qu

en

ced

iagram

.

Fig

ure

14

.27

- Co

mm

un

icatio

n d

iag

ram

sd

M

:rs[k

]:B

s[u

]:B

1a:m

1

2:m

21b:m

3

1b.1

:m3

1b.1

.1:m

3,

1b.1

.1.1

:m2

Life

line

Me

ssa

ge

with

Seq

uen

ce

nu

mbe

r

Me

ssa

ge

s

(OM

G,2

00

7,5

15)

Fig

ure

14

.30 - C

om

pa

ct L

ifelin

e w

ith S

tate

s

sd

Use

rAcc_

Use

r

Idle

WaitC

ard

WaitA

cce

ss

Idle

{d..3

*d}

:User

Sta

te o

r co

nd

ition

Life

line

Dura

tion

Constra

int

(OM

G,2

00

7,5

22

)

Fig

ure

14

.31 - T

imin

g D

iag

ram

with

mo

re th

an

on

e L

ifelin

e a

nd

with

Mes

sag

es

sd

Use

rAcce

pte

d

Idle

WaitC

ard

WaitA

ccess

{t..t+3}

{d..3

*d}

:User

01

2t

HasC

ard

NoC

ard

:ACSystem

Code

Card

Out

{0..1

3}

OK

Unlo

ck

dt=

now

Sta

te o

r con

ditio

nL

ifelin

es

Du

ratio

n O

bse

rva

tion

Du

ratio

n C

onstra

ints

Tim

e O

bserv

atio

n

Tim

e C

on

stra

int

Me

ssa

ge

(OM

G,2

00

7,5

22

)

Fig

ure

14

.26

- Seq

uen

ce

Dia

gra

m w

ith tim

e a

nd

timin

g c

on

cep

ts

sd

Use

rAcce

pte

d

:User

:AC

Syste

m

Code d

=d

ura

tion

Ca

rdO

ut {0

..13}

OK

Un

lock

{d..3

*d}

t=n

ow

{t..t+3

}

Du

ratio

nC

on

stra

int

Tim

eO

bse

rva

tion

Tim

eC

on

stra

int

Du

ratio

nO

bse

rva

tion

(OM

G,2

00

7,5

13)

Fig

ure

14

.28 - In

tera

ctio

n O

ve

rvie

w D

iag

ram

rep

rese

ntin

g a

Hig

h L

evel In

tera

ctio

n d

iag

ram

sd

Ove

rvie

wD

iagra

m life

line

s :U

ser, :A

CS

yste

m

ref

Esta

blis

hA

ccess("Ille

ga

l PIN

")

sd

:User

:AC

Syste

m

Card

Outs

d

:User

:AC

Syste

m

Msg("P

lease E

nte

r")

ref

Op

en

Do

or

[pin

ok]

{0..2

5}

{1..1

4}

Inte

ractio

nU

se

(inlin

e) In

tera

ctio

n

de

cis

ion

inte

ractio

n c

on

stra

int

Dura

tion

Con

stra

int

(OM

G,2

00

7,5

18)

Wh

yS

equ

ence

Dia

gra

ms?

– 18 – 2017-01-24 – Sinteract –

9/

66

Mo

stP

rom

ine

nt:S

eq

ue

nce

Diagram

s—

with

lon

gh

istory

:

•M

essage

Se

qu

en

ceC

harts,stan

dard

ized

by

the

ITU

ind

iffere

nt

versio

ns,

ofte

naccu

sed

tolack

afo

rmalse

man

tics.

•S

eq

ue

nce

Diag

rams

of

UM

L1.x

Mo

stse

vere

draw

backs

of

the

sefo

rmalism

s:

•u

ncle

arin

terp

retatio

n:

exam

ple

scen

arioo

rin

variant?

•u

ncle

aractivatio

n:

wh

attrigge

rsth

ere

qu

irem

en

t?

•u

ncle

arp

rog

ress

req

uire

me

nt:

mu

stallm

essage

sb

eo

bse

rved

?

•co

nd

ition

sm

ere

lyco

mm

en

ts

•n

om

ean

sto

exp

ress

forb

idd

en

scen

arios

Use

rC

oin

Valid

ator

Ch

oice

Pan

el

Disp

en

ser

C50

pWATER

water

_in

_sto

ck

dWATER

OK

Hen

ce:L

iveS

equ

ence

Ch

arts

– 18 – 2017-01-24 – Sinteract –

10/

66

•S

Ds

of

UM

L2

.xad

dre

ssso

me

issue

s,ye

tth

estan

dard

exh

ibits

un

clarities

and

eve

nco

ntrad

iction

sH

arelan

dM

aoz

(20

07

);Stö

rrle(2

00

3)

•Fo

rth

ele

cture

,we

con

side

rL

iveS

eq

ue

nce

Ch

arts(L

SC

s)Dam

man

dH

arel(2

00

1);Klo

se(2

00

3);H

arelan

dM

arelly

(20

03

),w

ho

have

aco

mm

on

fragme

nt

with

UM

L2

.xS

Ds

Hare

land

Mao

z(2

00

7)

•M

od

ellin

gg

uid

elin

e:stick

toth

atfragm

en

t.

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oin

Valid

ator

cp:C

ho

iceP

ane

lD

ispe

nse

r

C50

pWATER

¬(C

50!∨E1!∨pSOFT!

∨pTEA!∨pFIL

LUP!

cp->water

_in

_sto

ck

dWATER

OK

¬(dSoft!

∨dTEA!)

Co

urse

Ma

p

– 18 – 2017-01-24 – main –

11/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✔✔

Page 3: Lecture 18: Live Sequence Charts II

Live

Seq

uen

ceC

ha

rts—

Syn

tax

– 18 – 2017-01-24 – main –

12/

66

LS

CB

od

yB

uild

ing

Blo

cks

– 18 – 2017-01-24 – Slscsyn –

13/

66

:C

1:C

2

x>

3

:C

3

ABC

D

E

v=

0

LS

CB

od

y:A

bstra

ctS

ynta

x

– 18 – 2017-01-24 – Slscsyn –

15/

66

De

finitio

n.[LS

CB

od

y]

An

LS

Cb

od

yo

ver

signatu

reS

=(T,C,V,atr,E)

isa

tup

le

((L,�,∼

),I,Msg,Cond,LocInv,Θ

)

wh

ere

•L

isa

finite

,no

n-e

mp

tyo

flo

cation

sw

ith

•a

partialo

rde

r�

⊆L

×L

,

•a

sym

me

tricsim

ultan

eity

relatio

n∼

⊆L

×L

disjo

int

with

�,i.e

.�∩

∼=

∅,

•I

={I1,...,In}

isa

partitio

nin

go

fL

;ele

me

nts

ofI

arecalle

din

stance

line

,

•Msg

⊆L

×E

×L

isa

set

of

me

ssages

with

(l,E,l′)

∈Msg

on

lyif(l,l′)

∈≺

∪∼

;

me

ssage(l,E,l′)

iscalle

din

stantan

eo

us

iffl∼l′

and

asyn

chro

no

us

oth

erw

ise,

•Cond⊆

(2L

\∅)×

Expr

Sis

ase

to

fco

nd

ition

sw

ith(L,φ)∈

Cond

on

lyifl∼l′

for

alll6=l′∈L

,

•LocInv⊆L

×{◦,•}×

Expr

S×L

×{◦,•}

isa

set

of

localin

variants

with

(l,ι,φ,l′,ι′)

∈LocInv

on

lyifl≺l′,◦

:exclu

sive,•

:inclu

sive,

•Θ

:L

∪Msg

∪Cond∪

LocInv→

{hot,cold}

assigns

toe

achlo

cation

and

each

ele

me

nt

ate

mp

eratu

re.

Fro

mC

on

creteto

Ab

stract

Syn

tax

– 18 – 2017-01-24 – Slscsyn –

16/

66

•lo

cation

sL

,

•�

⊆L

×L

,∼

⊆L

×L

•I

={I1,...,In}

,

•Msg

⊆L

×E×L

,

•Cond⊆

(2L

\∅)×

Expr

S

•LocInv⊆L

×{◦,•}×

Expr

S×L

×{◦,•}

,

•Θ

:L

∪Msg

∪Cond∪

LocInv→

{hot,cold}

.

:C

1:C

2

x>

3

:C

3

ABC

D

E

v=

0

Page 4: Lecture 18: Live Sequence Charts II

Fro

mC

on

creteto

Ab

stract

Syn

tax

– 18 – 2017-01-24 – Slscsyn –

16/

66

•lo

cation

sL

,

•�

⊆L

×L

,∼

⊆L

×L

•I

={I1,...,In}

,

•Msg

⊆L

×E×L

,

•Cond⊆

(2L

\∅)×

Expr

S

•LocInv⊆L

×{◦,•}×

Expr

S×L

×{◦,•}

,

•Θ

:L

∪Msg

∪Cond∪

LocInv→

{hot,cold}

.

:C

1:C

2

x>

3

:C

3

ABC

D

E

v=

0

l1,0

l1,1

l1,2

l1,3

l1,4

l2,0

l2,1

l2,2

l2,3

l3,0

l3,1

l3,2

Fro

mC

on

creteto

Ab

stract

Syn

tax

– 18 – 2017-01-24 – Slscsyn –

16/

66

•lo

cation

sL

,

•�

⊆L

×L

,∼

⊆L

×L

•I

={I1,...,In}

,

•Msg

⊆L

×E×L

,

•Cond⊆

(2L

\∅)×

Expr

S

•LocInv⊆L

×{◦,•}×

Expr

S×L

×{◦,•}

,

•Θ

:L

∪Msg

∪Cond∪

LocInv→

{hot,cold}

.

Well-F

orm

edn

ess

– 18 – 2017-01-24 – Slscsyn –

17/

66

Bo

nd

ed

ne

ss/n

oflo

ating

con

ditio

ns:(co

uld

be

relaxe

da

littleif

we

wan

ted

to)

•Fo

re

achlo

cationl∈L

,ifl

isth

elo

cation

of

•a

con

ditio

n,i.e

.∃(L,φ

)∈Cond:l∈L

,or

•a

localin

variant,i.e

.∃(l1,ι

1,φ,l2,ι

2 )∈LocIn

v:l∈{l1,l2 }

,

the

nth

ere

isa

locatio

nl ′

simu

ltane

ou

stol,i.e

.l∼l ′,w

hich

isth

elo

cation

of

•an

instan

ceh

ead

,i.e.l ′

ism

inim

alwrt.�

,or

•a

me

ssage,i.e

.

∃(l1,E,l2 )

∈Msg

:l∈{l1,l2 }

.

No

te:

ifm

essage

sin

ach

artare

cyclic,

the

nth

ere

do

esn’t

exist

ap

artialord

er

(sosu

chd

iagrams

do

n’t

eve

nh

avean

abstract

syn

tax).

Live

Seq

uen

ceC

ha

rts—

Sem

an

tics

– 18 – 2017-01-24 – main –

18/

66

TB

A-b

ased

Sem

an

ticso

fL

SC

s

– 18 – 2017-01-24 – Slscpresem –

19/

66

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✘✔

Plan

:

(i)G

iven

anL

SC

Lw

ithb

od

y((L,�,∼

),I,M

sg,C

ond,L

ocIn

v,Θ

),

(ii)co

nstru

cta

TB

AB

L,an

d

(iii)d

efin

elan

guage

L(L

)o

fL

inte

rms

ofL(B

L),

inp

articular

taking

activation

con

ditio

nan

dactivatio

nm

od

ein

toacco

un

t.

(iv)d

efin

elan

guage

L(M

)o

fa

UM

Lm

od

el.

•T

he

nM

|=L

(un

iversal)

ifan

do

nly

ifL(M

)⊆

L(L

).

An

dM

|=L

(existe

ntial)

ifan

do

nly

ifL(M

)∩L(L

)6=

∅.

Live

Seq

uen

ceC

ha

rts—

TB

AC

on

structio

n

– 18 – 2017-01-24 – main –

20

/6

6

Page 5: Lecture 18: Live Sequence Charts II

Fo

rma

lL

SC

Sem

an

tics:It’s

inth

eC

uts!

– 18 – 2017-01-24 – Slsccutfire –

21/

66

De

finitio

n.

Let((L

,�,∼

),I,M

sg,C

ond,L

ocIn

v,Θ

)b

ean

LS

Cb

od

y.

An

on

-em

pty

set∅6=C

⊆L

iscalle

da

cut

of

the

LS

Cb

od

yiff

•it

isd

ow

nw

ardclo

sed

,i.e.∀l,l ′•l ′∈C

∧l�l ′

=⇒

l∈C,

•it

isclo

sed

un

de

rsim

ultan

eity

,i.e.

∀l,l ′

•l ′∈C

∧l∼l ′

=⇒

l∈C

,and

•it

com

prise

sat

least

on

elo

cation

pe

rin

stance

line

,i.e.

∀i∈I∃l∈C

•il=i.

Fo

rma

lL

SC

Sem

an

tics:It’s

inth

eC

uts!

– 18 – 2017-01-24 – Slsccutfire –

21/

66

De

finitio

n.

Let((L

,�,∼

),I,M

sg,C

ond,L

ocIn

v,Θ

)b

ean

LS

Cb

od

y.

An

on

-em

pty

set∅6=C

⊆L

iscalle

da

cut

of

the

LS

Cb

od

yiff

•it

isd

ow

nw

ardclo

sed

,i.e.∀l,l ′•l ′∈C

∧l�l ′

=⇒

l∈C,

•it

isclo

sed

un

de

rsim

ultan

eity

,i.e.

∀l,l ′

•l ′∈C

∧l∼l ′

=⇒

l∈C

,and

•it

com

prise

sat

least

on

elo

cation

pe

rin

stance

line

,i.e.

∀i∈I∃l∈C

•il=i.

Th

ete

mp

eratu

refu

nctio

nis

exte

nd

ed

tocu

tsas

follo

ws:

Θ(C

)=

{

hot

,if∃l∈C

•(∄l ′∈C

•l≺l ′)

∧Θ(l)

=hot

cold

,oth

erw

ise

that

is,Cis

ho

tif

and

on

lyif

atle

asto

ne

of

itsm

aximale

lem

en

tsis

ho

t.

Cu

tE

xam

ples

– 18 – 2017-01-24 – Slsccutfire –

22

/6

6

∅6=C

⊆L

—d

ow

nw

ardclo

sed

—sim

ultan

eity

close

d—

atle

asto

ne

loc.p

er

instan

celin

e

:C

1:C

2

φ

:C

3

E

F

G

l1,0

l1,1

l1,2

l2,0

l2,1

l2,2

l2,3

l3,0

l3,1

Page 6: Lecture 18: Live Sequence Charts II

AS

uccesso

rR

elatio

no

nC

uts

– 18 – 2017-01-24 – Slsccutfire –

23

/6

6

Th

ep

artialord

er

“�”

and

the

simu

ltane

ityre

lation

“∼”

of

locatio

ns

ind

uce

ad

irect

succe

ssor

relatio

no

ncu

tso

fan

LS

Cb

od

yas

follo

ws:

De

finitio

n.

LetC

⊆L

be

ta

cut

of

LS

Cb

od

y((L

,�,∼

),I,Msg,Cond,LocIn

v,Θ

).

Ase

t∅6=F

⊆L

of

locatio

ns

iscalle

dfire

d-se

tF

of

cutC

ifan

do

nly

if

•C

∩F

=∅

andC

∪F

isa

cut,i.e

.Fis

close

du

nd

er

simu

ltane

ity,

•alllo

cation

sinF

ared

irect

≺-su

ccesso

rso

fth

efro

nt

ofC

,i.e.

∀l∈F

∃l ′∈C

•l ′≺l∧(∄l ′′

∈C

•l ′≺l ′′

≺l),

•lo

cation

sinF

,that

lieo

nth

esam

ein

stance

line

,arep

airwise

un

ord

ere

d,i.e

.

∀l6=l ′∈F

•(∃I∈

I•{l,l ′}

⊆I)

=⇒

l6�l ′∧l ′6�l,

•fo

re

achasy

nch

ron

ou

s(!)

me

ssagere

cep

tion

inF

,th

eco

rresp

on

din

gse

nd

ing

isalre

ady

inC

,

∀(l,E

,l ′)∈

Msg

•l ′∈F

=⇒

l∈C.

Th

ecu

tC

′=C

∪F

iscalle

dd

irect

succe

ssor

ofC

viaF

,de

no

ted

byC FC

′.

Page 7: Lecture 18: Live Sequence Charts II

Sig

na

la

nd

Attrib

ute

Exp

ression

s

– 18 – 2017-01-24 – Stbaconstr –

26

/6

6

•Le

tS

=(T,C,V,atr,E)

be

asign

ature

andX

ase

to

flo

gicalvariable

s,

•T

he

signalan

dattrib

ute

exp

ressio

nsExpr

S(E,X)

ared

efin

ed

by

the

gramm

ar:

ψ::=

true|ψ|E

!x,y

|E

?x,y

|¬ψ|ψ

1∨ψ

2,

wh

ere

expr:Bool∈Expr

S,E

∈E

,x,y

∈X

(or

key

wo

rdenv

).

•W

eu

seE!? (X

):=

{E

!x,y,E

?x,y

|E

∈E,x,y

∈X}

tod

en

ote

the

set

of

eve

nt

exp

ressio

ns

ove

rE

andX

.

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Stbaconstr –

27

/6

6

Re

call:Th

eT

BAB(L

)o

fL

SC

Lis(E

xprB(X

),X,Q,q

ini ,→

,QF)

with

•Q

isth

ese

to

fcu

tso

fL

,qin

iis

the

instan

ceh

ead

scu

t,

•ExprB

∪E!?(X

),

•→

con

sistso

flo

op

s,pro

gress

transitio

ns

(from F

),and

legale

xits(co

ldco

nd

./lo

calinv.),

•F

={C

∈Q

|Θ(C

)=

cold

∨C

=L}

isth

ese

to

fco

ldcu

ts.

Page 8: Lecture 18: Live Sequence Charts II

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Stbaconstr –

27

/6

6

Re

call:Th

eT

BAB(L

)o

fL

SC

Lis(E

xprB(X

),X,Q,q

ini ,→

,QF)

with

•Q

isth

ese

to

fcu

tso

fL

,qin

iis

the

instan

ceh

ead

scu

t,

•ExprB

∪E!?(X

),

•→

con

sistso

flo

op

s,pro

gress

transitio

ns

(from F

),and

legale

xits(co

ldco

nd

./lo

calinv.),

•F

={C

∈Q

|Θ(C

)=

cold

∨C

=L}

isth

ese

to

fco

ldcu

ts.

So

inth

efo

llow

ing,w

e“o

nly”

ne

ed

toco

nstru

ctth

etran

sition

s’labe

ls:

→=

{(q,

,q)|q∈Q}∪

{(q,

,q′)

|q Fq′}

∪{(q,

,L)|q∈Q}

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Stbaconstr –

27

/6

6

Re

call:Th

eT

BAB(L

)o

fL

SC

Lis(E

xprB(X

),X,Q,q

ini ,→

,QF)

with

•Q

isth

ese

to

fcu

tso

fL

,qin

iis

the

instan

ceh

ead

scu

t,

•ExprB

∪E!?(X

),

•→

con

sistso

flo

op

s,pro

gress

transitio

ns

(from F

),and

legale

xits(co

ldco

nd

./lo

calinv.),

•F

={C

∈Q

|Θ(C

)=

cold

∨C

=L}

isth

ese

to

fco

ldcu

ts.

So

inth

efo

llow

ing,w

e“o

nly”

ne

ed

toco

nstru

ctth

etran

sition

s’labe

ls:

→=

{(q,ψ

loop(q

),q)|q∈Q}∪

{(q,ψ

prog(q,q′),q′)

|q Fq′}

∪{(q,ψ

exit (q

),L)|q∈Q}

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Stbaconstr –

27

/6

6

Re

call:Th

eT

BAB(L

)o

fL

SC

Lis(E

xprB(X

),X,Q,q

ini ,→

,QF)

with

•Q

isth

ese

to

fcu

tso

fL

,qin

iis

the

instan

ceh

ead

scu

t,

•ExprB

∪E!?(X

),

•→

con

sistso

flo

op

s,pro

gress

transitio

ns

(from F

),and

legale

xits(co

ldco

nd

./lo

calinv.),

•F

={C

∈Q

|Θ(C

)=

cold

∨C

=L}

isth

ese

to

fco

ldcu

ts.

So

inth

efo

llow

ing,w

e“o

nly”

ne

ed

toco

nstru

ctth

etran

sition

s’labe

ls:

→=

{(q,ψ

loop(q

),q)|q∈Q}∪

{(q,ψ

prog(q,q′),q′)

|q Fq′}

∪{(q,ψ

exit (q

),L)|q∈Q}

q...

ψloop(q

):“w

hat

allo

ws

us

tosta

yat

cutq”

“...F

1”

ψprog(q,q′):

“chara

cte

ris

atio

nof

fire

dsetFn”

ψexit (q

):“w

hatallo

ws

us

to

legally

exit”

true

:C

1:C

2

x>

3

:C

3

ABC

DE

v=

0

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Stbaconstr –

28

/6

6

“On

ly”co

nstru

ctth

etran

sition

s’labe

ls:

→=

{(q,ψ

loop(q

),q)|q∈Q}∪

{(q,ψ

prog(q,q′),q′)

|q Fq′}

∪{(q,ψ

exit (q

),L)|q∈Q}

q

q1

...qn

ψloop(q

)=

=:ψ

hot

loop(q)

︷︸︸

ψMsg(q

)∧ψ

LocInv

hot

(q)∧ψ

LocInv

cold

(q)

ψexit (q

)=

hot

loop(q

)∧

¬ψ

LocInv

cold

(q))

∨∨

1≤i≤n

hot

prog(q,qi )

∧(¬ψ

LocInv,•

cold

(q,qi )∨¬ψ

Cond

cold

(q,qi )))

ψprog(q,qn)=

=:ψ

hot

prog(q,qn)

︷︸︸

ψMsg(q

,qn)∧ψ

Cond

hot(q,qn)∧ψ

LocInv,•

hot

(q,qn)

∧ψ

Cond

cold

(q,qn)∧ψ

LocInv,•

cold

(q,qn)

true:C

1:C

2

x>

3

:C

3

ABC

DE

v=

0

Lo

op

Co

nd

ition

– 18 – 2017-01-24 – Stbaconstr –

29

/6

6

ψloop(q

)=ψ

Msg(q

)∧ψ

LocInv

hot

(q)∧ψ

LocInv

cold

(q)

•ψMsg(q

)=

¬∨

1≤i≤nψMsg(q

,qi )

∧(stric

t=⇒

ψ∈Msg(L)¬ψ)

︸︷︷

=:ψ

strict (q)

•ψLocInv

θ(q)=

ℓ=(l,ι,φ

,l′,ι

′)∈LocInv,Θ(ℓ)=θ,ℓ

activeatqφ

Alo

cationl

iscalle

dfro

nt

locatio

no

fcu

tC

ifan

do

nly

if∄l ′∈L•l≺l ′.

Localin

variant(lo,ι

0,φ,l1,ι

1)

isactive

atcu

t(!)q

ifan

do

nly

ifl0

�l≺l1

for

som

efro

nt

locatio

nl

of

cutq

orl1

∈q∧ι1=

•.

•Msg(F

)=

{E

!xl,xl′|(l,E

,l ′)∈

Msg,l∈F}∪{E

?xl,xl′|(l,E

,l ′)∈

Msg,l ′∈F}

•xl∈X

isth

elo

gicalvariable

associate

dw

ithth

ein

stance

lineI

wh

ichin

clud

esl,i.e

.l∈I

.

•Msg(F

1,...,F

n)=

1≤i≤nMsg(Fi )

:C

1:C

2

x>

3

:C

3

ABC

DE

v=

0

Pro

gress

Co

nd

ition

– 18 – 2017-01-24 – Stbaconstr –

30

/6

6

ψhot

prog(q,qi )

Msg(q

,qn)∧ψ

Cond

hot(q,qn)∧ψ

LocInv,•

hot

(qn)

•ψMsg(q

,qi )

=∧

ψ∈Msg(qi\q)ψ∧∧

j6=i

ψ∈Msg(qj\q)\

Msg(qi\q)¬ψ

∧(stric

t=⇒

ψ∈Msg(L)\

Msg(Fi)¬ψ)

︸︷︷

=:ψ

strict (q,qi)

•ψCond

θ(q,qi )

=∧

γ=(L,φ

)∈Cond,Θ(γ)=θ,L∩(qi\q)6=

∅φ

•ψLocInv,•

θ(q,qi )

=∧

λ=(l,ι,φ

,l′,ι

′)∈LocInv,Θ(λ)=θ,λ•

-activeatqiφ

Localin

variant(l0,ι

0,φ,l1,ι

1)

is•

-activeatq

ifan

do

nly

if

•l0≺l≺l1

,or

•l=l0∧ι0=

•,o

r

•l=l1∧ι1=

for

som

efro

nt

locatio

nl

of

cut

(!)q

.

:C

1:C

2

x>

3

:C

3

ABC

DE

v=

0

Page 9: Lecture 18: Live Sequence Charts II

Co

urse

Ma

p

– 18 – 2017-01-24 – main –

32

/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✘✔

Tell

Th

emW

ha

tYo

u’ve

To

ldT

hem

...

– 18 – 2017-01-24 – Sttwytt18 –

33

/6

6

•In

teractio

ns

canb

ere

flective

de

scriptio

ns

of

be

havio

ur,i.e

.

•d

escrib

ew

hat

be

havio

ur

is(u

n)d

esire

d,

with

ou

t(ye

t)de

finin

gh

ow

tore

aliseit.

•O

ne

visualfo

rmalism

for

inte

raction

s:Live

Se

qu

en

ceC

harts

•lo

cation

sin

diagram

ind

uce

ap

artialord

er,

•in

stantan

eo

us

and

ayn

chro

no

us

me

ssages,

•co

nd

ition

san

dlo

calinvarian

ts

•T

he

me

anin

go

fan

LS

Cis

de

fine

du

sing

TB

As.

•C

uts

be

com

estate

so

fth

eau

tom

aton

.

•Lo

cation

sin

du

cea

partialo

rde

ro

ncu

ts.

•A

uto

mato

n-tran

sition

san

dan

no

tation

sco

rresp

on

dto

asu

ccesso

rre

lation

on

cuts.

•A

nn

otatio

ns

use

sign

al/attrib

ute

exp

ressio

ns.

•L

ater:

•T

BA

have

chiacce

ptan

ce(o

fin

finite

wo

rds

(of

am

od

el)).

•Fu

llLSC

sem

antics.

•P

re-C

harts.

Excu

rsion

:B

üch

iA

uto

ma

ta

– 18 – 2017-01-24 – main –

34

/6

6

Fro

mF

inite

Au

tom

ata

toS

ymb

olic

chi

Au

tom

ata

– 18 – 2017-01-24 – Stba –

35

/6

6

q1

q2

01

A:

Σ=

{0,1}

q1

q2

01

B:

Σ=

{0,1}

q1

q2

01

1

0

B′:

Σ=

{0,1}

q1

q2

even(x

)

odd(x

)

Asym

=({x}→

N)

q1

q2

even(x

)

odd(x

)

Bsym

=({x}→

N)

Büch

i

infin

itew

ord

s

symb

olic

symb

olic

Büch

i

infin

itew

ord

s

Sym

bo

licB

üch

iA

uto

ma

ta

– 18 – 2017-01-24 – Stba –

36

/6

6

De

finitio

n.

AS

ym

bo

licB

üch

iAu

tom

aton

(TB

A)is

atu

ple

B=

(ExprB(X

),X,Q,qin

i ,→,Q

F)

wh

ere

•X

isa

set

of

logicalvariab

les,

•ExprB(X

)is

ase

to

fB

oo

lean

exp

ressio

ns

ove

rX

,

•Q

isa

finite

set

of

states,

•qin

i∈Q

isth

ein

itialstate,

•→

⊆Q

×ExprB(X

)×Q

isth

etran

sition

relatio

n.

Transitio

ns(q,ψ,q

′)fro

mq

toq′

arelab

elle

dw

ithan

exp

ressio

∈ExprB(X

).

•QF

⊆Q

isth

ese

to

ffair

(or

accep

ting

)states.

Page 10: Lecture 18: Live Sequence Charts II

Wo

rd

– 18 – 2017-01-24 – Stba –

37

/6

6

De

finitio

n.Le

tX

be

ase

toflo

gicalvariable

san

dle

tExprB(X

)b

ea

seto

fBo

ole

ane

xpre

ssion

so

verX

.

Ase

t(Σ,·

|=··)

iscalle

dan

alph

abe

tfo

rExprB(X

)if

and

on

lyif

•fo

re

achσ∈

Σ,

•fo

re

ache

xpre

ssionexpr∈

ExprB

,and

•fo

re

achvalu

ationβ:X

→D(X

)o

flo

gicalvariable

s,

eith

er

σ|=βexpr

or

σ6|=βexpr.

(σsatisfie

s(o

rd

oe

sn

ot

satisfy)expr

un

de

rvalu

ationβ

)

An

infin

itese

qu

en

cew

=(σi )i∈

N0∈Σω

ove

r(Σ,·

|=··)

iscalle

dw

ord

(forExprB(X

)).

Ru

no

fT

BA

over

Wo

rd

– 18 – 2017-01-24 – Stba –

38

/6

6

De

finitio

n.Le

tB=

(ExprB(X

),X,Q,qin

i ,→,Q

F)

be

aT

BA

and

w=σ1,σ

2,σ

3,...

aw

ord

forExprB(X

).An

infin

itese

qu

en

ce

=q0,q

1,q

2,...

∈Qω

iscalle

dru

no

fB

ove

rw

un

de

rvalu

ationβ:X

→D(X

)if

and

on

lyif

•q0=qin

i ,

•fo

re

achi∈

N0

the

reis

atran

sition(qi ,ψ

i ,qi+

1)∈→

such

thatσi|=βψi .

Ru

no

fT

BA

over

Wo

rd

– 18 – 2017-01-24 – Stba –

38

/6

6

De

finitio

n.Le

tB=

(ExprB(X

),X,Q,qin

i ,→,Q

F)

be

aT

BA

and

w=σ1,σ

2,σ

3,...

aw

ord

forExprB(X

).An

infin

itese

qu

en

ce

=q0,q

1,q

2,...

∈Qω

iscalle

dru

no

fB

ove

rw

un

de

rvalu

ationβ:X

→D(X

)if

and

on

lyif

•q0=qin

i ,

•fo

re

achi∈

N0

the

reis

atran

sition(qi ,ψ

i ,qi+

1)∈→

such

thatσi|=βψi .

Exam

ple

:q1

q2

q1

even(x

)

odd(x

)

even(x

)

odd(x

)

Bsym

=({x}→

N)

Th

eL

an

gu

age

of

aT

BA

– 18 – 2017-01-24 – Stba –

39

/6

6

De

finitio

n.

We

sayT

BAB=

(ExprB(X

),X,Q,q

ini ,→

,QF)

accep

tsth

ew

ord

w=

(σi )i∈

N0∈(E

xprB→

B)ω

ifan

do

nly

ifB

has

aru

n=

(qi )i∈

N0

ove

rw

such

that

fair(o

racce

ptin

g)state

sare

visited

infin

itely

ofte

nb

y

,i.e

.,such

that

∀i∈N

0∃j>i:qj∈QF.

We

callth

ese

tL(B

)⊆

(ExprB

→B)ω

of

wo

rds

that

areacce

pte

db

yB

the

lang

uage

ofB

.

Th

eL

an

gu

age

of

aT

BA

– 18 – 2017-01-24 – Stba –

39

/6

6

De

finitio

n.

We

sayT

BAB=

(ExprB(X

),X,Q,q

ini ,→

,QF)

accep

tsth

ew

ord

w=

(σi )i∈

N0∈(E

xprB→

B)ω

ifan

do

nly

ifB

has

aru

n=

(qi )i∈

N0

ove

rw

such

that

fair(o

racce

ptin

g)state

sare

visited

infin

itely

ofte

nb

y

,i.e

.,such

that

∀i∈N

0∃j>i:qj∈QF.

We

callth

ese

tL(B

)⊆

(ExprB

→B)ω

of

wo

rds

that

areacce

pte

db

yB

the

lang

uage

ofB

.

Exam

ple

:q1

q2

q1

even(x

)

odd(x

)

even(x

)

odd(x

)

Bsym

=({x}→

N)

La

ng

uage

of

UM

LM

od

el

– 18 – 2017-01-24 – main –

40

/6

6

Page 11: Lecture 18: Live Sequence Charts II

Th

eL

an

gu

age

of

aM

od

el

– 18 – 2017-01-24 – Smodellang –

41/

66

Re

call:AU

ML

mo

de

lM=

(C

D,S

M,O

D)

and

astru

cture

Dd

en

ote

ase

tJM

Ko

f(in

itialand

con

secu

tive) com

pu

tation

so

fth

efo

rm

(σ0,ε

0 )a0

−→

(σ1,ε

1 )a1

−→

(σ2,ε

2 )a2

−→...

wh

ere

ai=

(consi ,Sndi ,u

i )∈2

D(E)×

2(D

(E)∪

{∗,+

})×

D(C

D(C)

︸︷︷

=:A

.

Th

eL

an

gu

age

of

aM

od

el

– 18 – 2017-01-24 – Smodellang –

41/

66

Re

call:AU

ML

mo

de

lM=

(C

D,S

M,O

D)

and

astru

cture

Dd

en

ote

ase

tJM

Ko

f(in

itialand

con

secu

tive) com

pu

tation

so

fth

efo

rm

(σ0,ε

0 )a0

−→

(σ1,ε

1 )a1

−→

(σ2,ε

2 )a2

−→...

wh

ere

ai=

(consi ,Sndi ,u

i )∈2

D(E)×

2(D

(E)∪

{∗,+

})×

D(C

D(C)

︸︷︷

=:A

.

For

the

con

ne

ction

be

twe

en

mo

de

lsan

din

teractio

ns,w

ed

isreg

ardth

eco

nfigu

ration

of

the

eth

er ,an

dd

efin

eas

follo

ws:

De

finitio

n.

LetM

=(C

D,S

M,O

D)

be

aU

ML

mo

de

land

Da

structu

re.T

he

n

L(M

):=

{(σi ,u

i ,consi ,Sndi )i∈

N0∈

(ΣDS

×A)ω|

∃(εi )i∈

N0:(σ

0,ε

0)

(cons0,S

nd0)

−−−−−−−−−→

u0

(σ1,ε

1)···

∈JM

K}

isth

elan

gu

ageo

fM

.

Exa

mp

le:L

an

gu

age

of

aM

od

el

– 18 – 2017-01-24 – Smodellang –

42

/6

6

L(M

):=

{(σi ,u

i ,consi ,Sndi )i∈

N0|∃

(εi )i∈

N0:(σ

0,ε

0)

(cons0,S

nd0)

−−−−−−−−−→

u0

(σ1,ε

1)···

∈JM

K}

C1

C2

k:Int

C3

itsC2

0,1

itsC1

0,1

itsC3

0,1

CD

:

c1:C

1c2:C

2

k=

27

c3:C

3

itcC

1

itcC

2

itcC

3σ0 :

(σ,ε)

(cons,S

nd)

−−−−−−→

u···

→(σ

0,ε

0 )(cons0,S

nd0)

−−−−−−−−→

u0

(σ1,ε

1 )(cons1, {

(:E,c

2)}

)−−−−−−−−−−−→

c1

(σ2,ε

2 )( {

:E},S

nd2)

−−−−−−−−→

c2

(σ3 ,ε3 )

(cons3,{

(:F,c

3)}

)−−−−−−−−−−−→

c2

(σ4,ε

4 )(cons4,{

(G(),c

1)}

)−−−−−−−−−−−−→

c2

(σ5 ,ε5 )

({:F

},S

nd5)

−−−−−−−−→

c3

(σ6 ,ε6 )

→···

Wo

rds

over

Sig

na

ture

– 18 – 2017-01-24 – Smodellang –

43

/6

6

De

finitio

n.Le

tS

=(T,C,V,atr,E)

be

asign

ature

and

Da

structu

reo

fS

.

Aw

ord

ove

rS

and

Dis

anin

finite

seq

ue

nce

(σi ,u

i ,consi ,Sndi )i∈

N0∈Σ

DS×

D(C)×

2D

(E)×

2(D

(E)∪

{∗,+

})×

D(C

)

•T

he

langu

ageL(M

)o

fa

UM

Lm

od

elM

=(C

D,S

M,O

D)

isa

wo

rdo

ver

the

signatu

reS

(C

D)

ind

uce

db

yC

Dan

dD

,give

nstru

cture

D.

Sa

tisfactio

no

fS

ign

al

an

dA

ttribu

teE

xpressio

ns

– 18 – 2017-01-24 – Smodellang –

44

/6

6

•Le

t(σ,u,cons,Snd)∈

ΣDS

×A

be

atu

ple

con

sisting

of

syste

mstate

,ob

ject

ide

ntity

,con

sum

ese

t,and

sen

dse

t.

•Le

tβ:X

→D(C)

be

avalu

ation

of

the

logicalvariab

les.

Th

en

•(σ,u,cons,Snd)|=β

true

•(σ,u,cons,Snd)|=βψ

ifan

do

nly

ifIJψ

K(σ,β

)=

1

•(σ,u,cons,Snd)|=β¬ψ

ifan

do

nly

ifn

ot(σ,cons,Snd)|=βψ

•(σ,u,cons,Snd)|=βψ1∨ψ2

ifan

do

nly

if(σ,u,cons,Snd)|=βψ1

or(σ,u,cons,Snd)|=βψ2

•(σ,u,cons,Snd)|=βE

!x,y

ifan

do

nly

ifβ(x

)=u∧∃e∈

D(E

)•(e,β

(y))

∈Snd

•(σ,u,cons,Snd)|=βE

?x,y

ifan

do

nly

ifβ(y)=u∧cons⊂

D(E

)

Sa

tisfactio

no

fS

ign

al

an

dA

ttribu

teE

xpressio

ns

– 18 – 2017-01-24 – Smodellang –

44

/6

6

•Le

t(σ,u,cons,Snd)∈

ΣDS

×A

be

atu

ple

con

sisting

of

syste

mstate

,ob

ject

ide

ntity

,con

sum

ese

t,and

sen

dse

t.

•Le

tβ:X

→D(C)

be

avalu

ation

of

the

logicalvariab

les.

Th

en

•(σ,u,cons,Snd)|=β

true

•(σ,u,cons,Snd)|=βψ

ifan

do

nly

ifIJψ

K(σ,β

)=

1

•(σ,u,cons,Snd)|=β¬ψ

ifan

do

nly

ifn

ot(σ,cons,Snd)|=βψ

•(σ,u,cons,Snd)|=βψ1∨ψ2

ifan

do

nly

if(σ,u,cons,Snd)|=βψ1

or(σ,u,cons,Snd)|=βψ2

•(σ,u,cons,Snd)|=βE

!x,y

ifan

do

nly

ifβ(x

)=u∧∃e∈

D(E

)•(e,β

(y))

∈Snd

•(σ,u,cons,Snd)|=βE

?x,y

ifan

do

nly

ifβ(y)=u∧cons⊂

D(E

)

Ob

servatio

n:w

ed

on’t

use

allinfo

rmatio

nfro

mth

eco

mp

utatio

np

ath.

We

cou

ld,e

.g.,alsoke

ep

tracko

fe

ven

tid

en

tities

be

twe

en

sen

dan

dre

ceive

.

Page 12: Lecture 18: Live Sequence Charts II

Exa

mp

le:M

od

elL

an

gu

age

an

dS

ign

al

/A

ttribu

teE

xpresio

ns

– 18 – 2017-01-24 – Smodellang –

45

/6

6

C1

C2

k:Int

C3

itsC2

0,1

itsC1

0,1

itsC3

0,1

CD

:

c1:C

1c2:C

2

k=

27

c3:C

3

itcC

1

itcC

2

itcC

3σ0 :

(σ,ε)

(cons,S

nd)

−−−−−−−→

u···

→(σ

0,ε

0)

(cons0,S

nd0)

−−−−−−−−−→

u0

(σ1,ε

1)

(cons1, {

(:E,c

2)}

)−−

−−−−−−−−−−→

c1

(σ2,ε

2)

({:E

},S

nd2)

−−−−−−−−→

c2

(σ3,ε

3)

(cons3, {

(:F,c

3)}

)−−−−−−−−−−−−→

c2

(σ4,ε

4)

(cons4, {

(G(),c

1)}

)−−−−−−−−−−−−−→

c2

(σ5,ε

5)

( {:F

},S

nd5)

−−−−−−−−→

c3

(σ6,ε

6)→

···

•β=

{x7→c1,y

7→c2,z

7→c3 }

•(σ

0 ,u0,cons0,S

nd0 )

|=βy.k>

0

•(σ

0 ,u0,cons0,S

nd0 )

|=βx.k>

0

•(σ

1 ,c1,cons1,{(:E,c

2 )})|=βE

!x,y

•(σ

1 ,c1,cons1,{(:E,c

2 )})|=βF

!x,y

•···

|=βE

?x,y

•W

ese

t(σ

4,c

2,cons4,{G(),c

1 })|=βGy,x!∧Gy,x?

(triggere

do

pe

ration

or

me

tho

dcall).

TB

Aover

Sig

na

ture

– 18 – 2017-01-24 – Smodellang –

46

/6

6

De

finitio

n.A

TB

A

B=

(ExprB(X

),X,Q,qin

i ,→,Q

F)

wh

ere

ExprB(X

)is

the

set

of

sign

alan

dattrib

ute

exp

ressio

nsExpr

S(E,X

)o

ver

signatu

reS

iscalle

dT

BA

ove

rS

.

TB

AC

on

structio

nP

rincip

le

– 18 – 2017-01-24 – Smodellang –

47

/6

6

Re

call:Th

eT

BAB(L

)o

fL

SC

Lis(E

xprB(X

),X,Q,q

ini ,→

,QF)

with

•Q

isth

ese

to

fcu

tso

fL

,qin

iis

the

instan

ceh

ead

scu

t,

•ExprB

∪E!?(X

),

•→

con

sistso

flo

op

s,pro

gress

transitio

ns

(from F

),and

legale

xits(co

ldco

nd

./lo

calinv.),

•F

={C

∈Q

|Θ(C

)=

cold

∨C

=L}

isth

ese

to

fco

ldcu

ts.

So

inth

efo

llow

ing,w

e“o

nly”

ne

ed

toco

nstru

ctth

etran

sition

s’labe

ls:

→=

{(q,ψ

loop(q

),q)|q∈Q}∪

{(q,ψ

prog(q,q′),q′)

|q Fq′}

∪{(q,ψ

exit (q

),L)|q∈Q}

q...

ψloop(q

):“w

hat

allo

ws

us

tosta

yat

cutq”

“...F

1”

ψprog(q,q′):

“chara

cte

ris

atio

nof

fire

dsetFn”

ψexit (q

):“w

hatallo

ws

us

to

legally

exit”

true

:C

1:C

2

x>

3

:C

3

ABC

DE

v=

0

Co

urse

Ma

p

– 18 – 2017-01-24 – main –

48

/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✔✔

Live

Seq

uen

ceC

ha

rts—

Sem

an

ticsC

on

t’d

– 18 – 2017-01-24 – main –

49

/6

6

Fu

llL

SC

s

– 18 – 2017-01-24 – Slscsem –

50

/6

6

Afu

llLS

CL

=(((L

,�,∼

),I,Msg,Cond,LocIn

v,Θ

),ac0,am,Θ

L)

con

sistso

f

•b

od

y((L

,�,∼

),I,Msg,Cond,LocInv,Θ

),

•activatio

nco

nd

itionac0∈

Expr

S,

•strictn

ess

flagstric

t(if

false,

Lis

called

pe

rmissive

)

•activatio

nm

od

ea

m∈

{in

itial,invarian

t},

•ch

artm

od

ee

xisten

tial(Θ

L=

cold

)or

un

iversal(Θ

L=

hot).

Page 13: Lecture 18: Live Sequence Charts II

Fu

llL

SC

s

– 18 – 2017-01-24 – Slscsem –

50

/6

6

Afu

llLS

CL

=(((L

,�,∼

),I,Msg,Cond,LocIn

v,Θ

),ac0,am,Θ

L)

con

sistso

f

•b

od

y((L

,�,∼

),I,Msg,Cond,LocInv,Θ

),

•activatio

nco

nd

itionac0∈

Expr

S,

•strictn

ess

flagstric

t(if

false,

Lis

called

pe

rmissive

)

•activatio

nm

od

ea

m∈

{in

itial,invarian

t},

•ch

artm

od

ee

xisten

tial(Θ

L=

cold

)or

un

iversal(Θ

L=

hot).

Co

ncre

tesy

ntax:

LS

C:

L1

AC

:ac0

AM

:in

itialI:

pe

rmissive

:C

1:C

2

φ

:C

3

E

F

G

Fu

llL

SC

s

– 18 – 2017-01-24 – Slscsem –

50

/6

6

Afu

llLS

CL

=(((L

,�,∼

),I,Msg,Cond,LocIn

v,Θ

),ac0,am,Θ

L)

con

sistso

f

•b

od

y((L

,�,∼

),I,Msg,Cond,LocInv,Θ

),

•activatio

nco

nd

itionac0∈

Expr

S,

•strictn

ess

flagstric

t(if

false,

Lis

called

pe

rmissive

)

•activatio

nm

od

ea

m∈

{in

itial,invarian

t},

•ch

artm

od

ee

xisten

tial(Θ

L=

cold

)or

un

iversal(Θ

L=

hot).

Ase

to

fw

ord

sW

⊆(E

xprB→

B)ω

isacce

pte

db

yL

ifan

do

nly

if

LS

C:

L1

AC

:ac1

AM

:in

itialI:

pe

rmissive

:C

1:C

2

φ

:C

3

E

F

G

ΘL

am

=in

itialam

=in

variant

cold

∃w

∈W

•w

0|=

ac∧¬ψexit (C

0)

∧w

0|=ψprog(∅,C

0)∧w/1∈

L(B

(L

))

∃w

∈W

∃k∈

N0•wk|=

ac∧¬ψexit (C

0)

∧wk|=ψprog(∅,C

0)∧w/k+

1∈

L(B

(L

))

hot

∀w

∈W

•w

0|=

ac∧¬ψexit (C

0)

=⇒

w0|=ψprog(∅,C

0)∧w/1∈

L(B

(L

))

∀w

∈W

∀k∈

N0•wk|=

ac∧¬ψexit (C

0)

=⇒

wk|=ψCond

hot

(∅,C

0)∧w/k+

1∈

L(B

(L

))

wh

ereC

0is

the

min

imal(o

rin

stance

he

ads)cu

t.

No

te:A

ctivatio

nC

on

ditio

n

– 18 – 2017-01-24 – Slscsem –

52

/6

6

LS

C:

L1

AC

:c1

AM

:in

itialI:

pe

rmissive

:C

1:C

2:C

3

E

F

GL

SC

:L

1A

M:

initial

I:p

erm

issive

:C

1:C

2:C

3

E

F

G

c1

Existen

tial

LS

CE

xam

ple:

Bu

yA

So

ftdrin

k

– 18 – 2017-01-24 – Sswlsc –

53

/6

6

LS

C:

bu

yso

ftdrin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

Existen

tial

LS

CE

xam

ple:

Get

Ch

an

ge

– 18 – 2017-01-24 – Sswlsc –

54

/6

6

LS

C:

get

chan

geA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

C50

E1

pSOFT

SOFT

chg

-C50

Page 14: Lecture 18: Live Sequence Charts II

TB

A-b

ased

Sem

an

ticso

fL

SC

s

– 18 – 2017-01-24 – Slscpresem –

55

/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✘✔

Plan

:

(i)G

iven

anL

SC

Lw

ithb

od

y((L,�,∼

),I,M

sg,C

ond,L

ocIn

v,Θ

),

(ii)co

nstru

cta

TB

AB

L,an

d

(iii)d

efin

elan

guage

L(L

)o

fL

inte

rms

ofL(B

L),

inp

articular

taking

activation

con

ditio

nan

dactivatio

nm

od

ein

toacco

un

t.

(iv)d

efin

elan

guage

L(M

)o

fa

UM

Lm

od

el.

•T

he

nM

|=L

(un

iversal)

ifan

do

nly

ifL(M

)⊆

L(L

).

An

dM

|=L

(existe

ntial)

ifan

do

nly

ifL(M

)∩L(L

)6=

∅.

Live

Seq

uen

ceC

ha

rts—

Prech

arts

– 18 – 2017-01-24 – main –

56

/6

6

Pre-C

ha

rts

– 18 – 2017-01-24 – Sprechart –

57

/6

6

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oinV

alidato

rcp

:Ch

oiceP

ane

lD

ispe

nse

r

C50

pWATER

cp->water

_in

_sto

ck

dWATER

OK

Afu

llLS

CL

=(P

C,MC,ac0,am,Θ

L)

actually

con

sisto

f

•p

re-ch

artPC

=((L

P,�

P,∼

P),I

P,S,MsgP,CondP,LocInvP,Θ

P)

(po

ssibly

em

pty),

•m

ain-ch

artMC

=((L

M,�

M,∼

M),I

M,S,MsgM,CondM,LocInvM,Θ

M)

(no

n-e

mp

ty),

•activatio

nco

nd

itionac0:Bool∈

Expr

S,

•strictn

ess

flagstric

t(o

the

rwise

called

pe

rmissive

)

•activatio

nm

od

ea

m∈

{in

itial,invarian

t},

•ch

artm

od

ee

xisten

tial(Θ

L=

cold

)or

un

iversal(Θ

L=

hot).

Pre-C

ha

rtsS

ema

ntics

– 18 – 2017-01-24 – Sprechart –

58

/6

6

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oinV

alidato

rcp

:Ch

oiceP

ane

lD

ispe

nse

r

C50

pWATER

cp->water

_in

_sto

ck

dWATER

OK

am

=in

itialam

=in

variant

ΘL = cold

∃w

∈W

∃m

∈N

0•

∧w

0|=

ac∧¬ψ

exit (C

P0)∧ψ

prog(∅,CP0)

∧w

1,...,wm

∈L(B

(PC))

∧wm

+1|=

¬ψ

exit (C

M0)

∧wm

+1|=ψ

prog(∅,CM0

)

∧w/m

+2∈

L(B

(MC))

∃w

∈W

∃k<m

∈N

0•

∧wk|=

ac∧¬ψ

exit (C

P0)∧ψ

prog(∅,CP0)

∧wk+

1,...,wm

∈L(B

(PC))

∧wm

+1|=

¬ψ

exit (C

M0)

∧wm

+1|=ψ

prog(∅,CM0

)

∧w/m

+2∈

L(B

(MC))

ΘL = hot

∀w

∈W

∀m

∈N

0•

∧w

0|=

ac∧¬ψ

exit (C

P0)∧ψ

prog(∅,CP0)

∧w

1,...,wm

∈L(B

(PC))

∧wm

+1|=

¬ψ

exit (C

M0)

=⇒

wm

+1|=ψ

prog(∅,CM0

)

∧w/m

+2∈

L(B

(MC))

∀w

∈W

∀k≤m

∈N

0•

∧wk|=

ac∧¬ψ

exit (C

P0)∧ψ

prog(∅,CP0)

∧wk+

1,...,wm

∈L(B

(PC))

∧wm

+1|=

¬ψ

exit (C

M0)

=⇒

wm

+1|=ψ

prog(∅,CM0

)

∧w/m

+2∈

L(B

(MC))

Un

iversal

LS

C:

Exa

mp

le

– 18 – 2017-01-24 – Sprechart –

59

/6

6

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oin

Valid

ator

cp:C

ho

iceP

ane

lD

ispe

nse

r

C50

pWATER

cp->water

_in

_sto

ck

dWATER

OK

Un

iversal

LS

C:

Exa

mp

le

– 18 – 2017-01-24 – Sprechart –

59

/6

6

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oin

Valid

ator

cp:C

ho

iceP

ane

lD

ispe

nse

r

C50

pWATER

¬(C

50!∨E1!∨pSOFT!

∨pTEA!∨pFIL

LUP!

cp->water

_in

_sto

ck

dWATER

OK

Page 15: Lecture 18: Live Sequence Charts II

Un

iversal

LS

C:

Exa

mp

le

– 18 – 2017-01-24 – Sprechart –

59

/6

6

LS

C:

bu

yw

ater

AC

:true

AM

:in

variant

I:strict

Use

rC

oin

Valid

ator

cp:C

ho

iceP

ane

lD

ispe

nse

r

C50

pWATER

¬(C

50!∨E1!∨pSOFT!

∨pTEA!∨pFIL

LUP!

cp->water

_in

_sto

ck

dWATER

OK

¬(dSoft!

∨dTEA!)

Fo

rbid

den

Scen

ario

Exa

mp

le:D

on

’tG

iveTw

oD

rinks

– 18 – 2017-01-24 – Sprechart –

60

/6

6

Fo

rbid

den

Scen

ario

Exa

mp

le:D

on

’tG

iveTw

oD

rinks

– 18 – 2017-01-24 – Sprechart –

60

/6

6

LS

C:

on

lyo

ne

drin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

SOFT

¬C50!∧¬E1!

false

No

te:S

equ

ence

Dia

gra

ms

an

d(A

ccepta

nce)

Test

– 18 – 2017-01-24 – Sprechart –

61/

66

LS

C:

bu

yso

ftdrin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

LS

C:

get

chan

geA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

C50

E1

pSOFT

SOFT

chg

-C50

LS

C:

on

lyo

ne

drin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

SOFT

¬C50!∧¬E1!

false

•E

xisten

tialLS

Cs∗

may

hin

tat

test-case

sfo

rth

eacce

ptan

cete

st!

(∗:as

we

llas(p

ositive)sce

nario

sin

gen

eral,like

use

-cases)

No

te:S

equ

ence

Dia

gra

ms

an

d(A

ccepta

nce)

Test

– 18 – 2017-01-24 – Sprechart –

61/

66

LS

C:

bu

yso

ftdrin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

LS

C:

get

chan

geA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

C50

E1

pSOFT

SOFT

chg

-C50

LS

C:

on

lyo

ne

drin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

SOFT

¬C50!∧¬E1!

false

•E

xisten

tialLS

Cs∗

may

hin

tat

test-case

sfo

rth

eacce

ptan

cete

st!

(∗:as

we

llas(p

ositive)sce

nario

sin

gen

eral,like

use

-cases)

•U

nive

rsalLS

Cs

(and

ne

gative/an

ti-scen

arios)in

gen

eraln

ee

de

xhau

stivean

alysis!

No

te:S

equ

ence

Dia

gra

ms

an

d(A

ccepta

nce)

Test

– 18 – 2017-01-24 – Sprechart –

61/

66

LS

C:

bu

yso

ftdrin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

LS

C:

get

chan

geA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

C50

E1

pSOFT

SOFT

chg

-C50

LS

C:

on

lyo

ne

drin

kA

C:

trueA

M:

invarian

tI:

pe

rmissive

Use

rV

en

d.M

a.

E1

pSOFT

SOFT

SOFT

¬C50!∧¬E1!

false

•E

xisten

tialLS

Cs∗

may

hin

tat

test-case

sfo

rth

eacce

ptan

cete

st!

(∗:as

we

llas(p

ositive)sce

nario

sin

gen

eral,like

use

-cases)

•U

nive

rsalLS

Cs

(and

ne

gative/an

ti-scen

arios)in

gen

eraln

ee

de

xhau

stivean

alysis!

(Be

cause

the

yre

qu

ireth

atth

eso

ftware

ne

ver

eve

re

xhib

itsth

eu

nw

ante

db

eh

aviou

r.)

Page 16: Lecture 18: Live Sequence Charts II

TB

A-b

ased

Sem

an

ticso

fL

SC

s

– 18 – 2017-01-24 – Slscpresem –

62

/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✘✔

Plan

:

(i)G

iven

anL

SC

Lw

ithb

od

y((L,�,∼

),I,M

sg,C

ond,L

ocIn

v,Θ

),

(ii)co

nstru

cta

TB

AB

L,an

d

(iii)d

efin

elan

guage

L(L

)o

fL

inte

rms

ofL(B

L),

inp

articular

taking

activation

con

ditio

nan

dactivatio

nm

od

ein

toacco

un

t.

(iv)d

efin

elan

guage

L(M

)o

fa

UM

Lm

od

el.

•T

he

nM

|=L

(un

iversal)

ifan

do

nly

ifL(M

)⊆

L(L

).

An

dM

|=L

(existe

ntial)

ifan

do

nly

ifL(M

)∩L(L

)6=

∅.

Co

urse

Ma

p

– 18 – 2017-01-24 – main –

63

/6

6

UM

L

ModelInstances

NS

WE

CD

,SM

S=

(T,C,V

,atr),S

M

M=

(ΣDS,A

S,→

SM)

ϕ∈

OC

L

expr

CD

,SD

S,S

D

B=

(QSD,q

0 ,AS,→

SD,F

SD)

π=

(σ0 ,ε

0 )(cons0,Snd0)

−−−−−−−−→

u0

(σ1 ,ε

1 )···

wπ=

((σi ,co

nsi ,S

ndi ))

i∈N

G=

(N,E

,f)

Ma

them

atics

OD

UM

L

✔✔

✔✔

✘✔

Tell

Th

emW

ha

tYo

u’ve

To

ldT

hem

...

– 18 – 2017-01-24 – Sttwytt19 –

64

/6

6

•B

üch

iauto

mata

accep

tin

finite

wo

rds

•if

the

ree

xistsis

aru

no

ver

the

wo

rd,

•w

hich

visitsan

accep

ting

statein

finite

lyo

ften

.

•T

he

lang

uage

of

am

od

elis

just

are

writin

go

fco

mp

utatio

ns

into

wo

rds

ove

ran

alph

abe

t.

•A

nL

SC

accep

tsa

wo

rd(o

fa

mo

de

l)if

Existe

ntial:

atle

asto

nw

ord

(of

the

mo

de

l)is

accep

ted

by

the

con

structe

dT

BA

,

Un

iversio

n:

allwo

rds

(of

the

mo

de

l)areacce

pte

d.

•A

ctivation

mo

de

initialactivate

sat

system

startup

(on

ly),in

variant

with

each

satisfied

activation

con

ditio

n(o

rp

re-ch

art).

•P

re-ch

artscan

be

use

dto

statefo

rbid

de

nsce

nario

s.

•S

eq

ue

nce

Diag

rams

canb

eu

sefu

lfor

testin

g.

Referen

ces

– 18 – 2017-01-24 – main –

65

/6

6

Referen

ces

– 18 – 2017-01-24 – main –

66

/6

6

Cran

e,M

.L.an

dD

inge

l,J.(20

07

).U

ML

vs.classicalvs.rhap

sod

ystate

charts:n

ot

allmo

de

lsare

create

de

qu

al.S

oftw

are

an

dS

ystems

Mo

delin

g,6(4

):415

–4

35

.

Dam

m,W

.and

Hare

l,D.(2

00

1).L

SC

s:Bre

athin

glife

into

Me

ssageS

eq

ue

nce

Ch

arts.Fo

rma

lMeth

od

sin

System

Design

,19(1):4

5–

80

.

Hare

l,D.(19

97

).S

om

eth

ou

ghts

on

statech

arts,13ye

arslate

r.In

Gru

mb

erg,O

.,ed

itor,C

AV

,volu

me

125

4o

fLN

CS

,page

s2

26

–2

31.S

prin

ger-V

erlag.

Hare

l,D.an

dM

aoz,S

.(20

07

).A

ssert

and

ne

gatere

visited

:Mo

dalse

man

ticsfo

rU

ML

seq

ue

nce

diagram

s.S

oftw

are

an

dS

ystemM

od

eling

(SoS

yM).

Toap

pe

ar.(Early

versio

nin

SC

ES

M’0

6,2

00

6,p

p.13

-20

).

Hare

l,D.an

dM

arelly,R

.(20

03

).C

om

e,Let’sP

lay:S

cena

rio-B

ased

Pro

gram

min

gU

sing

LSC

sa

nd

the

Pla

y-En

gine.

Sp

ringe

r-Ve

rlag.

Klo

se,J.(2

00

3).LS

Cs:A

Gra

ph

icalFo

rma

lismfo

rth

eS

pecifica

tion

of

Co

mm

unica

tion

Beh

avio

r.P

hD

the

sis,Carlvo

nO

ssietzky

Un

iversität

Old

en

bu

rg.

OM

G(2

00

7).

Un

ified

mo

de

ling

langu

age:S

up

erstru

cture

,versio

n2

.1.2.

Tech

nicalR

ep

ort

form

al/0

7-11-02

.

OM

G(2

011a).

Un

ified

mo

de

ling

langu

age:In

frastructu

re,ve

rsion

2.4

.1.Te

chn

icalRe

po

rtfo

rmal/

20

11-08

-05

.

OM

G(2

011b

).U

nifie

dm

od

elin

glan

guage

:Su

pe

rstructu

re,ve

rsion

2.4

.1.Te

chn

icalRe

po

rtfo

rmal/

20

11-08

-06

.

Stö

rrle,H

.(20

03

).A

ssert,n

egate

and

refin

em

en

tin

UM

L-2

inte

raction

s.In

Jürje

ns,J.,R

um

pe

,B.,Fran

ce,R

.,and

Fern

and

ez,E

.B.,e

dito

rs,CS

DU

ML

200

3,n

um

be

rT

UM

-I03

23

.Tech

nisch

eU

nive

rsitätM

ün

che

n.