Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Algebra Calculus of Communicating Systems Daniel Choi Provable Software Lab. KAIST.

Similar presentations


Presentation on theme: "Process Algebra Calculus of Communicating Systems Daniel Choi Provable Software Lab. KAIST."— Presentation transcript:

1 Process Algebra Calculus of Communicating Systems Daniel Choi Provable Software Lab. KAIST

2 Content Introduction Calculus of Communicating Systems Equivalence for CCS Discussions 2016-05-272/59Provable Software Laboratory Seminar

3 Why are we going to study Process Algebra? Need –Mathematical models for concurrent communicating processes? How –How can we define a mathematical models for concurrent communicating process? 2016-05-273/59Provable Software Laboratory Seminar

4 Why are we going to study Process Algebra? Need –Mathematical models for concurrent communicating processes? How –How can we define a mathematical models for concurrent communicating process? 2016-05-274/59Provable Software Laboratory Seminar

5 The reason why we study Process Algebra 2016-05-27Provable Software Laboratory Seminar5 /59 Need –Mathematical models for concurrent communicating processes? –Process Algebra, Petri Net, etc. How –How can we define a mathematical models for concurrent communicating process? –By defining structured operational semantics

6 Families of Algebraic Approaches Milner’s Calculus of Communicating Systems (CCS) Hoare’s theory of Communicating Sequential Processes The Algebra of Communicating Processes (ACP) of Bergstra & Klop 2016-05-276 /59Provable Software Laboratory Seminar

7 Content Introduction –Why are we going to study Process Algebra? Calculus of Communicating Systems –Definitions –Operational Semantic of CCS Terms –Examples Equivalence for CCS Discussions 2016-05-277 /59Provable Software Laboratory Seminar

8 Definitions Theoretical definitions Assume a non-empty set S of states, together with a finite, non-empty set of transition labels A and a finite set of predicate symbols Signature –Consist of a finite set of function symbols f, g, … where each function symbol f has an arity ar(f), being its number of arguments. –Symbol of arity zero : constant (a, b, c, …) –Countably infinite set of variables (x, y, z, …) Finite non-empty set A of (atomic) actions –Each atomic action a is a constant that can execute itself, after which it terminates successfully. Term –Set T(∑) of open terms, s, t, u, … over ∑ is defined as the least set satisfying Each variable is T(∑); If f ∈ ∑ and t 1, …, t ar(f) ∈ T(∑), then f(t 1, …, t ar(f) ) ∈ T(∑) –A term is closed if it does not contain variables. The set of closed terms is denoted by T(∑) Labeled transition system –A transition is a triple (s, a, s’) with a ∈ A, or a pair (s, P) with P a predicate, where s, s’ ∈ S. A labeled transition system (LTS) is a possibly infinite set of transitions. An LTS is finitely branching if each of its states has only finitely many outgoing transitions –The states of an LTS are always the closed terms over a signature ∑. –In view of the syntactic structure of closed terms over a signature, such transitions can be derived by means of inductive proof rules, where the validity of a number of transitions (the premises) may imply the validity of some other transition (the conclusion) Process graph –A Process (graph) p is an LTS in which one state s is elected to be the root. If the LTS contains a transition s – a -> s’, then p – a -> p’ where p’ has root state s’. Moreover, if the LTS contains a transition sP, then pP. 2016-05-278 /59Provable Software Laboratory Seminar

9 Definitions Theoretical definitions Assume a non-empty set S of states, together with a finite, non-empty set of transition labels A and a finite set of predicate symbols Signature –Consist of a finite set of function symbols f, g, … where each function symbol f has an arity ar(f), being its number of arguments. –Symbol of arity zero : constant (a, b, c, …) –Countably infinite set of variables (x, y, z, …) Finite non-empty set A of (atomic) actions –Each atomic action a is a constant that can execute itself, after which it terminates succefully. Term –Set T(∑) of open terms, s, t, u, … over ∑ is defined as the least set satisfying Each variable is T(∑); If f ∈ ∑ and t 1, …, t ar(f) ∈ T(∑), then f(t 1, …, t ar(f) ) ∈ T(∑) –A term is closed if it does not contain variables. The set of closed terms is denoted by T(∑) Labeled transition system –A transition is a triple (s, a, s’) with a ∈ A, or a pair (s, P) with P a predicate, where s, s’ ∈ S. A labeled transition system (LTS) is a possibly infinite set of transitions. An LTS is finitely branching if each of its states has only finitely many outgoing transitions –The states of an LTS are always the closed terms over a signature ∑. –In view of the syntactic structure of closed terms over a signature, such transitions can be derived by means of inductive proof rules, where the validity of a number of transitions (the premises) may imply the validity of some other transition (the conclusion) Process graph –A Process (graph) p is an LTS in which one state s is elected to be the root. If the LTS contains a transition s – a -> s’, then p – a -> p’ where p’ has root state s’. Moreover, if the LTS contains a transition sP, then pP. 2016-05-279 /59Provable Software Laboratory Seminar

10 Definitions Definitions in CCS Actions –Atomic –uninterruptible execution steps (with some other internal computation steps(τ)) –Representing potential interactions with its environment (inputs/outputs on ports) 2016-05-27Provable Software Laboratory Seminar10 /59

11 Definitions Operator of CCS nil –terminated process that has finished execution a.p –Capable first of a and then behaves like p + –Choice construct –p 1 + p 2 offers the potential of behaving like either p 1 or p 2, depending on the interactions offered by the environment | –parallel composition –p 1 | p 2 offers interleaves the execution of p 1 and p 2 –Permitting complementary actions of p 1 and p 2 to synchronize (τ) Restriction operator –Permits actions to be localized within a system [f] –Actions in a process to be renamed –P[f] behaves exactly like p except that f is applied to each action that p wishes to engage in Defining equation –C represents a valid system 2016-05-2711 /59Provable Software Laboratory Seminar

12 Definitions Labeled transition Systems Labeled transition system (LTS) –Triple Q : a set of states A : a set of actions → : transition relation → ⊆ Q ⅹ A ⅹ Q –B = ((a.(b.B + c.0) + b.0)|a’.0 )\a 2016-05-2712 /59Provable Software Laboratory Seminar B ((b.B + c.0)|0)\a (0|a’.0)\a (0|0)\a(0|0)\a (B|0)\a … τ b c b Temporal Structure

13 Operation Semantics of CCS Terms 2016-05-2713 /59Provable Software Laboratory Seminar Referenced from lecture note of Prof. Kim

14 Examples Lovers Assume that there is a man and a woman in the society Man and Woman can manifest their emotion independently (concurrently) M = ‘man.(acc.M‘+ rej.M) W = man.(‘acc.W’ + ‘rej.W) M’ = lov.M’ + ‘lov.M’ + ‘neg_man.M W’ = lov.W’ + ‘lov.W’ + neg_man.W Does L = (M|W) is a model of happy lovers? 2016-05-2714 /59Provable Software Laboratory Seminar

15 Examples LTS of Unhappy lovers 2016-05-2715 /59Provable Software Laboratory Seminar M|W (acc.M‘+ rej.M) |WM|(’acc.W’ + ‘rej.W) ‘man man (acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) M’|WM|W’M’|(’acc.W’ + ‘rej.W) acc ‘rej ‘acc acc ‘acc rej ‘rej rej (acc.M‘+ rej.M)|W’ M‘|W’ τ τ τ man ‘man ‘acc acc τ,lov,’lov τ neg_man ‘neg_man lov,’lov ‘neg_man neg_man

16 Examples LTS of Unhappy lovers 2016-05-2716 /59Provable Software Laboratory Seminar M|W (acc.M‘+ rej.M) |WM|(’acc.W’ + ‘rej.W) ‘man man (acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) M’|WM|W’M’|(’acc.W’ + ‘rej.W) acc ‘rej ‘acc acc ‘acc rej ‘rej rej (acc.M‘+ rej.M)|W’ M‘|W’ τ τ τ man ‘man ‘acc acc τ,lov,’lov τ neg_man ‘neg_man lov,’lov ‘neg_man neg_man One sided Love

17 Examples LTS of Happy lovers 2016-05-2717 /59Provable Software Laboratory Seminar HL = (M|W) \{man, lov, acc, rej} M|W (acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) M‘|W’ τ τ τ

18 Examples LTS of Happy lovers 2016-05-2718 /59Provable Software Laboratory Seminar HL = (M|W) \{man, lov, acc, rej} M|W (acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) M‘|W’ τ τ τ proc HL = (M|W)\{manifest,love,neg_manifest,accept,reject} proc UHL = (M|W) proc M = 'manifest.(accept.M1 + reject.M) proc W = manifest.('accept.W1 + 'reject.W) proc M1 = love.M1 + 'love.M1 + 'neg_manifest.M proc W1 = 'love.W1 + love.W1 + neg_manifest.W

19 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2719 /59Provable Software Laboratory Seminar (M|W)\{man, lov, acc, rej} -τ->((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej}

20 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2720 /59Provable Software Laboratory Seminar (M|W)\{man, lov, acc, rej} -τ->((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej} Res

21 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2721 /59Provable Software Laboratory Seminar (M|W)\{man, lov, acc, rej} -τ->((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej} ‘man.(acc.M‘+ rej.M) | man.(‘acc.W’ + ‘rej.W) -τ->(acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) Res

22 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2722 /59Provable Software Laboratory Seminar (M|W)\{man, lov, acc, rej} -τ->((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej} ‘man.(acc.M‘+ rej.M) | man.(‘acc.W’ + ‘rej.W) -τ->(acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) Par τ Res

23 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2723 /59Provable Software Laboratory Seminar (M|W)\{man, lov, acc, rej} -τ->((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej} ‘man.(acc.M‘+ rej.M) | man.(‘acc.W’ + ‘rej.W) -τ->(acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W) ‘man.(acc.M‘+ rej.M) – ‘man-> (acc.M‘+ rej.M)man.(‘acc.W’ + ‘rej.W) – man-> (‘acc.W’ + ‘rej.W) Act Par τ Res

24 Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} 2016-05-2724 /59Provable Software Laboratory Seminar ((acc.M‘+ rej.M)|(’acc.W’ + ‘rej.W)) \{man, lov, acc, rej} -τ-> (M’|W’) \{man, lov, acc, rej} (acc.M‘+ rej.M) | (‘acc.W’ + ‘rej.W) -τ-> (M’|W’) (acc.M‘+ rej.M) - acc-> M’(‘acc.W’ + ‘rej.W) – ‘acc -> W’ acc.M‘ – acc -> M’ ‘acc.W‘ – ‘acc -> W’ Act Choice L Par τ Res

25 Content Introduction –Why are we going to study Process Algebra? Calculus of Communicating Systems –Definitions –Operational Semantic of CCS Terms –Examples Equivalence for CCS –Trace Equivalence –Strong Bisimulation Equivalence –Weak Bisimulation Equivalence Discussions 2016-05-2725 /59Provable Software Laboratory Seminar

26 Trace Equivalence Definition Language Equivalence –Two machines are equivalent if they accept the same sequences of symbol Can we directly apply language equivalence to rooted LTS? No –Identify every state in a rooted LTS as being accepting Definition Let be a labeled transition system –Let A * consists of the set of finite sequences of elements of A –Let s = a 1 … a n ∈ A * be a sequence of actions. Then q – s-> q’ if there are states q 0,..., q n such that q = q 0, q i –a i -> q i+1 and q’ = q n –s is a strong trace of q if there exists q’ such that q – s -> q’. We use S(q) to represent the set of all strong traces of q –p ≈ s q exactly when S(p) = S(q) (strong traces do not distinguish between internal and external actions) Can we use trace equivalence to decide whether two system are behavioral congruent? No 2016-05-2726 /59Provable Software Laboratory Seminar

27 Trace Equivalence Definition Language Equivalence –Two machines are equivalent if they accept the same sequences of symbol Can we directly apply language equivalence to rooted LTS? No –Identify every state in a rooted LTS as being accepting Definition Let be a labeled transition system –Let A * consists of the set of finite sequences of elements of A –Let s = a 1 … a n ∈ A * be a sequence of actions. Then q – s-> q’ if there are states q 0,..., q n such that q = q 0, q i –a i -> q i+1 and q’ = q n –s is a strong trace of q if there exists q’ such that q – s -> q’. We use S(q) to represent the set of all strong traces of q –p ≈ s q exactly when S(p) = S(q) (strong traces do not distinguish between internal and external actions) Can we use trace equivalence to decide whether two system are behavioral congruent? No 2016-05-2727 /59Provable Software Laboratory Seminar

28 Trace Equivalence Definition Language Equivalence –Two machines are equivalent if they accept the same sequences of symbol Can we directly apply language equivalence to rooted LTS? No –Identify every state in a rooted LTS as being accepting Definition Let be a labeled transition system –Let A * consists of the set of finite sequences of elements of A –Let s = a 1 … a n ∈ A * be a sequence of actions. Then q – s-> q’ if there are states q 0,..., q n such that q = q 0, q i –a i -> q i+1 and q’ = q n –s is a strong trace of q if there exists q’ such that q – s -> q’. We use S(q) to represent the smallest set of all strong traces of q (prefix-closed) –p ≈ s q exactly when S(p) = S(q) (strong traces do not distinguish between internal and external actions) Can we use trace equivalence to decide whether two system are behavioral congruent? No 2016-05-2728 /59Provable Software Laboratory Seminar

29 Trace Equivalence Definition Language Equivalence –Two machines are equivalent if they accept the same sequences of symbol Can we directly apply language equivalence to rooted LTS? No –Identify every state in a rooted LTS as being accepting Definition Let be a labeled transition system –Let A * consists of the set of finite sequences of elements of A –Let s = a 1 … a n ∈ A * be a sequence of actions. Then q – s-> q’ if there are states q 0,..., q n such that q = q 0, q i –a i -> q i+1 and q’ = q n –s is a strong trace of q if there exists q’ such that q – s -> q’. We use S(q) to represent the smallest set of all strong traces of q (prefix-closed) –p ≈ s q exactly when S(p) = S(q) (strong traces do not distinguish between internal and external actions) Can we use trace equivalence to decide whether two system are behavioral congruent? No 2016-05-2729 /59Provable Software Laboratory Seminar

30 Example Trace Equivalence 2016-05-2730 /59Provable Software Laboratory Seminar q0q0 q1q1 q1’q1’ q2q2 q3q3 p0p0 p2p2 p3p3 p1p1 P = a.(b.nil + c.nil) S(P) = {ε,a,ab,ac} a cb a cb a Q = a.b.nil + a.c.nil S(Q) = {ε,a,ab,ac}

31 Example Trace Equivalence 2016-05-2731 /59Provable Software Laboratory Seminar q0q0 q1q1 q1’q1’ q2q2 q3q3 p0p0 p2p2 p3p3 p1p1 P = a.(b.nil + c.nil) S(P) = {ε,a,ab,ac} a cb a cb a Q = a.b.nil + a.c.nil S(Q) = {ε,a,ab,ac} S(P) = S(Q)

32 Example Trace Equivalence 2016-05-2732 /59Provable Software Laboratory Seminar q0q0 q1q1 q1’q1’ q2q2 q3q3 p0p0 p2p2 p3p3 p1p1 P = a.(b.nil + c.nil) S(P) = {ε,a,ab,ac} a cb a cb a Q = a.b.nil + a.c.nil S(Q) = {ε,a,ab,ac} Trace Equivalent S(P) = S(Q)

33 Example Trace Equivalence 2016-05-2733 /59Provable Software Laboratory Seminar q0q0 q1q1 q1’q1’ q2q2 q3q3 p0p0 p2p2 p3p3 p1p1 P = a.(b.nil + c.nil) S(P) = {ε,a,ab,ac} a cb a cb a Q = a.b.nil + a.c.nil S(Q) = {ε,a,ab,ac} Trace Equivalent S(P) = S(Q) It is not behavioral congruent

34 Strong Bisimulation Equivalence Definition Execution sequences for equivalent systems ought to pass through equivalent states Definition Let be an LTS. A relation R ⊆ Q x Q is a bisimulation if whenever ∈ R, then the following conditions hold for any a, p’ and q’ –If p –a-> p’ then q – a -> q’ for some q’ such that ∈ R –If q –a-> q’ then p – a -> p’ for some p’ such that ∈ R Definition System p and q are bisimulation equivalent, or bisimilar, if there exists a bisimulation R containing. We write p ~ q whenever p and q are bisimilar 2016-05-2734 /59Provable Software Laboratory Seminar

35 Strong Bisimulation Equivalence How to find out P and Q are bisimular? Strong Simulation –Let be an LTS, and let S be a binary relation over Q. Then S is called a strong simulation over if, whenever pSq, if p – a -> p’ then there exists q’ ∈ Q such that q – a -> q’ and p’ S q’ q strongly simulates p if there exists a strong simulation S such that pSq 2016-05-2735 /59Provable Software Laboratory Seminar

36 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2736 /59Provable Software Laboratory Seminar q0q0 q1q1 q1’q1’ q2q2 q3q3 p0p0 p2p2 p3p3 p1p1 a cb a cb a Suppose, (p 0, q 0 ) ∈ S

37 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2737 /59Provable Software Laboratory Seminar Suppose p 0 strongly simulates q 0, (q 0, p 0 ) ∈ S or q 0 Sp 0 q 1 p 1 q 0 S p 0 a a

38 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2738 /59Provable Software Laboratory Seminar Suppose p 0 strongly simulates q 0, (q 0, p 0 ) ∈ S or q 0 Sp 0 q 1 p 1 q 0 S p 0 a a q 1 S p 1 q 1 ' p 1 q 0 S p 0 a a q 1 ' S p 1

39 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2739 /59Provable Software Laboratory Seminar Suppose p 0 strongly simulates q 0, (q 0, p 0 ) ∈ S or q 0 Sp 0 q 1 p 1 q 0 S p 0 a a q 1 S p 1 q 1 ' p 1 q 0 S p 0 a a q 1 ' S p 1 q 2 p 2 q 1 S p 1 b b q 2 S p 2

40 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2740 /59Provable Software Laboratory Seminar Suppose p 0 strongly simulates q 0, (q 0, p 0 ) ∈ S or q 0 Sp 0 q 1 p 1 q 0 S p 0 a a q 1 S p 1 q 1 ' p 1 q 0 S p 0 a a q 1 ' S p 1 q 2 p 2 q 1 S p 1 b b q 2 S p 2 q 3 p 3 q 1 ' S p 1 c c q 3 S p 3

41 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2741 /59Provable Software Laboratory Seminar Suppose p 0 strongly simulates q 0, (q 0, p 0 ) ∈ S or q 0 Sp 0 q 1 p 1 q 0 S p 0 a a q 1 S p 1 q 1 ' p 1 q 0 S p 0 a a q 1 ' S p 1 q 2 p 2 q 1 S p 1 b b q 2 S p 2 q 3 p 3 q 1 ' S p 1 c c q 3 S p 3 Therefore S = {(q 0, p 0 ), (q 1, p 1 ), (q 1 ’, p 1 ), (q 2, p 2 ), (q 3, p 3 )}

42 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2742 /59Provable Software Laboratory Seminar Suppose q 0 strongly simulates p 0, (p 0, q 0 ) ∈ S or p 0 Sq 0 p 1 q 1 p 0 S q 0 a a p 1 S q 1 p 2 q 2 p 1 S q 1 b b q 1 ' S p 1 p3p3 p 1 S q 1 c

43 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2743 /59Provable Software Laboratory Seminar Suppose q 0 strongly simulates p 0, (p 0, q 0 ) ∈ S or p 0 Sq 0 p 1 q 1 ’ p 0 S q 0 a a p 1 S q 1 ’ p 3 q 3 p 1 S q 1 ’ c c p 3 S q 3 p2p2 p 1 S q 1 ’ b

44 Strong Bisimulation Equivalence How to find out P and Q are bisimular? Strong Simulation –Let be an LTS, and let S be a binary relation over Q. Then S is called a strong simulation over if, whenever pSq, if p – a -> p’ then there exists q’ ∈ Q such that q – a -> q’ and p’ S q’ q strongly simulates p if there exists a strong simulation S such that pSq S -1 is the set of pairs (y, x) such that (x, y) ∈ S Strong bisimulation –A binary relation S over Q is said to be a strong bisimulation over the LTS if both S and its converse are simulations 2016-05-2744 /59Provable Software Laboratory Seminar

45 Strong Bisimulation Equivalence How to find out P and Q are bisimular? Strong Simulation –Let be an LTS, and let S be a binary relation over Q. Then S is called a strong simulation over if, whenever pSq, if p – a -> p’ then there exists q’ ∈ Q such that q – a -> q’ and p’ S q’ q strongly simulates p if there exists a strong simulation S such that pSq S -1 is the set of pairs (y, x) such that (x, y) ∈ S Strong bisimulation –A binary relation S over Q is said to be a strong bisimulation over the LTS if both S and its converse are simulations 2016-05-2745 /59Provable Software Laboratory Seminar

46 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2746 /59Provable Software Laboratory Seminar p0p0 p2p2 p1p1 a b S = {(p 0, q 0 ), (p 1, q 1 ), (p 2, q 1 ), (p 0, q 2 )} a a a b q0q0 q1q1 q2q2 a a a b S’ = {(q 0, p 0 ), (q 1, p 1 ), (q 1, p 2 ), (q 2, p 0 )}

47 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2747 /59Provable Software Laboratory Seminar p0p0 p2p2 p1p1 a b S = {(p 0, q 0 ), (p 1, q 1 ), (p 2, q 1 ), (p 0, q 2 )} a a a b q0q0 q1q1 q2q2 a a a b S’ = {(q 0, p 0 ), (q 1, p 1 ), (q 1, p 2 ), (q 2, p 0 )} Strong Bisimulation

48 Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example 2016-05-2748 /59Provable Software Laboratory Seminar p0p0 p2p2 p1p1 P strongly simulates Q S = {(q 0, p 0 ), (q 1, p 2 ), (q 2, p 3 )} a a b q0q0 q1q1 q2q2 a b Q strongly simulates P S’ = {(p 0, q 0 ), (p 1, q 1 ), (p 2, q 1 ), (p 3, q 2 )} p3p3 It is not Strong Bisimulation

49 Strong Bisimulation Equivalence How to find out P and Q are bisimular? Strong Simulation –Let be an LTS, and let S be a binary relation over Q. Then S is called a strong simulation over if, whenever pSq, if p – a -> p’ then there exists q’ ∈ Q such that q – a -> q’ and p’ S q’ q strongly simulates p if there exists a strong simulation S such that pSq S -1 is the set of pairs (y, x) such that (x, y) ∈ S Strong bisimulation (P ~ Q) –A binary relation S over Q is said to be a strong bisimulation over the LTS if both S and its converse are simulations –Strong bisimulation equivalence : reflexive, symmetric, transitive –P ~ Q implies P ≈ s Q What about internal computation τ ? –Weak bisimulation 2016-05-2749 /59Provable Software Laboratory Seminar

50 Strong Bisimulation Equivalence How to find out P and Q are bisimular? Strong Simulation –Let be an LTS, and let S be a binary relation over Q. Then S is called a strong simulation over if, whenever pSq, if p – a -> p’ then there exists q’ ∈ Q such that q – a -> q’ and p’ S q’ q strongly simulates p if there exists a strong simulation S such that pSq S -1 is the set of pairs (y, x) such that (x, y) ∈ S Strong bisimulation (P ~ Q) –A binary relation S over Q is said to be a strong bisimulation over the LTS if both S and its converse are simulations –Strong bisimulation equivalence : reflexive, symmetric, transitive –P ~ Q implies P ≈ s Q What about internal computation τ ? –Weak bisimulation 2016-05-2750 /59Provable Software Laboratory Seminar

51 Weak Bisimulation Equivalence Definition How are we going to treat internal computation? –We cannot ignore τ. Definition S is a weak simulation (observational simulation) if and only if, whenever PSQ, if P → P’ then there exists Q’ ∈ P such that Q ⇒ Q’ and P’SQ’ if P -λ-> then there exists Q’ ∈ P such that Q = λ => Q’ and P’SQ’ → : unobservable reactions (like τ) λ : observable actions ⇒ : zero or more reactions = λ => : observation – λ -> accompanied (before and after) by any number of reactions = λ =>  →* – λ -> →* = τ => : = at least one reaction 2016-05-2751 /59Provable Software Laboratory Seminar

52 Weak Bisimulation Equivalence Definition How are we going to treat internal computation? –We cannot ignore τ. Definition S is a weak simulation (observational simulation) if and only if, whenever PSQ, if P → P’ then there exists Q’ ∈ P such that Q ⇒ Q’ and P’SQ’ if P -λ-> then there exists Q’ ∈ P such that Q = λ => Q’ and P’SQ’ → : unobservable reactions (like τ) λ : observable actions ⇒ : zero or more reactions = λ => : observation – λ -> accompanied (before and after) by any number of reactions –= λ =>  →* – λ -> →* = τ => : = at least one reaction 2016-05-2752 /59Provable Software Laboratory Seminar

53 Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? Similar to strong bisimulation Definition A binary relation S over P is said to be a weak bisimulation if both S and its converse are weak simulations. We say that P and Q are weakly bisimilar, weakly equivalent, or observation equivalent, written P ≈ Q, if there exists a weak bisimulation S such that P S Q q weakly simulates p if there exists a strong simulation S such that pSq 2016-05-2753 /59Provable Software Laboratory Seminar

54 Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example 2016-05-2754 /59Provable Software Laboratory Seminar A = a.A’B = b.B’ A’ = ‘b.AB’ = ‘c.B p 0 = (A|B)\{b} p 1 = (A’|B)\{b} p 2 = (A|B’)\{b} p 3 = (A’|B’)\{b} p0p0 p1p1 p2p2 a a ‘c p3p3 τ E = a.E’ E’ = a.E’’ + ‘c.E E’’ = ‘c.E q 0 = E q 1 = E’ q 2 = E’’ q0q0 q0q0 q1q1 q1q1 a ‘c q2q2 q2q2 a

55 Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example 2016-05-2755 /59Provable Software Laboratory Seminar A = a.A’B = b.B’ A’ = ‘b.AB’ = ‘c.B p 0 = (A|B)\{b} p 1 = (A’|B)\{b} p 2 = (A|B’)\{b} p 3 = (A’|B’)\{b} p0p0 p1p1 p2p2 a a ‘c p3p3 τ E = a.E’ E’ = a.E’’ + ‘c.E E’’ = ‘c.E q 0 = E q 1 = E’ q 2 = E’’ q0q0 q0q0 q1q1 q1q1 a ‘c q2q2 q2q2 a S = {(p 0,q 0 ), (p 1,q 1 ), (p 2,q 1 ), (p 3,q 2 )}

56 Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example 2016-05-2756 /59Provable Software Laboratory Seminar A = a.A’B = b.B’ A’ = ‘b.AB’ = ‘c.B p 0 = (A|B)\{b} p 1 = (A’|B)\{b} p 2 = (A|B’)\{b} p 3 = (A’|B’)\{b} p0p0 p1p1 p2p2 a a ‘c p3p3 τ E = a.E’ E’ = a.E’’ + ‘c.E E’’ = ‘c.E q 0 = E q 1 = E’ q 2 = E’’ q0q0 q0q0 q1q1 q1q1 a ‘c q2q2 q2q2 a S = {(p 0,q 0 ), (p 1,q 1 ), (p 2,q 1 ), (p 3,q 2 )} Observational Bisimulation

57 Content Introduction –Why are we going to study Process Algebra? Calculus of Communicating Systems –Definitions –Operational Semantic of CCS Terms –Examples Equivalence for CCS –Trace Equivalence –Strong Bisimulation Equivalence –Weak Bisimulation Equivalence Discussions 2016-05-2757 /59Provable Software Laboratory Seminar

58 Discussions 2016-05-27Provable Software Laboratory Seminar58 /59

59 Reference Communicating and mobile systems: the pi-calculus by Robin Milner, Cambridge,1999 Communication and Concurrency by Robin Milner, Prentice Hall, 1989 Fundamentals of software engineering by C. Chezzi, M. Jazayeri, D. Mandrioli, Prentice Hall, 2003 Lecture Notes of Professor Bae, http://se.kaist.ac.kr/~course/DrBae/cs550_2006/http://se.kaist.ac.kr/~course/DrBae/cs550_2006/ Lecture Notes of Professor Kim, http://cs.kaist.ac.kr/~moonzoo/cs750bhttp://cs.kaist.ac.kr/~moonzoo/cs750b Notes on the methodology of CCS and CSP by R.J. van Glabbeek, TCS 177(2), pp. 329-349. Originally appeared as Report CS-R8624, CWI, Amsterdam, 1986 Operational and algebraic semantics of concurrent processes by R. Milner, in J. van Leeuwen, editor: Handbook of Theoretical Computer Science, Chapter 19, Elsevier Science Publishers B.V. (North-Holland), pp. 1201-1242. (1990) Process Algebra by R. Cleaveland and S. Smolka, in J.G. Webster, editor, Encyclopedia of Electrical Engineering, John Wiley & Sons, 1999 (Chap. 1 ~ 3) 2016-05-27Provable Software Laboratory Seminar59 /59


Download ppt "Process Algebra Calculus of Communicating Systems Daniel Choi Provable Software Lab. KAIST."

Similar presentations


Ads by Google