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

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Completeness and Expressiveness
Process Algebra Book: Chapter 8. The Main Issue Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the.
5.1 Real Vector Spaces.
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
1.6 Behavioral Equivalence. 2 Two very important concepts in the study and analysis of programs –Equivalence between programs –Congruence between statements.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Event structures Mauro Piccolo. Interleaving Models Trace Languages:  computation described through a non-deterministic choice between all sequential.
Programming Paradigms for Concurrency Lecture 11 Part III – Message Passing Concurrency TexPoint fonts used in EMF. Read the TexPoint manual before you.
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 11: An introduction to CSP.
Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Department of mathematics and computer science 1 of 21 Rob van Glabbeek (Sydney) Marc Voorhoeve (TUE) Liveness, Fairness and Impossible Futures.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Chair of Software Engineering 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Relations Chapter 9.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Introduction to Theory of Automata
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
Communication and Concurrency: CCS
Reactive systems – general
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Operational Semantics And Process Algebra Mads Dam Reading: Peled 8.3, 8.4, 8.6 – rest of ch. 8.
Rewriting Logic Model of Compositional Abstraction of Aspect-Oriented Software FOAL '10Mar. 15, 2010 Yasuyuki Tahara, Akihiko Ohsuga The University of.
Advanced Topics in Software Engineering Marjan Sirjani Tehran University Faculty of Engineering ECE Department Tehran,
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
11/19/20151 Metodi formali nello sviluppo software a.a.2013/2014 Prof.Anna Labella.
Laws of concurrent design Tony Hoare Microsoft ResearchCambridge FMCAD October.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
MPRI 3 Dec 2007Catuscia Palamidessi 1 Why Probability and Nondeterminism? Concurrency Theory Nondeterminism –Scheduling within parallel composition –Unknown.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
INM175 Topic 8 1 Module INM175 Discrete Mathematics Topic 8 Algebraic Theories.
UNIT - 2.  A binary operation on a set combines two elements of the set to produce another element of the set. a*b  G,  a, b  G e.g. +, -, ,  are.
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.
2G1516/2G1521 Formal Methods2004 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.1, 8.2, 8.5.
Concurrency 5 The theory of CCS Specifications and Verification Expressive Power Catuscia Palamidessi
On the origins of Bisimulation & Coinduction
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Notions & Notations - 1ICOM 4075 (Fall 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Fall 2010 ICOM.
Chapter 1 Logic and proofs
Formal Language & Automata Theory
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
Programming Languages 2nd edition Tucker and Noonan
Computer Security: Art and Science, 2nd Edition
Formal Methods in software development
Translating Linear Temporal Logic into Büchi Automata
Chapter 1 Introduction to the Theory of Computation
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

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

Content Introduction Calculus of Communicating Systems Equivalence for CCS Discussions /59Provable Software Laboratory Seminar

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? /59Provable Software Laboratory Seminar

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? /59Provable Software Laboratory Seminar

The reason why we study Process Algebra Provable 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

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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) Provable Software Laboratory Seminar10 /59

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 /59Provable Software Laboratory Seminar

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 /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

Operation Semantics of CCS Terms /59Provable Software Laboratory Seminar Referenced from lecture note of Prof. Kim

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? /59Provable Software Laboratory Seminar

Examples LTS of Unhappy lovers /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

Examples LTS of Unhappy lovers /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

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

Examples LTS of Happy lovers /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

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

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

Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} /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

Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} /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

Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} /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

Examples Proof Proof of (M|W)\{man, lov, acc, rej} => (M|W)\{man, lov, acc, rej} /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

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

Example Trace Equivalence /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}

Example Trace Equivalence /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)

Example Trace Equivalence /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)

Example Trace Equivalence /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

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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 )}

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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 Equivalence How to find out P and Q are bisimular? : Example /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

Strong Bisimulation Equivalence How to find out P and Q are bisimular? : Example /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

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

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 /59Provable Software Laboratory Seminar

Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example /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

Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example /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 )}

Weak Bisimulation Equivalence How to find out weak bisimulation equivalence? : example /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

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 /59Provable Software Laboratory Seminar

Discussions Provable Software Laboratory Seminar58 /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, Lecture Notes of Professor Kim, Notes on the methodology of CCS and CSP by R.J. van Glabbeek, TCS 177(2), pp 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 (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) Provable Software Laboratory Seminar59 /59