1 / 19

Process Algebra (2IF45) Extending the Basic Process Algebra

Process Algebra (2IF45) Extending the Basic Process Algebra. Dr. Suzana Andova. Guarded recursive specification. What do we still miss? Consider three specifications: E = {X = a.Y, Y = a.X} and F = {Z = a.a.Z} G = {U n = a.U n+1 , n  0}. Can we derive

nitara
Download Presentation

Process Algebra (2IF45) Extending the Basic Process Algebra

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)Extending the Basic Process Algebra Dr. Suzana Andova

  2. Guarded recursive specification What do we still miss? Consider three specifications: E = {X = a.Y, Y = a.X} and F = {Z = a.a.Z} G = {Un = a.Un+1, n  0} Can we derive BPA(A), E, F, G ├ X = Z or BPA(A), E, F, G ├ X = U0 or BPA(A), E, F, G ├ Z = U0  X Z   NOT DIRECTLY a a a a Y a.Z a a a … U0 U1 U2 consistency Process Algebra (2IF45)

  3. Deriving equalities of recursive variables Consider three specifications: E = {X = a.Y, Y = a.X} and F = {Z = a.a.Z} G = {Un = a.Un+1, n  0} 1. BPA(A), E, F, G ├ X = a.a.X which is exactly the form of Z 2. BPA(A), E, F, G ├ X = U0 cannot be derived directly. We introduce new variables X0, X1, … which are defined using X, as: X0 = X, X1= a.X, X2 = a.a.X, …, Xn = an X, …., Now, we want to show that Xn can be rewritten in the form of Un for any n  0! BPA(A), E, F, G ├ X0 = X = a.a.X = a.X1 BPA(A), E, F, G ├ X1 = a.X = a.a.a.X = a.X2 and in general BPA(A), E, F, G ├ Xn = an X = an a.a.X = a.Xn+1 We conclude that Xn is in the same form as Un for any n  0 Process Algebra (2IF45)

  4. Recursive principles for Deriving equalities of recursive variables • Every guarded recursive specification has a solution, this is called Restricted Recursive Definition Principle (RDP-) • Every guarded recursive specification has a unique solution, this is called Recursive Specification Principle (RSP) • BPA(A), E, F, G ├ X = a.a.X which is exactly the form of Z. • Directly from the RSP and RDP- we can conclude • BPA(A), E, F, G, RDP-, RSP ├ X = Z • 2. BPA(A), E, F, G ├ X = U0 cannot be derived directly. We introduce new variables X0, X1, … which are defined using X, as: • X0 = X, X1= a.X, X2 = a.a.X, …, Xn = an X, …., • Now, we want to show that Xn can be rewritten in the form of Un for any n  0! • BPA(A), E, F, G ├ X0 = X = a.a.X = a.X1 • BPA(A), E, F, G ├ X1 = a.X = a.a.a.X = a.X2 • and in general • BPA(A), E, F, G ├Xn = an X = ana.a.X = a.Xn+1 • We conclude that Xn is in the same form as Un for any n  0. Directly from the RSP and RDP- we can conclude • BPA(A), E, F, G, RDP-, RSP ├ X0 = U0 • and also BPA(A), E, F, G, RDP-, RSP ├ X = X0 = U0

  5. Specifying a Stack Consider a finite set of data elements D = {d1, d2, …, dn} for some n natural number. Define a recursive specification that describes a stack with unlimited capacity. Elements from D can be added or removed from the stack from the top of the stack. Steps: 1. First, define the set of atomic actions. 2. As a short hand notation you can use universal sum dD 3. Reason how many recursive variables you may need. 4. Specify the behaviour of the stack process.

  6. Specifying a Stack Consider a finite set of data elements D = {d1, d2, …, dn} for some n natural number. Define a recursive specification that describes a stack with unlimited capacity. Elements from D can be added or removed from the stack from the top of the stack. Steps: 1. First, define the set of atomic actions. 2. As a short hand notation you can use universal sum dD 3. Reason how many recursive variables you may need. 4. Specify the behaviour of the stack process. Stack1 = S S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + dD pop(d).S, for any d  D and   D* infinite

  7. Specifying a Stack again • Consider a finite set of data elements D = {d1, d2, …, dn} for some n natural number. Define a recursive specification that describes a stack with unlimited capacity. Elements from D can be added or removed from the stack from the top of the stack. • Steps: • First, define the set of atomic actions. • The equational theory is extended with  operator (general sequential composition) • 3. Can we do it with finitely many equations now? • Stack2 = T • T = dD push(d). ( ( ….) . pop(d).1)

  8. Specifying a Stack again • Consider a finite set of data elements D = {d1, d2, …, dn} for some n natural number. Define a recursive specification that describes a stack with unlimited capacity. Elements from D can be added or removed from the stack from the top of the stack. • Steps: • First, define the set of atomic actions. • The equational theory is extended with  operator • 3. Can we do it with finitely many equations now? • Stack2 = T • T = dD push(d). ( ( U ) . pop(d).1) • U = 1 + T  U push(d) Stack pop(d) U  pop(d) push(e) pop(e) (U  pop(e))  (U pop(d))

  9. Extending BPA(A) with sequential composition • BPA(A) • Signature: constants 0,1 • action prefix a._ (unary operator) • non-deterministic choice _+_ (bin. op.) • sequential composition __ (bin.op.) • (A1) x+ y = y+x • (A2) (x+y) + z = x+ (y + z) • (A3) x + x = x • (A4) x+ 0 = x Question: Can you find a set of axioms for the new operator? Process Algebra (2IF45)

  10. Extending BPA(A) with sequential composition BPA(A) Signature: constants 0,1 action prefix a._ (unary operator) non-deterministic choice _+_ (bin. op.) sequential composition __ (bin.op.) • (A1) x+ y = y+x • (A2) (x+y) + z = x+ (y + z) • (A3) x + x = x • (A4) x+ 0 = x • (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) Process Algebra (2IF45)

  11. Term deduction system for BPA(A) with sequential composition • Set of action names (actions): A • Signature: constants 0,1 (note 0,1 A) action prefix a._ (unary operator) non-deterministic choice _+_ (binary operator) sequential composition __ (binary operator) • Behaviour expressed by action transitions _  _ for a in A and termination _ • Behavioural equivalence is bisimilarity a • Deduction rules a x  x’ x + y  x’ a y  y’ x + y  y’ a a.x  x    a a x (x + y)  y (x + y)  1 ⑥   Process Algebra (2IF45)

  12. Term deduction system for BPA(A) with sequential composition • Set of action names (actions): A • Signature: constants 0,1 (note 0,1 A) • action prefix a._ (unary operator) • non-deterministic choice _+_ (binary operator) • sequential composition __ (binary operator) • Behaviour expressed by action transitions _  _ for a in A and • termination _ • Behavioural equivalence is bisimilarity a • Deduction rules a x  x’ x + y  x’ a y  y’ x + y  y’ a a.x  x    a a • Deduction rules for sequential com. x (x + y)  y (x + y)  1 a x  x’ x  y  x’ a x y y’ x  y  y’ ⑥     a a Process Algebra (2IF45) x y (x  y)  

  13. Extending BPA(A) further BPA(A) Signature: constants 0,1 action prefix a._ non-deterministic choice _+_ sequential composition _  _ || cut_cake water in_plate coffee in_cup What are possible scenarios? Process Algebra (2IF45)

  14. Extending BPA(A) further and further || water cut_cake in_plate coffee sit_sofa in_cup watchTV sit_sofa watchTV What are possible scenarios now? Process Algebra (2IF45)

  15. Term deduction system for BPA(A) extended to TCP(A) • Set of action names (actions): A • Signature: constants 0,1 (note 0,1 A) action prefix a._ non-deterministic choice _+_ sequential composition _  _ • Behaviour expressed by action transitions _  _ for a in A and termination _ • Behavioural equivalence is bisimilarity • Deduction rules for sequential com. a x  x’ x  y  x’ a x y y’ x  y  y’   a a x y (x  y)   • Deduction rules a x  x’ x + y  x’ a y  y’ x + y  y’ a a.x  x    a a x (x + y)  y (x + y)  1 ⑥   Process Algebra (2IF45)

  16. Term deduction system for BPA(A) extended to TCP(A) • Set of action names (actions): A • Signature: constants 0,1 (note 0,1 A) action prefix a._ nondeterminism _+_ sequential compos. __ • Behaviour expressed by action transitions _  _ for a in A and termination _ • Behavioural equivalence is bisimilarity communication function (_,_) parallel composition _ || _ communication composition. _ | _ • Deduction rules a a y  y’ x || y  x || y’ x  x’ x || y  x’ || y x y x | y x y x || y a a a b x  x’ y  y’, (a,b) = c x || y  x’ || y’ a b x  x’ y  y’, (a,b) = c x | y  x’ || y’ c c Process Algebra (2IF45)

  17. Extending BPA(A) to TCP(A) • communication function (_,_) • parallel composition_ || _ • communication compos. _ | _ • left merge operator _ ╙_ • unary operator ∂H BPA(A) Signature: constants 0,1 action prefix a._ non-determ. _+_ sequential comp. __ • a.x | b.y = c.(x || y) if (a,b) = c • a.x | b.y = 0 if (a,b) not defined • 0| x = 0 • (x + y) | z = x | z + y | z • 1 | 1 = 1 • a.x | 1 = 0 • x | y = y | x • (x | y) | z = x | (y | z) • 1 | x + 1 = 1 • (x | y) ╙ z = x | (y ╙ z) • x|| y = x╙ y + y ╙ x + x | y • x || 1 = x • (x || y) || z = x || (y || z) • 0╙ x = 0 • 1╙ x = 0 • a.x╙ y = a.(x || y) • (x + y) ╙ z = x ╙ z + y ╙ z • (x ╙ y) ╙ z = x ╙ (y || z) Process Algebra (2IF45)

  18. Example Specify the communication process: B 2 1 A 3 4 C Process Algebra (2IF45)

  19. Example • Draw the transition system generated by the operational rules for the process X || Y given by the recursive specification • X = a.X • Y = b.Y • There is no communication, so  = . • 2. Draw the transition system generated by the operational rules for the process X || Y given by the recursive specification • X = a.Y + b.Y; • Y = a.X + b.X. • There is no communication, so  = . • 3. Also draw the transition system generated by the operational rules for the process Z = (a.1 || b.1)  Z • 4. Are the transition systems found in the previous two items (2 and 3) bisimilar? If yes, show a bisimulation. If no, argue why not. Process Algebra (2IF45)

More Related