51
Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Embed Size (px)

Citation preview

Page 1: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular Processings based on Unfoldings

Eric Fabre & Agnes MadalinskiDistribCom Team

Irisa/Inria

UFO workshop - June 26, 2007

Page 2: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Assembling Petri nets products, pullbacks, unfoldings and trellises

Modular computationson a constraint graph : an abstract viewpoint

Application 1: modular diagnosisor modular computation of a minimal product covering

Application 2: modular prefixesor how to compute a FCP directly in factorized form

Conclusion

Outline

Page 3: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Nets as Products of Automata Caution : in this talk, for simplicity

we limit ourselves to safe Petri nets, although most results extend to ½ weighted nets

we represent safe nets in “complemented” form, i.e. their number of tokens remains constant

Building bloc: a site or variable V = labeled automaton labeling of transitions

V = (S,T,s0,,¸,¤)

¸: T ¤

Page 4: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Nets as Products of Automata (2)

Composition of variables by product : disjoint union of places transitions with shared labels are “glued” transitions with private labels don’t change

S = V1£ V2 £ V3

This product yields a safe (labeled) nets, and extends to safe nets

Page 5: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Interest of Product Forms The 1st interests are

a natural construction method starting from modules the compactness of the product form on this example, the expanded product contains m*n

transitions, instead of m+n in the factorized form

Page 6: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Composition by Pullback Generalizes the product

allows interactions of nets by an interface (sub-net) outside the interface, interactions are still by shared labels

S = V1£ V2£ V3 = (V1£V2) Æ (V2£V3) Main property

Page 7: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Graph of a Product Net Interaction graph of a net

shared labels define the local interactions…

… but it’s better to re-express interactions under the form of shared variables (or sub-nets).

S = V1£ … £ Vn

V1£ V2£ V3 = (V1£V2) Æ (V2£V3)

= S1 Æ S2

Translation in terms of pullbacks define components Si in order to “cover” the shared labels

Page 8: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Unfoldings in Factorized Form

The key = Universal Property of the unfolding of S Let denote the unfolding of S,

and its associated folding (labeling)

8O, 8Á:OS, 9! Ã:OU(S), Á = fS ± Ã

fS:U(S)S

U(S)

Consequences: functor has a left adjoint,

and thus preserves products, pullbacks, …

U

U(S) = U(S1) £O … £O U(Sn)S = S1£ … £ Sn )U(S) = U(S1) ÆO … ÆO U(Sm)S = S1 Æ … Æ Sm )

Page 9: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Unfoldings in Factorized Form (2)

Example:

U(S) = U(V1) £O U(V2) £O U(V3)S = V1£V2£V3 )

Page 10: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Important properties The category theory approach naturally provides

an expression for operators (and ) recursive procedures to compute them (as for unfoldings) notions of projections associated to products/pullbacks:

£O ÆO

¦Si: U(S) U(Si)

Page 11: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Important properties The category theory approach naturally provides

an expression for operators (and ) recursive procedures to compute them (as for unfoldings) notions of projections associated to products/pullbacks:

£O ÆO

¦Si: U(S) U(Si)

Page 12: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Important properties The category theory approach naturally provides

an expression for operators (and ) recursive procedures to compute them (as for unfoldings) notions of projections associated to products/pullbacks:

£O ÆO

¦Si: U(S) U(Si)

Page 13: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Important properties The category theory approach naturally provides

an expression for operators (and ) recursive procedures to compute them (as for unfoldings) notions of projections associated to products/pullbacks:

£O ÆO

¦Si: U(S) U(Si)

Page 14: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Important properties (2)

Thmlet Oi be an occ. net of component Si,

then is an occ. net of

define then and this is the minimal product covering of O

O=O1£O…£O On S=S1£…£Sn

O’i = ¦Si(O) v Oi O=O’1£O…£O O’n

The reduced occurrence nets represent the behaviors of component Si that remain

once Si is inserted in the global system S

or the local view in each component Si of the behaviors of the global system S are interesting objects !

O’i v Oi

Factorized forms of unfoldings are often more compact……but they can however contain useless parts.

Page 15: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Trellises in Factorized Form The trellis of net S is

obtained by merging conditions of with identical height a close cousin of merged processes (Khomenko et al., 2005)

T(S)

U(S)

time is counted independently in each Vi

for S = V1£ … £ Vn

Page 16: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Trellises in Factorized Form The trellis of net S is

obtained by merging conditions of with identical height a close cousin of merged processes (Khomenko et al., 2005) enjoys exactly the same factorization properties as unfoldings

T(S) = T(S1) £T … £T T(Sn)S = S1£ … £ Sn )T(S) = T(S1) ÆT … ÆT T(Sm)S = S1 Æ … Æ Sm )

T(S)

U(S)

Page 17: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Assembling Petri netsproducts, pullbacks, unfoldings and trellises

Modular computationson a constraint graph : an abstract viewpoint

Application 1: modular diagnosisor modular computation of a minimal product covering

Application 2: modular prefixesor how to compute a FCP directly in factorized form

Conclusion

Outline

Page 18: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

S2

S3

S4

“Abstract” Constraint Reduction

Ingredients : variables “systems” or “components” Si

defined by (local) constraints on

Vmax = {V1,V2 ,…}

Vi µ {V1,…,Vn}

S1

V1

V5

V3

V2

V7

V6

V4V8

S = S1ÆS2 a composition operator (conjunction)

Page 19: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

“Abstract” Constraint Reduction (2)

Reductions: for , reduces constraints of S to variables V reductions are projections

VµVmax ¦V(S)¦V1

± ¦V2 = ¦V1ÅV2

Central axiom: S1 operates on V1, S2 operates on V2

let then i.e. all interactions go through shared variables

V3 ¶ V1ÅV2 ¦V3(S1ÆS2) = ¦V3

(S1)ƦV3(S2)

Page 20: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 21: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 22: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 23: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 24: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 25: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Modular reduction algorithms Problem :

Given where Si operates on Vi compute the reduced components i.e. how does Si change once inserted into the global S ?

S = S1Æ … Æ Sn

S’i = ¦Vi(S)

This can be solved by Message Passing Algorithms (MPA)

always converges only involves local computations exact if the graph of S is a (hyper-) tree

Page 26: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

What about systems with loops ?

Message passing algorithms converge to a unique fix point (independent of message scheduling)

that gives an upper approximation:

How good are their results ? Local extendibility to any tree around each component.

¦Vi(S) v S’i v Si

Page 27: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

What about systems with loops ?

Message passing algorithms converge to a unique fix point (independent of message scheduling)

that gives an upper approximation:

How good are their results ? Local extendibility to any tree around each component.

¦Vi(S) v S’i v Si

Page 28: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Assembling Petri netsproducts, pullbacks, unfoldings and trellises

Modular computationson a constraint graph : an abstract viewpoint

Application 1: modular diagnosisor modular computation of a minimal product covering

Application 2: modular prefixesor how to compute a FCP directly in factorized form

Conclusion

Outline

Page 29: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

centralized supervizor

Distributed system monitoring…

ab c b b a b

caa

distributed supervision

Page 30: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Consider the netand move to trajectory sets (unfolding or trellis)

In the category of occurrence nets (for ex.), we have a composition operator, the pullback trajectories of S are in factorized form

we have projection operators on occ. nets,where Vi are the variables of Si

Thm: projections and pullback satisfy the central axiom (here we cheat a little however…)

We are already equipped for that !

ÆO

S = S1 Æ … Æ Sm

U(S) = U(S1) ÆO … ÆO U(Sm)

¦Vi

Page 31: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 32: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 33: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 34: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 35: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 36: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A computation example

Page 37: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Assembling Petri netsproducts, pullbacks, unfoldings and trellises

Modular computationson a constraint graph : an abstract viewpoint

Application 1: modular diagnosisor modular computation of a minimal product covering

Application 2: modular prefixesor how to compute a FCP directly in factorized form

Conclusion

Outline

Page 38: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Objective

Given compute a finite complete prefix of in factorized form

Obvious solution: compute a FCP of then compute its minimal pullback covering

where

S = S1 Æ … Æ Sm

U(S)

Us(S) U(S)

Us(S) v U’(S1) Æ …Æ U’(Sm)

U’(Si) = ¦Vi(Us(S))

but this imposes to work on the global unfolding…… we rather want to obtain directly the factorized form

Page 39: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Local canonical prefixes don’t work

Canonical prefix defined by a cutting context

Θ = ( ~ , ⊲ , {κe}eE ) ~ equivalence relation on Conf

set of reachable markings ⊲ adequate order on Conf

partial order on Conf refining inclusion {κe}eE a subset of Conf,

configurations used for cut-off identification

cut-off event

Page 40: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Extended canonical prefix Toy example :

two components, elementary interface (=automaton)

S = A£C£B = (A£C) Æ (C£B) = SA Æ SB

interface

Page 41: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Extended canonical prefix (2)

extended prefix of w.r.t. its interface C

restriction of the cutting context ΘC = (~,⊲, {κe}eE )

to particular configurations κe

e cut-off event, corresponding event e’ : κe~κe’ and κe’ ⊲ κe where usually κe =[e]

if e is a private event, then C (κe ∆ κe’)=Ø

if e is an interface event, then e’ is also an interface event

SA

where ∆ is the symmetric set difference

Page 42: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Extended cut-off event

e : extended cut-off

e’ : interface event

Page 43: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Summary net Summary net =

behaviors allowed by an extended prefix on the interface: obtained by projecting the extended prefix on the interface, and refolding matching markings

merge

Page 44: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

augmentedprefixes

Page 45: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

extract summary nets

Page 46: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

exchange summary nets

Page 47: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

build pullbacks

Page 48: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

construct prefixes

Page 49: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Distributed computations

Killed in the pullback

Local factors are a little too conservative (not the minimal pullback covering of the FCP)

Page 50: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

Assembling Petri netsproducts, pullbacks, unfoldings and trellises

Modular computationson a constraint graph : an abstract viewpoint

Application 1: modular diagnosisor modular computation of a minimal product covering

Application 2: modular prefixesor how to compute a FCP directly in factorized form

Conclusion

Outline

Page 51: Modular Processings based on Unfoldings Eric Fabre & Agnes Madalinski DistribCom Team Irisa/Inria UFO workshop - June 26, 2007

A few lessons… Factorized forms of unfoldings are generally more compact. One can work directly on them, in an efficient modular

manner, without ever having to compute anything global. Optimal when component graphs are trees. Sub-optimal, but provide “good” upper approximations

otherwise.

…and some questions Finite complete prefixes in factorized form:

we need to understand better how to compute them,and provide complexity results.

Can this be useful for model checking? Can this be useful for distributed optimal planning?

(see last talk today)