From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary An introduction to Concurrency Theory Communicating and Mobile Systems Frank D. Valencia French National Center for Scientic Research (CNRS) Computer Science Laboratory of École Polytechnique de Paris (LIX) Oct 2005/CLEI'05 CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency is everywhere... Concurrent Systems Multiple agents (processes) that interact among each other. Some fundamental concurrent systems: Reactive Systems. Synchronous Communicating Systems Mobile Systems. Concurrent systems can combine: Example E.g., The Internet (a complex one!) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency: A Serious Challenge... Models of Concurrency Formal Models to describe and analyze concurrent systems. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency: A Serious Challenge... Models of Concurrency Formal Models to describe and analyze concurrent systems. As other models of reality, these models must be be simple be expressive, be formal provide reasoning techniques. Just like λ−calculus model of sequential computation ! CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency: A Serious Challenge... Models of Concurrency Formal Models to describe and analyze concurrent systems. Models for sequential computation don't apply putation is usually . Concurrent com- Non-Terminating Reactive (or Interactive) Nondeterministic (Unpredictable). CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency: A Serious Challenge... Models of Concurrency Formal Models to describe and analyze concurrent systems. In concurrency theory Each model focuses in a fundamental phenomenon: E.g., Synchrony and Mobility. But there is no yet a cannonical model . ...Probably because concurrency is a very broad (young) area. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concurrency: A Serious Challenge... Models of Concurrency Formal Models to describe and analyze concurrent systems. Some well established model of concurrency: Process Calculi (Like λ-calculi) CCS (Synchronous communication) π -calculus (CCS Extension to Mobility) Petri Nets (Like Automata) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Mobility What kind of mobility will we consider in this tutorial ? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Mobility What kind of mobility will we consider in this tutorial ? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Mobility What kind of mobility will we consider in this tutorial ? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Link Mobility Mobile phones CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Link Mobility Mobile phones CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary A avour of the pi-calculus In the π calculus: (ν a)(b̄a.S k a(x ).P ) k b(c ).c̄d .C CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary A avour of the pi-calculus π the pi-calculus: (ν a)(b̄a.S k a(x ).P ) k b(c ).c̄d .C −→ S k (ν a)(a(x ).P k ād .C ) In CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Automata Denition An automata A over an alphabet Act is a tuple (Q , Q0 , Qf , T ) where S (A) = Q = {q0 , q1 , . . .} is the set of states, S0 (A) = Q0 ⊆ Q is the set of initial states, Sf (A) = Qf ⊆ Q is the set of accepting (or nal) states, T (A) = T ⊆ Q × Act × Q is the set of transitions. Write a 0 q −→ q for (q , a, q 0 ) ∈ T CLEI'05 Cali . Omit Act when it is understood. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Automata Example: A Typical Graph Representation CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Regular Sets and Expressions Denition (Acceptance, Regularity) a a an 1 2 A accepts a1 ...an i there is a path q0 −→ q1 −→· · · −→ qn in T (A) with q0 ∈ So (A) and qn ∈ Sf (A). The Language of (or recognized by) A, L(A), is the set of sequences accepted by A. Regular sets are those recognized by nite-state automata (FSA). CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Regular Sets and Expressions Denition (Acceptance, Regularity) a a an 1 2 A accepts a1 ...an i there is a path q0 −→ q1 −→· · · −→ qn in T (A) with q0 ∈ So (A) and qn ∈ Sf (A). The Language of (or recognized by) A, L(A), is the set of sequences accepted by A. Regular sets are those recognized by nite-state automata (FSA). Fact Regular Expressions (e.g. a.(b + c )∗ ) are as expressive as FSA. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Regular Sets and Expressions Example An string accepted: 10001. The language accepted: All binary strings with an even number of 1's. ∗ (10∗ 10∗ )∗ A Corresponding Regular Expression: 0 CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Some Nice Properties and Exercises Fact 1 2 Deterministic and NonDeterministic FSA are equally expressive. Regular sets are closed under (a) union, (b) complement, (c) intersection. Exercises 1 Prove 2.b and 2.c. 2 Prove that emptiness problem of a given FSA is 3 Prove that language equivalence of two given FSA is decidable. decidable. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory Some Nice Properties and Exercises Fact 1 2 Deterministic and NonDeterministic FSA are equally expressive. Regular sets are closed under (a) union, (b) complement, (c) intersection. Exercises 1 Prove 2.b and 2.c. 2 Prove that emptiness problem of a given FSA is 3 Prove that language equivalence of two given FSA is decidable. decidable. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory What is good for ? Classic Automata Theory is solid and foundational with several applications in computer science. BUT... CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory What is good for ? Classic Automata Theory is solid and foundational with several applications in computer science. BUT... Example: A FSA Vending Machine Representation CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory What is good for ? Classic Automata Theory is solid and foundational with several applications in computer science. BUT... Example: A FSA Vending Machine Representation • L(B1 ) = L(B2 ) but B2 machine! would represent an annoying vending CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory What is good for ? Classic Automata Theory is solid and foundational with several applications in computer science. BUT... Fact Language equivalence may be too weak for interactive behavior. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Classic Automata Theory. The Problem with Language Equivalence In automata theory a · (b + c ) = a · b + a · c . I.e., p0 and qo are equivalent. • We need stronger equivalences that does not validate the above. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Transition Systems Transition systems are just automata in which initial and nal states are irrelevant. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Simulation T be transition system. A relation R ⊆ S (T ) × S (T ) is a simulation i for each (p , q ) ∈ R : a a . If p −→ p 0 then there is q 0 s.t. q −→ q 0 and (p 0 , q 0 ) ∈ R . Let CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Bisimulation A relation R is a bisimulation i R and its converse R −1 are both simulations. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Similaridad & Bisimilaridad . p simulates q i there exists a simulation R s.t (p , q ) ∈ R . . p and q are bisimilar, written p ∼ q , if there exists a bisimulation R s.t. (p , q ) ∈ R . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Trace Equivalence is not Bisimilarity Here p0 simulates q0 but q0 does not simulate p0 , so p0 and not bisimilar. CLEI'05 Cali Communicating and Mobile Systems q0 are From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Bisimilarity is not graph equivalence Bisimilarity equates LTS with dierent graph structure: E.g., and q0 p0 are bisimilar. But how do we prove they are bisimilar ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Proving Bisimilarity p0 and q0 are bisimilar simply exhibit a bisimulation R = {(p0 , q0 ), (p0 , q2 ), (p1 , q1 ), (p2 , q1 )}. To prove that R. E.g. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Proving Bisimilarity p0 and q0 are bisimilar simply exhibit a bisimulation R = {(p0 , q0 ), (p0 , q2 ), (p1 , q1 ), (p2 , q1 )}. To prove that R. E.g. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Bisimilarity and simulation Suppose that p simulates q and q simulates p. Are p and q necesarly bisimilar ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Concepts from Automata Theory Bisimilarity Equivalence Bisimilarity: The Equivalence of Reactive Systems. Example: Bisimilarity and simulation No! Here p Notice that q and q simulates p but they are not bisimilar. reliable than q ; i.e., it deadlocks after a. simulates p is less CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Process Calculi Process calculi treat processes much like λ-calculus treats computable functions: Structure of terms represent the structure of processes. E.g.: PkQ Operational Semantics to represent computational steps. E.g.: PAR P −→ P 0 P k Q −→ P 0 k Q CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Process Calculi Process calculi treat processes much like λ-calculus treats computable functions: Structure of terms represent the structure of processes. E.g.: PkQ Operational Semantics to represent computational steps. E.g.: PAR P −→ P 0 P k Q −→ P 0 k Q CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Process Calculi Process calculi treat processes much like λ-calculus treats computable functions: Structure of terms represent the structure of processes. E.g.: PkQ Operational Semantics to represent computational steps. E.g.: PAR P −→ P 0 P k Q −→ P 0 k Q CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Typical Issues in Developing Process Calculi Which process constructs t the intended phenomena? E.g. atomic actions, parallelism, nondeterminism. How should these constructs be given meaning ? E.g. Operational Semantics, Denotational Semantics. How should processes be compared ? E.g. Observable Behavior, Process Equivalences. How should process properties be specied and proved ? E.g. Logic for expressing process specications (like in Hoare's Logic). How expressive is the calulus ? E.g. Expressiveness of a nice fragment of the calculus. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Typical Issues in Developing Process Calculi Which process constructs t the intended phenomena? E.g. atomic actions, parallelism, nondeterminism. How should these constructs be given meaning ? E.g. Operational Semantics, Denotational Semantics. How should processes be compared ? E.g. Observable Behavior, Process Equivalences. How should process properties be specied and proved ? E.g. Logic for expressing process specications (like in Hoare's Logic). How expressive is the calulus ? E.g. Expressiveness of a nice fragment of the calculus. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Typical Issues in Developing Process Calculi Which process constructs t the intended phenomena? E.g. atomic actions, parallelism, nondeterminism. How should these constructs be given meaning ? E.g. Operational Semantics, Denotational Semantics. How should processes be compared ? E.g. Observable Behavior, Process Equivalences. How should process properties be specied and proved ? E.g. Logic for expressing process specications (like in Hoare's Logic). How expressive is the calulus ? E.g. Expressiveness of a nice fragment of the calculus. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Typical Issues in Developing Process Calculi Which process constructs t the intended phenomena? E.g. atomic actions, parallelism, nondeterminism. How should these constructs be given meaning ? E.g. Operational Semantics, Denotational Semantics. How should processes be compared ? E.g. Observable Behavior, Process Equivalences. How should process properties be specied and proved ? E.g. Logic for expressing process specications (like in Hoare's Logic). How expressive is the calulus ? E.g. Expressiveness of a nice fragment of the calculus. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Typical Issues in Developing Process Calculi Which process constructs t the intended phenomena? E.g. atomic actions, parallelism, nondeterminism. How should these constructs be given meaning ? E.g. Operational Semantics, Denotational Semantics. How should processes be compared ? E.g. Observable Behavior, Process Equivalences. How should process properties be specied and proved ? E.g. Logic for expressing process specications (like in Hoare's Logic). How expressive is the calulus ? E.g. Expressiveness of a nice fragment of the calculus. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS Syntax Basic Entities of CCS: A set N = a, b , . . . co-names. of names and N = {a | a ∈ N } of labels (ranged over by l , l 0 , . . .). A set Act = L ∪ {τ } of actions (ranged over by a, b, . . .). Action τ is called the silent or unobservable action. Actions a and a are viewed as being complementary. I.e., a = a. A set L=N ∪N of CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS Syntax Denition (CCS Syntax of Processes) P , Q , . . . := 0 | a.P | P k Q | P + Q | (ν a)P | A(a1 , ..., an ) Bound names of P , fn(P ): Those with a bound occurrence in P. Free names of P , bn(P ): Those with a not bound occurrence in P . For each (call) A(a1 , . . . , an ) there is a unique process denition A(b1 . . . bn ) = P , with fv (P ) ⊆ {b1 , . . . , bn }. The set of all processes is denoted by CLEI'05 Cali P. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: Operational Semantics. ACT a a.P −→ SUM1 P a −→ 0 a + −→ 0 P P Q P a −→ a −→ P COM1 P PkQ P0 P0 k Q COM3 l P 0 Q −→ l Q0 P −→ P k Q −τ→ P 0 k Q 0 RES P −a→ P 0 a (ν a)P −→ (ν a)P 0 REC PA [b1 , . . . , bn /a1 , . . . , an ] −a→ P 0 A hb1 , . . . , bn i −a→ P 0 SUM2 Q −a→ Q 0 P + Q −a→ Q 0 COM2 Q −a→ Q 0 P k Q −a→ P k Q 0 if a 6= a and a 6= a CLEI'05 Cali if A(a1 , . . . , an ) def = PA Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: Bisimilarity Labeled Transition System of CCS The LTS of CCS has P as its states and its transitions given by the operational semantics. Dene P ∼ Q i the states corresponding to P and Q are bisimilar. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: Bisimilarity Labeled Transition System of CCS The LTS of CCS has P as its states and its transitions given by the operational semantics. Dene P ∼ Q i the states corresponding to P and Q are bisimilar. Example: Processes and LTS states P = a.(b.0 + c .0) corresponds to p0 corresponds to q0 . Hence P 6∼ Q . CLEI'05 Cali and Q = a.b.0 + a.c .0 Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: Bisimilarity Labeled Transition System of CCS The LTS of CCS has P as its states and its transitions given by the operational semantics. Dene P ∼ Q i the states corresponding to P and Q are bisimilar. Some Basic Equalities . . . . . . PkQ∼QkP Pk0∼P (P k Q ) k R ∼ P k (Q k R ) (ν a)0 ∼ 0 P k (ν a)Q ∼ (ν a)(P k Q ) ? (ν a)P ∼ (ν b)P [b/a] ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: The expansion law. a.0 k b.0 is bisimilar to a.b.0 + b.a.0. More generally, we have the expansion law: (ν~a)(P1 k . . . k Pn ) ∼ Notice that a i Σ{ai .(ν~a)(P1 k . . . k Pi0 k . . . k Pn | Pi −→ Pi0 , a, ai 6∈ ~a} + l l Σ{τ.(ν a)(P1 k . . . k Pi0 k . . . k Pj0 . . . k Pn | Pi −→ Pi0 , Pj −→ Pj0 } So, every move in (ν~a)(P1 k . . . k Pn ) is either Pi and Pj . one of the or a communication between some CLEI'05 Cali Communicating and Mobile Systems Pi From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: The expansion law. a.0 k b.0 is bisimilar to a.b.0 + b.a.0. More generally, we have the expansion law: (ν~a)(P1 k . . . k Pn ) ∼ Notice that a i Σ{ai .(ν~a)(P1 k . . . k Pi0 k . . . k Pn | Pi −→ Pi0 , a, ai 6∈ ~a} + l l Σ{τ.(ν a)(P1 k . . . k Pi0 k . . . k Pj0 . . . k Pn | Pi −→ Pi0 , Pj −→ Pj0 } So, every move in (ν~a)(P1 k . . . k Pn ) is either Pi and Pj . one of the or a communication between some CLEI'05 Cali Communicating and Mobile Systems Pi From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication CCS: The expansion law. a.0 k b.0 is bisimilar to a.b.0 + b.a.0. More generally, we have the expansion law: (ν~a)(P1 k . . . k Pn ) ∼ Notice that a i Σ{ai .(ν~a)(P1 k . . . k Pi0 k . . . k Pn | Pi −→ Pi0 , a, ai 6∈ ~a} + l l Σ{τ.(ν a)(P1 k . . . k Pi0 k . . . k Pj0 . . . k Pn | Pi −→ Pi0 , Pj −→ Pj0 } So, every move in (ν~a)(P1 k . . . k Pn ) is either Pi and Pj . one of the or a communication between some CLEI'05 Cali Communicating and Mobile Systems Pi From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Congruence issues Suppose that P ∼ Q. We would like P k R ∼ Q k R. More generally we would like C [P ] ∼ C [Q ] C [.] is a process context. congruence. where I.e., we want The notion of congruence allows us to replace equals. In fact, ∼ ∼ to be a equals with is a congruence. How can we prove this ?. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Congruence issues Suppose that P ∼ Q. We would like P k R ∼ Q k R. More generally we would like C [P ] ∼ C [Q ] C [.] is a process context. congruence. where I.e., we want The notion of congruence allows us to replace equals. In fact, ∼ ∼ to be a equals with is a congruence. How can we prove this ?. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Congruence issues Suppose that P ∼ Q. We would like P k R ∼ Q k R. More generally we would like C [P ] ∼ C [Q ] C [.] is a process context. congruence. where I.e., we want The notion of congruence allows us to replace equals. In fact, ∼ ∼ to be a equals with is a congruence. How can we prove this ?. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Congruence issues Suppose that P ∼ Q. We would like P k R ∼ Q k R. More generally we would like C [P ] ∼ C [Q ] C [.] is a process context. congruence. where I.e., we want The notion of congruence allows us to replace equals. In fact, ∼ ∼ to be a equals with is a congruence. How can we prove this ?. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observable Behavior equivalent i another process (the environment, an observer) cannot observe any dierence In principle, P and Q should be in their behavior. Notice τ.P 6∼ P , could be too although strong:). τ is an unobservable action. So We look for other notion of equivalence focused in terms of l observable actions (i.e., actions −→ , l ∈ L). CLEI'05 Cali Communicating and Mobile Systems ∼ From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observable Behavior equivalent i another process (the environment, an observer) cannot observe any dierence In principle, P and Q should be in their behavior. Notice τ.P 6∼ P , could be too although strong:). τ is an unobservable action. So We look for other notion of equivalence focused in terms of l observable actions (i.e., actions −→ , l ∈ L). CLEI'05 Cali Communicating and Mobile Systems ∼ From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observable Behavior equivalent i another process (the environment, an observer) cannot observe any dierence In principle, P and Q should be in their behavior. Notice τ.P 6∼ P , could be too although strong:). τ is an unobservable action. So We look for other notion of equivalence focused in terms of l observable actions (i.e., actions −→ , l ∈ L). CLEI'05 Cali Communicating and Mobile Systems ∼ From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observations l −→ l 6= τ as an observation. Think of an experiment e as a sequence l1 .l2 . . . ln Think of any with of observable actions. Notation: If s = a1 . . . an ∈ Act ∗ then dene a1 s an τ τ τ τ =⇒= (−→)∗ −→ (−→)∗ . . . (−→)∗ −→ (−→)∗ e =⇒ e = l1 .l2 . . . ln ∈ L denotes a sequence of observable actions inter-spread with τ actions: The notion of experiment. Notice that for CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observations l −→ l 6= τ as an observation. Think of an experiment e as a sequence l1 .l2 . . . ln Think of any with of observable actions. Notation: If s = a1 . . . an ∈ Act ∗ then dene a1 s an τ τ τ τ =⇒= (−→)∗ −→ (−→)∗ . . . (−→)∗ −→ (−→)∗ e =⇒ e = l1 .l2 . . . ln ∈ L denotes a sequence of observable actions inter-spread with τ actions: The notion of experiment. Notice that for CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observations l −→ l 6= τ as an observation. Think of an experiment e as a sequence l1 .l2 . . . ln Think of any with of observable actions. Notation: If s = a1 . . . an ∈ Act ∗ then dene a1 s an τ τ τ τ =⇒= (−→)∗ −→ (−→)∗ . . . (−→)∗ −→ (−→)∗ e =⇒ e = l1 .l2 . . . ln ∈ L denotes a sequence of observable actions inter-spread with τ actions: The notion of experiment. Notice that for CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Observations l −→ l 6= τ as an observation. Think of an experiment e as a sequence l1 .l2 . . . ln Think of any with of observable actions. Notation: If s = a1 . . . an ∈ Act ∗ then dene a1 s an τ τ τ τ =⇒= (−→)∗ −→ (−→)∗ . . . (−→)∗ −→ (−→)∗ e =⇒ e = l1 .l2 . . . ln ∈ L denotes a sequence of observable actions inter-spread with τ actions: The notion of experiment. Notice that for CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Trace Equivalence Denition (Trace Equivalence) P and Q are trace equivalent, written P ∼t Q , i for every e = l1 . . . ln ∈ L∗ experiment (here called trace) e e P =⇒ i Q =⇒ Observations: τ.P ∼t P (nice!) a.b.0 + a.c .0 ∼t a.(b.0 + c .0) (not that nice:) a.b.0 + a.0 ∼t a.b.0 (not sensitive to deadlocks) a.0 + b.0 ∼t (ν c )(c .0 k c .a.0 k c .b.0) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Trace Equivalence Denition (Trace Equivalence) P and Q are trace equivalent, written P ∼t Q , i for every e = l1 . . . ln ∈ L∗ experiment (here called trace) e e P =⇒ i Q =⇒ Observations: τ.P ∼t P (nice!) a.b.0 + a.c .0 ∼t a.(b.0 + c .0) (not that nice:) a.b.0 + a.0 ∼t a.b.0 (not sensitive to deadlocks) a.0 + b.0 ∼t (ν c )(c .0 k c .a.0 k c .b.0) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Failures Equivalence Denition (Failures Equivalence) A pair (e , L), where 0 i there is P s.t.: e ∈ L∗ (a trace) and L ⊂ L, is a failure for P e l τ (1)P =⇒ P 0 , (2) P 0 6−→ for all l ∈ L, and (3)P 0 6−→ P ∼f Q i P and Q have the same failures. Observations: τ.P ∼f P . a.b.0 + a.c .0 6∼f a.(b.0 + c .0) (Exercise: why?) a.b.0 + a.0 6∼f a.b.0. a.0 + b.0 6∼f (ν c )(c .0 k c .a.0 k c .b.0) (Exercise) a.(b.c .0 + b.d .0) ∼f a.b.c .0 + a.b.d .0. Let D = τ.D . We have 0 6∼f Communicating D. CLEI'05τ. Cali and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Failures Equivalence Denition (Failures Equivalence) A pair (e , L), where 0 i there is P s.t.: e ∈ L∗ (a trace) and L ⊂ L, is a failure for P e l τ (1)P =⇒ P 0 , (2) P 0 6−→ for all l ∈ L, and (3)P 0 6−→ P ∼f Q i P and Q have the same failures. Observations: τ.P ∼f P . a.b.0 + a.c .0 6∼f a.(b.0 + c .0) (Exercise: why?) a.b.0 + a.0 6∼f a.b.0. a.0 + b.0 6∼f (ν c )(c .0 k c .a.0 k c .b.0) (Exercise) a.(b.c .0 + b.d .0) ∼f a.b.c .0 + a.b.d .0. Let D = τ.D . We have 0 6∼f Communicating D. CLEI'05τ. Cali and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Weak Bisimilarity (Observational Equivalence) Denition (Weak Bisimilarity) A symmetric relation R is a weak bisimulation i for every (P , Q ) ∈ R : e e . If P =⇒ P 0 then there is Q 0 s.t. Q =⇒ Q 0 and (P 0 , Q 0 ) ∈ R . Dene P ≈ Q i (P , Q ) ∈ R for some weak bisimulation R . Observations: τ.P ≈ P a.τ.P ≈ a.P However, a.0 + b .0 6≈ a.0 + τ.b .0 a.(b.c .0 + b.d .0) 6≈ a.b.c .0 + a.b.d .0.(Exercise) Let D = τ.D . We have τ.0 ≈ D . a.0 + b.0 6≈ (ν c )(c .0 k c .a.0 k c .b.0) (Exercise) , CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Weak Bisimilarity (Observational Equivalence) Denition (Weak Bisimilarity) A symmetric relation R is a weak bisimulation i for every (P , Q ) ∈ R : e e . If P =⇒ P 0 then there is Q 0 s.t. Q =⇒ Q 0 and (P 0 , Q 0 ) ∈ R . Dene P ≈ Q i (P , Q ) ∈ R for some weak bisimulation R . Observations: τ.P ≈ P a.τ.P ≈ a.P However, a.0 + b .0 6≈ a.0 + τ.b .0 a.(b.c .0 + b.d .0) 6≈ a.b.c .0 + a.b.d .0.(Exercise) Let D = τ.D . We have τ.0 ≈ D . a.0 + b.0 6≈ (ν c )(c .0 k c .a.0 k c .b.0) (Exercise) , CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Process Logic: Verication and Specication Processes can be used to specify and verify behavioural properties: E.g., 2 p .tea.0 + 2p .coe .0 species a machine which does not p .(tea.0 + coe .0). satisfy the behaviour specied by a 2 Alternatively, a logic can be used. An example of a property is P will never not execute a bad action or P eventually executes execute a good action. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Process Logic: Verication and Specication Processes can be used to specify and verify behavioural properties: E.g., 2 p .tea.0 + 2p .coe .0 species a machine which does not p .(tea.0 + coe .0). satisfy the behaviour specied by a 2 Alternatively, a logic can be used. An example of a property is P will never not execute a bad action or P eventually executes execute a good action. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic Denition (Logic Syntax) F := true | false | F1 ∧ F2 | F1 ∨ F2 | hK i F | [K ]F where K is a set of actions The boolean operators are interpreted as in propositional logic. hK i F (possibility) asserts (of a given P ): It is possible to do a a ∈ K and then evolve into a Q that satisfy F . [K ]F (necessity) then it asserts (of a given must evolve into a Q CLEI'05 Cali P ): If which satises for P P can do a a ∈ K F. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic Denition (Logic Syntax) F := true | false | F1 ∧ F2 | F1 ∨ F2 | hK i F | [K ]F where K is a set of actions The boolean operators are interpreted as in propositional logic. hK i F (possibility) asserts (of a given P ): It is possible to do a a ∈ K and then evolve into a Q that satisfy F . [K ]F (necessity) then it asserts (of a given must evolve into a Q CLEI'05 Cali P ): If which satises for P P can do a a ∈ K F. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic Denition (Logic Syntax) F := true | false | F1 ∧ F2 | F1 ∨ F2 | hK i F | [K ]F where K is a set of actions The boolean operators are interpreted as in propositional logic. hK i F (possibility) asserts (of a given P ): It is possible to do a a ∈ K and then evolve into a Q that satisfy F . [K ]F (necessity) then it asserts (of a given must evolve into a Q CLEI'05 Cali P ): If which satises for P P can do a a ∈ K F. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic Denition (Logic Syntax) F := true | false | F1 ∧ F2 | F1 ∨ F2 | hK i F | [K ]F where K is a set of actions The boolean operators are interpreted as in propositional logic. hK i F (possibility) asserts (of a given P ): It is possible to do a a ∈ K and then evolve into a Q that satisfy F . [K ]F (necessity) then it asserts (of a given must evolve into a Q CLEI'05 Cali P ): If which satises for P P can do a a ∈ K F. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Semantics of Hennessy-Milner Logic Denition The compliance of P with the specication F , written P |= F , is given by: P P P P P P 6|= false |= true |= F1 ∧ F2 |= F1 ∨ F2 |= hK i F |= [K ]F i i i i P |= F1 P |= F1 P |= F2 P |= F2 a for some Q , P −→ Q , a ∈ K and Q |= F a if P −→ Q and a ∈ K then Q |= F and or CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic and Bisimilarity Example Let P1 = a.(b.0 + c .0), P2 = a.b.0 + a.c .0. Also let F = h{a}i (h{b}i true ∧ h{c }i true). Notice that P1 |= F but P2 6|= F . Theorem P ∼ Q if and only, for every F , P |= F i Q |= F . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Hennessy&Milner Logic and Bisimilarity Example Let P1 = a.(b.0 + c .0), P2 = a.b.0 + a.c .0. Also let F = h{a}i (h{b}i true ∧ h{c }i true). Notice that P1 |= F but P2 6|= F . Theorem P ∼ Q if and only, for every F , P |= F i Q |= F . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication A Linear Temporal Logic. Denition (Logic Syntax) F := true | false | L | F1 ∨ F2 | F1 ∧ F2 | ♦F | F where L is a set of non-silent actions. Formulae assert properties of traces. Boolean operators are interpreted as usual L asserts (of a given trace s ) that the rst action of s must be in L ∪ {τ } ♦F asserts (of a given trace s ) that at some point in s , F holds. F asserts (of a given trace s ) that at every point in s , F holds. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication A Linear Temporal Logic. Denition (Logic Syntax) F := true | false | L | F1 ∨ F2 | F1 ∧ F2 | ♦F | F where L is a set of non-silent actions. Formulae assert properties of traces. Boolean operators are interpreted as usual L asserts (of a given trace s ) that the rst action of s must be in L ∪ {τ } ♦F asserts (of a given trace s ) that at some point in s , F holds. F asserts (of a given trace s ) that at every point in s , F holds. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication A Linear Temporal Logic. Denition (Logic Syntax) F := true | false | L | F1 ∨ F2 | F1 ∧ F2 | ♦F | F where L is a set of non-silent actions. Formulae assert properties of traces. Boolean operators are interpreted as usual L asserts (of a given trace s ) that the rst action of s must be in L ∪ {τ } ♦F asserts (of a given trace s ) that at some point in s , F holds. F asserts (of a given trace s ) that at every point in s , F holds. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication A Linear Temporal Logic. Denition (Logic Syntax) F := true | false | L | F1 ∨ F2 | F1 ∧ F2 | ♦F | F where L is a set of non-silent actions. Formulae assert properties of traces. Boolean operators are interpreted as usual L asserts (of a given trace s ) that the rst action of s must be in L ∪ {τ } ♦F asserts (of a given trace s ) that at some point in s , F holds. F asserts (of a given trace s ) that at every point in s , F holds. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication A Linear Temporal Logic. Denition (Logic Syntax) F := true | false | L | F1 ∨ F2 | F1 ∧ F2 | ♦F | F where L is a set of non-silent actions. Formulae assert properties of traces. Boolean operators are interpreted as usual L asserts (of a given trace s ) that the rst action of s must be in L ∪ {τ } ♦F asserts (of a given trace s ) that at some point in s , F holds. F asserts (of a given trace s ) that at every point in s , F holds. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Semantics of the temporal logic. Denition s = a1 .a2 . . . satises (or is a model F , written s |= F , i hs , 1i |= F , where An innite sequence of actions of ) hs , i i |= true hs , i i 6|= false hs , i i |= L hs , i i |= F1 ∨ F2 hs , i i |= F1 ∧ F2 hs , i i |= F hs , i i |= ♦F P |= F i whenever i i i i i ai ∈ L ∪ τ hs , i i |= F1 or hs , i i |= F2 hs , i i |= F1 and hs , i i |= F2 for all j ≥ i hs , j i |= F there is a j ≥ i s.t. hs , j i |= F s P =⇒ then ŝ |= F , where ŝ = s .τ.τ. . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Temporal Logic and Trace Equivalence Example Consider the trace equivalent processes A(a, b, c ) def = a.(b.A(a, b, c ) + c .A(a, b, c )) and def B (a, b, c ) = a.b.B (a, b, c ) + a.c .B (a, b, c ), and the property F = ♦(b ∨ c ). We have A(a, b , c ) |= F and B (a, b , c ) |= F . Theorem P ∼t Q then for every linear temporal formula F , P |= F i Q |= F Question. Does the other direction of the theorem hold ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Temporal Logic and Trace Equivalence Example Consider the trace equivalent processes A(a, b, c ) def = a.(b.A(a, b, c ) + c .A(a, b, c )) and def B (a, b, c ) = a.b.B (a, b, c ) + a.c .B (a, b, c ), and the property F = ♦(b ∨ c ). We have A(a, b , c ) |= F and B (a, b , c ) |= F . Theorem P ∼t Q then for every linear temporal formula F , P |= F i Q |= F Question. Does the other direction of the theorem hold ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication Temporal Logic and Trace Equivalence Example Consider the trace equivalent processes A(a, b, c ) def = a.(b.A(a, b, c ) + c .A(a, b, c )) and def B (a, b, c ) = a.b.B (a, b, c ) + a.c .B (a, b, c ), and the property F = ♦(b ∨ c ). We have A(a, b , c ) |= F and B (a, b , c ) |= F . Theorem P ∼t Q then for every linear temporal formula F , P |= F i Q |= F Question. Does the other direction of the theorem hold ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobility and the pi calculus What kind of mobility are we talking about? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobility and the pi calculus What kind of mobility are we talking about? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobility and the pi calculus What kind of mobility are we talking about? Processes move. √ Links move The last one, because it is the π -calculus' choice; for exibility and simplicity. π -calculus names). has the ability of sending private and public ( CLEI'05 Cali Communicating and Mobile Systems links From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Link Mobility Mobile phones CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Link Mobility Mobile phones CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π−Calculus: Syntax Denition (Syntax) P , Q , . . . := P k Q | Σi ∈I α.P | (ν a)P | !P | if a = b then P where α := τ | ab | a(x ). Names=Channels=Ports=Links. ab.P : send b on channel a and then activate P a(x ).P : receive a name on channel a (if any), and replace x with it in P (ν a)P : create a fresh name a private to P (ν a)P and a(x ).Q are the only binders. !P : replicate P i.e., !P represents P k P k P k . . . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences A avour of the pi-calculus In the π calculus: (ν a)(b̄a.S k a(x ).P ) k b(c ).c̄d .C CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences A avour of the pi-calculus π the pi-calculus: (ν a)(b̄a.S k a(x ).P ) k b(c ).c̄d .C −→ S k (ν a)(a(x ).P k ād .C ) In CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobile Exercises Write an agent that: reads something from port generates innitely many a. a and sends it twice along port b dierent namesand send them along channel x̄z1 z2 .P which outputs both y1 x , and x (y1 , y2 ).Q which inputs two names encodes biadic-comunication: and y2 on channel sent on channel x. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobile Exercises Write an agent that: reads something from port generates innitely many a. a and sends it twice along port b dierent namesand send them along channel x̄z1 z2 .P which outputs both y1 x , and x (y1 , y2 ).Q which inputs two names encodes biadic-comunication: and y2 on channel sent on channel x. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Mobile Exercises Write an agent that: reads something from port generates innitely many a. a and sends it twice along port b dierent namesand send them along channel x̄z1 z2 .P which outputs both y1 x , and x (y1 , y2 ).Q which inputs two names encodes biadic-comunication: and y2 on channel sent on channel x. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Reaction Semantics of π . The reactive semantics of ≡ and the reactive rules. π The relation≡ describes consists of an structural congruence irrelevant syntactic aspects The reactive semantics describes evolutions due to synchronous communication. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Reaction Semantics of π . The reactive semantics of ≡ and the reactive rules. π The relation≡ describes consists of an structural congruence irrelevant syntactic aspects The reactive semantics describes evolutions due to synchronous communication. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Reaction Semantics of π . The reactive semantics of ≡ and the reactive rules. π The relation≡ describes consists of an structural congruence irrelevant syntactic aspects The reactive semantics describes evolutions due to synchronous communication. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Structural Equivalence Structural Congruence Structural Congruence ≡ is the congruence given by: P ≡ Q if P can be α-converted into Q . P k 0 ≡ P , P k Q ≡ Q k P , (P k Q ) k R = P k (Q k R ). (ν a)0 = 0,(ν a)(ν b)P ≡ (ν b)(ν a)P , (ν a)(P k Q ) ≡ P k (ν a)Q if a 6∈ fn(P ). !P ≡ P k!P . Example (1) (2) (3) (ν a)P ≡ P if a 6∈ fn(P )? x (y ).y (z ) ≡ x (z ).y (y ) ? x k y ≡ x .y + y .x ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Structural Equivalence Structural Congruence Structural Congruence ≡ is the congruence given by: P ≡ Q if P can be α-converted into Q . P k 0 ≡ P , P k Q ≡ Q k P , (P k Q ) k R = P k (Q k R ). (ν a)0 = 0,(ν a)(ν b)P ≡ (ν b)(ν a)P , (ν a)(P k Q ) ≡ P k (ν a)Q if a 6∈ fn(P ). !P ≡ P k!P . Example (1) (2) (3) (ν a)P ≡ P if a 6∈ fn(P )? x (y ).y (z ) ≡ x (z ).y (y ) ? x k y ≡ x .y + y .x ? CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Reactive Rules TAU τ.P + M −→ REACT PAR P (a(x ).P + M ) k (ab .Q + N ) −→ P [b/x ] k Q P −→ P 0 P k Q −→ P 0 k P P −→ P 0 (ν a)P −→ (ν a)P 0 P ≡ P 0 −→ Q 0 ≡ Q STRUCT P −→ Q RES Exercise. Assume a 6∈ fn(S ) ∪ fn(C ). Write a derivation for our Server example: (ν a)(b̄a.S k a(x ).P ) k b (c ).c̄d .C −→ S k (ν a)(a(x ).P k ād .C ) CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Applications: Persistent and Mutable Data Structures Denition A cell is basis for dening mutable and persistent data structures. Cell (u , r , z ) def = u (z 0 ).Cell (u , r , z 0 ) + r (x ).x̄z .Cell (u , r , z ) The cell current contents z can be updated via But we do not have recursive denitions in the above cell be rewritten in with the CLEI'05 Cali π -calculus u or read via π -calculus. r. Can the primitives ? Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Applications: Persistent and Mutable Data Structures Denition A cell is basis for dening mutable and persistent data structures. Cell (u , r , z ) def = u (z 0 ).Cell (u , r , z 0 ) + r (x ).x̄z .Cell (u , r , z ) The cell current contents z can be updated via But we do not have recursive denitions in the above cell be rewritten in with the CLEI'05 Cali π -calculus u or read via π -calculus. r. Can the primitives ? Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Recursive Denitions We wish invocations def A(x ) = P . Do we need to extend the calculus ? No! Jus take an 1 A(z ) to recursive denition (as in CCS) Replace in a 6∈ fn(P ): P every invocation A(u ) with āu . Call P̂ the resulting processes. 1 Encode A(x ) = P 1 Encode A(z ) as (ν a)(ā(z ) k!a(x ).P̂ ). as !a(x ).P̂ . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Recursive Denitions We wish invocations def A(x ) = P . Do we need to extend the calculus ? No! Jus take an 1 A(z ) to recursive denition (as in CCS) Replace in a 6∈ fn(P ): P every invocation A(u ) with āu . Call P̂ the resulting processes. 1 Encode A(x ) = P 1 Encode A(z ) as (ν a)(ā(z ) k!a(x ).P̂ ). as !a(x ).P̂ . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Recursive Denitions We wish invocations def A(x ) = P . Do we need to extend the calculus ? No! Jus take an 1 A(z ) to recursive denition (as in CCS) Replace in a 6∈ fn(P ): P every invocation A(u ) with āu . Call P̂ the resulting processes. 1 Encode A(x ) = P 1 Encode A(z ) as (ν a)(ā(z ) k!a(x ).P̂ ). as !a(x ).P̂ . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Recursive Denitions We wish invocations def A(x ) = P . Do we need to extend the calculus ? No! Jus take an 1 A(z ) to recursive denition (as in CCS) Replace in a 6∈ fn(P ): P every invocation A(u ) with āu . Call P̂ the resulting processes. 1 Encode A(x ) = P 1 Encode A(z ) as (ν a)(ā(z ) k!a(x ).P̂ ). as !a(x ).P̂ . CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π Equivalences Should P = x (z ) k ȳu π like in CCS? Take R = a(x ).P Hence, āy be equivalent to and can tell R Q = x (z ).ȳu + ȳu .x (z ) in S = a(x ).Q . and S apart!. I.e., āy k R . Passing links around complicates mattersnot unduly, though:). Need to consider substitutions, contexts, etc! CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π Equivalences Should P = x (z ) k ȳu π like in CCS? Take R = a(x ).P Hence, āy be equivalent to and can tell R Q = x (z ).ȳu + ȳu .x (z ) in S = a(x ).Q . and S apart!. I.e., āy k R . Passing links around complicates mattersnot unduly, though:). Need to consider substitutions, contexts, etc! CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences π Equivalences Should P = x (z ) k ȳu π like in CCS? Take R = a(x ).P Hence, āy be equivalent to and can tell R Q = x (z ).ȳu + ȳu .x (z ) in S = a(x ).Q . and S apart!. I.e., āy k R . Passing links around complicates mattersnot unduly, though:). Need to consider substitutions, contexts, etc! CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Outline 1 From Computability to Concurrency Theory Basic Concepts from Automata Theory Bisimilarity Equivalence 2 Calculus of Comunicating Systems CCS General Aspects of Process Calculi Syntax and Semantics Bisimilarity Observable Behaviour and other Equivalences Verication and Specication 3 Mobility and the pi calculus Syntax and Semantics Applications Equivalences CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Equivalence Intuitively we write channel x. P ↓l Formally, P ↓x (P ↓x̄ ) i P where can receive (send) a link on l ∈ L is given by: x (y ).P ↓x . x̄z .P ↓x̄ . Σi ∈I αi .Pi ↓l i for some i ∈ I , αi .Pi ↓l P k Q ↓l i either P ↓l or Q ↓l (ν z )P ↓l i l 6= z , l̄ 6= z and P ↓l CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Equivalence Denition barbed simulation i for every (P , Q ) ∈ R : P −→ P 0 then ∃Q 0 : Q −→ Q 0 ∧ (P 0 , Q 0 ) ∈ R . (2) If P ↓l then Q ↓l . R is a (1) If Denition Barbed bisimilarity: P ∼B Q i there is R are barbed simulations and (P , Q ) ∈ R . such that R and R −1 Example P = x (z ) k ȳu and Q = x (z ).ȳu + ȳu .x (z ). anda(x ).P ∼B a(x ).Q . Let CLEI'05 Cali Then P ∼B Q Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Equivalence Denition barbed simulation i for every (P , Q ) ∈ R : P −→ P 0 then ∃Q 0 : Q −→ Q 0 ∧ (P 0 , Q 0 ) ∈ R . (2) If P ↓l then Q ↓l . R is a (1) If Denition Barbed bisimilarity: P ∼B Q i there is R are barbed simulations and (P , Q ) ∈ R . such that R and R −1 Example P = x (z ) k ȳu and Q = x (z ).ȳu + ȳu .x (z ). anda(x ).P ∼B a(x ).Q . Let CLEI'05 Cali Then P ∼B Q Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Equivalence Denition barbed simulation i for every (P , Q ) ∈ R : P −→ P 0 then ∃Q 0 : Q −→ Q 0 ∧ (P 0 , Q 0 ) ∈ R . (2) If P ↓l then Q ↓l . R is a (1) If Denition Barbed bisimilarity: P ∼B Q i there is R are barbed simulations and (P , Q ) ∈ R . such that R and R −1 Example P = x (z ) k ȳu and Q = x (z ).ȳu + ȳu .x (z ). anda(x ).P ∼B a(x ).Q . Let CLEI'05 Cali Then P ∼B Q Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Congruence. Let ≈B be the congruence induced by ∼B . I.e: Denition P ≈B Q i for every context C [.], C [P ] ∼B C [Q ] Example Note that x (z ) k ȳu 6≈B x (z ).ȳu + ȳu .x (z ). CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Barbed Congruence. Let ≈B be the congruence induced by ∼B . I.e: Denition P ≈B Q i for every context C [.], C [P ] ∼B C [Q ] Example Note that x (z ) k ȳu 6≈B x (z ).ȳu + ȳu .x (z ). CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences A Labelled Semantics for Pi. Transitions α P −→ Q where α ∈ {āb, a(x ), τ, ā ν u } CLEI'05 Cali are given by: Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Early Bisimilarity for Pi Denition is a simulation i for ∀(P , Q ) ∈ R : α P −→ P 0 then 0 (1) If α is an input a(x ) then ∀u , ∃Q : α 0 0 0 Q −→ Q ∧ (P [u /x ], Q [u /x ]) ∈ R α 0 ∧ (P 0 , Q 0 ) ∈ R (2) If α is not an input then ∃Q : Q −→ Q R If . Denition (Early) Bisimilarity: P ∼E Q simulations and (P , Q ) ∈ R . Example: Let i there is R such R and R −1 P = x (z ) k ȳu and Q = x (z ).ȳu + ȳu .x (z ). a(x ).P 6∼E a(x ).Q but P ∼E Q . Then CLEI'05 Cali Communicating and Mobile Systems are From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Early Congruence for Pi. Denition Dene P ≈E Q i P σ ∼E Q σ Example: Note that The relation ≈E for all substitutions σ. x (z ) k ȳu ≈ 6 E x (z ).ȳu + ȳu .x (z ). is a congruence. Furthermore CLEI'05 Cali ≈E =≈B In fact, !. Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Thanks Example On rst slide. Example On second slide. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Thanks Example On rst slide. Example On second slide. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Make Titles Informative. Theorem On rst slide. Corollary On second slide. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Make Titles Informative. Theorem On rst slide. Corollary On second slide. CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Make Titles Informative. Theorem Corollary In left column. In right column. New line CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Syntax and Semantics Applications Equivalences Make Titles Informative. Theorem Corollary In left column. In right column. New line CLEI'05 Cali Communicating and Mobile Systems From Computability to Concurrency Theory Calculus of Comunicating Systems CCS Mobility and the pi calculus Summary Summary The rst main message of your talk in one or two lines. The second main message of your talk in one or two lines. Perhaps a third message, but not more than that. Outlook What we have not done yet. Even more stu. CLEI'05 Cali Communicating and Mobile Systems