11.07.2015 Views

Concurrency 3 - CCS - Syntax and transitions, Equivalences - Inria

Concurrency 3 - CCS - Syntax and transitions, Equivalences - Inria

Concurrency 3 - CCS - Syntax and transitions, Equivalences - Inria

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Concurrency</strong> 3<strong>CCS</strong> - <strong>Syntax</strong> <strong>and</strong> <strong>transitions</strong>, <strong>Equivalences</strong>Catuscia PalamidessiINRIA Futurs <strong>and</strong> LIX - Ecole PolytechniqueThe other lecturers for this course:Jean-Jacques Lévy (INRIA Rocquencourt)James Leifer (INRIA Rocquencourt)Eric Goubault (CEA)http://pauillac.inria.fr/˜leifer/teaching/mpri-concurrency-2005/


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Outline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsOutline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsWhy a Calculus for <strong>Concurrency</strong>?The Calculus for Communicating Systems (<strong>CCS</strong>) wasdeveloped by R. Milner around the 80’s.Other Process Calculi were proposed at about the sametime: the Theory of Communicating Sequential Processesby T. Hoare <strong>and</strong> the Algebra of Communicating Processesby J. Bergstra <strong>and</strong> J.W. Klop.Researchers were looking for a calculus with few,orthogonal mechanisms, able to represent all the relevantconcepts of concurrent computations. More complexmechanisms should be built by using the basic ones.To help underst<strong>and</strong>ing / reasoning about / developingformal tools for concurrency.To play a role, for concurrency, like that of the λ-calculus forsequential computation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsInadequacy of st<strong>and</strong>ard models of computationsThe λ calculus, the Turing machines, etc. are computationallycomplete, yet do not capture the features of concurrentcomputations likeInteraction <strong>and</strong> communicationInadequacy of functional denotationNondeterminismNote: nondeterminism in concurrency is different from thenondeterminism used in Formal Languages, like for instancethe Nondeterministic Turing Machines.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsA few words about nondeterminismIn st<strong>and</strong>ard computationtheory, if we want to computethe partial function f s.t.f (0) = 1, a Turing Machinelike this one is considered okHowever, we would not behappy with a coffee machinethat behaves in the samewayfail01success


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsA few words about nondeterminism0In st<strong>and</strong>ard computationtheory, if we want to computethe partial function f s.t.f (0) = 1, a Turing Machinelike this one is considered okfail1successHowever, we would not behappy with a coffee machinethat behaves in the samewaycoinfailcoincoffeesuccess


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in sequential modelsConvenient tool for solving certain problems in an easyway or for characterizing complexity classes (examples:search for a path in a graph, search for a proof etc.)Examples of nondeterministic formalisms:The nondeterminismistic Turing machinesLogic languages like Prolog <strong>and</strong> λ PrologThe characteristics of nondeterminism in this setting:It can be eliminated without loss of computational power byusing backtracking.Failures don’t matter: all what we are interested on is theexistence of succesful computations. A failure is reportedonly if all possible alternatives fail.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in concurrent modelsNondeterminism may arise because of interaction betweenprocesses.The characteristics of nondeterminism in this setting:It cannot be avoided. At least, not without loosing essentialparts of expressive power. All interesting models ofconcurrency cope with nondeterminism.Failures do matter. Chosing the wrong branch might bringto an "undesirable situation". Backtracking is usually notapplicable (or very costly), because the control isdistributed: we should restart not one but severalprocesses.Hence controlling nondeterminism is very important. Insequential programming is just a matter of efficiency, here is amatter of avoiding getting stuck in a wrong situation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in concurrent modelsNondeterminism may arise because of interaction betweenprocesses.The characteristics of nondeterminism in this setting:It cannot be avoided. At least, not without loosing essentialparts of expressive power. All interesting models ofconcurrency cope with nondeterminism.Failures do matter. Chosing the wrong branch might bringto an "undesirable situation". Backtracking is usually notapplicable (or very costly), because the control isdistributed: we should restart not one but severalprocesses.Hence controlling nondeterminism is very important. Insequential programming is just a matter of efficiency, here is amatter of avoiding getting stuck in a wrong situation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in concurrent modelsNondeterminism may arise because of interaction betweenprocesses.The characteristics of nondeterminism in this setting:It cannot be avoided. At least, not without loosing essentialparts of expressive power. All interesting models ofconcurrency cope with nondeterminism.Failures do matter. Chosing the wrong branch might bringto an "undesirable situation". Backtracking is usually notapplicable (or very costly), because the control isdistributed: we should restart not one but severalprocesses.Hence controlling nondeterminism is very important. Insequential programming is just a matter of efficiency, here is amatter of avoiding getting stuck in a wrong situation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in concurrent modelsNondeterminism may arise because of interaction betweenprocesses.The characteristics of nondeterminism in this setting:It cannot be avoided. At least, not without loosing essentialparts of expressive power. All interesting models ofconcurrency cope with nondeterminism.Failures do matter. Chosing the wrong branch might bringto an "undesirable situation". Backtracking is usually notapplicable (or very costly), because the control isdistributed: we should restart not one but severalprocesses.Hence controlling nondeterminism is very important. Insequential programming is just a matter of efficiency, here is amatter of avoiding getting stuck in a wrong situation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>MotivationsNondeterminism in concurrent modelsNondeterminism may arise because of interaction betweenprocesses.The characteristics of nondeterminism in this setting:It cannot be avoided. At least, not without loosing essentialparts of expressive power. All interesting models ofconcurrency cope with nondeterminism.Failures do matter. Chosing the wrong branch might bringto an "undesirable situation". Backtracking is usually notapplicable (or very costly), because the control isdistributed: we should restart not one but severalprocesses.Hence controlling nondeterminism is very important. Insequential programming is just a matter of efficiency, here is amatter of avoiding getting stuck in a wrong situation.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designOutline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (1/2)A calculus should contain only the primary constructs. Forinstance, the primary form of interaction. But what is the primaryform of interaction?In general, concurrent languages can offer various kinds ofcommunication. For instance:Communications via shared memory.Communication via channels.Communication via broadcasting.<strong>and</strong> we could make even more distinctionsone-to-one / one-to-manyOrdered / unordered (i.e. queues / bags)Bounded / unbounded.So what is the basic kind of communication?For <strong>CCS</strong> the answer was: none of the above!


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (2/2)In <strong>CCS</strong>, the fundamental model of interaction is synchronous <strong>and</strong>symmetric, i.e. the partners act at the same time performingcomplementary actions.This kind of interaction is called h<strong>and</strong>shaking: the partners agreesimoultaneously on performing the two (complementary) actions.In Java there is a separation between active objects (threads) <strong>and</strong>passive objects (resources). <strong>CCS</strong> avoids this separation: Every(non-elementary) entity is a process.For instance, consider two proceesses P <strong>and</strong> Q communicating via abuffer B. in <strong>CCS</strong> also B is a process <strong>and</strong> the communication is betweenP <strong>and</strong> B, <strong>and</strong> between Q <strong>and</strong> B.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (2/2)In <strong>CCS</strong>, the fundamental model of interaction is synchronous <strong>and</strong>symmetric, i.e. the partners act at the same time performingcomplementary actions.This kind of interaction is called h<strong>and</strong>shaking: the partners agreesimoultaneously on performing the two (complementary) actions.In Java there is a separation between active objects (threads) <strong>and</strong>passive objects (resources). <strong>CCS</strong> avoids this separation: Every(non-elementary) entity is a process.For instance, consider two proceesses P <strong>and</strong> Q communicating via abuffer B. in <strong>CCS</strong> also B is a process <strong>and</strong> the communication is betweenP <strong>and</strong> B, <strong>and</strong> between Q <strong>and</strong> B.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (2/2)In <strong>CCS</strong>, the fundamental model of interaction is synchronous <strong>and</strong>symmetric, i.e. the partners act at the same time performingcomplementary actions.This kind of interaction is called h<strong>and</strong>shaking: the partners agreesimoultaneously on performing the two (complementary) actions.In Java there is a separation between active objects (threads) <strong>and</strong>passive objects (resources). <strong>CCS</strong> avoids this separation: Every(non-elementary) entity is a process.For instance, consider two proceesses P <strong>and</strong> Q communicating via abuffer B. in <strong>CCS</strong> also B is a process <strong>and</strong> the communication is betweenP <strong>and</strong> B, <strong>and</strong> between Q <strong>and</strong> B.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designThe basic kind of interaction (2/2)In <strong>CCS</strong>, the fundamental model of interaction is synchronous <strong>and</strong>symmetric, i.e. the partners act at the same time performingcomplementary actions.This kind of interaction is called h<strong>and</strong>shaking: the partners agreesimoultaneously on performing the two (complementary) actions.In Java there is a separation between active objects (threads) <strong>and</strong>passive objects (resources). <strong>CCS</strong> avoids this separation: Every(non-elementary) entity is a process.For instance, consider two proceesses P <strong>and</strong> Q communicating via abuffer B. in <strong>CCS</strong> also B is a process <strong>and</strong> the communication is betweenP <strong>and</strong> B, <strong>and</strong> between Q <strong>and</strong> B.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Principles in <strong>CCS</strong> designExample: P <strong>and</strong> Q communicating via a buffer Bports (or channels)PaBbQletinB = a(x).b(x).B , P = a(d).P' , Q = b(y).Q'[y]P | B | Qparallel operatorco-actionssequential operator


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Outline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong><strong>Syntax</strong> of <strong>CCS</strong>(channel, port) names: a, b, c, . . .co-names: ā, ¯b, ¯c, . . . Note: ā = asilent action: τactions, prefixes: µ ::= a | ā | τprocesses: P, Q ::= 0 inaction| µ.P prefix| P | Q parallel| P + Q (external) choice| (νa)P restriction| rec K P process P with definition K = P| K (defined) process name


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemOutline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemLabeled transition systemThe semantics of <strong>CCS</strong> is defined by in terms of a labeledtransition system, which is a set of triples of the formPµ → QMeaning: P evolves into Q by making the action µ.The presence of the label µ allows us to keep track of theinteraction capabilities with the environment.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemStructural operational semanticsThe <strong>transitions</strong> of <strong>CCS</strong> are defined by a set of inductive rules.The system is also called structural semantics because theevolution of a process is defined in terms of the evolution of itscomponents.[Act]µ.P µ → P[Res]P → µ P ′ µ≠a,a(νa)P → µ (νa)P ′[Sum1]P µ → P ′P+Q µ → P ′ [Sum2]Q µ → Q ′P+Q µ → Q ′[Par1]P µ → P ′P|Q µ → P ′ |Q[Par2]Q µ → Q ′P|Q µ → P|Q ′[Com]P a → P ′ Q a → Q ′P|Q τ → P ′ |Q ′[Rec]P[rec K P/K ] µ → P ′rec K P µ → P ′


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemStructural operational semanticsThe <strong>transitions</strong> of <strong>CCS</strong> are defined by a set of inductive rules.The system is also called structural semantics because theevolution of a process is defined in terms of the evolution of itscomponents.[Act]µ.P µ → P[Res]P → µ P ′ µ≠a,a(νa)P → µ (νa)P ′[Sum1]P µ → P ′P+Q µ → P ′ [Sum2]Q µ → Q ′P+Q µ → Q ′[Par1]P µ → P ′P|Q µ → P ′ |Q[Par2]Q µ → Q ′P|Q µ → P|Q ′[Com]P a → P ′ Q a → Q ′P|Q τ → P ′ |Q ′[Rec]P[rec K P/K ] µ → P ′rec K P µ → P ′


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemSome examplesa.0 | a.0a a(v a) (a.0 | a.0)The restriction can beused to enforce0 | a.0ta.0 | 0tsynchronizationa0 | 0a(va) (0 | 0)The parallel operatormay cause infinitelymany different statesrec a.kkarec a.k + b.0kbaarec a.k | a.kka aaaThe fragment of thecalculus without paralleloperator generates onlyfinite automata / regulartrees


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemSome examplesa.0 | a.0a a(v a) (a.0 | a.0)The restriction can beused to enforce0 | a.0ta.0 | 0tsynchronizationa0 | 0a(va) (0 | 0)The parallel operatormay cause infinitelymany different statesrec a.kkarec a.k + b.0kbaarec a.k | a.kka aaaThe fragment of thecalculus without paralleloperator generates onlyfinite automata / regulartrees


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemSome examplesa.0 | a.0a a(v a) (a.0 | a.0)The restriction can beused to enforce0 | a.0ta.0 | 0tsynchronizationa0 | 0a(va) (0 | 0)The parallel operatormay cause infinitelymany different statesrec a.kkarec a.k + b.0kbaarec a.k | a.kka aaaThe fragment of thecalculus without paralleloperator generates onlyfinite automata / regulartrees


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>Labeled transition SystemSome examplesa.0 | a.0a a(v a) (a.0 | a.0)The restriction can beused to enforce0 | a.0ta.0 | 0tsynchronizationa0 | 0a(va) (0 | 0)The parallel operatormay cause infinitelymany different statesrec a.kkarec a.k + b.0kbaarec a.k | a.kka aaaThe fragment of thecalculus without paralleloperator generates onlyfinite automata / regulartrees


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Outline1 IntroductionMotivationsPrinciples in <strong>CCS</strong> design2 <strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong><strong>Syntax</strong>Labeled transition SystemWhat equivalence for <strong>CCS</strong>?


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?MotivationIt is important to define formally when two system can beconsidered equivalentThere may be various "interesting" notion of equivalence, itdepends on what we want (which observables we want topreserve)A good notion of equivalence should be a congruence, soto allow modular verification


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?MotivationIt is important to define formally when two system can beconsidered equivalentThere may be various "interesting" notion of equivalence, itdepends on what we want (which observables we want topreserve)A good notion of equivalence should be a congruence, soto allow modular verification


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?MotivationIt is important to define formally when two system can beconsidered equivalentThere may be various "interesting" notion of equivalence, itdepends on what we want (which observables we want topreserve)A good notion of equivalence should be a congruence, soto allow modular verification


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?MotivationIt is important to define formally when two system can beconsidered equivalentThere may be various "interesting" notion of equivalence, itdepends on what we want (which observables we want topreserve)A good notion of equivalence should be a congruence, soto allow modular verification


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?Examples: possible definitions of a coffee machinerec K coin.(coffee.ccup.K + tea.tcup.K )coin.rec K (coffee.ccup.coin.K + tea.tcup.coin.K )rec K (coin.coffee.ccup.K + coin.tea.tcup.K )Question: which of these machines can we safely considerequivalent?Note that these machines have all the same traces.


Introduction<strong>Syntax</strong> <strong>and</strong> Operational Semantics of <strong>CCS</strong>What equivalence for <strong>CCS</strong>?ExercisesDefine in <strong>CCS</strong> a semaphore with initial value nShow that maximal trace equivalence is not a congruencein <strong>CCS</strong>. By maximal traces here we mean the traces of allpossible (finite or infinite) maximal runs.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!