p6 p3 b1 t1 t1 t2 a1 a1 a2 b2 c2 b1 b1 p4 a1 t1. Marking of the system net: µ = p1. + p1. + p2. + p3. Michael Köhler-BuÃmeier (UHH). Hornets: Nets within Nets ...
Hornets: Nets within Nets combined with Net Algebra Michael K¨ohler-Bußmeier Department for Informatics University of Hamburg
Application and Theory of Petri Nets
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
1 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
2 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
3 / 26
Nets within Nets s1 t1
s1’
t
s
s’
Elementary Object Nets [Val98, Val03] Object Nets [K¨oh07] Recursive nets [HP99] Nested nets [Lom00] Hypernets [BBPP04] Mobile systems [Lak05] AHO systems [HEM05] Adaptive workflow nets [LvHO+ 06] RN systems [VdFE08]
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
4 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
5 / 26
Definition An elementary object system has two nesting levels.
Definition b N , d, Θ, µ0 ) An elementary object system is a tuple OS = ( N, 1 2 3
b is a P/T-net, called the system-net. N N = {N1 , . . . , Nn } is a set of P/T-nets, called object-nets. b → {•} ∪ N is the typing of the system-net places. d :P
4
Θ ⊆ T defines synchronised transitions (system/object).
5
µ0 ∈ M is the initial marking.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
6 / 26
Example p1
p4
p2
p5
t
p6
p3
Places p with different types: d(p1 ) = d(p1 ) = d(p4 ) = N1 d(p3 ) = d(p5 ) = d(p6 ) = N2
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
p2 p3
a1
a2 b2
p4
b1
t1 a1
t1
t1
t2
b1
p5
t
b1
p6
c2
Marking of the system net: µ = + + + Michael K¨ ohler-Bußmeier (UHH)
p1 p1 p2 p3
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
p2 p3
a1
a2 b2
p4
b1
t1 a1
t1
t1
t2
b1
p5
t
b1
p6
c2
Tokens are net-tokens, which have independent (nested) markings: µ = + + + Michael K¨ ohler-Bußmeier (UHH)
p1 [0] p1 [a1 + b1 ] p2 [a1 ] p3 [a2 + b2 ]
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
p2 p3
a1
a2 b2
p4
b1
t1 a1
t1
t1
t2
b1
p5
t
b1
p6
c2
Firing of t selects a submarking λ of µ: λ = + + + Michael K¨ ohler-Bußmeier (UHH)
··· p1 [a1 + b1 ] p2 [a1 ] p3 [a2 + b2 ]
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
p2 p3
p4
b1
t1 a1
a1
t1
b1
t1
b1
p5
< t1, t2 >
a1
a2 b2
t1
t
b1 a2
t2
c2
b2
t2
p6
c2
The markings of the net-tokens are added.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
p2 p3
a1
a2 b2
p4
b1
t1 a1
a1
t1
t1
b1
b1
t
b1 a2
t2
t1
a1
c2
b2
t2
b1
p5
< t1, t2 >
a2 c2
t1
b2
t2
p6
c2
Synchronisation θ = t[t1 , t2 ] of t with t1 and t2 .
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
b1
t1
a1
a1
p2 p3
a1
t1
b1
t1
a1 b1
t1
a2 b2
t1
t
b1 a2
t2
c2
b2
t2
a2
t2
b2 a2
c2
b2
t2
b1
p4
b1
< t1, t2 >
a1
t1
c2
a2 b2
t2
p5 c2
p6 c2
The resulting markings are distributed, resulting in ρ.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Example p1
a1
t1
b1 a1
p2
t
< t1, t2 >
p3
a2
t1
t2
b2
a2 b2
t2
b1
p4 p5
c2
p6 c2
Successor marking µ0 = µ − λ + ρ: t[t1 ,t2 ](λ,ρ)
µ −−−−−−−→ µ0 OS
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
7 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
8 / 26
Object Net Systems (ONS) Extending Eos to Object Net Systems: 1
Unbounded nesting of markings
2
Firing may increase the marking’s nesting depth.
3
Moving of net-tokens along channels Net N2
y
p1::N1
p2::N2 y
p1::N1
p2::N2
q2::N3
q1::N3
x
t !c:N2
x
p3::N1
x
t !c:N2
x
p3::N1 Net N1 ?c::N2 z v
r::N2
Net N1 ?c::N2 z v
Net N2 q1::N3
r::N2
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
q2::N3
ICATPN’09
9 / 26
Object Net Systems (ONS) Extending Eos to Object Net Systems: 1
Unbounded nesting of markings
2
Firing may increase the marking’s nesting depth.
3
Moving of net-tokens along channels Net N2
y
p1::N1
p2::N2 y
p1::N1
p2::N2
q2::N3
q1::N3
x
t !c:N2
x
p3::N1
x
t !c:N2
x
p3::N1 Net N1 ?c::N2 z v
r::N2
Net N1 ?c::N2 z v
Net N2 q1::N3
r::N2
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
q2::N3
ICATPN’09
9 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
10 / 26
Hornets: Algebraic Net Operations Algebraic operations on the net-tokens, e.g. parallel composition: (N 1 kN2 )
q u Hy r H j H (xky) t p * u x
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
11 / 26
Hornets: Algebraic Net Operations Algebraic operations on the net-tokens, e.g. parallel composition: (N 1 kN2 )
=
q u Hy r H j H (xky) t p * u x
i1- - iu- - riv - - i N1 i f1 a c b
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
11 / 26
Hornets: Algebraic Net Operations Algebraic operations on the net-tokens, e.g. parallel composition: (N 1 kN2 )
i2- - ris - - i N2 i f2 e d } Z Z
=
q Z Zu Hy r H j H (xky) t p * u x
i1- - iu- - riv - - i N1 i f1 a c b
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
11 / 26
Hornets: Algebraic Net Operations Algebraic operations on the net-tokens, e.g. parallel composition: (N 1 kN2 )
u - rhv- i1 - h h N3 a c b q i 3 h Hy r* H j H (xky) u i2 @ R h t p * rs - e d - h x
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
f1 h @ R - h f f2 h
11 / 26
Net Algebra Hornets are related to Adaptive Workflows [LvHO+ 06]: Hornets adaptive workflows
= =
object nets workflows
ri-N1 - i-N2 - i
i = i1
f1 = i 2
(N1 · N2 )
Michael K¨ ohler-Bußmeier (UHH)
f = f2
+ +
net algebra composition
f =f1
3 N1 Q =f2 s Qj rj i =iQ 1 s Q N2 3 =i2 (N1 + N2 )
+
nets-within-nets
f i1h N1 - h1 Q 3 s Q - hf rh i f23 Q s Q h2- N2 - h i
Hornets: Nets within Nets combined with Net Algebra
(N1 kN2 )
ICATPN’09
12 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
13 / 26
Example: Workflow Management Network Each workflow is executed in a network of workflow agents. Workflows are composed from sub-workflows. Each agent either (a) executes its workflow itself or (b) decomposes it and delegates the sub-workflows to other agents. all workflows that the agent can handle by delegation
root WFMS agent WFMS 1 subordinate WFMS agent
WF1, WF2, (WF1 || WF2), .... WF1, ...
workflows that the agent can handle on its own
WFMS 11
WF2, .... WF2, ...
....
Michael K¨ ohler-Bußmeier (UHH)
....
WFMS 12
WF1, WF3, (WF1 + WF3), .... WF1, WF3, ...
....
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
14 / 26
The Workflow Agent delegation = (N1 || N2) info management compose3 NOR N = (N1; N2)
compose
update
N = (N1 || N2) OR N = (N1; N2) OR N = (N1 + N2)
N1; N2
N
N
in & propagate downwards
receive
N
N
proposed nets
check
subordinate WFMS agents
A
N
atomic well formed workflows
N
insert
N
propagate basic delegation info upwards
A1:enactWF(N1); A2:enactWF(N2)
wf instance N
:upd(N)
enact :enactWF(N)
N [N1,true]
[N,true]
start execution
N = (N1 || N2) OR N = (N1; N2) OR N = (N1 + N2)
"in doubt - deligate" (decompose)
running workflows N1
N
log
Michael K¨ ohler-Bußmeier (UHH)
delegate and distribute N = (N1 || N2) OR N = (N1; N2) OR N = (N1 + N2)
[N,false]
local workflow repository
:upd(N)
[N1,A1]; [N2,A2] A1; A2
[N,true]
[N,b]
[N, true]
workflow repository management
[N,b]
[N1,b1]; [N2,b2]
b= is_local(N,this)
propagate delegation info upwards
[N,A]
A
N = (N1 || N2) OR N = (N1; N2) compose2 OR N = (N1 + N2) b= (b1 AND b2)
N
analysis
delegation info
[N,A]
N
E:secure_in(N)
[N,A]
A:upd(N)
well formed workflows
:secure_in(N)
:inWF(N)
OR N = (N1 + N2)
[N1,A]; [N2,A]
update delegation info
N
N
N:start()
stop execution
workflow execution
N:stop()
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
15 / 26
Refinement: Workflow Analysis Refinement of the transition check in the module analysis: proposed nets
workflow nets
N N
N
& isFinalPlace(f,N)
N
& isConnected(i,f,N)
isLive(N)
N
N
N
bounded
N
isStructBounded(N)
N
well formed workflows
N
N
workflows
N
N
check
N
isInitialPlace(i,N)
C = controler(N)
N
N || C
N N
N
N N
not isStrucBounded(N)
Michael K¨ ohler-Bußmeier (UHH)
N
isWFBounded(N)
not isLive(N)
N
not isWFBounded(N)
rejected nets
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
16 / 26
Outline 1
Nets within Nets
2
Elementary Object Systems (EOS)
3
Object Nets
4
Higher-Order Object Nets
5
A Workflow Management Network
6
Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
17 / 26
Decidability Results: Net Classes
' &
Michael K¨ ohler-Bußmeier (UHH)
P/T-Nets Reachability
$ %
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
18 / 26
Decidability Results: Net Classes
'
' &
&
Michael K¨ ohler-Bußmeier (UHH)
Transfer Nets P/T-Nets Reachability Boundedness
$
$ %
Hornets: Nets within Nets combined with Net Algebra
%
ICATPN’09
18 / 26
Decidability Results: Net Classes '
'
' &
&
&
Michael K¨ ohler-Bußmeier (UHH)
$
Reset Nets Transfer Nets P/T-Nets Reachability Boundedness
$
$ %
Coverability
Hornets: Nets within Nets combined with Net Algebra
%
%
ICATPN’09
18 / 26
Decidability Results: Net Classes '
'
'
' &
&
&
&
Michael K¨ ohler-Bußmeier (UHH)
$
Selbstmodifying Nets
$
Reset Nets Transfer Nets P/T-Nets Reachability Boundedness
$
$ %
Coverability
Hornets: Nets within Nets combined with Net Algebra
%
%
ICATPN’09
% 18 / 26
Hornets Theorem Each counter machine can be simulated by a Hornet.
Proof. (Obvious.) Define the net-type Nat with the net-constant zero and the unary operator suc.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
19 / 26
Object Nets Theorem (K¨ohler and R¨olke 2004, ICATPN’04) Each counter machine can be simulated by an Object Net System.
Proof. Let NZERO and NSUC be object nets. We use the marking’s nesting depth to encode a counter: cod(0) = NZERO [] cod(n + 1) = NSUC [pos + cod(n)] The test for zero, incrementation and decrementation can be simulated.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
20 / 26
EOS: Weak Simulation of Counter Machines Theorem (K¨ohler 2007) Let A be a counter automaton. The Eos OS(A) has the following weak simulation property: ∗
(q, n1 , . . . , nk ) − → (q 0 , n10 , . . . , nk0 ) A
iff ∗
µ(q, n1 , . . . , nk ) −−−−→ µ(q 0 , n10 , . . . , nk0 ) OS(A)
is-pos
inc1
dec1
counter
inc1
reduce
2
control
=0
a
recreate
r
is-pos n
counter
Michael K¨ ohler-Bußmeier (UHH)
dec1
q
>0
Hornets: Nets within Nets combined with Net Algebra
s ICATPN’09
21 / 26
EOS Boundedness / Coverability Theorem Boundedness and Coverability are decidable for Eos. Boundedness is decidable iff < is a decidable, monotonous well-quasiorder. Coverability is decidable iff ≤ is [Finkel and Schnoebelen, 2001]. m 1 < m2 y∗ m10
=⇒
m 1 < m 2 y∗ y∗ 0 m1 < m20
One can show: Firing is monotonous for Eos wrt. the wqo : P b a [A ] ∧ αβ ⇐⇒ α = m Pni =1 bi i β = i =1 bi [Bi ] ∧ ∀1 ≤ i ≤ m : b ai = b bi ∧ A i ≤ B i Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
(1)
22 / 26
Summary: Decidability Hierarchy '
'
'
Reset-Nets Transfer-Nets, Eos
'
P/T-Nets, GSM-ONS
&
&
&
&
$
Selbstmodifying Nets, ONS, Hornets
Michael K¨ ohler-Bußmeier (UHH)
Reachability Boundedness
$
$
$ %
Coverability
Hornets: Nets within Nets combined with Net Algebra
%
%
ICATPN’09
% 23 / 26
Conclusion Nets within Nets Elementary Object Systems (EOS) Object Nets, Channels for in/out transfers Hornets: Higher-Order Object Nets Relationship to adaptive workflow nets Example: Workflow Management (Un)Decidability Results
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
24 / 26
Marek A. Bednarczyk, Luca Bernardinello, Wieslaw Pawlowski, and Lucia Pomello. Modelling mobility with Petri hypernets. In Jos`e Luiz Fiadeiro, Peter D. Mosses, and Fernando Orejas, editors, Recent Trends in Algebraic Development Techniques (WADT 2004), volume 3423 of Lecture Notes in Computer Science, pages 28–44. Springer-Verlag, 2004. Kathrin Hoffmann, Hartmut Ehrig, and Till Mossakowski. High-level nets with nets and rules as tokens. In Application and Theory of Petri Nets and Other Models of Concurrency, volume 3536 of Lecture Notes in Computer Science, pages 268 – 288. Springer-Verlag, 2005. Serge Haddad and Denis Poitrenaud. Theoretical aspects of recursive Petri nets. In S. Donatelli and J. Kleijn, editors, Proceedings of the 20th International Conference on Application and Theory of Petri Nets, volume 1639 of Lecture Notes in Computer Science, pages 228–247. Springer-Verlag, 1999. Michael K¨ ohler. Reachable markings of object Petri nets. Fundamenta Informaticae, 79(3-4):401 – 413, 2007. Charles Lakos. A Petri net view of mobility. In Formal Techniques for Networked and Distributed Systems (FORTE 2005), volume 3731 of Lecture Notes in Computer Science, pages 174–188. Springer-Verlag, 2005.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
25 / 26
Irina A. Lomazova. Nested Petri nets – a formalism for specification of multi-agent distributed systems. Fundamenta Informaticae, 43(1-4):195–214, 2000. Irina A. Lomazova, Kees M. van Hee, Olivia Oanea, Alexander Serebrenik, Natalia Sidorova, and Marc Voorhoeve. Nested nets for adaptive systems. In Application and Theory of Petri Nets and Other Models of Concurrency, Lecture Notes in Computer Science, pages 241–260. Springer-Verlag, 2006. R¨ udiger Valk. Petri nets as token objects: An introduction to elementary object nets. In J¨ org Desel and Manuel Silva, editors, Application and Theory of Petri Nets, volume 1420 of Lecture Notes in Computer Science, pages 1–25, 1998. R¨ udiger Valk. Object Petri nets: Using the nets-within-nets paradigm. In J¨ org Desel, Wolfgang Reisig, and Grzegorz Rozenberg, editors, Advanced Course on Petri Nets 2003, volume 3098 of Lecture Notes in Computer Science, pages 819–848. Springer-Verlag, 2003. Fernando Rosa Velardo and David de Frutos-Escrig. Name creation vs. replication in petri net systems. Fundam. Inform., 88(3):329–356, 2008.
Michael K¨ ohler-Bußmeier (UHH)
Hornets: Nets within Nets combined with Net Algebra
ICATPN’09
26 / 26