Rate-Based Transition Systems and Stochastic Process Algebras Rocco - - PowerPoint PPT Presentation

rate based transition systems and stochastic process
SMART_READER_LITE
LIVE PREVIEW

Rate-Based Transition Systems and Stochastic Process Algebras Rocco - - PowerPoint PPT Presentation

Rate-Based Transition Systems and Stochastic Process Algebras Rocco De Nicola 1 , 3 Diego Latella 2 Michele Loreti 1 Mieke Massink 2 1 DSI - Universit di Firenze, Firenze 2 ISTI - CNR, Pisa 3 IMT - Alti Studi, Lucca - Annual Meeting Bologna -


slide-1
SLIDE 1

Rate-Based Transition Systems and Stochastic Process Algebras

Rocco De Nicola1,3 Diego Latella2 Michele Loreti1 Mieke Massink2

1DSI - Università di Firenze, Firenze 2ISTI - CNR, Pisa

  • 3IMT - Alti Studi, Lucca

Annual Meeting Bologna - September 5, 2009

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 1 / 40

slide-2
SLIDE 2
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 2 / 40

slide-3
SLIDE 3
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 3 / 40

slide-4
SLIDE 4
  • Motivations. . .

A number of stochastic process algebras have been proposed in the last two decades. These are based on:

1

Labeled Transition Systems (LTS)

◮ for providing compositional semantics of languages ◮ for describing qualitative properties 2

Continuous Time Markov Chains (CTMC)

◮ for analysing quantitative properties

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 4 / 40

slide-5
SLIDE 5
  • Motivations. . .

A number of stochastic process algebras have been proposed in the last two decades. These are based on:

1

Labeled Transition Systems (LTS)

◮ for providing compositional semantics of languages ◮ for describing qualitative properties 2

Continuous Time Markov Chains (CTMC)

◮ for analysing quantitative properties

Semantics of these calculi have been given by variants of the Structured Operational Semantics (SOS) approach but: there is no general framework for modelling the different formalisms it is rather difficult to appreciate differences and similarities of such semantics.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 4 / 40

slide-6
SLIDE 6

Stochastic Process Algebras - incomplete list

TIPP (N. Glotz, U. Herzog, M. Rettelbach - 1993) Stochastic π-calculus (C. Priami - 1995, later with P . Quaglia) PEPA (J. Hillston - 1996) EMPA (M. Bernardo, R. Gorrieri - 1998) IMC (H. Hermanns - 2002) . . . STOKLAIM MarCaSPiS . . . More Calculi will come: Besides qualitative aspects of distributed systems it more and more important that performance and dependability be addressed to deal with issues related to quality of service.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 5 / 40

slide-7
SLIDE 7

Common ingredients of Stochastic PA

Randomized Actions

It is assumed that action execution takes time Execution times is described by means of random variables Random Variables are assumed to be exponentially distributed Random Variables are fully characterised by their rates.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 6 / 40

slide-8
SLIDE 8

Common ingredients of Stochastic PA

Randomized Actions

It is assumed that action execution takes time Execution times is described by means of random variables Random Variables are assumed to be exponentially distributed Random Variables are fully characterised by their rates.

Properties of Exponential Distributions

If X is exponentially distributed with parameter λ ∈ I R>0: P{X ≤ d} = 1 − e−λ·d, for d ≥ 0 The average duration of X is 1

λ ; the variance of X is 1 λ2

Memory-less: P{X ≤ t + d | X > t} = P{X ≤ d}

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 6 / 40

slide-9
SLIDE 9

Continuous Time Markov Chains

Continuous Time Markov Chains are a successful mathematical framework for modeling and analysing performance and dependability

  • f systems that rely on exponential distribution of states transitions.

CTMCs come with Well established Analysis Techniques

◮ Steady State Analysis ◮ Transient Analysis

Efficient Software Tools:

◮ Stochastic Timed/Temporal Logics ◮ Stochastic Model Checking

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 7 / 40

slide-10
SLIDE 10

Continuous Time Markov Chains

Continuous Time Markov Chains are a successful mathematical framework for modeling and analysing performance and dependability

  • f systems that rely on exponential distribution of states transitions.

CTMCs come with Well established Analysis Techniques

◮ Steady State Analysis ◮ Transient Analysis

Efficient Software Tools:

◮ Stochastic Timed/Temporal Logics ◮ Stochastic Model Checking

A CTMC is a pair (S, R) S: a countable set of states R : S × S → I R≥0, the rate matrix

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 7 / 40

slide-11
SLIDE 11

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-12
SLIDE 12

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

To get a CTMC from a term, one needs to. . .

compute synchronizations rate

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-13
SLIDE 13

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

To get a CTMC from a term, one needs to. . .

compute synchronizations rate while taking into account transition multiplicity, for determining correct execution rate

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-14
SLIDE 14

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

To get a CTMC from a term, one needs to. . .

compute synchronizations rate while taking into account transition multiplicity, for determining correct execution rate

Process Calculi:

α.P + α.P = α.P rec X . α.X | rec X . α.X = rec X . α.X

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-15
SLIDE 15

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

To get a CTMC from a term, one needs to. . .

compute synchronizations rate while taking into account transition multiplicity, for determining correct execution rate

Stochastic Process Calculi:

αλ.P + αλ.P = αλ.P rec X . αλ.X | rec X . αλ.X = rec X . αλ.X

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-16
SLIDE 16

Stochastic process calculi

A CTMC is associated to each process term; CTMC model the stochastic behaviour of processes.

To get a CTMC from a term, one needs to. . .

compute synchronizations rate while taking into account transition multiplicity, for determining correct execution rate

Stochastic Process Calculi:

αλ.P + αλ.P = α2λ.P rec X . αλ.X | rec X . αλ.X = rec X . α2λ.X

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 8 / 40

slide-17
SLIDE 17
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 9 / 40

slide-18
SLIDE 18

Semantics of stochastic process calculi

We introduce a variant of Rate Transition Systems (RTS), proposed by Klin and Sassone(FOSSACS 2008), and use them for defining stochastic behaviour of a few process algebras.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 10 / 40

slide-19
SLIDE 19

Semantics of stochastic process calculi

We introduce a variant of Rate Transition Systems (RTS), proposed by Klin and Sassone(FOSSACS 2008), and use them for defining stochastic behaviour of a few process algebras. Like most of the previous attempts we take a two step approach: For a given term, say T, we define an enriched LTS and then use it to determine the CTMC to be associated to T.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 10 / 40

slide-20
SLIDE 20

Semantics of stochastic process calculi

We introduce a variant of Rate Transition Systems (RTS), proposed by Klin and Sassone(FOSSACS 2008), and use them for defining stochastic behaviour of a few process algebras. Like most of the previous attempts we take a two step approach: For a given term, say T, we define an enriched LTS and then use it to determine the CTMC to be associated to T. Our variant of RTS associates terms and actions to functions from terms to rates The apparent rate approach, originally developed by Hillston for multi-party synchronisation (à la CSP), is generalized to deal "appropriately" also with binary synchronisation (à la CCS).

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 10 / 40

slide-21
SLIDE 21

Semantics of stochastic process calculi

Stochastic semantics of process calculi is defined by means of a transition relation

✲ that associates to a pair (P, α) - consisting of

process and an action - a total function (P, Q,. . . ) that assigns a non-negative real number to each process of the calculus. Value 0 is assigned to unreachable processes.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 11 / 40

slide-22
SLIDE 22

Semantics of stochastic process calculi

Stochastic semantics of process calculi is defined by means of a transition relation

✲ that associates to a pair (P, α) - consisting of

process and an action - a total function (P, Q,. . . ) that assigns a non-negative real number to each process of the calculus. Value 0 is assigned to unreachable processes. P

α

✲ P means that, for a generic process Q:

if P(Q) = x (= 0) then Q is reachable from P via the execution of α with rate/(weight) x if P(Q) = 0 then Q is not reachable from P via α

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 11 / 40

slide-23
SLIDE 23

Semantics of stochastic process calculi

Stochastic semantics of process calculi is defined by means of a transition relation

✲ that associates to a pair (P, α) - consisting of

process and an action - a total function (P, Q,. . . ) that assigns a non-negative real number to each process of the calculus. Value 0 is assigned to unreachable processes. P

α

✲ P means that, for a generic process Q:

if P(Q) = x (= 0) then Q is reachable from P via the execution of α with rate/(weight) x if P(Q) = 0 then Q is not reachable from P via α We have that if P

α

✲ P then

⊕P =

Q P(Q) represents the total rate/weight of α in P.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 11 / 40

slide-24
SLIDE 24

Rate transition systems

Definition

A rate transition system is a triple (S, A,

✲ ) where:

S is a set of states; A is a set of transition labels; →⊆ S × A × [S → I R≥0]

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 12 / 40

slide-25
SLIDE 25

Rate transition systems

Definition

A rate transition system is a triple (S, A,

✲ ) where:

S is a set of states; A is a set of transition labels; →⊆ S × A × [S → I R≥0]

An example of RTS

s3 s1 s2 s4 α λ1 β λ2 a λ3 λ4 b λ5 λ6 γ λ7 δ λ8

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 12 / 40

slide-26
SLIDE 26

Some Notation for Rate transition systems

RTS will be denoted by R, R1, R′, . . . , Elements of [S → I R≥0] are denoted by P, Q, R, . . . [s1 → v1, . . . , sn → vn] denotes the function associating vi to si and 0 to all the other states. ∅ denotes the constant function 0. χs stands for [s → 1]. P + Q denotes the function R such that: R(s) = P(s) + Q(s). P · x

y denotes the function R such that: R(s) = P(s) · x y if y = 0,

and ∅ if y = 0.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 13 / 40

slide-27
SLIDE 27

Rate transition systems

Definition

Let R = (S, A, →) be an RTS, then: R is fully stochastic if and only if for each s ∈ S, α ∈ A, P and Q we have: s

α

✲ P, s

α

✲ Q =

⇒ P = Q R is image finite if and only if for each s ∈ S, α ∈ A and P such that s

α

✲ P we have: {s′|P(s′) > 0} is finite

A fully stochastic RTS. . .

s1 α s2 λ2 s3 λ1 . . . leads to a CTMC.

General RTS. . .

s4 s5 s6 α λ1 α λ2 . . . leads to a CTM Decision Process.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 14 / 40

slide-28
SLIDE 28

From RTS to CTMC. . .

Reachable Sets of States

For sets S′ ⊆ S and A′ ⊆ A, the set of derivatives of S′ through A′, denoted Der(S′, A′), is the smallest set such that: S′ ⊆ Der(S′, A′), if s ∈ Der(S′, A′) and there exists α ∈ A′ and Q ∈ ΣS such that s

α

✲ Q then {s′ | Q(s′) > 0} ⊆ Der(S′, A′)

Mapping (S, A, →) into (Der(S′, A′), R)

Let R = (S, A, →) be a fully stochatics RTS, for S′ ⊆ S, the CTMC of S′, when one considers only actions A′ ⊆ A is defined as CTMC[S′, A′] def = (Der(S′, A′), R) where for all s1, s2 ∈ Der(S′, A′): R[s1, s2] def =

  • α∈A′

Pα(s2) with s1

α

✲ Pα.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 15 / 40

slide-29
SLIDE 29

A translation from an RTS to a CTMC

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 16 / 40

slide-30
SLIDE 30

A translation from an RTS to a CTMC

An RTS:

s3 s1 s2 s4 α λ1 β λ2 a λ3 λ4 b λ5 λ6 c λ7 γ λ7 δ λ8

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 16 / 40

slide-31
SLIDE 31

A translation from an RTS to a CTMC

An RTS:

s3 s1 s2 s4 α λ1 β λ2 a λ3 λ4 b λ5 λ6 c λ7 γ λ7 δ λ8

The corresponding CTMC:

s1 s2 s3 s4 λ3 + λ7 λ4 λ6 λ5 λ2 λ1 λ8 λ7

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 16 / 40

slide-32
SLIDE 32

A translation from an RTS to a CTMC

An RTS:

s3 s1 s2 s4 α λ1 β λ2 a λ3 λ4 b λ5 λ6 c λ7 γ λ7 δ λ8

The corresponding CTMC:

s1 s2 s3 s4 λ3 + λ7 λ4 λ6 λ5 λ2 λ1 λ8 λ7

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 16 / 40

slide-33
SLIDE 33

Another translation

({s1, s2, s3, s4}, {α, β, γ, δ, a, b, c}, →)

s3 s1 s2 s4 α λ1 β λ2 a λ3 λ4 b λ5 λ6 c λ7 γ λ7 δ λ8

CTMC[{s1, s2}, {a, b, c}]

s1 s2 λ3 + λ7 λ4 λ6 λ5

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 17 / 40

slide-34
SLIDE 34

Strong Markovian Bisimilarity

Definition (Bisimulation)

Given a generic CTMC (S, R) An equivalence relation E on S is a Markovian bisimulation on S if and only if for all (s1, s2) ∈ E and for all equivalence classes C ∈ S/E the following condition holds: R[s1, C] = R[s2, C].

Definition (Bisimilarity)

Given a generic CTMC (S, R) Two states s1, s2 ∈ S are strongly Markovian bisimilar, written s1 ∼M s2, if and only if there exists a Markovian bisimulation E on S with (s1, s2) ∈ E.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 18 / 40

slide-35
SLIDE 35

Rate aware bisimulation

Definition (Rate Aware Bisimilarity)

Let R = (S, A, →) be a RTS: An equivalence relation E ⊆ S × S is a rate aware bisimulation if and only if, for all (s1, s2) ∈ E, and S ∈ S/E, and for all α and P: s1

α

✲ P =

⇒ ∃Q : s2

α

✲ Q ∧ P(S) = Q(S)

Two states s1, s2 ∈ S are rate aware bisimilar (s1 ∼ s2) if there exists a rate aware bisimulation E such that (s1, s2) ∈ E.

Theorem

Let R = (S, A,

✲ ), for each A′ ⊆ A and for each s1, s2 ∈ S and

(S, R) = CTMC[{s1, s2}, A′]: s1 ∼ s2 = ⇒ s1 ∼M s2 Notice that rate aware bisimilarity and strong bisimilarity coincide when

  • ne does not take into account actions.
  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 19 / 40

slide-36
SLIDE 36
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 20 / 40

slide-37
SLIDE 37

PEPA: Performance Process Algebra

Systems

PEPA systems are the result of components interaction via activities: Components reflect the behaviour of relevant parts of the system, activities capture the actions that the components perform.

Activities

Each PEPA activity consists of a pair (α, λ) where: α symbolically denotes the performed action; λ > 0 is the rate of the (negative) exponential distribution.

Syntax

If A is a set of actions, ranged over by α, α′, α1, . . ., then PPEPA is the set of process terms P, P′, P1, . . . defined by: P ::= (α, λ).P | P + P | P ||L P | P/L | A

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 21 / 40

slide-38
SLIDE 38

PEPA Stochastic semantics. . .

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM) P

α

✲ P

Q

α

✲ Q

α ∈ L P ||L Q

α

✲ P ||L χQ + χP ||L Q

(INT) P

α

✲ P

Q

α

✲ Q

α ∈ L P ||L Q

α

✲ P ||L Q · min{⊕P,⊕Q}

⊕P·⊕Q

(COOP) P

α

✲ P

α ∈ L P/L

α

✲ P/L

(P-HIDE) α ∈ L P/L

α

✲ ∅

(∅-HIDE) P

τ

✲ Pτ

∀α ∈ L.P

α

✲ Pα

P/L

τ

✲ Pτ/L + P

α∈L Pα/L

(HIDE) P

α

✲ P

A

= P A

α

✲ P

(CALL)

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 22 / 40

slide-39
SLIDE 39

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-40
SLIDE 40

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

An example derivation

((α, λ1).P1 + (β, λ2).P2) + (α, λ3).P3

α

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-41
SLIDE 41

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

An example derivation

(α, λ1).P1 + (β, λ2).P2

α

(α, λ3).P3

α

✲ [P3 → λ3]

((α, λ1).P1 + (β, λ2).P2) + (α, λ3).P3

α

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-42
SLIDE 42

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

An example derivation

(α, λ1).P1

α

✲ [P1 → λ1]

(β, λ2).P2

α

✲ ∅

(α, λ1).P1 + (β, λ2).P2

α

(α, λ3).P3

α

✲ [P3 → λ3]

((α, λ1).P1 + (β, λ2).P2) + (α, λ3).P3

α

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-43
SLIDE 43

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

An example derivation

(α, λ1).P1

α

✲ [P1 → λ1]

(β, λ2).P2

α

✲ ∅

(α, λ1).P1 + (β, λ2).P2

α

✲ [P1 → λ1]

(α, λ3).P3

α

✲ [P3 → λ3]

((α, λ1).P1 + (β, λ2).P2) + (α, λ3).P3

α

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-44
SLIDE 44

PEPA Stochastic semantics. . .

Prefixes and Sums

(α, λ).P

α

✲ [P → λ]

(ACT) α = β (α, λ).P

β

✲ ∅

(∅-ACT) P

α

✲ P

Q

α

✲ Q

P + Q

α

✲ P + Q

(SUM)

An example derivation

(α, λ1).P1

α

✲ [P1 → λ1]

(β, λ2).P2

α

✲ ∅

(α, λ1).P1 + (β, λ2).P2

α

✲ [P1 → λ1]

(α, λ3).P3

α

✲ [P3 → λ3]

((α, λ1).P1 + (β, λ2).P2) + (α, λ3).P3

α

✲ [P1 → λ1, P3 → λ3]

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 23 / 40

slide-45
SLIDE 45

PEPA Stochastic semantics

Interleaving and Multiparty Synchronization

P

α

✲ P

Q

α

✲ Q

α ∈ L P ||L Q

α

✲ P ||L χQ + χP ||L Q

P

α

✲ P

Q

α

✲ Q

α ∈ L P ||L Q

α

✲ P ||L Q · min{⊕P,⊕Q}

⊕P·⊕Q

remember that χP is: χP(R) = 1 if R = P

  • therwise

P ||L Q denotes the function R such that: R(R) = P(P) · Q(Q) if R = P ||L Q

  • therwise
  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 24 / 40

slide-46
SLIDE 46

A couple results for our PEPA semantics

Theorem

RPEPA is fully stochastic and image finite.

Theorem

For all P, Q ∈ PPEPA and α ∈ A the following holds: P

α

✲ P ∧ P(Q) = λ > 0 ⇔ P

α,λ

✲P Q

where

✲P stands for the transition relation defined by Hillstone in

[Hil96].

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 25 / 40

slide-47
SLIDE 47
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 26 / 40

slide-48
SLIDE 48

STOCCS: Stochastic CCS

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 27 / 40

slide-49
SLIDE 49

STOCCS: Stochastic CCS

STOCCS is a Markovian extension of CCS where:

  • utput activities are enriched with rates characterizing random

variables with exponential distributions, modeling their duration; input activities are equipped with weights characterizing the relative selection probability

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 27 / 40

slide-50
SLIDE 50

STOCCS: Stochastic CCS

STOCCS is a Markovian extension of CCS where:

  • utput activities are enriched with rates characterizing random

variables with exponential distributions, modeling their duration; input activities are equipped with weights characterizing the relative selection probability Like for PEPA , and for most of the other calculi, the CTMC for STOCCS specifications are obtained by only considering internal actions and channel interactions.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 27 / 40

slide-51
SLIDE 51

STOCCS: Transitions rates

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 28 / 40

slide-52
SLIDE 52

STOCCS: Transitions rates

The rate of a binary complementary synchronization mainly depends on the one of the triggering activity

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 28 / 40

slide-53
SLIDE 53

STOCCS: Transitions rates

The rate of a binary complementary synchronization mainly depends on the one of the triggering activity The synchronization rate of a and a depends on the rate of a, on the weight of the selected a and on the total weight of a (i.e. on the sum of the weights of all a-transitions).

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 28 / 40

slide-54
SLIDE 54

STOCCS: Transitions rates

The rate of a binary complementary synchronization mainly depends on the one of the triggering activity The synchronization rate of a and a depends on the rate of a, on the weight of the selected a and on the total weight of a (i.e. on the sum of the weights of all a-transitions). a, ω2 a, ω1 a, λ

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 28 / 40

slide-55
SLIDE 55

STOCCS: Transitions rates

The rate of a binary complementary synchronization mainly depends on the one of the triggering activity The synchronization rate of a and a depends on the rate of a, on the weight of the selected a and on the total weight of a (i.e. on the sum of the weights of all a-transitions). a, ω2 a, ω1 a, λ Two synchronizations can occur with rates: λ · ω1 ω1 + ω2 λ · ω2 ω1 + ω2 The overall sum of the synchronization rates is the same as the one of the output, i.e. it does not depend on the number

  • f available (input) partners.
  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 28 / 40

slide-56
SLIDE 56

STOCCS: Transitions rates

P1 P2 P a, ω2 a, ω1 Q1 Q Q2 a, λ1 a, λ2 P|Q P1|Q1 P2|Q1 P1|Q2 P2|Q2 τa, λ1 ·

ω1 ω1+ω2

τa, λ1 ·

ω2 ω1+ω2

τa, λ2 ·

ω1 ω1+ω2

τa, λ2 ·

ω2 ω1+ω2

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 29 / 40

slide-57
SLIDE 57

STOCCS: Stochastic semantics - 1st attempt

Binary Synchronisation:

P

τa

✲ P

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Q

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲ P|χQ + χP|Q + Pi |Qo

⊕Pi

+ Po|Qi

⊕Qi

Next states of P|Q after τa, i.e. after a synchronisation over channel a, are:

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 30 / 40

slide-58
SLIDE 58

STOCCS: Stochastic semantics - 1st attempt

Binary Synchronisation:

P

τa

✲ P

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Q

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲ P|χQ + χP|Q + Pi |Qo

⊕Pi

+ Po|Qi

⊕Qi

Next states of P|Q after τa, i.e. after a synchronisation over channel a, are:

1

the next states of P after τa in parallel with Q;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 30 / 40

slide-59
SLIDE 59

STOCCS: Stochastic semantics - 1st attempt

Binary Synchronisation:

P

τa

✲ P

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Q

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲ P|χQ + χP|Q + Pi |Qo

⊕Pi

+ Po|Qi

⊕Qi

Next states of P|Q after τa, i.e. after a synchronisation over channel a, are:

1

the next states of P after τa in parallel with Q;

2

the next states of Q after τa in parallel with P;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 30 / 40

slide-60
SLIDE 60

STOCCS: Stochastic semantics - 1st attempt

Binary Synchronisation:

P

τa

✲ P

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Q

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲ P|χQ + χP|Q + Pi |Qo

⊕Pi

+ Po|Qi

⊕Qi

Next states of P|Q after τa, i.e. after a synchronisation over channel a, are:

1

the next states of P after τa in parallel with Q;

2

the next states of Q after τa in parallel with P;

3

the next states of P after a in parallel with the next states of Q after a;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 30 / 40

slide-61
SLIDE 61

STOCCS: Stochastic semantics - 1st attempt

Binary Synchronisation:

P

τa

✲ P

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Q

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲ P|χQ + χP|Q + Pi |Qo

⊕Pi

+ Po|Qi

⊕Qi

Next states of P|Q after τa, i.e. after a synchronisation over channel a, are:

1

the next states of P after τa in parallel with Q;

2

the next states of Q after τa in parallel with P;

3

the next states of P after a in parallel with the next states of Q after a;

4

the next states of P after a in parallel with the next states of Q after a.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 30 / 40

slide-62
SLIDE 62

STOCCS: Stochastic semantics - 1st attempt

Theorem

RStoCCS is fully stochastic and image finite.

Theorem

The proposed semantics coincides with the one proposed by Klin and Sassone.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 31 / 40

slide-63
SLIDE 63

STOCCS: Stochastic semantics - 1st attempt

Theorem

RStoCCS is fully stochastic and image finite.

Theorem

The proposed semantics coincides with the one proposed by Klin and Sassone.

Problem

The proposed semantics does not respect a standard and expected property of the CCS parallel composition. The | operator is not associative!

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 31 / 40

slide-64
SLIDE 64

STOCCS: Stochastic semantics, 1st attempt

A counterexample for associativity

For instance:

aλ.P|(aω1.Q1|aω2.Q2)

τa

(aλ.P|aω1.Q1)|aω2.Q2

τa

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 32 / 40

slide-65
SLIDE 65

STOCCS: Stochastic semantics, 1st attempt

A counterexample for associativity

For instance:

aλ.P|(aω1.Q1|aω2.Q2)

τa

[P|(Q1|aω2.Q2) →

λ·ω1 ω1+ω2 , P|(aω1.Q1|Q2) → λ·ω2 ω1+ω2 ]

(aλ.P|aω1.Q1)|aω2.Q2

τa

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 32 / 40

slide-66
SLIDE 66

STOCCS: Stochastic semantics, 1st attempt

A counterexample for associativity

For instance:

aλ.P|(aω1.Q1|aω2.Q2)

τa

[P|(Q1|aω2.Q2) →

λ·ω1 ω1+ω2 , P|(aω1.Q1|Q2) → λ·ω2 ω1+ω2 ]

(aλ.P|aω1.Q1)|aω2.Q2

τa

[(P|Q1)|aω2.Q2 → λ, (P|aω1.Q1)|Q2 → λ]

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 32 / 40

slide-67
SLIDE 67

STOCCS: Stochastic semantics, 1st attempt

A counterexample for associativity

For instance:

aλ.P|(aω1.Q1|aω2.Q2)

τa

[P|(Q1|aω2.Q2) →

λ·ω1 ω1+ω2 , P|(aω1.Q1|Q2) → λ·ω2 ω1+ω2 ]

(aλ.P|aω1.Q1)|aω2.Q2

τa

[(P|Q1)|aω2.Q2 → λ, (P|aω1.Q1)|Q2 → λ]

Theorem (From Klin and Sassone - KS08)

STOCCS parallel composition is associative up-to stochastic bisimilarity if and only if the rate of a synchronisation is determined as the product of the two rates of the involved actions.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 32 / 40

slide-68
SLIDE 68

Computing the rate of a synchronization

P P′ τa, λ

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-69
SLIDE 69

Computing the rate of a synchronization

P P′ τa, λ aω.Q Q a, ω

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-70
SLIDE 70

Computing the rate of a synchronization

P P′ τa, λ aω.Q Q a, ω P|aω.Q P′|Q τa, λ′

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-71
SLIDE 71

Computing the rate of a synchronization

P P′ τa, λ aω.Q Q a, ω P|aω.Q P′|Q τa, λ′ If ω is the total weight of a in P: λ′ =

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-72
SLIDE 72

Computing the rate of a synchronization

P P′ τa, λ aω.Q Q a, ω P|aω.Q P′|Q τa, λ′ If ω is the total weight of a in P: λ′ = λ · ω ω + ω

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-73
SLIDE 73

Computing the rate of a synchronization

P P′ τa, λ aω.Q Q a, ω P|aω.Q P′|Q τa, λ′ If ω is the total weight of a in P: λ′ = λ · ω ω + ω This is the key point to guarantee associativity of parallel composition in CCS-like synchronizations.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 33 / 40

slide-74
SLIDE 74

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ+χP|Q+ Pi|Qo

⊕Pi + Po|Qi ⊕ Qi

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-75
SLIDE 75

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ+χP|Q+ Pi|Qo

⊕Pi + Po|Qi ⊕ Qi

Interactions on channel a in P|Q are determined by considering

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-76
SLIDE 76

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ · ⊕Pi

⊕Pi + ⊕Qi +χP|Q+ Pi|Qo ⊕Pi + Po|Qi ⊕ Qi

Interactions on channel a in P|Q are determined by considering the synchronisations in P, where synchronization rates are updated for considering input in Q;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-77
SLIDE 77

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ · ⊕Pi

⊕Pi + ⊕Qi + χP|Q · ⊕Qi ⊕Pi + ⊕Qi + Pi|Qo ⊕Pi + Po|Qi ⊕ Qi

Interactions on channel a in P|Q are determined by considering the synchronisations in P, where synchronization rates are updated for considering input in Q; the synchronisations in Q, where synchronization rates are updated for considering input in P;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-78
SLIDE 78

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ · ⊕Pi

⊕Pi + ⊕Qi + χP|Q · ⊕Qi ⊕Pi + ⊕Qi + Pi|Qo ⊕Pi + ⊕Qi + Po|Qi ⊕ Qi

Interactions on channel a in P|Q are determined by considering the synchronisations in P, where synchronization rates are updated for considering input in Q; the synchronisations in Q, where synchronization rates are updated for considering input in P; interactions between input in P with output in Q;

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-79
SLIDE 79

STOCCS: stochastic semantics, 2nd attempt

Binary Synchronisation:

P

τa

✲ Ps

P

a

✲ Pi

P

a

✲ Po

Q

τa

✲ Qs

Q

a

✲ Qi

Q

a

✲ Qo

P|Q

τa

✲Ps|χQ · ⊕Pi

⊕Pi + ⊕Qi + χP|Q · ⊕Qi ⊕Pi + ⊕Qi + Pi|Qo ⊕Pi + ⊕Qi + Po|Qi ⊕ Pi + ⊕Qi

Interactions on channel a in P|Q are determined by considering the synchronisations in P, where synchronization rates are updated for considering input in Q; the synchronisations in Q, where synchronization rates are updated for considering input in P; interactions between input in P with output in Q; interactions between input in P with output in Q.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 34 / 40

slide-80
SLIDE 80

STOCCS: stochastic semantics

Theorem

In StoCCS parallel composition is associative up to rate aware bisimilarity, i.e. for each P, Q and R, P|(Q|R) ∼ (P|Q)|R

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 35 / 40

slide-81
SLIDE 81

Stoπ: Stochastic π-Calculus

Input, Output and Synchronisation:

abλ.P

ab

✲ [P → λ]

(OUT) a(x)ω.P

ab

✲ [P[b/x] → ω]

(IN) P

τa(b)

✲ P

P

ab

✲ Pi

P

ab

✲ Po

Q

τa(b)

✲ Q

Q

ab

✲ Qi

Q

ab

✲ Qo

P|Q

τab

P|Q·⊕Pi ⊕Pi+⊕Qi + P|Q·⊕Qi ⊕Pi+⊕Qi + Pi|Qo ⊕Pi+⊕Qi + Po|Qi ⊕Pi+⊕Qi

(SYNC) The other rules are the expected ones.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 36 / 40

slide-82
SLIDE 82
  • Outline. . .

1

Motivations

2

Rate-based Transition Systems

3

Stochastic CSP: PEPA

4

Stochastic CCS: StoCCS

5

Conclusions and Future Directions

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 37 / 40

slide-83
SLIDE 83

Summing Up

We have introduced Rate Transition Systems and have used them as the basic model for defining stochastic behaviours of processes. We have introduced a natural notion of bisimulation over RTS that agrees with Markovian bisimulation. We have shown how RTS can be used to provide the stochastic

  • perational semantics of PEPA and CCS.

We have discussed the generalization of the approach to π-calculus and (in another paper) MarCaSPiS.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 38 / 40

slide-84
SLIDE 84

Future Work

Use RTS to model other formalisms Use the RTS approach as general framework for modelling other PA semantics (non-deterministic, truly-concurrent, probabilitistic,. . . ) Consider alternative semantics synchonisation rates:

◮ based on phase type distributions ◮ based on Interactive Markov Chains

Develop tools directly for RTS rather than for CTMC.

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 39 / 40

slide-85
SLIDE 85

Thank you for your attention!

If interested read our ICALP-C 2009 paper

  • r

the full version available on the web (e.g. from Michele Loreti’s home page).

  • R. De Nicola (DSI@FI)

RTS and Stochastic Process Algebras IFIP W.G. 2.2 - 2009 40 / 40