Tools for random generation in safe Petri nets GASCOM 2016 Samy - - PowerPoint PPT Presentation

tools for random generation in safe petri nets
SMART_READER_LITE
LIVE PREVIEW

Tools for random generation in safe Petri nets GASCOM 2016 Samy - - PowerPoint PPT Presentation

Tools for random generation in safe Petri nets GASCOM 2016 Samy Abbes (Universit e Paris Diderot) June 2016 Concurrency and Petri nets Concurrent systems Systems with parallel actions Examples: communication networks, distributed


slide-1
SLIDE 1

Tools for random generation in safe Petri nets

GASCOM 2016 Samy Abbes (Universit´ e Paris Diderot) June 2016

slide-2
SLIDE 2

Concurrency and Petri nets

Concurrent systems

◮ Systems with parallel actions ◮ Examples: communication networks, distributed databases

Locality

◮ Notions of local components with local states ◮ Moto: “Most objects should be relative to local components”

Petri nets models

◮ Transition systems featuring concurrent actions ◮ Models for various systems: queuing networks, distributed

systems, workflows

slide-3
SLIDE 3

Petri nets and their dynamics

Static model

◮ Two disjoint sets P of places and T of transitions ◮ Bi-partite graph (P, T, →) ◮ Each transition t ∈ T has a pre-set •t ⊆ P and a post-set

t• ⊆ P

  • t = {p ∈ P : p → t}

t• = {p ∈ P : t → p}

slide-4
SLIDE 4

Petri nets and their dynamics

Static model

◮ Two disjoint sets P of places and T of transitions ◮ Bi-partite graph (P, T, →) ◮ Each transition t ∈ T has a pre-set •t ⊆ P and a post-set

t• ⊆ P

  • t = {p ∈ P : p → t}

t• = {p ∈ P : t → p}

Marking

◮ Each place p ∈ P contains 0 or 1 token ◮ The marking α : P → {0, 1} is the distribution of tokens

among places

slide-5
SLIDE 5

Petri nets and their dynamics

Dynamics

◮ Given a markig α : P → {0, 1}, a transition t may fire

whenever α = 1 on •t

◮ The firing of t yields a new marking α t

− → α′ according to the following comsumption-production rule (only a and b can fire)

  • a
  • b
  • c

a − − − →

  • a
  • b
  • c
slide-6
SLIDE 6

Petri nets and their dynamics

Dynamics

◮ Given a markig α : P → {0, 1}, a transition t may fire

whenever α = 1 on •t

◮ The firing of t yields a new marking α t

− → α′ according to the following comsumption-production rule (only a and b can fire)

  • a
  • b
  • c

b − − − →

  • a
  • b
  • c
slide-7
SLIDE 7

Petri nets: a model for concurrency

Firing sequences

◮ The marking is the state of the system ◮ The initial marking determines the possible sequences of firing

transitions firing sequence t1 · . . . · tk ∈ T ∗ α0

t1·...·tk

− − − − → αk

Concurrency features

◮ Only •t• = •t ∪ t• is affected by the firing of t ◮ Transitions act locally

slide-8
SLIDE 8

Petri nets: a model for concurrency

Changing the dynamics

◮ Define two transitions t1 and t2 to be concurrent:

t1 t2 ⇐ ⇒ •t•

1 ∩ •t• 2 = ∅ ◮ Identify two firing sequences of the form

u · t · t′ · v and u · t′ · t · v with u, v ∈ T ∗ and t t′ and consider the congruence generated ∼

◮ The congruence ∼ forgets irrelevant interleavings of

concurrent actions

slide-9
SLIDE 9

Petri nets: a model for concurrency

A right action on markings

◮ The action of T ∗ on the set M of markings factorizes through

the quotient monoid M = T ∗/ ∼

◮ Elements of M are called traces, and M acts on M on the

right: α · e = α α · (u · v) = (α · u) · v

◮ Intuition: traces only retain causal dependencies

slide-10
SLIDE 10

Petri nets: a model for concurrency

Extending the action

◮ Actually, not all words are able to act on a given initial

marking

◮ Idem for traces ◮ We extend the action to all traces on M′ = M ∪ {⊥} by

putting α · u = ⊥ if u is not enabled at M α · ⊥ = ⊥

◮ For each initial marking α we put

Mα = {x ∈ M : α · x = ⊥} (a downward closed language of traces)

slide-11
SLIDE 11

Outline

Trace/heap interpretation of trajectories on an example Uniform measure for a trace monoid action Computing the uniform measure for the Petri net example

slide-12
SLIDE 12

An example

  • a
  • b
  • c
  • d
  • e

We record traces (sequences of transitions up to interleavings) as heaps of pieces, taking into account a · d = d · a a · e = e · e b · d = d · b b · e = e · b c · e = e · c

slide-13
SLIDE 13

An example

  • a
  • b
  • c
  • d
  • e

heap a·a·d ·e·b·e·c·a·d = a·d ·e ·a·e ·b ·c ·d ·a a d a e b e c a d a, b c d e

slide-14
SLIDE 14

Outline

Trace/heap interpretation of trajectories on an example Uniform measure for a trace monoid action Computing the uniform measure for the Petri net example

slide-15
SLIDE 15

Uniform dynamics?

An analogy with irreducible sub-shifts of finite type

◮ The Parry measure is the measure of maximal entropy on

infinite trajectories of an irreducible sub-shift

◮ It is realized as a Markov chain on the set of states of the

sub-shift

slide-16
SLIDE 16

Uniform dynamics?

An analogy with irreducible sub-shifts of finite type

◮ The Parry measure is the measure of maximal entropy on

infinite trajectories of an irreducible sub-shift

◮ It is realized as a Markov chain on the set of states of the

sub-shift

◮ For a Petri net model (“sub-shift featuring concurrency”):

◮ What are infinite trajectories? ◮ What are Markov measures? ◮ Is there a measure of maximal entropy with a Markov

realization?

◮ All these notions can be developped in the framework of a

trace monoid acting on a finite set

slide-17
SLIDE 17

Infinite trajectories

Framework

A trace monoid M acting on a finite set X ∪ {⊥} with ⊥ an absorbing state α ∈ X Mα = {x ∈ M : α · x = ⊥} Identifications trajectories ↔ traces ↔ heaps

A compactification

We consider the space ∂M of infinite heaps seen as infinite trajectories (up to interleavings) and M = M ∪ ∂M compact metrisable space Mα = Adh(Mα) ∩ ∂M

slide-18
SLIDE 18

Markov measures featuring concurrency

Definition

A Markov measure is a family (mα)α∈X with

◮ mα a probability measure on ∂M ◮ mα(∂Mα) = 1 ◮ for all x, y ∈ M:

  • ↑(x · y)
  • = mα( ↑x) · mα·x( ↑y)

where ↑x = {ξ ∈ ∂M : x ≤ ξ}, the set of infinite trajectories that start with x

Remark

The existence of Markov measures is not trivial

slide-19
SLIDE 19

Irreducible actions

Definition

The action of a trace monoid M on a set X is irreducible if for every α, β ∈ X there is some x ∈ M such that β = α · x

Generating series

Gα(z) =

  • x∈Mα

z|x| =

  • k≥0

λα(k)zk λα(k) = #{x ∈ Mα : |x| = k}

Proposition

All the series Gα(z) are rational. If the action is irreducible, they all have the same radius of convergence q0 ∈ (0, 1), the characteristic root of the action.

slide-20
SLIDE 20

Uniform measure

Theorem

For an irreducible action of a trace monoid M over a finite set X and with characteristic root q0, there exists a Markov measure m = (mα)α∈X with the following form: x ∈ Mα = ⇒ mα( ↑x) = q|x|

0 Γ(α, α · x)

x / ∈ Mα = ⇒ mα( ↑x) = 0 where Γ : X × X → R>0 satisfies the cocyle identities Γ(α, γ) = Γ(α, β) · Γ(β, γ) in particular Γ(α, α) = 1 The Markov measure m is the uniform measure associated with the action.

slide-21
SLIDE 21

Uniform measure

Remarks

◮ The uniform measure generalizes the Parry measure to a

context featuring concurrency.

◮ The Markov identity is easy to verify given the previous form

and the cocycle property: mα

  • ↑(x · y)
  • = q|x·y|

Γ

  • α, α · (x · y)
  • = q|x|

0 Γ(α, α · x) · q|y| 0 Γ

  • α · x, (α · x) · y
  • = mα( ↑x) · mα·x( ↑y)
slide-22
SLIDE 22

Uniform measure

Remarks

◮ The measure mα can be constructed as the following weak

limit mα = lim

q→q−

1 Gα(q)

  • x∈Mα

z|x|δx

◮ It yields the following expression for Γ(·, ·):

Γ(α, β) = lim

q→q0−

Gβ(q) Gα(q)

slide-23
SLIDE 23

Outline

Trace/heap interpretation of trajectories on an example Uniform measure for a trace monoid action Computing the uniform measure for the Petri net example

slide-24
SLIDE 24

An example

Two markings: α depicted and β = α · b

  • a
  • b
  • c
  • d
  • e

The root q0 is determined as the root of smallest modulus of the following determinant: θ(z) =

  • 1 − 3z + 2z2

−z + 2z2 −z + z2 1 − 2z

  • = (1 − z)(1 − 2z)(1 − 2z − z2)

q0 = √ 2 − 1

slide-25
SLIDE 25

An example

Two markings: α depicted and β = α · b

  • a
  • b
  • c
  • d
  • e

From the cocyle identity: Γ(α, α) = Γ(β, β) = 1 Γ(α, β) = λ Γ(β, α) = λ−1 Apply the inclusion-exclusion decomposition to the following union: ∂Mα = ( ↑a) ∪ ( ↑b) ∪ ( ↑d) ∪ ( ↑e) , ( ↑b) ∩ ( ↑d) = ↑(b · d), . . . mα

  • ↑(b · d)
  • = q2

0λ, . . .

yields λ = √ 2

slide-26
SLIDE 26

An example

Two markings: α depicted and β = α · b

  • a
  • b
  • c
  • d
  • e

Finally: mα( ↑x) =

  • (

√ 2 − 1)|x|, if α · x = α √ 2( √ 2 − 1)|x|, if α · x = β mβ( ↑x) =

  • (

√ 2 − 1)|x|, if β · x = β

1 √ 2(

√ 2 − 1)|x|, if β · x = α

slide-27
SLIDE 27

Extensions

General Markov measures

  • ↑(x · y)
  • = mα( ↑x) · mα·x( ↑y)

◮ They can be characterized by finitely many probabilistic

parameters with suitable normalization conditions

◮ Analogous to the transition matrix of a Markov chain ◮ Yields a notion of “discrete time Markov chain with several

tokens”

slide-28
SLIDE 28

Extensions

Application to uniform generation

◮ Infinite executions (traces) may be generated through a large

but finite Markov chain

◮ A variant for finite traces allows for Boltzman sampling ◮ Not entirely satisfying since it does not fit the “distributed”

nature of the model

slide-29
SLIDE 29

Extensions

More developments needed

◮ Algorithmic ways to determine the parameters of the uniform

measure?

◮ How succesful in general is the ad hoc method used earlier?