Download presentation
Presentation is loading. Please wait.
Published byAniya Fickett Modified over 9 years ago
1
Process Algebra (2IF45) Recursion in Process Algebra Suzana Andova http://fusionanomaly.net/recursion.jpg
2
1 Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Closed terms C(BPA(A)) Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Equational theory: terms and LTSs Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x coin.coffee.1 coin coffee
3
2 Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Closed terms C(BPA(A)) Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Bisimilarity of LTSsEquality of terms Equational theory: terms and LTSs Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x coin.coffee.1 coin.coffee.1 + coin.coffee.1 coin coffee coin.coffee.1 = coin.coffee.1 + coin.coffee.1 coin coffee coin coffee
4
3 Recursive processes Process Algebra (2IF45) Socrates_thinks Socrates_eats getHungry goThinking thinking eating
5
4 Recursive processes Process Algebra (2IF45) Socrates_thinks Socrates_eats getHungry goThinking Socrates_thinks = getHungry.Socrates_eats Socrates_eats = goThinking.Socrates_thinks thinking eating
6
5 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Recursive specifications and LTSs Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Closed terms C(BPA(A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x goThinking getHungry Socrates_thinks = getHungry.Socrates_eats Socrates_eats = goThinking.Socrates_thinks
7
6 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Recursive specifications and LTSs Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Closed terms C(BPA(A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x GoThinking GetHungry Socrates_thinks = getHungry.Socrates_eats Socrates_eats = goThinking.Socrates_thinks
8
7 Process Algebra (2IF45) Recursive equations and specifications E = { X = a.0 } E 1 = { X = a.Y, Y = b.0 }
9
8 Process Algebra (2IF45) Recursive Equations and Rec. Specification in Equational Theory 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 Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Closed terms C(BPA(A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x Recursive specification E
10
9 Process Algebra (2IF45) Solutions of recursive equations Example: 1. E = { X = a.0 } 2. E 1 = { X = a.Y, Y = b.0 }
11
10 Process Algebra (2IF45) Solutions of recursive equations Example: 1. E = { X = X } 2. E 1 = { X = X + a.0 }
12
11 Process Algebra (2IF45) Solutions of recursive equations Example: 1. E = { X = a.X } 2. E 1 = { X = a.(a.(X+1)) +1 }
13
12 Process Algebra (2IF45) Solutions of recursive specifications E 1 = { X = a.(a.(X+1)) +1 } X a a.(X+1) a a X+1 This is a solution for X in the recursive spec. E1 Substitute it on the left-hand side and on the right-hand side and check bisimilarity.
14
13 This is also recursion …. Process Algebra (2IF45)
15
14 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Semantics of Recursive specifications Language: BPA(A) Signature: 0, 1, (a._ ) a A, +, … Language terms T(BPA(A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x
16
15 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Semantics of Recursive specifications Language: BPA rec (A) Signature: 0, 1, (a._ ) a A, +, X Language terms T(BPA(A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x
17
16 Process Algebra (2IF45) Semantics of Recursive specifications
18
17 Process Algebra (2IF45) Semantics of Recursive specifications t X,E w, X=t in E X w a a
19
18 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Semantics of Recursive specifications Language: BPA rec (A) Signature: 0, 1, (a._ ) a A, +, X E Language terms T(BPA rec (A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x GoThinking GetHungry Socrates_thinks = getHungry.Socrates_eats Socrates_eats = goThinking.Socrates_thinks a term ….
20
19 Process Algebra (2IF45) Deduction rules for BPA(A): x x’ x + y x’ a a 11 x (x + y) a.x x a y y’ x + y y’ a a y (x + y) ⑥ Semantics of Recursive specifications Language: BPA rec (A) Signature: 0, 1, (a._ ) a A, +, X E Language terms T(BPA rec (A)) Axioms of BPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x GoThinking GetHungry Socrates_thinks = getHungry.Socrates_eats Socrates_eats = goThinking.Socrates_thinks a term ….
21
20 Term model T(BPA rec (A)) and BPA rec (A) Bisimulation is congruence Soundness holds (it is a model indeed) Ground completeness does not hold Every recursive specification has a solution Not every recursive specification has unique solution Process Algebra (2IF45)
22
21 Equational theories with recursion Model vs. Solution of recursive specification Two important points for “useful models” Every recursive specification has a solution Every recursive specification has a unique solution Process Algebra (2IF45)
23
22 Recursive Definition Principle (RDP) For every recursive specification there is a solution in the model Process Algebra (2IF45)
24
23 Guarded recursions Does E = {X = a.Y, Y = Z, Z = b.X} has a solution and is this unique in T(BPA rec (A))? Process Algebra (2IF45)
25
24 Recursive Specification Principle (RSP) Every guarded recursive specification has at most one solution. Process Algebra (2IF45)
26
25 Restricted Recursive Definition Principle (RSP - ) Every guarded recursive specification has a solution. Process Algebra (2IF45)
27
26 Combining principles RDP - + RSP implies Every guarded recursive specification has a unique solution. Example E = {X = a.X} E’ = {X’ = a.a.X’} Process Algebra (2IF45)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.