Process Algebra Book: Chapter 8 - PowerPoint PPT Presentation

Audrey
process algebra book chapter 8 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Process Algebra Book: Chapter 8 PowerPoint Presentation
Download Presentation
Process Algebra Book: Chapter 8

play fullscreen
1 / 40
Download Presentation
Process Algebra Book: Chapter 8
224 Views
Download Presentation

Process Algebra Book: Chapter 8

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Process AlgebraBook: Chapter 8

  2. Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the models have different executions? The Main Issue

  3. What is process algebra? • An abstract description for nondeterministic and concurrent systems. • Focuses on the transitions observed rather than on the states reached. • Main correctness criterion: conformance between two models. • Uses: system refinement, model checking, testing.

  4. Different models may have the same set of executions! d a a e e a d b c b c a-insert coin, b-press pepsi, c-press pepsi-light d-obtain pepsi, e-obtain pepsi-light

  5. Actions: Act={a,b,c,d}{}.Agents: E, E’, F, F1, F2, G1, G2, … F E d a a e e a d F1 F2 E’ b c b c G1 G2 Agent E may evolve into agent E’. Agent F may evolve into F1 or F2.

  6. F E   a a  a  F1 F2 E’ b c b c G1 G2 E—aE’, F—aF1, F—aF2, F1—aG1, F2—aG2. G1—F, G1—F. Events.

  7. F E  a a  a  F1 F2 E’ b c b c G1 G2 Actions and co-actions  For each action a, except for , there is a co-action a. a and a interact (a input, a output).The coaction of a is a.

  8. Notation E a.(b+c)(actually, a.((b.0)+(c.0)) E—aFF—bGF—cH 0 – deadlock/termination. a F b c G H a.E – execute a, then continue according to E.E+F – execute according to E or to F.E||F – execute E and F in parallel.

  9. Conventions • “.” has higher priority than “+”. • “.0” or “.(0||0||…||0)” is omitted.

  10. CCS - calculus of concurrent systems [Milner]. Syntax • a,b,c, … actions, A, B, C - agents. • a,b,c, coactions of a,b,c. t-silent action. • nil - terminate. • a.E - execute a, then behave like E. • + - nondeterministic choice. • || - parallel composition. • \L - restriction: cannot use letters of L. • [f] - apply mapping function f between between letters.

  11. Semantics (proof rule and axioms).Structural Operational Semantics SOS • a.p –a p • p—ap’ |-- p+q –a p’ • q—aq’ |-- p+q –a q’ • p—ap’ |-- p|q –a p’|q • q—aq’ |-- p|q –a p|q’ • p—ap’, q—aq’ |-- p|q –t p’|q’ • p—ap’ , a R |-- p\L –a p’\R • p—ap’ |-- p[m]—m(a)p’[m]

  12. Action Prefixing a.E—aE (Axiom) Thus, a.(b.(c||c)+d)—a(b.(c||c)+d).

  13. Choice E—aE’F—aF’ (E+F)—aE’ (E+F)—aF’ b.(c||c)—b(c||c). Thus,(b.(c||c)+e)—b(c||c). If E—aE’ and F—aF’, then E+F has a nondeterministic choice.

  14. Concurrent Composition E—aE’ F—aF’ E||F—aE’||F E||F—aE||F’ E—aE’, F—aF’ ———————— E||F—E’||F’ c—c0, c—c0, c||c—0||0, c||c—c0||c, c||c—cc||0.

  15. Restriction E—aE’, a, aR ————————— E\R –aE’\R In this case: allows only internal interaction of c. c||c—0||0 c||c—c0||c c||c—cc||0 (c||c) \ {c}—(0||0) \{c}

  16. Relabeling E—aE’ ———— E[m] –m(a)E’[m] No axioms/rules for agent 0.

  17. Examples a.E||b.F a b E||b.F a.E||F a b E||F

  18. Derivations a.(b.(c||c)+d) a b.(c||c)+d b d (c||c) 0 c c  (0||c) (c||0) c c (0||0)

  19. Modeling binary variable C0=is_0? . C0 + set_1 . C1 + set_0 . C0 C1=is_1? . C1 + set_0 . C0 + set_1 . C1 set_1 C0 C1 set_0 is_0? set_1 is_1? set_0

  20. F E  a a  a  F1 F2 E’ b c b c G1 G2 Equational Definition E=a.(b..E+c..E) E—aE’, A=E F=a.b..F+a.c..F A—aE’ 

  21. Trace equivalence:Systems have same finite sequences. E F a a a c c b b b E=a.(b+c) F=(a.b)+a.(b+c) Same traces

  22. Failures: comparing also what wecannot do after a finite sequence. E F a a a c b c b b Failure of agent E: (σ, X), where after executing σ from E, none of the events in X is enabled.Agent F has failure (a, {c}), which is not a failure of E.

  23. Simulation equivalence F • Relation over set of agents S. RSS. • E R F • If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’. E a a a b b b b c d c d

  24. Simulation equivalence F • Relation over set of agents S. RSS. • E R F • If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’. E a a a b b b b c d c d

  25. Here, simulation works only in one direction. No equivalence! want to establish F • Relation over set of agents S. RSS. • E R F • If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’. E a a a symmetrically b b b b necessarily c d c d problem!!!

  26. Simulation equivalentbut not failure equivalent Left agent a.b+a has a failure (a,{b}). F E a a a b b

  27. Bisimulation: same relation simulates in both directions Not in this case: different simulation relations. F E a a a b b

  28. Hierarchy of equivalences Bisimulation Simulation Failure Trace

  29. Example: b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c A=a.((b.nil)+(c.d.A)) B=(a.(b.nil))+(a.c.d.B) d t3

  30. Bisimulation between G1 and G2 • Let N= N1 U N2 • A relation R : N1 x N2 is a bisumulation ifIf (m,n) in R then1. If m—am’ then $n’:n—an’ and (m’,n’) in R2. If n—an’ then $m’:m—am’ and (m’,n’) in R. • Other simulation relations are possible, I.e., m=a=> m’ when m—t…—a... —tm’.

  31. Algorithm for bisimulation: • Partition N into blocks B1B2…Bn=N. • Initially: one block, containing all of N. • Repeat until no change: Choose a block Bi and a letter a. If some of the transitions of Bi move to some block Bj and some not, partition Bi accordingly. • At the end: Structures bisimilar if initial states of two structures are in same blocks.

  32. Correctness of algorithm • Invariant: if (m,n) in R then m and n remain in the same block throughout the algorithm. • Termination: can split only a finite number of times.

  33. b a s1 s2 c s0 d s3 Example: b t1 t2 a t0 a t4 c d t3 {s0,s1,s2,s3,t0,t1,t2,t3,t4}

  34. Example: b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 {s0,s1,s2,s3,t0,t1,t2,t3,t4} split on a. {s0,t0},{s1,s2,s3,t1,t2,t3,t4}

  35. b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 Example: {s0,t0},{s1,s2,s3,t1,t2,t3,t4} split on b {s0,t0},{s1,t1},{s0,s2,s3,t2,t3,t4}

  36. b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 Example: {s0,t0},{s1,t1},{s2,s3,t2,t3,t4} split on c {s0,t0},{s1},{t1},{s2,s3,t2,t3,t4}

  37. b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 Example: {s0,t0},{s1},{t1},{s2,s3,t2,t3,t4} split on c {s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3}

  38. b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 Example: {s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d {s0,t0},{s1},{t1},{t4},{s3, t3},{s2,t2}

  39. b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 Example: {s0,t0},{s1},{t1},{t4},{s2,t2},{s3,t3} split on a {s0},{t0},{s1},{t1},{t4},{s3, t3},{s2,t2}

  40. Example: b a s1 s2 c s0 b d s3 t1 t2 a t0 a t4 c d t3 {s0},{t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d {s0},{t0},{s1},{t1},{t4},{s3},{t3},{s2,t2}