Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Process Algebras and Petri Nets are Discrete Dynamical Systems

838 views

Published on

Charla de D. Fernando Lopez Pelayo impartaida en la Facultad de Informática el día 4 de diciembre de 2014.

Published in: Education
  • Be the first to comment

Process Algebras and Petri Nets are Discrete Dynamical Systems

  1. 1. Process Algebras and Petri Nets are Discrete Dynamical Systems Fernando Lopez Pelayo Real Time and Concurrent Systems Group Computing Systems Department of University of Castilla-La Mancha Facultad de Informatica Universidad Complutense December 4th, 2014 Madrid, SPAIN Process Algebras and Petri Nets are Discrete Dynamical Systems – p.1/55
  2. 2. Objectives • To get a more usable Process Algebra • To codify Petri Nets as Discrete Dynamical Systems • To study the DDS • To study the ODE Process Algebras and Petri Nets are Discrete Dynamical Systems – p.2/55
  3. 3. Outline 1. The Problem: LTS generation process • Roughly ROSA • Normal Formed ROSA • A Complete Metric Space • GENETIC ROSA Process Algebras and Petri Nets are Discrete Dynamical Systems – p.3/55
  4. 4. Outline 1. The Problem: LTS generation process • Roughly ROSA • Normal Formed ROSA • A Complete Metric Space • GENETIC ROSA 2. Petri Nets to Dynamical Systems • 1-safe PNs ⇒ Discrete Dynamical Systems I • PNs ⇒ DDSs II • TAPNs ∗ ⇒ DDSs III Process Algebras and Petri Nets are Discrete Dynamical Systems – p.3/55
  5. 5. The Problem: LTS are unbroachable Process Algebras and Petri Nets are Discrete Dynamical Systems – p.4/55
  6. 6. Markovian Process Algebra ROSA Three kinds of transitions: Process Algebras and Petri Nets are Discrete Dynamical Systems – p.5/55
  7. 7. Markovian Process Algebra ROSA Three kinds of transitions: • Non-Deterministic transitions: P −→ Q Process P can evolve non-deterministically to proc. Q Process Algebras and Petri Nets are Discrete Dynamical Systems – p.5/55
  8. 8. Markovian Process Algebra ROSA Three kinds of transitions: • Non-Deterministic transitions: P −→ Q Process P can evolve non-deterministically to proc. Q • Probabilistic Transitions: P −→r Q Process P can evolve, with probability r to process Q Process Algebras and Petri Nets are Discrete Dynamical Systems – p.5/55
  9. 9. Markovian Process Algebra ROSA Three kinds of transitions: • Non-Deterministic transitions: P −→ Q Process P can evolve non-deterministically to proc. Q • Probabilistic Transitions: P −→r Q Process P can evolve, with probability r to process Q • Action transitions: P a,λ −→ Q Process P can evolve by executing the action labelled by a, taking a time described by an Exponential random distribution with parameter λ, to process Q Process Algebras and Petri Nets are Discrete Dynamical Systems – p.5/55
  10. 10. Non-deterministic Transitions Rules (ND-Def) P ⊕ Q −→ P (ND-Def) P ⊕ Q −→ Q (ND-Ext) P −→ P P + Q −→ P + Q (ND-Ext) Q −→ Q P + Q −→ P + Q (ND-Pro) P −→ P P ⊕r Q −→ P ⊕r Q (ND-Pro) Q −→ Q P ⊕r Q −→ P ⊕r Q (ND-Par) P −→ P P||AQ −→ P ||AQ (ND-Par) Q −→ Q P||AQ −→ P||AQ (ND-Rec) recX.P −→ P[recX.P/X] Process Algebras and Petri Nets are Discrete Dynamical Systems – p.6/55
  11. 11. Probabilistic Transition Rules (P-Def) P ⊕r Q −→r P (P-Def) P ⊕r Q −→1−r Q (P-Ext) P −→r P ∧ Action[Q] P + Q −→r P + Q (P-Ext) Q −→t Q ∧ Action[P] P + Q −→t P + Q (P-Par) P −→r P ∧ Action[Q] P||AQ −→r P ||AQ (P-Par) Q −→t Q ∧ Action[P] P||AQ −→t P||AQ (P-BothExt) P −→r P ∧ Q −→t Q P + Q −→r·t P + Q (P-BothPar) P −→r P ∧ Q −→t Q P||AQ −→r·t P ||AQ Provided that DS[P] ∧ DS[Q] Process Algebras and Petri Nets are Discrete Dynamical Systems – p.7/55
  12. 12. Action Transition Rules (A-Def) a.P a,∞ −→ P (A-Def) a, λ .P a,λ −→ P (A-Ext) P a,λ −→ P ∧ a /∈ Type[Available[Q]] P + Q a,λ −→ P (A-Ext) Q a,λ −→ Q ∧ a /∈ Type[Available[P]] P + Q a,λ −→ Q (A-Par) P a,λ −→ P ∧ a /∈ Type[Available[Q]] ∪ A P||AQ a,λ −→ P ||AQ (A-Par) Q a,λ −→ Q ∧ a /∈ Type[Available[P]] ∪ A P||AQ a,λ −→ P||AQ (A-RaceExt) P a,∞ −→ P ∧ Q a,λ −→ Q ∧ λ = ∞ P + Q a,∞ −→ P (A-RaceExt) P a,λ −→ P ∧ Q a,∞ −→ Q ∧ λ = ∞ P + Q a,∞ −→ Q (A-RacePar) P a,∞ −→ P ∧ Q a,λ −→ Q ∧ λ = ∞ ∧ a /∈ A P||AQ a,∞ −→ P ||AQ (A-RacePar) P a,λ −→ P ∧ Q a,∞ −→ Q ∧ λ = ∞ ∧ a /∈ A P||AQ a,∞ −→ P||AQ (A-RaceExtCoop) P a,λ1 −→ P ∧ Q a,λ2 −→ Q ∧ (λ1 = ∞ = λ2 ∨ λ1 = ∞ = λ2) P + Q a,λ1+λ2 −→ P ⊕ Q (A-Syn) P a,λ1 −→ P ∧ Q a,λ2 −→ Q ∧ a ∈ A P||AQ a,min[{λ1,λ2}] −→ P ||AQ (A-RaceParCoop) P a,λ1 −→ P ∧ Q a,λ2 −→ Q ∧ (λ1 = ∞ = λ2 ∨ λ1 = ∞ = λ2) ∧ a /∈ A P||AQ a,λ1+λ2 −→ P ||AQ ⊕ P||AQ Provided that DS[P] ∧ DS[Q] Process Algebras and Petri Nets are Discrete Dynamical Systems – p.8/55
  13. 13. ROSA Specification of MPEG (H.262) I frame: I ≡ DCT_QI, α1 .( V LCI, α2 .out ||A IQ_IDCTI, α3 . FSI, α4 .ESTP .COMPP .Θ) P frame: P ≡ ESTP , γ1 . COMPP , γ2 . ERRORP , γ3 . DCT_Q, γ4 .( V LCP , γ5 .out ||A IQ_IDCT, γ6 . FSP , γ7 .Θ) Bi frames: Bi ≡ ESTBi, β1 . COMPBi, β2 . ERRORBi, β3 . DCT_Q, β4 . V LCBi, β5 .out Θ ≡ (ESTB1.COMPB1 ||A ESTB2.COMPB2) MPEG Encoding Algorithm: MPEG ≡ I ||A P ||A B1 ||A B2 A = {ESTP , ESTB1, ESTB2, COMPP , COMPB1, COMPB2} Process Algebras and Petri Nets are Discrete Dynamical Systems – p.9/55
  14. 14. LTS of MPEG specification   ¡ ¢ ¡£ ¤ ¡£ ¥ ¦ §¨ © ¡     ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ¦# $ §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ # # % % % ''' §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ( ''' )01 §¨ © ¡ ¡ §¨ © ¡     ¡£ ¤ ¡£ ¥ 2 2 2 ¦ 2#2 $ ¦ $ 2 ¦ 2 ( ¦ ( §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ 4 4 4 3 ¥ 56 3 ¥ §¨ © ¦ ) 2 0 ¦ 0 2 1 ¦ 1 ¦7 # 7 ¦ 2 §¨ © ¡ §¨ © ¡ §¨ © ¡ 56 3 ¥ §¨ © §¨ © ¡ §¨ © ¡ §¨ © ¡ §¨ © 8 9 ¤ 56 8 9 ¥     8 9@ 8 9A 8 B ¤ ! ¢ 8 B ¥ 4 4 4 8 B @ 8 B A 56 8 BC     8 BD 8 BE 3 ¤ 8 F ¤ ! ¢ 3 ¤ 8 F ¥ 4 4 4 3 ¤ 8 F @ 8 F A 56 3 ¤ 8 F C 3 ¥8 F ¤ ! ¢ 3 ¥ 8 F ¥ 4 4 4 3 ¥8 F @ 8 F A 56 3 ¥8 F C     8 9@ 56 8 9 ¥ 8 9A 3 ¥8 F ¤ ! ¢ 3 ¤ 8 F ¥ ! ¢ 3 ¥8 F ¥ 4 4 4 3 ¤ 8 F @ 4 4 4 3 ¥8 F @ 8 F A 8 F A 56 3 ¤ 8 F C 56 3 ¥ 8 F C 56 8 9 ¥ 8 B ¤ Process Algebras and Petri Nets are Discrete Dynamical Systems – p.10/55
  15. 15. Looking for solutions: Genetics? Process Algebras and Petri Nets are Discrete Dynamical Systems – p.11/55
  16. 16. Pseudocode - Description 1: P = generateInitialPopulation(); 2: evaluate(P); 3: while not stoppingCondition()do 4: P0 = selectParents(P); 5: P0 = applyV ariationOperators(P0); 6: evaluate(P0); 7: P1 = selectNewPopulation(P0); 8: end while; 9: return the best found solution; Process Algebras and Petri Nets are Discrete Dynamical Systems – p.12/55
  17. 17. Pseudocode - Description 1: P = generateInitialPopulation(); 2: evaluate(P); FITNESS FUNCTION 3: while not stoppingCondition()do 4: P0 = selectParents(P); 5: P0 = applyV ariationOperators(P0); 6: evaluate(P0); FITNESS FUNCTION 7: P1 = selectNewPopulation(P0); 8: end while; 9: return the best found solution; Process Algebras and Petri Nets are Discrete Dynamical Systems – p.12/55
  18. 18. FITNESS - given 2 target states   ¡ ¢ ¡£ ¤ ¡£ ¥ ¦ §¨ © ¡     ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ¦# $ §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ # # % % % ''' §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ( ''' )01 §¨ © ¡ ¡ §¨ © ¡     ¡£ ¤ ¡£ ¥ 2 2 2 ¦ 2#2 $ ¦ $ 2 ¦ 2 ( ¦ ( §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ 4 4 4 3 ¥ 56 3 ¥ §¨ © ¦ ) 2 0 ¦ 0 2 1 ¦ 1 ¦7 # 7 ¦ 2 §¨ © ¡ §¨ © ¡ §¨ © ¡ 56 3 ¥ §¨ © §¨ © ¡ §¨ © ¡ §¨ © ¡ §¨ © 8 9 ¤ 56 8 9 ¥     8 9@ 8 9A 8 B ¤ ! ¢ 8 B ¥ 4 4 4 8 B @ 8 B A 56 8 BC     8 BD 8 BE 3 ¤ 8 F ¤ ! ¢ 3 ¤ 8 F ¥ 4 4 4 3 ¤ 8 F @ 8 F A 56 3 ¤ 8 F C 3 ¥ 8 F ¤ ! ¢ 3 ¥ 8 F ¥ 4 4 4 3 ¥ 8 F @ 8 F A 56 3 ¥ 8 F C     8 9 @ 56 8 9 ¥ 8 9 A 3 ¥ 8 F ¤ ! ¢ 3 ¤ 8 F ¥ ! ¢ 3 ¥ 8 F ¥ 4 4 4 3 ¤ 8 F @ 4 4 4 3 ¥ 8 F @ 8 F A 8 F A 56 3 ¤ 8 F C 56 3 ¥ 8 F C 56 8 9 ¥ 8 B ¤ Process Algebras and Petri Nets are Discrete Dynamical Systems – p.13/55
  19. 19. FITNESS - given 2 target states   ¡ ¢ ¡£ ¤ ¡£ ¥ ¦ §¨ © ¡     ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ¦# $ §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ # # % % % ''' §¨ © ¡ ! ¢ ¡ ¢ ¡£ ¤ ¡£ ¥ ( ''' )01 §¨ © ¡ ¡ §¨ © ¡     ¡£ ¤ ¡£ ¥ 2 2 2 ¦ 2#2 $ ¦ $ 2 ¦ 2 ( ¦ ( §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ ¡ §¨ © ¡ 3 ¥ ! ¢ 3 ¥ 4 4 4 3 ¥ 56 3 ¥ §¨ © ¦ ) 2 0 ¦ 0 2 1 ¦ 1 ¦7 # 7 ¦ 2 §¨ © ¡ §¨ © ¡ §¨ © ¡ 56 3 ¥ §¨ © §¨ © ¡ §¨ © ¡ §¨ © ¡ §¨ © 8 9 ¤ 56 8 9 ¥     8 9@ 8 9A 8 B ¤ ! ¢ 8 B ¥ 4 4 4 8 B @ 8 B A 56 8 BC     8 BD 8 BE 3 ¤ 8 F ¤ ! ¢ 3 ¤ 8 F ¥ 4 4 4 3 ¤ 8 F @ 8 F A 56 3 ¤ 8 F C 3 ¥ 8 F ¤ ! ¢ 3 ¥ 8 F ¥ 4 4 4 3 ¥ 8 F @ 8 F A 56 3 ¥ 8 F C     8 9 @ 56 8 9 ¥ 8 9 A 3 ¥ 8 F ¤ ! ¢ 3 ¤ 8 F ¥ ! ¢ 3 ¥ 8 F ¥ 4 4 4 3 ¤ 8 F @ 4 4 4 3 ¥ 8 F @ 8 F A 8 F A 56 3 ¤ 8 F C 56 3 ¥ 8 F C 56 8 9 ¥ 8 B ¤ G HI HP Q H P R G H I HP Q HP R S S TU V H GW GX Y`a b cd a b ed ` f b Yg hI f b i H I H P Q HP R TU V H GW GX Y`a b cd a b ed ` f b Yg hI f b i H I H P Q HP R p p q q r r s s TU V H i H TU V H GW GX Y` b cd f b i HP Q HP R TU V H i H TU V H GW GX Y` b cd f b i HP Q H P R t t t t tu tu t p S p Sv t q S q TU V H ed ` w R b Yg hI w R H TU V H ed ` w R b Yg hI w R H TU V H ed ` w R b Yg hI w R b ex x g x w R b X Y` W b y€ Y w R b TU V tt s S s u‚ S t TU V H TU V H TU V H y€ Y w R b TU V TU V H TU V H TU V H TU V TU V H TU V H TU V H TU V t ƒ„ Q t ƒ„ R t ƒ„… t ƒ† Q t ƒ† R t ƒ†‡ t ƒ†ˆ t ƒ†‰ t ƒ Q t ƒ R t ƒ ‡ t ƒ ˆ t ƒ Q t ƒ R t ƒ ‡ t ƒ ˆ t ƒ„ Q t ƒ „ R t ƒ „ … t ƒ† Q t ƒ† R t ƒ† ‡ t ƒ † ˆ t ƒ† ‰ t ƒ Q t ƒ Q t ƒ R t ƒ R t ƒ ‡ t ƒ ‡ t ƒ ˆ t ƒ ˆ Process Algebras and Petri Nets are Discrete Dynamical Systems – p.13/55
  20. 20. VARIATIONS • Crossover • Operational Semantics • Non-deterministic Transition Rules • Probabilistic Transition Rules • Action Transition Rules • Mutation • Variation on FITNESS Process Algebras and Petri Nets are Discrete Dynamical Systems – p.14/55
  21. 21. Towards a Cheaper Semantics for ROSA Process Algebras and Petri Nets are Discrete Dynamical Systems – p.15/55
  22. 22. A Complete Metric Space Given a pair of ROSA processes P and Q the distance between them is d(P, Q) d(P, Q) = 1 2l(P Q) − 1 2n • l(T) is the length of process T • n = max{l(P), l(Q)} • P Q is the longest common initial part of processes P and Q Process Algebras and Petri Nets are Discrete Dynamical Systems – p.16/55
  23. 23. Consistent with the Semantics of ROSA • ∀P, Q ∈ {ROSA}.d(P, Q) = 0 ⇔ P = Q • Commutability and Associativity of ⊕ and + . Weighted Commutability and W. Assoc. of ⊕r • Distributivity: d((P ⊕ Q) + R, (P + R) ⊕ (Q + R)) = 0 • Derivative operators: d(a.0||∅b.0, a.b.0 + b.a.0) = 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.17/55
  24. 24. Consistent with the Semantics of ROSA • ∀P, Q ∈ {ROSA}.d(P, Q) = 0 ⇔ P = Q • Commutability and Associativity of ⊕ and + . Weighted Commutability and W. Assoc. of ⊕r • Distributivity: d((P ⊕ Q) + R, (P + R) ⊕ (Q + R)) = 0 • Derivative operators: d(a.0||∅b.0, a.b.0 + b.a.0) = 0 NORMAL FORMS: i [qi] Aj∈Ai +a∈Type(Aj) a, λAj .nf(PAj,a) Process Algebras and Petri Nets are Discrete Dynamical Systems – p.17/55
  25. 25. Normal-Formed Genetic ROSA ∀P ∈ G − ROSA process : P ::= 0 | i [qi]Qi Decreasing ordered qi and λA Q ::= Aj∈A Tj Alphabetically ordered Tj and actions T ::= +a∈Type(A) a, λA .Va Process Algebras and Petri Nets are Discrete Dynamical Systems – p.18/55
  26. 26. The Complete Metric Space Given a pair of ROSA processes P and Q the distance between them is D(P, Q) D(P, Q) = 1 2l( P Q ) − 1 2N • P is the ROSA normal form of process P • l(T) is the length of process T • N = max{l( P ), l( Q )} • P Q is the longest common initial part of the normal form of processes P and Q Process Algebras and Petri Nets are Discrete Dynamical Systems – p.19/55
  27. 27. Cheaper Semantics According to a Means - Ends Policy: p − f : {ROSA procs.} −→ (0, 1] P → 1 − D(P, SF ) Higher values to the more promising states p − f is a FITNESS FUNCTION PROs: Several Symbolic Metrics could be valid CONs: Harder specification process Process Algebras and Petri Nets are Discrete Dynamical Systems – p.20/55
  28. 28. PETRI NETS Process Algebras and Petri Nets are Discrete Dynamical Systems – p.21/55
  29. 29. Marked Ordinary Petri Nets An Ordinary Petri Net (OPN) is a tuple N = (P, T, F): P Set of places T Set of transitions (P ∩ T = ∅) F Flow relation , F ⊆ (P × T) ∪ (T × P) • Marking of N = (P, T, F) is M : P −→ IN • (P, T, F, M) is a Marked Ordinary Petri Net • A PN is k-safe (k ∈ IN) if |M(p)| ≤ k, ∀p ∈ P Process Algebras and Petri Nets are Discrete Dynamical Systems – p.22/55
  30. 30. Firing a transition • X = P ∪ T • ∀x ∈ X: • • x = {y ∈ X | (y, x) ∈ F} (precondition set of x) • x• = {y ∈ X | (x, y) ∈ F} (postcondition set of x) • A transition t ∈ T of N = (P, T, F, M) is ENABLED∗ AT MARKING M (M[t ) iff ∀p ∈ • t . M(p) 0 • M[t can be fired ⇒ M (M[t M ): M (p) = M(p) − Wf (• t) + Wf (t• ) ∀p ∈ P • More than 1 transition can be fired at once Process Algebras and Petri Nets are Discrete Dynamical Systems – p.23/55
  31. 31. Non-determinism
  32. 32. qq q
  33. 33. ? ? ? ? ? ? JJ JJ ? ? t4 t2 t3 t1 p5p4 p3p2p1 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.24/55
  34. 34. Non-determinism
  35. 35. qq q
  36. 36. ? ? ? ? ? ? JJ JJ ? ? t4 t2 t3 t1 p5p4 p3p2p1
  37. 37. q q
  38. 38. ? ? ? ? ? ? JJ JJ ? ? t4 t2 t3 t1 p5p4 p3p2p1
  39. 39. q q
  40. 40. ? ? ? ? ? ? JJ JJ ? ? t4 t2 t3 t1 p5p4 p3p2p1 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.24/55
  41. 41. Examples and Analysis by Petri Nets Process Algebras and Petri Nets are Discrete Dynamical Systems – p.25/55
  42. 42. MTAPN for generic GoP 0 DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out 0,0 np BBP Process Algebras and Petri Nets are Discrete Dynamical Systems – p.26/55
  43. 43. MTAPN Modelling MPEG-2 I 0 DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Process Algebras and Petri Nets are Discrete Dynamical Systems – p.27/55
  44. 44. MTAPN Modelling MPEG-2 II DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out 00 Time = 595ms Process Algebras and Petri Nets are Discrete Dynamical Systems – p.28/55
  45. 45. MTAPN Modelling MPEG-2 III DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 895ms 300 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.29/55
  46. 46. MTAPN Modelling MPEG-2 IV DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 895ms 300 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.30/55
  47. 47. MTAPN Modelling MPEG-2 V DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 1268ms 0 373 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.31/55
  48. 48. MTAPN Modelling MPEG-2 VI DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 1268ms 373 0 000 0 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.32/55
  49. 49. MTAPN Modelling MPEG-2 VII DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 1863ms 595595 968 0 0 595 595 595 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.33/55
  50. 50. MTAPN Modelling MPEG-2 VIII DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 2163ms 895895 1268895 895 895 0 300 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.34/55
  51. 51. MTAPN Modelling MPEG-2 IX DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 2163ms 895895 895 895 895 300 1268 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.35/55
  52. 52. MTAPN Modelling MPEG-2 X DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out Time = 2448ms 1180 1180 585 1553 285 1180 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.36/55
  53. 53. Demanding processors DCT_QI IQ_IDCTI VLCI FSI Iout I Perror P ESTP COMPP OUTI 595,595 298,358673,673 0,0 0,0 1180,1181 32,32 B1out 48,48 189,454 0,0 0,0 189,454 521,521521,521 0,0 48,48 MV−B1 MV−B2 ERROR DCT_Q P 521,521 0,0 VLCP 0,0 Pout OUTP 378,389 IQ_IDCT FS P 0,0 515,515 I−B2 I−B1 B1 B2 2398,2422 P−B1 P−B2 2398,2422 B1error 0,0 B2error B1 VLCB1 DCT_Q ERRORB1 COMP B1 ESTB1 OUT B2 VLC B2 DCT_Q ERRORB2 COMPB2 EST B2 OUT MV−P B2out 0 PROCESSING FINISHED PROCESSING STARTED Process Algebras and Petri Nets are Discrete Dynamical Systems – p.37/55
  54. 54. Analysis on Petri Nets Process Algebras and Petri Nets are Discrete Dynamical Systems – p.38/55
  55. 55. Behavioural properties • Reachability • Can ever a marking be reached from another one? • Reversibility • Is M0 reachable from each reachable marking? • Boundness / Safeness • Is there an upper limit on the number of tokens in a/all given place/s? • Vivacity / Liveliness / Deadlock freeness • Can the system become blocked? Process Algebras and Petri Nets are Discrete Dynamical Systems – p.39/55
  56. 56. Analysis Means • Reachability / Reversibility • Reachability or coverability tree • Explosion on the number of markings / states! • Boundness / Safeness • Incidence Matrix and State Equations • Vivacity / Liveliness / Deadlock freeness • Structural Analysis based on net structures Process Algebras and Petri Nets are Discrete Dynamical Systems – p.40/55
  57. 57. Codification to Discrete Dynamical Systems Process Algebras and Petri Nets are Discrete Dynamical Systems – p.41/55
  58. 58. DDS associated to a PN The DDS which encodes the MOPN N = (P, T, F, M) is the triple (X, T, Φ), where: • the Phase Space X = P(INn) is the set of all subsets of INn, being n the number of places of the MOPN. • T is the monoid N ∪ {0} • Φ : T × X → X is the evolution operator Φ which holds: 1. Φ(0, x) = x ∀x ∈ X, i.e., Φ0(x) = idX 2. Φ(1, x) = y x, y ∈ X where: • x = {x1, . . . , xk} where xi ∈ INn encodes Markings of the MOPN N • y = ∪k i=1yi • yi = ∪t j=1yij , i.e. the union of all (t) possible reachable markings from xi, defined by xi[Ri yij being Ri the set of transitions of the net enabled at marking xi 3. Φ(t, Φ(s, x)) = Φ(t + s, x) ∀t, s ∈ T, ∀x ∈ X Process Algebras and Petri Nets are Discrete Dynamical Systems – p.42/55
  59. 59. Distance on 1-safe PNs Given a pair x, y ∈ {0, 1}n (corresponding to a pair of markings) the distance between them is given by: d(x, y) = 1 2l(x y) − 1 2n , x, y ∈ {0, 1}n • l(x y) is the length of the longest common initial part of the vectors x and y • n ∈ IN is the number of places of the PN • Metric well defined but blind to big differences in both k-safe and non-bounded cases Process Algebras and Petri Nets are Discrete Dynamical Systems – p.43/55
  60. 60. Problem of binary case metrics I p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.44/55
  61. 61. Problem of binary case metrics I p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.44/55
  62. 62. Problem of binary case metrics II • In the first pair of MOPNs the states are (0,1,1,4,1,0) and (0,1,0,5,1,0) which means distance 1 4 − 1 64 but only the first can fire t2 • In the second pair of MOPNs the states are (0,1,1,4,1,0) and (0,1,2,3,1,0) which means the same distance 1 4 − 1 64 but both can fire t2 • To solve this problem we will use the (ENABLED) TRANSITIONS VECTOR Process Algebras and Petri Nets are Discrete Dynamical Systems – p.45/55
  63. 63. Distance on k-safe and non-bounded PNs Given a pair x, y ∈ INm the distance between them is given by: d(x, y) = 1 2l(tv(x) tv(y)) − 1 2m , x, y ∈ INm • tv(x)i = 1 ⇔ transitioni is enabled, 0 o.w. • l(tv(x) tv(y)) = length of the longest common initial part of the transition vectors of x and y • m ∈ IN is the number of transitions of the PN Process Algebras and Petri Nets are Discrete Dynamical Systems – p.46/55
  64. 64. New distance p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 tv = (0, 1, 1, 0) tv = (0, 0, 1, 0) p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 t1 t2 t3 t4 tv = (0, 1, 1, 0) tv = (0, 1, 1, 0) Process Algebras and Petri Nets are Discrete Dynamical Systems – p.47/55
  65. 65. Complete Metric Space X • From this metric d, we can define the distance between a vector x ∈ INn and a subset B of vectors of INn , i.e., an element in P(INn ): d(x, B) = min{d(x, y) : y ∈ B} • Distance between A, B in P(INn ): D(A, B) = max{d(x, B) : x ∈ A} Process Algebras and Petri Nets are Discrete Dynamical Systems – p.48/55
  66. 66. Marked Timed-Arcs∗ Petri Net c c c c c c ) ——— b €€€€€€€i ¨ ¨ ¨¨B ....................    E .......................... .................... .......................' t1 t2 t3 t4 p1 p2 p3 p4 p5 p6 0 0 0 0 0 0 4 5 0 t = 0 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.49/55
  67. 67. MTAPNs∗ t = 4 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.50/55
  68. 68. MTAPNs∗ t = 4 t = 5 Process Algebras and Petri Nets are Discrete Dynamical Systems – p.50/55
  69. 69. Urgent TAPNs to DDSs • X = P({IN, ∅}n). n = #(places) of the MTAPN. • τ is the monoid N ∪ {0} • Φ : τ × X → X is the evolution operator Φ verifying: 1. Φ(0, A) = A ∀A ∈ X, i.e., Φ0 = idX 2. Φ(1, A) = B A, B ∈ X where: • A = {z1, . . . , zk}. zi ∈ {IN, ∅}n is a Marking. • ∀t ∈ {1 . . . k} . xt = 1 + zt where ∀i ∈ {1 . . . n}: xti =    ∅ when zti = ∅ zti + 1 otherwise • B = ∪k i=1Bi • Bi = ∪t j=1{y j i }/xi[RRi y j i being RRi maximal. 3. Φ(t, Φ(s, A)) = Φ(t + s, A) ∀t, s ∈ τ, ∀A ∈ X Process Algebras and Petri Nets are Discrete Dynamical Systems – p.51/55
  70. 70. Conclusions and Future Work Process Algebras and Petri Nets are Discrete Dynamical Systems – p.52/55
  71. 71. Conclusions • A Topology over ROSA processes consistent with ROSA semantics has been provided • A cheaper P.A. according to a Means - Ends Policy • Discrete and Stochastic Petri Nets encoded as Dynamical Systems • A Complete Metric Space for the DDSs associated to 1-safe, k-safe and unbounded PNs Process Algebras and Petri Nets are Discrete Dynamical Systems – p.53/55
  72. 72. Future Work • If P.A. heuristics does not work (chosen path is wrong) → Mutation means different FITNESS . . . Process Algebras and Petri Nets are Discrete Dynamical Systems – p.54/55
  73. 73. Future Work • If P.A. heuristics does not work (chosen path is wrong) → Mutation means different FITNESS . . . • Improving expressive power of nf − P.A. Process Algebras and Petri Nets are Discrete Dynamical Systems – p.54/55
  74. 74. Future Work • If P.A. heuristics does not work (chosen path is wrong) → Mutation means different FITNESS . . . • Improving expressive power of nf − P.A. • Key points in DSs Theory: • Periodic Points • Semi-periodic points • Orbits from M0 • In DDSs are sequences of elements of X • In CDSs are curves in X • α-limit and ω-limit sets Process Algebras and Petri Nets are Discrete Dynamical Systems – p.54/55
  75. 75. Future Work • If P.A. heuristics does not work (chosen path is wrong) → Mutation means different FITNESS . . . • Improving expressive power of nf − P.A. • Key points in DSs Theory: • Periodic Points • Semi-periodic points • Orbits from M0 • In DDSs are sequences of elements of X • In CDSs are curves in X • α-limit and ω-limit sets • Comparison over PNs Process Algebras and Petri Nets are Discrete Dynamical Systems – p.54/55
  76. 76. Process Algebras and Petri Nets are Discrete Dynamical Systems Fernando Lopez Pelayo Real Time and Concurrent Systems Group Computing Systems Department of University of Castilla-La Mancha Facultad de Informatica Universidad Complutense December 4th, 2014 Madrid, SPAIN Process Algebras and Petri Nets are Discrete Dynamical Systems – p.55/55

×