Overview Lecture 1: Introduction 1 Lecture 2: Message Sequence - - PowerPoint PPT Presentation

overview
SMART_READER_LITE
LIVE PREVIEW

Overview Lecture 1: Introduction 1 Lecture 2: Message Sequence - - PowerPoint PPT Presentation

Overview Lecture 1: Introduction 1 Lecture 2: Message Sequence Charts 2 Joost-Pieter Katoen Theoretical Foundations of the UML 1/32 Theoretical Foundations of the UML Lecture 1: Introduction Joost-Pieter Katoen Lehrstuhl fr Informatik 2


slide-1
SLIDE 1

Overview

1

Lecture 1: Introduction

2

Lecture 2: Message Sequence Charts

Joost-Pieter Katoen Theoretical Foundations of the UML 1/32

slide-2
SLIDE 2

Theoretical Foundations of the UML

Lecture 1: Introduction Joost-Pieter Katoen

Lehrstuhl für Informatik 2 Software Modeling and Verification Group

moves.rwth-aachen.de/teaching/ss-16/theoretical-foundations-of-the-uml/

  • 13. April 2016

Joost-Pieter Katoen Theoretical Foundations of the UML 2/32

slide-3
SLIDE 3

Target audience

You are studying:

Master Computer Science, or Master Systems Software Engineering, or Bachelor Computer Science, or . . . . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 3/32

slide-4
SLIDE 4

Target audience

You are studying:

Master Computer Science, or Master Systems Software Engineering, or Bachelor Computer Science, or . . . . . .

Usage as:

elective course Theoretical Computer Science not a Wahlpflicht course for bachelor students specialization MOVES (Modeling and Verification of Software) complementary to Model-based Software Development (Rumpe)

Joost-Pieter Katoen Theoretical Foundations of the UML 3/32

slide-5
SLIDE 5

Target audience (contd.)

In general:

interest in system software engineering interest in formal methods for software interest in semantics and verification application of mathematical reasoning

Joost-Pieter Katoen Theoretical Foundations of the UML 4/32

slide-6
SLIDE 6

Target audience (contd.)

In general:

interest in system software engineering interest in formal methods for software interest in semantics and verification application of mathematical reasoning

Prerequisites:

mathematical logic formal language and automata theory algorithms and data structures computability and complexity theory

Joost-Pieter Katoen Theoretical Foundations of the UML 4/32

slide-7
SLIDE 7

Organization

Schedule:

Day Time Room Lecture Tue 12:15 - 13:45 9U09 Thu 08:30 - 10:15 5056 Exercises Thu 14:15- 15:45 9U09 about 20 lectures in total; Keep track of website for precise dates!

Joost-Pieter Katoen Theoretical Foundations of the UML 5/32

slide-8
SLIDE 8

Organization

Schedule:

Day Time Room Lecture Tue 12:15 - 13:45 9U09 Thu 08:30 - 10:15 5056 Exercises Thu 14:15- 15:45 9U09 about 20 lectures in total; Keep track of website for precise dates!

People involved:

Lecturer EMail Lectures Joost-Pieter Katoen katoen@cs.rwth-aachen.de Exercises Hao Wu hao.wu@cs.rwth-aachen.de Benjamin Kaminksi benjamin.kaminski@cs.rwth-aachen.de

Joost-Pieter Katoen Theoretical Foundations of the UML 5/32

slide-9
SLIDE 9

Organization (contd.)

Assignments:

(almost) weekly assignments available from course web-site first assignment: Thursday April 21 hand in solution at start next exercise class groups of maximally two students first exercise class: Thursday April 28

Joost-Pieter Katoen Theoretical Foundations of the UML 6/32

slide-10
SLIDE 10

Organization (contd.)

Examination: (6 ECTS credit points)

written exam: July XY, 2016 (tba) written re-exam: September WZ, 2016 (tba)

Joost-Pieter Katoen Theoretical Foundations of the UML 7/32

slide-11
SLIDE 11

Organization (contd.)

Examination: (6 ECTS credit points)

written exam: July XY, 2016 (tba) written re-exam: September WZ, 2016 (tba)

Admission:

at least 40% of exercise points

Joost-Pieter Katoen Theoretical Foundations of the UML 7/32

slide-12
SLIDE 12

Motivation

Scope:

Goal: formal description + analysis of (concurr.) software systems Focus: the Unified Modeling Language

Joost-Pieter Katoen Theoretical Foundations of the UML 8/32

slide-13
SLIDE 13

Motivation

Scope:

Goal: formal description + analysis of (concurr.) software systems Focus: the Unified Modeling Language

More specifically:

Sequence Diagrams (used for requirements analysis) Propositional Dynamic Logic Communicating Finite State Automata Statecharts (behavioral description of systems)

Joost-Pieter Katoen Theoretical Foundations of the UML 8/32

slide-14
SLIDE 14

Motivation

Scope:

Goal: formal description + analysis of (concurr.) software systems Focus: the Unified Modeling Language

More specifically:

Sequence Diagrams (used for requirements analysis) Propositional Dynamic Logic Communicating Finite State Automata Statecharts (behavioral description of systems)

Aims:

clarify and make precise the semantics of some UML fragments formal reasoning about basic properties of UML models convince you that UML models are much harder than you think

Joost-Pieter Katoen Theoretical Foundations of the UML 8/32

slide-15
SLIDE 15

What this course is NOT about:

What is it **not** about?

the use of the UML in the software development cycle

see the complementary course by Prof. Rumpe

  • ther notations of the UML (e.g., class diagrams, activity diagrams)

what is precisely in the UML, and what is not

liberal interpretation of which constructs belong to the UML

applying the UML to concrete SW development case studies empirical results on the usage of UML drawing pictures . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 9/32

slide-16
SLIDE 16

Overview

1

Lecture 1: Introduction

2

Lecture 2: Message Sequence Charts

Joost-Pieter Katoen Theoretical Foundations of the UML 10/32

slide-17
SLIDE 17

Theoretical Foundations of the UML

Lecture 2: Message Sequence Charts Joost-Pieter Katoen

Lehrstuhl für Informatik 2 Software Modeling and Verification Group

moves.rwth-aachen.de/teaching/ss-16/theoretical-foundations-of-the-uml/

  • 13. April 2016

Joost-Pieter Katoen Theoretical Foundations of the UML 11/32

slide-18
SLIDE 18

History

70s - 80s: often used informally 1992: first version of MSCs standardized by CCITT (currently ITU) Z.120 1992 - 1996: many extensions, e.g., high-level + formal semantics (using process algebras) 1996: MSC’96 standard 2000: MSC 2000, time, data, o-o features 2005: MSC 2004 . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 12/32

slide-19
SLIDE 19

Variants of MSCs

UML sequence diagrams (instantiations of) use cases triggered MSCs netcharts (= Petri net + MSC) STAIRS Live sequence charts . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 13/32

slide-20
SLIDE 20

Characteristics

scenario-based language visual representation “easy” to comprehend generalization possible towards automata (states are MSCs) widely used in industrial practice

Joost-Pieter Katoen Theoretical Foundations of the UML 14/32

slide-21
SLIDE 21

Applications

requirements specification (positive, negative scenarios, e.g., CREWS) system design and software engineering visualization of test cases (graphical extension to TTCN) feature interaction detection workflow management systems . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 15/32

slide-22
SLIDE 22

Example

p1 p2 p3 a b c d e

Joost-Pieter Katoen Theoretical Foundations of the UML 16/32

slide-23
SLIDE 23

Example

p1 p2 p3 a b c d e

These pictures are formalized using partial orders.

Joost-Pieter Katoen Theoretical Foundations of the UML 16/32

slide-24
SLIDE 24

Partial orders

Definition

Let E be a set of events. A partial order over E is a relation ⊆ E × E such that:

1 is reflexive, i.e., ∀e ∈ E. e e, 2 is transitive, i.e., e e′ ∧ e′ e′′ implies e e′′, and 3 is anti-symmetric, i.e., ∀e, e′. (e e′ ∧ e′ e) ⇒ e = e′.

The pair (E, ) is called a partially ordered set (poset, for short).

Joost-Pieter Katoen Theoretical Foundations of the UML 17/32

slide-25
SLIDE 25

Partial orders

Definition

Let E be a set of events. A partial order over E is a relation ⊆ E × E such that:

1 is reflexive, i.e., ∀e ∈ E. e e, 2 is transitive, i.e., e e′ ∧ e′ e′′ implies e e′′, and 3 is anti-symmetric, i.e., ∀e, e′. (e e′ ∧ e′ e) ⇒ e = e′.

The pair (E, ) is called a partially ordered set (poset, for short).

Definition

Let (E, ) be a poset and let e, e′ ∈ E. e and e′ are comparable if e e′

  • r e′ e. Otherwise, they are incomparable.

Joost-Pieter Katoen Theoretical Foundations of the UML 17/32

slide-26
SLIDE 26

Partial orders

Definition

Let E be a set of events. A partial order over E is a relation ⊆ E × E such that:

1 is reflexive, i.e., ∀e ∈ E. e e, 2 is transitive, i.e., e e′ ∧ e′ e′′ implies e e′′, and 3 is anti-symmetric, i.e., ∀e, e′. (e e′ ∧ e′ e) ⇒ e = e′.

The pair (E, ) is called a partially ordered set (poset, for short).

Definition

Let (E, ) be a poset and let e, e′ ∈ E. e and e′ are comparable if e e′

  • r e′ e. Otherwise, they are incomparable.

is a non-strict partial order as it is reflexive. A strict partial order is a relation ≺ that is irreflexive, transitive and asymmetric (i.e., if e ≺ e′ then not e′ ≺ e).

Joost-Pieter Katoen Theoretical Foundations of the UML 17/32

slide-27
SLIDE 27

Hasse diagram

Definition

Let (E, ) be a poset. The Hasse diagram (E, ⋖) of (E, ) is defined by: e ⋖ e′ iff e e′ and ¬(∃e′′ = e, e′. e e′′ ∧ e′′ e′)

Hasse diagrams can be used to visualize posets with finitely many elements in a succinct way.

Joost-Pieter Katoen Theoretical Foundations of the UML 18/32

slide-28
SLIDE 28

Linearizations

Definition

Let (E, ) be a poset. A linearization of (E, ) is a total order ⊑ ⊆ E × E such that e e′ implies e ⊑ e′ A linearization is a topological sort of the Hasse diagram of (E, ). Note that every partial order has at least one linearization.

Joost-Pieter Katoen Theoretical Foundations of the UML 19/32

slide-29
SLIDE 29

Example

Example

Let E = {e1, . . . , e6},

  • =

{ (e1, e2), (e1, e3), (e3, e4), (e4, e5), (e5, e6), (e1, e4), (e3, e5), (e1, e5), (e1, e6), (e3, e6), (e4, e6) }r where Rr denotes the reflexive closure of R Hasse diagram: e1 e2 e3 e4 e5 e6 Linearizations:

  • e1e2e3e4e5e6,
  • e1e3e2e4e5e6,
  • e1e3e4e2e5e6,
  • e1e3e4e5e2e6,
  • e1e3e4e5e6e2

No linearizations:

  • e2e1e3 . . ., and e1e4e3 . . .

Joost-Pieter Katoen Theoretical Foundations of the UML 20/32

slide-30
SLIDE 30

Processes and actions

Definition

Let P: finite set of (sequential) processes C: finite set of message contents (a, b, c, . . . ∈ C)

Joost-Pieter Katoen Theoretical Foundations of the UML 21/32

slide-31
SLIDE 31

Processes and actions

Definition

Let P: finite set of (sequential) processes C: finite set of message contents (a, b, c, . . . ∈ C)

Definition

Communication action: p, q ∈ P, p = q, a ∈ C !(p, q, a) “process p sends message a to process q” ?(p, q, a) “process p receives message a sent by process q” Let Act denote the set of communication actions

Joost-Pieter Katoen Theoretical Foundations of the UML 21/32

slide-32
SLIDE 32

Message Sequence Chart (MSC) (1)

Definition

An MSC M = (P, E, C, l, m, ) with:

Joost-Pieter Katoen Theoretical Foundations of the UML 22/32

slide-33
SLIDE 33

Message Sequence Chart (MSC) (1)

Definition

An MSC M = (P, E, C, l, m, ) with: P, a finite set of processes {p1, p2, . . . , pn} with n > 1

Joost-Pieter Katoen Theoretical Foundations of the UML 22/32

slide-34
SLIDE 34

Message Sequence Chart (MSC) (1)

Definition

An MSC M = (P, E, C, l, m, ) with: P, a finite set of processes {p1, p2, . . . , pn} with n > 1 E, a finite set of events E =

  • p∈P

Ep = E? · ∪ E!

Joost-Pieter Katoen Theoretical Foundations of the UML 22/32

slide-35
SLIDE 35

Message Sequence Chart (MSC) (1)

Definition

An MSC M = (P, E, C, l, m, ) with: P, a finite set of processes {p1, p2, . . . , pn} with n > 1 E, a finite set of events E =

  • p∈P

Ep = E? · ∪ E! C, a finite set of message contents

Joost-Pieter Katoen Theoretical Foundations of the UML 22/32

slide-36
SLIDE 36

Message Sequence Chart (MSC) (1)

Definition

An MSC M = (P, E, C, l, m, ) with: P, a finite set of processes {p1, p2, . . . , pn} with n > 1 E, a finite set of events E =

  • p∈P

Ep = E? · ∪ E! C, a finite set of message contents l : E → Act, a labelling function defined by: l(e) =

  • !(p, q, a)

if e ∈ Ep ∩ E! ?(p, q, a) if e ∈ Ep ∩ E? , for p = q ∈ P, a ∈ C

Joost-Pieter Katoen Theoretical Foundations of the UML 22/32

slide-37
SLIDE 37

Message Sequence Chart (MSC) (2)

Joost-Pieter Katoen Theoretical Foundations of the UML 23/32

slide-38
SLIDE 38

Message Sequence Chart (MSC) (2)

Definition

m : E! → E? a bijection (“matching function”), satisfying: m(e) = e′ ∧ l(e) = !(p, q, a) implies l(e′) = ?(q, p, a) (p = q, a ∈ C)

Joost-Pieter Katoen Theoretical Foundations of the UML 23/32

slide-39
SLIDE 39

Message Sequence Chart (MSC) (2)

Definition

m : E! → E? a bijection (“matching function”), satisfying: m(e) = e′ ∧ l(e) = !(p, q, a) implies l(e′) = ?(q, p, a) (p = q, a ∈ C) ⊆ E × E is a partial order (“visual order”) defined by: =

  • p∈P

<p

<p is a total order = “top-to- bottom” order on process p

∪ {(e, m(e)) | e ∈ E!}

  • communication order <c

where for relation R, R∗ denotes its reflexive and transitive closure.

Joost-Pieter Katoen Theoretical Foundations of the UML 23/32

slide-40
SLIDE 40

Example (1)

p1 p2 a b MSC M: e1 e2 e3 e4

M = (P, E, C, l, m, ) with: P = {p1, p2} Ep1 = {e1, e4} E = {e1, e2, e3, e4} Ep2 = {e2, e3} C = {a, b} E! = {e1, e3}, E? = {e2, e4} l(e1) = !(p1, p2, a) m(e1) = e2 l(e2) = ?(p2, p1, a) l(e3) = !(p2, p1, b) m(e3) = e4 l(e4) = ?(p1, p2, b)

Ordering at processes: e1 <p1 e4 and e2 <p2 e3 Hasse diagram of (E, ): e1 e2 e3 e4 Linearizations?

Joost-Pieter Katoen Theoretical Foundations of the UML 24/32

slide-41
SLIDE 41

Example (2)

p1 p2 a b MSC M′: e1 e2 e3 e4

M′ = (P, E, C, l, m

  • as above

, ′) with: e1 e3 e2 e4 <′

c:

e1 e3 e4 e2 <′

p1:

<′

p2:

e1 e3 e2 e4 ′:

Joost-Pieter Katoen Theoretical Foundations of the UML 25/32

slide-42
SLIDE 42

This is not an MSC

p1 p2 a b

Joost-Pieter Katoen Theoretical Foundations of the UML 26/32

slide-43
SLIDE 43

FIFO property

MSC M = (P, E, C, l, m, ) has the First-In-First-Out (FIFO) property whenever: for all e, e′ ∈ E! we have e ≺ e′ ∧ l(e) = !(p, q, a) ∧ l(e′) = !(p, q, b) implies m(e) ≺ m(e′) i.e., “no message overtaking allowed”

Joost-Pieter Katoen Theoretical Foundations of the UML 27/32

slide-44
SLIDE 44

FIFO property

MSC M = (P, E, C, l, m, ) has the First-In-First-Out (FIFO) property whenever: for all e, e′ ∈ E! we have e ≺ e′ ∧ l(e) = !(p, q, a) ∧ l(e′) = !(p, q, b) implies m(e) ≺ m(e′) i.e., “no message overtaking allowed”

p1 p2 a b e e′ m(e) m(e′) p1 p2 a b e e′ m(e′) m(e)

FIFO non-FIFO

l(e) = !(p1, p2, a) l(e′) = !(p1, p2, b) e ≺ e′ ⇒ m(e) ≺ m(e′)

Joost-Pieter Katoen Theoretical Foundations of the UML 27/32

slide-45
SLIDE 45

FIFO property

MSC M = (P, E, C, l, m, ) has the First-In-First-Out (FIFO) property whenever: for all e, e′ ∈ E! we have e ≺ e′ ∧ l(e) = !(p, q, a) ∧ l(e′) = !(p, q, b) implies m(e) ≺ m(e′) i.e., “no message overtaking allowed”

p1 p2 a b e e′ m(e) m(e′) p1 p2 a b e e′ m(e′) m(e)

FIFO non-FIFO

l(e) = !(p1, p2, a) l(e′) = !(p1, p2, b) e ≺ e′ ⇒ m(e) ≺ m(e′)

Note:

We assume an MSC to possess the FIFO property, unless stated otherwise!

Joost-Pieter Katoen Theoretical Foundations of the UML 27/32

slide-46
SLIDE 46

Linearizations

Definition

Let Lin(M) = denote the set of linearizations of MSC M.

Joost-Pieter Katoen Theoretical Foundations of the UML 28/32

slide-47
SLIDE 47

Linearizations

Definition

Let Lin(M) = denote the set of linearizations of MSC M.

MSCs and its linearizations are interchangeable

There is a one-to-one correspondence between an MSC and its set of linearizations.

Joost-Pieter Katoen Theoretical Foundations of the UML 28/32

slide-48
SLIDE 48

Linearizations

Definition

Let Lin(M) = denote the set of linearizations of MSC M.

MSCs and its linearizations are interchangeable

There is a one-to-one correspondence between an MSC and its set of linearizations.

Thus:

Lin(M) uniquely characterizes the MSC M.

Joost-Pieter Katoen Theoretical Foundations of the UML 28/32

slide-49
SLIDE 49

Linearizations

Definition

Let Lin(M) = denote the set of linearizations of MSC M.

MSCs and its linearizations are interchangeable

There is a one-to-one correspondence between an MSC and its set of linearizations.

Thus:

Lin(M) uniquely characterizes the MSC M.

From MSCs to its set of linearizations is straightforward. The reverse direction is discussed in the following. First: well-formedness.

Joost-Pieter Katoen Theoretical Foundations of the UML 28/32

slide-50
SLIDE 50

Well-formedness

Let Ch := {(p, q) | p = q , p, q ∈ P} be the set of channels over P.

Joost-Pieter Katoen Theoretical Foundations of the UML 29/32

slide-51
SLIDE 51

Well-formedness

Let Ch := {(p, q) | p = q , p, q ∈ P} be the set of channels over P. We call w = a1 . . . an ∈ Act∗ proper if

Joost-Pieter Katoen Theoretical Foundations of the UML 29/32

slide-52
SLIDE 52

Well-formedness

Let Ch := {(p, q) | p = q , p, q ∈ P} be the set of channels over P. We call w = a1 . . . an ∈ Act∗ proper if

1 every receive in w is preceded by a corresponding send, i.e.:

∀(p, q) ∈ Ch and prefix u of w, we have:

  • m∈C

|u|!(p,q,m)

  • # sends from p to q
  • m∈C

|u|?(q,p,m)

  • # receipts by q from p

where |u|a denotes the number of occurrences of action a in u

Joost-Pieter Katoen Theoretical Foundations of the UML 29/32

slide-53
SLIDE 53

Well-formedness

Let Ch := {(p, q) | p = q , p, q ∈ P} be the set of channels over P. We call w = a1 . . . an ∈ Act∗ proper if

1 every receive in w is preceded by a corresponding send, i.e.:

∀(p, q) ∈ Ch and prefix u of w, we have:

  • m∈C

|u|!(p,q,m)

  • # sends from p to q
  • m∈C

|u|?(q,p,m)

  • # receipts by q from p

where |u|a denotes the number of occurrences of action a in u

2 the FIFO policy is respected, i.e.:

∀1 i < j n, (p, q) ∈ Ch, and ai = !(p, q, m1), aj = ?(q, p, m2):

  • m∈C

|a1 . . . ai−1|!(p,q,m) =

  • m∈C

|a1 . . . aj−1|?(q,p,m) implies m1 = m2

Joost-Pieter Katoen Theoretical Foundations of the UML 29/32

slide-54
SLIDE 54

Well-formedness

Let Ch := {(p, q) | p = q , p, q ∈ P} be the set of channels over P. We call w = a1 . . . an ∈ Act∗ proper if

1 every receive in w is preceded by a corresponding send, i.e.:

∀(p, q) ∈ Ch and prefix u of w, we have:

  • m∈C

|u|!(p,q,m)

  • # sends from p to q
  • m∈C

|u|?(q,p,m)

  • # receipts by q from p

where |u|a denotes the number of occurrences of action a in u

2 the FIFO policy is respected, i.e.:

∀1 i < j n, (p, q) ∈ Ch, and ai = !(p, q, m1), aj = ?(q, p, m2):

  • m∈C

|a1 . . . ai−1|!(p,q,m) =

  • m∈C

|a1 . . . aj−1|?(q,p,m) implies m1 = m2

A proper word w is well-formed if

m∈C |w|!(p,q,m) = m∈C |w|?(q,p,m)

Joost-Pieter Katoen Theoretical Foundations of the UML 29/32

slide-55
SLIDE 55

Properties of well-formedness

Proposition

For every MSC M and every w ∈ Lin(M), w is well-formed.

Lin(M) denotes a set of words (and not linearizations) the word of linearization e1 . . . en equals ℓ(e1) . . . ℓ(en)

Joost-Pieter Katoen Theoretical Foundations of the UML 30/32

slide-56
SLIDE 56

From linearizations to posets

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-57
SLIDE 57

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ)

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-58
SLIDE 58

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ) such that: E = {1, . . . , n} are the positions in w labelled with ℓ(i) = ai

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-59
SLIDE 59

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ) such that: E = {1, . . . , n} are the positions in w labelled with ℓ(i) = ai =

  • p∈P ≺p ∪ ≺msg

∗ where

i ≺p j if and only if i < j for every i, j ∈ Ep

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-60
SLIDE 60

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ) such that: E = {1, . . . , n} are the positions in w labelled with ℓ(i) = ai =

  • p∈P ≺p ∪ ≺msg

∗ where

i ≺p j if and only if i < j for every i, j ∈ Ep i ≺msg j if for some (p, q) ∈ Ch and m ∈ C we have: ℓ(i) = !(p, q, m) and ℓ(j) = ?(q, p, m) and

  • m∈C

|a1 . . . ai−1|!(p,q,m) =

  • m∈C

|a1 . . . aj−1|?(q,p,m)

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-61
SLIDE 61

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ) such that: E = {1, . . . , n} are the positions in w labelled with ℓ(i) = ai =

  • p∈P ≺p ∪ ≺msg

∗ where

i ≺p j if and only if i < j for every i, j ∈ Ep i ≺msg j if for some (p, q) ∈ Ch and m ∈ C we have: ℓ(i) = !(p, q, m) and ℓ(j) = ?(q, p, m) and

  • m∈C

|a1 . . . ai−1|!(p,q,m) =

  • m∈C

|a1 . . . aj−1|?(q,p,m)

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-62
SLIDE 62

From linearizations to posets

Associate to w = a1 . . . an ∈ Act∗ an Act-labelled poset M(w) = (E, , ℓ) such that: E = {1, . . . , n} are the positions in w labelled with ℓ(i) = ai =

  • p∈P ≺p ∪ ≺msg

∗ where

i ≺p j if and only if i < j for every i, j ∈ Ep i ≺msg j if for some (p, q) ∈ Ch and m ∈ C we have: ℓ(i) = !(p, q, m) and ℓ(j) = ?(q, p, m) and

  • m∈C

|a1 . . . ai−1|!(p,q,m) =

  • m∈C

|a1 . . . aj−1|?(q,p,m)

Example

construct M(w) for w = !(r, q, m)!(p, q, m1)!(p, q, m2)?(q, p, m1)?(q, p, m2)?(q, r, m)

Joost-Pieter Katoen Theoretical Foundations of the UML 31/32

slide-63
SLIDE 63

Properties

Relating well-formed words to MSCs

For every well-formed w ∈ Act∗, M(w) is an MSC.

Definition

(E, , ℓ) and (E′, ′, ℓ′) are isomorphic if there exists a bijection f : E → E′ such that e e′ iff f(e) ′ f(e′) and ℓ(e) = ℓ′(f(e)).

Linearizations yield isomorphic MSCs

For every well-formed w ∈ Act∗ and w′ ∈ Lin(M(w)): M(w) and M(w′) are isomorphic.

Joost-Pieter Katoen Theoretical Foundations of the UML 32/32