process algebra 2if45 extending process algebra parallel composition more examples
Download
Skip this Video
Download Presentation
Process Algebra (2IF45) Extending Process Algebra: Parallel composition More examples

Loading in 2 Seconds...

play fullscreen
1 / 23

Process Algebra (2IF45) Extending Process Algebra: Parallel composition More examples - PowerPoint PPT Presentation


  • 130 Views
  • Uploaded on

Process Algebra (2IF45) Extending Process Algebra: Parallel composition More examples. Dr. Suzana Andova. TCP language. TCP(A,  ) A is a pre-defied set of atomic actions  is a pre-defined communication function Signature: (constructs of the language) constants 0,1

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Process Algebra (2IF45) Extending Process Algebra: Parallel composition More examples' - kapila


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
process algebra 2if45 extending process algebra parallel composition more examples

Process Algebra (2IF45)Extending Process Algebra:Parallel composition More examples

Dr. Suzana Andova

tcp language
TCP language
  • TCP(A, )
  • A is a pre-defied set of atomic actions
  •  is a pre-defined communication function
  • Signature: (constructs of the language)
  • constants 0,1
  • action prefix a._
  • non-deterministic choice _+_
  • sequential composition _  _
  • Process behaviour specification described by process equations,
    • recursive specifications
    • guarded recursive process variables and guarded process specifications
    • uniqueness of the process defined by a guarded Rspec
    • Additional mechanism for “equating” recursive specifications: RDP and RSP, where “equating” = they define the same (up to bisimulation) process

parallel composition _ || _

communication composition. _ | _

encapsulation H(_), where H  A

system specification manipulation recap
System specification manipulation (recap)

reduction

on specification

components’ specifications

reduction

on specification

the whole system specification

composition by axiom

  • simpler
  • smaller
  • in a particular form (basic)

reduction

on LTSs

the state space

SOS rules

Process Algebra (2IF45)

example specifying a bag
Example: Specifying a Bag
  • Assume a set of data elements D = {0,1}
  • Bn,m is the process that specify the current content of B
  • n is the number of 0s
  • m is the number of 1s
  • B0,0 = r1(0). B1,0 + r1(1). B0,1
  • B0, m+1 = r1(0). B1,m+1 + r1(1). B0,m+2 + s2(1). B0,m
  • Bn+1,0 = r1(0). Bn+2,0 + r1(1). Bn+1,1 + s2(0). Bm,0
  • Bn+1, m+1 = r1(0). Bn+2,m+1 + r1(1). Bn+1,m+2
  • + s2(0). Bn,m+1 + s2(1).Bn+1, m

2

1

example specifying a bag1
Example: Specifying a Bag
  • Assume a set of data elements D = {0,1}
  • Bn,m is the process that specify the current content of B
  • n is the number of 0s
  • m is the number of 1s
  • B0,0 = r1(0). B1,0 + r1(1). B0,1
  • B0, m+1 = r1(0). B1,m+1 + r1(1). B0,m+2 + s2(1). B0,m
  • Bn+1,0 = r1(0). Bn+2,0 + r1(1). Bn+1,1 + s2(0). Bn,0
  • Bn+1, m+1 = r1(0). Bn+2,m+1 + r1(1). Bn+1,m+2
  • + s2(0). Bn,m+1 + s2(1).Bn+1, m
  • This is an infinite recursive specification!
  • Can we do better?

2

1

example specifying a bag2
Example: Specifying a Bag
  • Assume a set of data elements D = {0,1}
  • Bn,m is the process that specify the current content of B
  • n is the number of 0s
  • m is the number of 1s
  • Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Do they define the same process, namely a bag process?

TCP, RSP, RDP |- Bag = B0,0?

example specifying a bag3
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

B0,0 = r1(0). B1,0 + r1(1). B0,1

B0, m+1 = r1(0). B1,m+1 + r1(1). B0,m+2 + s2(1). B0,m

Bn+1,0 = r1(0). Bn+2,0 + r1(1). Bn+1,1 + s2(0). Bn,0

Bn+1, m+1 = r1(0). Bn+2,m+1 + r1(1). Bn+1,m+2

+ s2(0). Bn,m+1 + s2(1).Bn+1, m

1. Define new equations Dn,m using Bag such that

Bag is exactly D0,0

2. and prove that

TCP, RSP, RDP |- D0,0 = B0,0!

example specifying a bag4
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

B0,0 = r1(0). B1,0 + r1(1). B0,1

B0, m+1 = r1(0). B1,m+1 + r1(1). B0,m+2 + s2(1). B0,m

Bn+1,0 = r1(0). Bn+2,0 + r1(1). Bn+1,1 + s2(0). Bn,0

Bn+1, m+1 = r1(0). Bn+2,m+1 + r1(1). Bn+1,m+2

+ s2(0). Bn,m+1 + s2(1).Bn+1, m

n (n0)

  • Define new equations Dn,m using Bag
  • Dn,m = Bag || (s2(0).s2(0)…. s2(0).1 )
  • || (s2(1).s2(1).… s2(1).1 )
  • such that Bag is exactly D0,0
  • 2. and prove that TCP, RSP, RDP |- D0,0 = B0,0?

m (m0)

example specifying a bag5
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Observe that

D0,0 = Bag

Dn,m = Bag || s2(0) n1 || s2(1) m1 for n,m 0

  • Our goal is to show that Dn,m = Bn,m, for any n and any m
  • Namelly to show that
  • D0,0 = B0,0
  • D0,m+1 = B, 0, m+1 (only this case on the next slides)
  • Dn+1, 0 = Bn+1,0
  • Dn+1,m+1 = Bn+1,m+1

?

example specifying a bag6
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Observe that

D0,0 = Bag

Dn,m = Bag || s2(0) n1 || s2(1) m1 for n,m 0

II. D0,m+1 = Bag || (s2(1) m+11)

= Bag ||_ s2(1) m+11 + s2(1) m+11 ||_ Bag

= (r1(0). (Bag || s2(0) ) + r1(1). (Bag || s2(1))) ||_ (s2(1) m+11)

+ (s2(1) m+11) ||_ Bag

= (r1(0). (Bag || s2(0))) ||_ (s2(1) m+11)+

(r1(1). (Bag || s2(1))) ||_ (s2(1) m+11) + (s2(1) m+11) ||_ Bag

=

no communication

example specifying a bag7
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Observe that

D0,0 = Bag

Dn,m = Bag || s2(0) n1 || s2(1) m1 for n,m 0

II. D0,m+1 = Bag || s2(1) m+11

= Bag ||_ s2(1) m+11 + s2(1) m+11 ||_ Bag

= (r1(0). (Bag || s2(0) ) + r1(1). (Bag || s2(1))) ||_ (s2(1) m+11)

+ (s2(1) m+11) ||_ Bag

= (r1(0). (Bag || s2(0)))||_ s2(1) m+11+

(r1(1). (Bag || s2(1)))||_ s2(1) m+11 + s2(1) m+11 ||_ Bag

= r1(0). ((Bag || s2(0))|| s2(1) m+11)+

r1(1). ((Bag || s2(1)) || s2(1) m+11) + s2(1). (s2(1)m1|| Bag)

s2(1) m+11 ||_Bag =

s2(1).s2(1) m1 ||_Bag =s2(1). (s2(1)m1|| Bag)

example specifying a bag8
Example: Specifying a Bag

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Observe that

D0,0 = Bag

Dn,m = Bag || s2(0) n1 || s2(1) m+11 for n,m 0

II. D0,m+1 = Bag || s2(1) m+11

= Bag ||_ s2(1) m+11 + s2(1) m+11 ||_ Bag

= (r1(0). (Bag || s2(0) ) + r1(1). (Bag || s2(1))) ||_ (s2(1) m+11)

+ (s2(1) m+11) ||_ Bag

= (r1(0). (Bag || s2(0)))||_ s2(1) m+11+

(r1(1). (Bag || s2(1)))||_ s2(1) m+11 + s2(1) m+11 ||_ Bag

= r1(0). ((Bag || s2(0))|| s2(1) m+11)+

r1(1). ((Bag || s2(1)) || s2(1) m+11) + s2(1). (s2(1)m1|| Bag)

= r1(0). (D1,m+1)+ r1(1). (D0,m+2) + s2(1). (D0,m)

s2(1).1 || s2(1) m+11 =

s2(1) m+11

example specifying a bag conclusion
Example: Specifying a Bag - Conclusion

Bag = r1(0). (Bag || s2(0)) + r1(1). (Bag || s2(1))

Observe that

D0,0 = Bag

Dn,m = Bag || s2(0) n1 || s2(1) m+11

From RDP and RSP it follows that

I. D0,0 = B0,0

II. D0,m+1 = B0,m+1

III. Dn+1,0= Bn+1,0

IV. Dn+1,m+1 = Bn+1,m+1

Final conclusion: B0,0 = Bag

example buffer revision
Example: Buffer - Revision

Assume a set of data elements D = {0,1}

II. Two place buffer

BufTwo = r1(0).B0 + r1(1).B1

B0 = s2(0).BufTwo + r1(0).s2(0).B0 + r1(1).s2(0).B1

B1 = s2(1).BufTwo + r1(0).s2(1).B0 + r1(1).s2(1).B1

1

2

BufTwo

Process Algebra (2IF45)

example buffer
Example: Buffer

Assume a set of data elements D = {0,1}

III. Implementing a Two place buffer with Two One place buffers

1

3

2

BufOne13 = r1(0).s3(0).BufOne13 + r1(1).s3(1).BufOne13

BufOne32 = r3(0).s2(0).BufOne32 + r3(1).s2(1).BufOne32

communication: (r3(x), s3(x)) = c3(x), for x  D

blocking: H = {r3(x), s3(x) | x D}

BufTwoInOne = ∂H( BufOne13 || BufOne32 )

Process Algebra (2IF45)

example buftwoinone recursive specification
Example: BufTwoInOne Recursive Specification

III. Implementing a Two place buffer with Two One place buffers

BufOne13 = r1(0).s3(0).BufOne13 + r1(1).s3(1).BufOne13

BufOne32 = r3(0).s2(0).BufOne32 + r3(1).s2(1).BufOne32

  • communication: (r3(x), s3(x)) = c3(x), for x  D
  • blocking: H = {r3(x), s3(x) | x  D}

BufTwoInOne = r1(0).c3(0).X0 + r1(1).c3(1).X1

X0 = r1(0).s2(0).c3(0).X0 + r1(1).s2(0). c3(1). X1 + s2(0). BufTwoInOne

X1 = r1(0).s2(1).c3(0).X0 + r1(1).s2(1).c3(1). X1 + s2(1). BufTwoInOne

II. Back to our original specification: Two place buffer

BufTwo = r1(0).B0 + r1(1).B1

B0 = s2(0).BufTwo + r1(0).s2(0).B0 + r1(1).s2(0).B1

B1 = s2(0).BufTwo + r1(0).s2(0).B0 + r1(1).s2(0).B1

NOT YET!

system specification manipulation recap1
System specification manipulation (recap)

reduction

on specification

components’ specifications

reduction

on specification

the whole system specification

composition by axiom

  • simpler
  • smaller
  • in a particular form (basic)

reduction

on LTSs

the state space

SOS rules

Process Algebra (2IF45)

tcp language extended with hiding feature
TCP language extended with hiding feature
  • TCP(A, )
  • A is a pre-defied set of atomic actions
  • internal (silent) action ,   A
  •  is a pre-defined communication function
  • Signature: (constructs of the language)
  • constants 0,1
  • action prefix a._
  • non-deterministic choice _+_
  • sequential composition _  _
  • hiding operator I for I  A
  • Process behaviour specification described by process equations,
    • guarded recursive process variables and guarded process specifications
    • equivalence relation that treats  differently

parallel composition _ || _

communication composition. _ | _

encapsulation H(_), where H  A

towards equivalence relation s
Towards  equivalence relation(s)

Think about different ways to reduce these processes?

hiding

reducing

?

in50c

in1euro

in50c

!coffee

!coffee

!coffee

!coffee

hiding

reducing

?

50c

40c

!coffee

!coffee

!tea

!tea

Which reduced process preserves “the same moment of choice” as

in the original process with s?

Process Algebra (2IF45)

towards equivalence relation s1
Towards  equivalence relation(s)

reducing

hiding

?

insert

insert

40c

coffee

coffee

reducing

hiding

?

insert

insert

coin

card

coffee

coffee

Process Algebra (2IF45)

towards our equivalence relation conclusions
Towards our equivalence relation -Conclusions
  • Some internal steps cannot be removed.
  • Some internal steps can be removed. They are called inert!
  • Inert internal steps occur in following situations:

reduces to

a

a

Q

P

P

+

+

Q

P

+

towards our equivalence relation conclusions1
Towards our equivalence relation -Conclusions
  • Some internal steps cannot be removed.
  • Some internal steps can be removed. They are called inert!
  • Inert internal steps occur in following situations:
  • Relation to be established is:

reduces to

a

a

Q

P

P

+

+

Q

P

+

ad