1 / 45

Process Algebra (2IF45) Expressiveness of BPA rec

Process Algebra (2IF45) Expressiveness of BPA rec. Suzana Andova. Outline. How far can we go with recursive specifications in BPA rec (A)? How expressive is BPA rec (A)? If it is not expressive as we want can we do better? How?. Recursive specs vs. Transition systems.

semah
Download Presentation

Process Algebra (2IF45) Expressiveness of BPA rec

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Process Algebra (2IF45)Expressiveness of BPArec Suzana Andova

  2. Outline • How far can we go with recursive specifications in BPArec(A)? How expressive is BPArec(A)? • If it is not expressive as we want can we do better? How? Process Algebra (2IF45)

  3. Recursive specs vs. Transition systems • Every recursive specification in BPArec(A) has a solution that can be represented as an LTS • For this purpose we use the SOS rules • Sometimes we understand the process behaviour better from its LTS representation

  4. Recursive specs vs. Transition systems • But sometimes a process LTS has infinitely many states or infinitely many transitions • Symbolic (graphical) representation of the specification but this is not an LTS i<10, b a(i) i10, c

  5. Recursive specs vs. Transition systems • LTSs are very simple but expressible language • They can be finite or infinite, • with countable or uncountable number of states or number of transitions • The language defined with a given process algebra and its corresponding SOS semantics can specify a subset of LTSs • A simple example: BPA(A) cannot be used to specify LTSs with time

  6. Recursive specs vs. Transition systems Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)?

  7. Recursive specs vs. Transition systems • Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)? • LTSs with finite number of states and finite number of transitions and no loops  closed BPA(A) terms • Can we specify LTSs with countable number of states or countable number of transitions?

  8. Recursive specs vs. Transition systems 2. Can we specify LTSs with countable number of states and countable number of transitions? l1: States x Act ↦ States States = Nat A = {a} l1(n,a) = n+1, n  Nat 3. Can we specify LTSs with uncountable number of states or uncountable number of transitions? a a a a … l2: States x Act ↦ States States = [0,1] A = {a} l2(0,a) = r, r  [0,1] l3: States x Act ↦ States States = {s} A = {a} l3(s,a) = s l2 is bisimilar to a a

  9. Expressivity of BPArec(A) Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)? 2. Can we specify any LTSs with countable number of states and transitions? YES! 3. Can we specify any LTSs with uncountable number of states or transitions? NO! Theorem: Up to bisimulation, only LTSs with countable number of states and transitions, and only those are specifiable in BPArec(A).

  10. Expressivity of BPArec(A) Example: X = n1 a.a. … a.0 0 a a a a n … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)? NO!

  11. Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … 0 a a a a … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)?

  12. Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … 0 a a a a … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)? YES! This process is specifiable in BPArec(A)!

  13. Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … • Observe: • It is an infinite rec. spec • It is an unguarded rec. spec • Some states are bisimilar • but the root does not change 0 a a a a … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)? YES!

  14. Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … • Observe: • It is an infinite rec. spec • It is an unguarded rec. spec • Some states are bisimilar but the root does not change 0 a a a a … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)? YES! Can we do better? Can we do guarded specification for this process? Can we do better? Can we do finite specification for this process?

  15. Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … • Observe: • It is an infinite rec. spec • It is an unguarded rec. spec • Some states are bisimilar but the root does not change 0 a a a a … … 3 1 2 n a a a a a … a Is this a proper recursive specification in BPArec(A)? YES! Can we do better? Can we do guarded specification for this process? NO! Can we do better? Can we do finite specification for this process? NO!

  16. Expressivity of BPArec(A) Question: What sort LTSs are specifiable by guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only finitely branching processes/LTSs and only those are specifiable by a guarded recursive specification in BPArec(A).

  17. Expressivity of BPArec(A): Definability Question: What sort LTSs are specifiable by guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only finitely branching processes/LTSs and only those are specifiable by a guarded recursive specification in BPArec(A). definable

  18. Expressivity of BPArec(A): Definability Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 … • Observe: • It is an infinite rec. spec • It is an unguarded rec. spec • Some states are bisimilar but the root does not change • It is infinitely branching 0 a a a a … … 3 1 2 n a a a a a … a Can we do better? Can we do guarded specification for this process? NO! Can we do better? Can we do finite specification for this process? NO! This process is not definable in BPArec(A)!

  19. Expressivity of BPArec(A):Stack example Example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack.

  20. Expressivity of BPArec(A):Stack example • Example: • We consider a Stack with unlimited capacity • Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) • Elements from D can be added to or removed from the top of the stack. • Steps: • First, define the set of atomic actions. • A = { push(d) | d  D }  {pop(d) | d  D } • 2. How many recursive variables may be needed • S denotes the situation when the stack is empty • S denotes the state of the stack process when the content is   D*

  21. Expressivity of BPArec(A):Stack example • Atomic actions • A = { push(d) | d  D }  {pop(d) | d  D } • 2. recursive variables • S denotes the situation when the stack is empty • S denotes the state of the stack process when the content is   D* • S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + pop(d).S , for any d  D Sd = eD push(e).Sed + pop(d).S, for any d  D and   D*

  22. Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* pp(0) pp(1) S ps(0) ps(0) 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) 01 11 00 10 … … … …

  23. Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* • Observe: • It is a nice guarded rec. spec pp(0) pp(1) S ps(0) ps(0) This process is definable, therefore it is finitely branching 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) 01 11 00 10 … … … …

  24. Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* • Observe: • It is finitely branching pp(0) pp(1) S ps(0) ps(0) There is a guarded spec defining this process 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) 01 11 00 10 … … … …

  25. Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* • Observe: • It is finitely branching pp(0) pp(1) S ps(0) ps(0) There is a guarded spec defining this process 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) Can we do better in BPArec(A)? Can we do finite spec? 01 11 00 10 … … … …

  26. Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* pp(0) Can we do better in BPArec(A)? Can we do finite spec? pp(1) S ps(0) ps(0) • Observe: • It has infinitely many states • None of them are bisimilar • Cannot be turned into a finite LTS 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) 01 11 00 10 … … … …

  27. Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A).

  28. Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? regular processes Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A).

  29. Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? regular processes Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A). finitely definable

  30. Expressivity of BPArec(A):Finite definability For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* pp(0) Can we do better in BPArec(A)? NO! Can we do finite spec? NO! pp(1) S • Observe: • It has infinitely many states • None of them are bisimilar • Cannot be turned into a finite LTS • This is not a regular process ps(0) ps(0) 0 1 pp(1) pp(0) pp(0) ps(0) ps(1) ps(0) ps(1) pp(1) 01 11 00 10 There is no finite rec. spec. in BPArec(A) ! … … … …

  31. Expressivity of BPArec(A) Question: What do we need to add to BPArec(A) just sufficient that this is possible?

  32. Expressivity of BPArec(A) Question: What do we need to add to BPArec(A) just sufficient that this is possible? Very simple extension: (general) sequential composition!

  33. Theory of Sequential Processes TSP Process Algebra (2IF45)

  34. TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of BPArec(A): (A1) – (A4) (A5) (x+ y) z = xz+yz (A6) (xy)  z = x(y  z) (A7) 0  x = 0 (A8) x 1 = x (A9) 1 x = x (A10) a.x y = a.(x y) a a.x  x  y (x + y)  ⑥ Process Algebra (2IF45)

  35. TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of TSPrec(A): (A1) – (A4) (A5) (x+ y) z = xz+yz (A6) (xy)  z = x(y  z) (A7) 0  x = 0 (A8) x 1 = x (A9) 1 x = x (A10) a.x y = a.(x y) a a.x  x  . . . Deduction rules for sequential composition a x  x’ x  y  x’ a x y  y’ x  y  y’   a a x y (x  y)   y (x + y)  ⑥ Process Algebra (2IF45)

  36. TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of TSPrec(A): (A1) – (A4) (A5) (x+ y) z = xz+yz (A6) (xy)  z = x(y  z) (A7) 0  x = 0 (A8) x 1 = x (A9) 1 x = x (A10) a.x y = a.(x y) a a.x  x  . . . Deduction rules for sequential comosition a x  x’ x  y  x’ a x y  y’ x  y  y’   a a x y (x  y)   y (x + y)  ⑥ Bisimilarity of LTSs Equality of terms Process Algebra (2IF45)

  37. TSPrec(A) process algebra • Congruence of bisimulation with respect to all operators in TSPrec(A) • Elimination result: BPA(A) are still basic terms • Soundness of TSPrec(A) with respect to the SOS semantic (term model) • Ground completeness: bisimilarity between closed terms is derivable in TSP(A)

  38. Stack process in TSPrec(A) Revise the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack.

  39. Stack process in TSPrec(A) Revision of the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack. Stack2 = T T = dD push(d). ( U  pop(d).1)

  40. Stack process in TSPrec(A) Revision of the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack. Stack2 = T T = dD push(d). ( U  pop(d).1) U = 1 + T  U

  41. Stack process in TSPrec(A) Stack1 = S S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + pop(d).S, for any d  D and   D* Stack2 = T T = dD push(d). ( U  pop(d).1) U = 1 + T  U Is Stack1 = Stack2 ? YES! Can be proved using RDP+RSP principles*. *See the proof in the book

  42. Expressivity of TSPrec(A) • BSPrec(A) and TSPrec(A) in general are equally expressive! • A process is definable in TSPrec(A) if and only if it is a solution of a guarded recursive spec.  the same as in BPSrec(A) • Nevertheless in TSPrec(A) infinitely branching processes can be specified by a finite (unguarded) recursive spec. • Example: X = X • (a.1) + a.1

  43. Expressivity of TSPrec(A) Example 2: Consider recursive specification in TSPrec(A) X = a. (Y • a.1) Y = a. (Y • Z) + a.1 Z = a.1 + 1 • Observe: • the specification is guarded • the process is finitely branching • but “the degree of branching” is unbounded

  44. Expressivity of TSPrec(A) Example 2: Consider recursive specification in TSPrec(A) X = a. (Y • a.1) Y = a. (Y • Z) + a.1 Z = a.1 + 1 • Observe: • the specification is guarded • the process is finitely branching • but “the degree of branching” is unbounded • Results: • In TSPrec(A) unbounded branching processes can be defined by a finite guarded specification • This is not the case with BPArec(A)

  45. What about the Bag process? • Can we find any BPArec(A) or TSPrec(A) specification of the Bag process? • Can we find any which is finite guarded specification? • Or do we need to extend TSP(A) with more operators?

More Related