history-dependent petri nets kees van hee, alexander serebrenik, natalia sidorova, wil van der aalst...

17
History-Dependent Petri History-Dependent Petri Nets Nets Kees van Hee Kees van Hee , Alexander Serebrenik, , Alexander Serebrenik, Natalia Sidorova Natalia Sidorova , Wil van der Aalst , Wil van der Aalst ?

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

History-Dependent Petri History-Dependent Petri NetsNetsKees van HeeKees van Hee, Alexander Serebrenik, , Alexander Serebrenik,

Natalia SidorovaNatalia Sidorova, Wil van der Aalst, Wil van der Aalst

?

MotivationMotivation

b

a a'

b'

Choices made in processes often depend on the previous events – process history

Process history is often available from logs

Encoding history-based decisions into the net structure can be

• complex, • error-prone, and • decreasing the readability

We do not model the whole state of a system, but only some aspects of it!

b

a a'

b'

GoalGoal

History logicHistory logic

History: a partially ordered set of labeled eventsE, ≤ ,λ, where λ: E → Σ

Operations on history: extension with an event union of histories

Given a set of labels Σ and an event variable x, we define

a formula φ, a term q and a label expression l :

Examples of history guardsExamples of history guards

Short-hand notations:#S – the number of events with a label from set S,

x: φ ≡ (#x: φ)>0

x: φ ≡ (#x: φ) =(#x: true)

Examples:

#{a} < #{b}

x: (λ(x) = a y: (λ(y) = b x ≤ y))

Token history netsToken history nets

Tokens are colored with histories.

Transitions have guards evaluated on the union of

the histories of consumed tokens.

Tokens produced by a transition firing are colored

with the union of histories of the consumed tokens

extended by the firing event.b

c

a

p

q

d

#{a}=1

b

c

a

p

q

d

#{a}=1

Global history netsGlobal history nets

History is available to all transitions.Guards are evaluated on this history.Transition firings extend the history with a corresponding event.

Global history nets are Turing complete:Take a net where transitions have unique

labels.Then guards of the type allow to simulate inhibitor arcs.

Token history vs. global historyToken history vs. global history

b

c

a

p

q

d

#{a}=1

Suppose the global history is aabc.What are token histories?Token on p and q might share the event with label a, but not necessarily.

Corollary: token history cannot be reconstructed

from the global history.

Suppose the marking of the token history net is

[(p,H1)] + [(p,H2)] + [(q,H3)] + [(q,H4)] where

H1 = {e1,e2}, {e1 ≤ e2}, {(e1,a),(e2,b)},

H2 = {e4,e5}, {e4 ≤ e5}, {(e4,a),(e5,b)},

H3 = {e1,e3}, {e1 ≤ e3}, {(e1,a),(e3,c)},

H4 = {e4,e6}, {e4 ≤ e6}, {(e4,a),(e6,c)}.

What is the global history?It might be abcabc, or aabbcc, or abacbc, etc.

Corollary: the global history cannot be reconstructed from the token histories.

However we can simulate global history by token history

Each transition t is

connected to extra place p.

Initially with the empty

history: the token history of

p is the global history

t

p

Counting Formulae GuardsCounting Formulae Guards

A counting formula φ is defined by

Nets with counting formulas are Turing complete (remember:

)So we provide a translation of this class into bisimilar inhibitor nets.

Guards (#A) ρ (#B + k)

a

s'

b'

a'

s

b

t

(b) g(t) = #A ≤ #B+k removed

A...

B...

...

...

A’

B’

t

a

b

A...

B...

invariant:max{0,#B-#A+k+1}

g(t)

invariant:max{0, #A-#B-k-1}

a

s

b'

a'

s’

b

t

A...

B...

...

...

A’

B’

invariant:max{0,#B-#A -1}

initial:1

(a) Transition with guard g(t)

k+1

initial:k+1

invariant:max{0, #A-#B+1}

(c) g(t) = #A ≥ #B+k removed

Construction for compound formulae

•Consider a guard g(t) for transition t in disjunctive normal

form

• ¬φ is trivial

• φ1 φ2: test arcs for each formulae to t

• φ1 φ2: duplicate t into t and t’ each with one test arc

Let (N,m) be a Petri net with n transitions and y Zn.The y-distance of (N,m) is

D((N,m),y)) = yT ·

where is the set of all executable finite firing sequences.

Let A and B be two label sets and y(A,B) is a vector with 1 for

transitions labeled by an A label, -1 for B labels and 0 for the rest.The y(A,B) distance is the max difference in the number

of the firings of A-transitions and the number of the firings of B-transitions. There is an efficient algorithm to determine if the distance is

finite!

When the guards are of the form #A #B + k and y(A,B) < , we can construct a

Petri net bisimilar to the global history net.

Similarly #A #B + k and y(B,A) <

Bounded synchronization Bounded synchronization distancedistance

sup

LTL guards without Next • LTL formulae can be translated into BÜchi automata

• LTL-guards are evaluated on finite traces (history!) they can be translated to finite deterministic automata.

• Synchronous product of the Petri net with these automata yields a classical Petri net.

ConclusionConclusion Incorporating history into a model allows to

separate process information from safety constraints.

History nets are Turing complete.

Still, some subclasses can be translated to

classical PNs.

For some other subclasses a translation to

inhibitor nets is proposed.

Future Work The use of tokens nets for component-based

systems.

• Need for additional operations like projection

and intersection of histories

Transformation of other subclasses to PNs.

What about Presburger logic?

symbols and constructs

*

1(o) 2(o)

min(t) max(t)

a* t p: t p: �