Process Algebra (2IF45) Assignments Dr. Suzana Andova
1 Groups (almost final) Process Algebra (2IF45) Group 1. Stijn Fleuren, Jori Selen, John van Heur, Jordi Timmermans Group 2. Nicky Gerritsen , Kevin van der Pol , Group 3. Group4. Luis Avila Pablo Puente Group 5. Oerlemans, G.G , Panhuijzen, I.W.F , Poppelaars, J.J.G Joost van Twist J Group 6. Johan Hendriks, Bas van der Oest, Roy van Doormaal, Peter Klerks, Group 7. Tal Yosefa Milea ( ), Sjoerd te Pas ( ), Twan Vermeulen ( ), Ahmed Ibrahim ( ) NOTE: Not all groups and students are listed here
2 Details regarding the assignments Process Algebra (2IF45) 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, 1 st related to SOS and axioms, 2 nd process specification, and 3 rd probabilistic/stochastic specification
3 Details regarding the assignments Process Algebra (2IF45) 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: 1 st : March 2 nd April 3 rd 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.
4 Details regarding the assignments Process Algebra (2IF45) 8. Questions?
Process Algebra (2IF45) Recursion Dr. Suzana Andova
6 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules Terms built from constants, operators and variables term LTS Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators term Process Terms (Specification) term
7 Process Algebra (2IF45) Bisimulation Term Equalities term term 1 term 2 a Deduction rules Terms built from constants, operators and variables term LTSs. Equivalence relation Set of Axioms (basic equalities) term 1 = term 2 Derivation gives more (derived) equalities Axiom ├ term 3 = term 4 Language (signature) Set of constants and operators term LTSs Language Process terms Process Terms (Specification) term
8 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules Terms built from constants, operators and variables Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators ?coin. (!coffee. 1 + !tea. 0) LTS !tea !coffee ?coin
9 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators !coin. ?coffee. 1 Terms built from constants, operators and variables LTS !coin User ?coffee
10 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules term LTS Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators Process Terms Terms built from constants, operators and variables
11 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules Terms built from constants, operators and variables Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators ?coin. (!coffee. x + !tea. 0) LTS x !tea !coffee ?coin What is x? 1 is !coffee.!coffee.1 !coffee.y ……
12 LTSs Language Process terms Process Algebra (2IF45) term term 1 term 2 a Deduction rules LTS Set of Axioms (basic equalities) Derivation gives more (derived) equalities Language (signature) Set of constants and operators term ? !tea ?coin !coffee “?coin. (!coffee +!tea). ?coin. (!coffee +!tea). ?coin. (!coffee +!tea) ….” Terms built from constants, operators and variables
13 LTSs Language Process terms Process Algebra (2IF45) LTS ?coin. (!coffee. x + !tea. 0) x !tea !coffee ?coin What is X? 1 is !coffee.!coffee.1 !coffee.y …… How do we solve this?
14 LTSs Language Process terms Process Algebra (2IF45) LTS ? !tea ?coin !coffee ?coin. (!coffee +!tea). ?coin. (!coffee +!tea) …. How do we solve this? Does the solution on the previous slide solves this question as well?
15 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.
16 Process Algebra (2IF45) Terms built from constants, operators and variables Set of Axioms (basic equalities) term 1 = term 2 Derivation Axioms, E ├ term_A= term_B, where term_A and term_B may contain recursive variables from E Language (signature) Set of constants and operators Recursive Equations X1 = …., X2 = ….., …. Recursive Specification E = {X1 = …., X2 = ….., …} Recursive Equations and Rec. Specification in Equational Theory
17 Process Algebra (2IF45) Terms built from constants, operators and variables Set of Axioms (basic equalities) term 1 = term 2 Derivation Axioms, E ├ term_A= term_B, where term_A and term_B may contain recursive variables from E Language (signature) Set of constants and operators Recursive Equations X1 = …., X2 = ….., …. Recursive Specification E = {X1 = …., X2 = ….., …} Recursive Equations and Rec. Specification in Equational Theory 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
18 Process Algebra (2IF45) Generating LTSs for recursive specifications Example. E = { X = a.Y + c.0,Y = b.X} with X being root variable. X a Y0 c b Example. E 2 = { X = a.(a.(X+1)) +1 } with X being root variable. X a a.(X+1) a a X+1
19 Process Algebra (2IF45) Generating LTSs for recursive specifications Example. E = { X = X + a.0} with X being root variable.
20 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 a.0 for X 0 a 0 a 0 a If we substitute a.0+c.1 for X 0 a 0 a 1 c 0 a 1 c If we substitute b.0 for X 0 b 0 b 0 a
21 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.
22 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 = {U n = a.U n+1, n 0} X a Y a Z a a.Z a U0U0 U1U1 U2U2 a a a … Can we derive BPA(A), E, F, G ├ X = Z or BPA(A), E, F, G ├ X = U 0 or BPA(A), E, F, G ├ Z = U 0
23 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 = {U n = a.U n+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 = U 0 cannot be derived directly. We introduce new variables X 0, X 1, … which are defined using X, as: X 0 = X, X 1 = a.X, X 2 = a.a.X, …, X n = a n X, …., Now, we want to show that X n can be rewritten in the form of U n for any n 0! BPA(A), E, F, G ├ X 0 = X = a.a.X = a.X 1 BPA(A), E, F, G ├ X 1 = a.X = a.a.a.X = a.X 2 and in general BPA(A), E, F, G ├ X n = a n X = a n a.a.X = a.X n+1 We conclude that X n is in the same form as U n for any n 0
24 Recursive principles for Deriving equalities of recursive variables 1.Every guarded recursive specification has a solution, this is called Restricted Recursive Definition Principle (RDP-) 2.Every guarded recursive specification has a unique solution, this is called Recursive Specification Principle (RSP) 1.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 = U 0 cannot be derived directly. We introduce new variables X 0, X 1, … which are defined using X, as: X 0 = X, X 1 = a.X, X 2 = a.a.X, …, X n = a n X, …., Now, we want to show that X n can be rewritten in the form of U n for any n 0! BPA(A), E, F, G ├ X 0 = X = a.a.X = a.X 1 BPA(A), E, F, G ├ X 1 = a.X = a.a.a.X = a.X 2 and in general BPA(A), E, F, G ├ X n = a n X = a n a.a.X = a.X n+1 We conclude that X n is in the same form as U n for any n 0. Directly from the RSP and RDP- we can conclude BPA(A), E, F, G, RDP-, RSP ├ X 0 = U 0 and also BPA(A), E, F, G, RDP-, RSP ├ X = X 0 = U 0
25 Specifying a Stack Consider a finite set of data elements D = {d 1, d 2, …, d n } 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.
26 Specifying a Stack Consider a finite set of data elements D = {d 1, d 2, …, d n } 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).S d, for any d D S d = e D push(e).S ed + d D pop(d).S , for any d D and D*