270 likes | 416 Views
Process Algebra (2IF45) Assignments. Dr. Suzana Andova. Groups (almost final). Group 5. Oerlemans, G.G. 0607213, Panhuijzen, I.W.F. 0570999, Poppelaars, J.J.G. 0518740 Joost van Twist J. 0617198 Group 6.
E N D
Process Algebra (2IF45)Assignments Dr. Suzana Andova
Groups (almost final) Group 5. Oerlemans, G.G. 0607213, Panhuijzen, I.W.F. 0570999, Poppelaars, J.J.G. 0518740 Joost van Twist J. 0617198 Group 6. Johan Hendriks, 0588920Bas van der Oest, 0588728Roy van Doormaal, 0668932Peter Klerks, 0593253 Group 7. Tal Yosefa Milea (0757073), Sjoerd te Pas (0663210), Twan Vermeulen (0732529), Ahmed Ibrahim (0718605) Group 1. Stijn Fleuren, Jori Selen, John van Heur, Jordi Timmermans Group 2. Nicky Gerritsen 0595838, Kevin van der Pol 0620300, Group 3. Group4. Luis Avila 0754588Pablo Puente 0761739 NOTE: Not all groups and students are listed here Process Algebra (2IF45)
Details regarding the assignments • 1. Assignments are not compulsory. You may chose to do the assignments, thus making it part of your final grade. Or you could chose to go only to the written exam. Advantages to do the assignments are: • a part of the written exams will be covered by the assignments. • you will get deeper insight in the material • you will prepare for the (your “relaxed”) written part of the exam as a side (positive) effect • it may be that the assignments will be more extensive questions than those given at the exam, but you can work in a team and discuss it and learn more. Also you will have more time to think about a solution. • possibility to earn bonus points • 2. The final grade will be calculated 40% from the assignment grade + 60% from the written exam. • 3. The assignment will consists out of 3 smaller assignments, 1st related to SOS and axioms, 2nd process specification, and 3rd probabilistic/stochastic specification Process Algebra (2IF45)
Details regarding the assignments 4. Way of working: Students within a group have to organize the work themselves. Each student has to be actively involved, from the beginning till the end. 5. Finalization of an assignment's part: For each assignment a strict deadline will be defined. A group delivers the solution, which they later defend. Defense will include all students from the group. 6. Assignments schedule: 1st: March 2nd April 3rd May They are obtained the first week of the corresponding month, to be delivered at the end of the month. 7. Assessment: The assignment grade will be based on: the quality of the delivered solution, the defense and peer-to-peer assessment of team members. Thus each student gets own grade. Process Algebra (2IF45)
Details regarding the assignments 8. Questions? Process Algebra (2IF45)
Process Algebra (2IF45)Recursion Dr. Suzana Andova
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term term a term1 term2 term Process Terms (Specification) LTS Set of Axioms (basic equalities) term Derivation gives more (derived) equalities Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term term a term1 term2 term Process Terms (Specification) LTSs. Equivalence relation Set of Axioms (basic equalities) term1 = term2 term consistency Derivation gives more (derived) equalities Axiom ├ term3= term4 Bisimulation Term Equalities Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term ?coin.(!coffee.1 + !tea.0) a term1 term2 LTS corresponds-one ?coin.(!coffee.1 + !tea.0) Set of Axioms (basic equalities) ?coin Derivation gives more (derived) equalities !coffee !tea Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term a term1 term2 LTS corresponds-one !coin.?coffee.1 Set of Axioms (basic equalities) User Derivation gives more (derived) equalities !coin ?coffee Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term a term1 term2 LTS Process Terms one-to-one term Set of Axioms (basic equalities) Derivation gives more (derived) equalities Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term a term1 term2 LTS corresponds-one ?coin.(!coffee.x + !tea.0) Set of Axioms (basic equalities) ?coin • What is x? • 1 • is !coffee.!coffee.1 • !coffee.y • …… Derivation gives more (derived) equalities !coffee !tea x Process Algebra (2IF45)
LTSs Language Process terms Language (signature) Set of constants and operators Terms built from constants, operators and variables Deduction rules term a term1 term2 term? LTS corresponds-one “?coin.(!coffee +!tea). ?coin.(!coffee +!tea) . ?coin.(!coffee +!tea)….” Set of Axioms (basic equalities) Derivation gives more (derived) equalities !tea !coffee ?coin Process Algebra (2IF45)
LTSs Language Process terms LTS corresponds-one ?coin.(!coffee.x + !tea.0) ?coin • What is X? • 1 • is !coffee.!coffee.1 • !coffee.y • …… !coffee !tea x How do we solve this? Process Algebra (2IF45)
LTSs Language Process terms ? LTS corresponds-one ?coin.(!coffee +!tea). ?coin.(!coffee +!tea) . ?coin.(!coffee +!tea)…. !tea !coffee ?coin How do we solve this? Does the solution on the previous slide solves this question as well? Process Algebra (2IF45)
Recursive (Process) Variables, Recursive Equations, Recursive Specification Example1. ?coin.(!coffee.X+ !tea.0) X = !coffee.!coffee.1 Example2. Y = ?coin.(!coffee.Y +!tea.Y) • Recursive specifications increase the specification power of equational theories. • By means of recursive specifications infinite processes can be specified. Process Algebra (2IF45)
Recursive Equations and Rec. Specification in Equational Theory Language (signature) Set of constants and operators Terms built from constants, operators and variables Set of Axioms (basic equalities) term1 = term2 Recursive Equations X1 = …., X2 = ….., …. Recursive Specification E = {X1 = …., X2 = ….., …} Derivation Axioms, E├ term_A= term_B, where term_A and term_B may contain recursive variables from E Process Algebra (2IF45)
Recursive Equations and Rec. Specification in Equational Theory Language (signature) Set of constants and operators Example. E = { X = a.Y + c.0,Y = b.X} BPA(A), E ├ X = a.Y +c.0 = a.(b.X) +c.0 = a.(b.(a.Y + c.))) + c.0 Terms built from constants, operators and variables Set of Axioms (basic equalities) term1 = term2 Recursive Equations X1 = …., X2 = ….., …. Recursive Specification E = {X1 = …., X2 = ….., …} Derivation Axioms, E├ term_A= term_B, where term_A and term_B may contain recursive variables from E Process Algebra (2IF45)
Generating LTSs for recursive specifications Example. E = { X = a.Y + c.0,Y = b.X} with X being root variable. Example. E2 = { X = a.(a.(X+1)) +1 } with X being root variable. X X c a a b a.(X+1) Y 0 a a X+1 Process Algebra (2IF45)
Generating LTSs for recursive specifications Example. E = { X = X + a.0} with X being root variable. Process Algebra (2IF45)
Generating LTSs for recursive specifications Example. E = { X = X + a.0} with X being root variable. What transitions can X execute? X can perform a transition iff X can perform a transition If we substitute b.0 for X If we substitute a.0 for X a a b b a a 0 0 0 0 If we substitute a.0+c.1 for X 0 0 a c c a a 1 1 0 0 0 Process Algebra (2IF45)
Guarded recursive specification • What do we need take care? • That the recursive specification generates a unique LTS, in other words, it has a unique solution • How do we guarantee it? • We make sure that our specification is guarded. Process Algebra (2IF45)
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)
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)
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
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 dD 3. Reason how many recursive variables you may need. 4. Specify the behaviour of the stack process.
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 dD 3. Reason how many recursive variables you may need. 4. Specify the behaviour of the stack process. Stack1 = S S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + dD pop(d).S, for any d D and D*