SlideShare a Scribd company logo
1 of 32
Download to read offline
Concurrent Processes and Reaction

                                  John Justine Villar          Jhoirene Clemente


                                             January 10, 2013




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction      January 10, 2013   1 / 30
Sequential Process Expression
A Process Expression carries information about both the behaviour and the
structure of the system.
Definition 1 (Sequential Process Expression)
The set Pseq of sequential process expressions is defined by the following
syntax: P ::= A < a1 , . . . , an > | i∈I αi .Pi where I is any finite indexing
set. We use P, Q, Pi , . . . to stand for process expressions.

Here are some notations defined in Section 3.
         Process identifiers: A, B, . . .
         Process with name parameters: A < a, b, c >
         We write a to denote a sequence of names a1 , a2 , . . . , an
         The notation {b/a}P means replacing ai by bi in P where 1 ≤ i ≤ n.
         The notation fn(P) denotes the set of names which occur in a process
         expression. (‘fn’ stands for free names)

John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   2 / 30
Sequential Process Expression




We also assume that every process identifier A has a defining equation of the
form
                                      def
                                A(a) = PA
where PA is a summation, and the names a = a1 , . . . , an include all the free
names fn(PA ) of PA .




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   3 / 30
Labels and Flowgraphs

Outline


1    Labels and Flowgraphs

2    Observation and Reactions

3    Concurrency Process Expressions

4    Structural Congruence

5    Reaction Rules




John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   4 / 30
Labels and Flowgraphs

Labels and Flowgraphs
Definition 2 (Labels)
Label L is the union of the set of names and co-names.
                                                          def ¯
                                                        L = N∪N

where N is an infinite set of names,
¯
N is and infinite set of co-names, and
     ¯
N ∩ N = ∅.

         Labels are used in Labelled Transition Systems (LTS).
         Labels are used as buttons of black boxes.
We call ¯ the complement of a.
        a
As an extension of complementation,

                                                              ¯ def a
                                                              a=
.
John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   5 / 30
Labels and Flowgraphs

Labels and Flowgraphs




                                   Figure: Black box A with buttons a and ¯
                                                                          b.

Every complementary pair (a, ¯) of labels will represent a means of
                               a
interaction between black boxes. So if we have another black box B with
buttons b and ¯, we have the following system.
               c




John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   6 / 30
Labels and Flowgraphs

Labels and Flowgraphs
This is an example of a single flowgraph.




Figure: The system containing black box A and B with interaction on the
complementary pair (b, ¯
                       b).


Definition 3 (Flowgraph)
Flowgraph depicts the structure of a system, i.e. linkage among its
components.

Flowgraphs should not be confused with transition systems.
Flowgraphs do not depict the dynamic property of a system.
John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   7 / 30
Labels and Flowgraphs

Labels and Flowgraphs
Here is another example of a flowgraph




           Figure: System containing a scheduler with client processes P1 , . . . , Pn .


Note that each Pi may have many other labelled ports and a port may bear any
number of arcs.
John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   8 / 30
Observation and Reactions

Outline


1    Labels and Flowgraphs

2    Observation and Reactions

3    Concurrency Process Expressions

4    Structural Congruence

5    Reaction Rules




John Justine Villar, Jhoirene Clemente ()             Concurrent Processes and Reaction   January 10, 2013   9 / 30
Observation and Reactions

Observation and Reactions




The complementary label (b, ¯ is not to be thought of as a buffer or channel
                              b)
having some capacity. It is a means of synchronized action or handshake.
Suppose we think of black boxes A and B as separate sequential processes.
The defining equations are
                                                                  def
                                                               A = a.A
                                                                  def
                                                               A =¯   b.A
                                                                 def
                                                               B = b.B
                                                                  def
                                                               B = ¯.Bc

John Justine Villar, Jhoirene Clemente ()             Concurrent Processes and Reaction   January 10, 2013   10 / 30
Observation and Reactions

Observation and Reactions
The composite system consisting of A and B running concurrently, with no
interdependence except that any action ¯ by A must be synchronized with an
                                       b
action b by B and conversely.




         the transition a occurs, leading to states A and B holding simultaneously;
         the shared transition occurs, leading to A and B ;
         the transitions a and ¯ occur in either order, or simultaneously, leading to
                               c
         A and B again;
         and so on.
John Justine Villar, Jhoirene Clemente ()             Concurrent Processes and Reaction   January 10, 2013   11 / 30
Observation and Reactions

Observation and Reactions

We shall think of the labels b and ¯ as representing observable actions, or
                                   b
observations.

We observe b by interacting
with it, i.e. by performing
its complement ¯ and conversely.
                  b,
Observations = Interactions
The shared transition in the figure
above is unobservable; we can think of it as internal action or a reaction.
Definition 4 (Reaction)
Reaction is the interaction (i.e. mutual observation) between two components
of the system, which will be denoted as τ ; being unobservable, it has no
complement.


John Justine Villar, Jhoirene Clemente ()             Concurrent Processes and Reaction   January 10, 2013   12 / 30
Observation and Reactions

Observation and Reactions




Definition 5 (Act)
                                                                def
                                                         Act = L ∪ {τ }




John Justine Villar, Jhoirene Clemente ()             Concurrent Processes and Reaction   January 10, 2013   13 / 30
Concurrency Process Expressions

Outline


1    Labels and Flowgraphs

2    Observation and Reactions

3    Concurrency Process Expressions

4    Structural Congruence

5    Reaction Rules




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   14 / 30
Concurrency Process Expressions

Concurrency Process Expressions
         Summation
           i∈I αi .Pi
         Composition
         P|Q
         Restriction
         (new a) P, where a is a bound name and fn(P) is the set of all names
         occurring free, or those that are not bound to P.

Definition 6 (Concurrent Process Expression)
The set P of (concurrent) process expressions is defined by the following
syntax:

                     P := A < a1 , . . . , an > |                         αi .Pi | P1 |P2 | (new a) P
                                                                    i∈I

where I is any finite indexing set.
John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction              January 10, 2013   15 / 30
Concurrency Process Expressions

Concurrency Process Expressions

Changing a bound name into a fresh name us called alpha-conversion. Two
terms are structurally congruent if one is derived from the other by
alpha-conversion.
Example:

                                            (new b)a.b = (new b )a.b
Alpha-conversion is also used to perform substitution
Example:

                                                     P = (new b)a.b


                                               {b/a}P = (new b )b.b



John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   16 / 30
Concurrency Process Expressions

Concurrency Process Expressions



To illustrate a reaction,
let P = A |B, where A = ¯ and B = b.B . Thus
                          b.A

                                                      P ≡ ¯ |b.B ,
                                                          b.A

so reaction between b and ¯ will occur.
                          b
We have the reaction
                                  P → A|B




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   17 / 30
Concurrency Process Expressions

Concurrency Process Expressions

To illustrate an alternative reaction,
let P = new a ((a.Q1 + b.Q2 )|¯.0) | (¯ 1 + ¯.R2 )
                                 a     b.R  a

                                            P → new a Q1 |(¯ 1 + ¯.R2 )
                                                           b.R   a
and
                                                P → new a (Q2 |¯)|R1
                                                               a
Note that, a’s in a.Q1 and ¯.R2 are different. Therefore,
                           a

                                                 P        new a(Q1 |¯)|R2
                                                                    a



                                                        ¯ b.R
                             P ≡ new a ((a .Q1 + b.Q2 )|a |(¯ 1 + ¯.R2 ))
                                                                  a



John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   18 / 30
Concurrency Process Expressions

Concurrency Process Expressions

To illustrate an alternative reaction,
let P = new a ((a.Q1 + b.Q2 )|¯.0) | (¯ 1 + ¯.R2 )
                                 a     b.R  a

                                            P → new a Q1 |(¯ 1 + ¯.R2 )
                                                           b.R   a
and
                                                P → new a (Q2 |¯)|R1
                                                               a
Note that, a’s in a.Q1 and ¯.R2 are different. Therefore,
                           a

                                                 P        new a(Q1 |¯)|R2
                                                                    a



                                                        ¯ b.R
                             P ≡ new a ((a .Q1 + b.Q2 )|a |(¯ 1 + ¯.R2 ))
                                                                  a



John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   18 / 30
Structural Congruence

Outline


1    Labels and Flowgraphs

2    Observation and Reactions

3    Concurrency Process Expressions

4    Structural Congruence

5    Reaction Rules




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   19 / 30
Structural Congruence

Structural Congruence



Definition 7 (Process Context)
A process context C is, informally speaking, a process expression containing a
hole, represented by [ ]. Formally, process context are given by the syntax

                                  C := [ ] | α.C + M |new a C | C|P | P|C
C[Q] denotes the results of filling the hole in the context C by the process Q.
The elementary contexts are α.[ ] + M, new a [ ], [ ]|P, P|[ ].
Note in particular that C = [ ] is the identify context; in this case C[Q] = Q.




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   20 / 30
Structural Congruence

Structural Congruence


Definition 8 (Process Congruence)
       ∼                                                                              ∼
Let = be an equivalence relation over P, i.e. it is reflexive (P = P),
                ∼              ∼                        ∼          ∼
symmetric (if P = Q then Q = P) and transitive (if P = Q and Q = R then
   ∼          ∼
P = R). Then = is said to be a process congruence if it is preserved by all
                                   ∼
elementary contexts; that is, if P = Q then
                                                                    ∼
                                                α.P + M = α.Q + M
                                                                    ∼
                                                  new a P = new a Q
                                                                    ∼
                                                         P|R = Q|R
                                                                    ∼
                                                         R|P = R|Q



John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   21 / 30
Structural Congruence

Structural Congruence




Proposition 4.1
                                                           ∼
An arbitrary equivalence relation = is a process congruence if and only if ,
for all contexts C,
                                               ∼                              ∼
                                            P = Q implies C[P] = C[Q].




John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   22 / 30
Structural Congruence

Structural Congruence


Definition 9 (Structural Congruence)
Structural Congruence, written ≡, is the process congruence over P
determined by the following equations:
    1    Change of bound name (alpha-conversion)
    2    Reordering of terms in a summation
    3    P|0 ≡ P, P|Q ≡ Q|P, P|(Q|R) ≡ (P|Q)|R
    4    new a (P|Q) ≡ P|new a Q if a ∈ fn(P)
                                      /
         new a 0 ≡ 0, new ab P ≡ new ba P
                                                    def
    5    A(b) ≡ {b/a}PA if A(a) = PA




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   23 / 30
Structural Congruence

Structural Congruence




Definition 10 (Standard Form)
A process expression new a (M1 | . . . |Mn ), where each Mi is a non-empty sum,
is said to be in standard form. (If n = 0 we take M1 | . . . | Mn to mean 0, If a is
empty then there is no restriction.)

Theorem 11
Every process is structurally congruent to a standard form.




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   24 / 30
Structural Congruence

Structural Congruence




Definition 10 (Standard Form)
A process expression new a (M1 | . . . |Mn ), where each Mi is a non-empty sum,
is said to be in standard form. (If n = 0 we take M1 | . . . | Mn to mean 0, If a is
empty then there is no restriction.)

Theorem 11
Every process is structurally congruent to a standard form.




John Justine Villar, Jhoirene Clemente ()         Concurrent Processes and Reaction   January 10, 2013   24 / 30
Structural Congruence

Structural Congruence
Linking




Binary linking operator
                                             def
                                       P Q = new m({m/r}P | {m/l}Q)

John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   25 / 30
Structural Congruence

Structural Congruence


Linking in a more general case




The linking operator can be generalised thus:
                                             def
                                      P Q = new m({m/r}P) | {m/l}Q)




John Justine Villar, Jhoirene Clemente ()          Concurrent Processes and Reaction   January 10, 2013   26 / 30
Reaction Rules

Outline


1    Labels and Flowgraphs

2    Observation and Reactions

3    Concurrency Process Expressions

4    Structural Congruence

5    Reaction Rules




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   27 / 30
Reaction Rules

Reaction Rules


         REACT Rule
         TAU Rule




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   28 / 30
Reaction Rules

Reaction Rules




Example 1:

                                              Q = ¯.(b.B|¯
                                                  a      bC)
Example 2:

                                                       a.A|Q




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   29 / 30
Reaction Rules

Reaction Rules




Example 3:

                             P = new a((a.Q1 + b.Q2 )|¯.0)|(¯ 1 + ¯.R2 )
                                                      a     b.R   a




John Justine Villar, Jhoirene Clemente ()   Concurrent Processes and Reaction   January 10, 2013   30 / 30

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Concurrent Processes and Reaction

  • 1. Concurrent Processes and Reaction John Justine Villar Jhoirene Clemente January 10, 2013 John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 1 / 30
  • 2. Sequential Process Expression A Process Expression carries information about both the behaviour and the structure of the system. Definition 1 (Sequential Process Expression) The set Pseq of sequential process expressions is defined by the following syntax: P ::= A < a1 , . . . , an > | i∈I αi .Pi where I is any finite indexing set. We use P, Q, Pi , . . . to stand for process expressions. Here are some notations defined in Section 3. Process identifiers: A, B, . . . Process with name parameters: A < a, b, c > We write a to denote a sequence of names a1 , a2 , . . . , an The notation {b/a}P means replacing ai by bi in P where 1 ≤ i ≤ n. The notation fn(P) denotes the set of names which occur in a process expression. (‘fn’ stands for free names) John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 2 / 30
  • 3. Sequential Process Expression We also assume that every process identifier A has a defining equation of the form def A(a) = PA where PA is a summation, and the names a = a1 , . . . , an include all the free names fn(PA ) of PA . John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 3 / 30
  • 4. Labels and Flowgraphs Outline 1 Labels and Flowgraphs 2 Observation and Reactions 3 Concurrency Process Expressions 4 Structural Congruence 5 Reaction Rules John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 4 / 30
  • 5. Labels and Flowgraphs Labels and Flowgraphs Definition 2 (Labels) Label L is the union of the set of names and co-names. def ¯ L = N∪N where N is an infinite set of names, ¯ N is and infinite set of co-names, and ¯ N ∩ N = ∅. Labels are used in Labelled Transition Systems (LTS). Labels are used as buttons of black boxes. We call ¯ the complement of a. a As an extension of complementation, ¯ def a a= . John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 5 / 30
  • 6. Labels and Flowgraphs Labels and Flowgraphs Figure: Black box A with buttons a and ¯ b. Every complementary pair (a, ¯) of labels will represent a means of a interaction between black boxes. So if we have another black box B with buttons b and ¯, we have the following system. c John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 6 / 30
  • 7. Labels and Flowgraphs Labels and Flowgraphs This is an example of a single flowgraph. Figure: The system containing black box A and B with interaction on the complementary pair (b, ¯ b). Definition 3 (Flowgraph) Flowgraph depicts the structure of a system, i.e. linkage among its components. Flowgraphs should not be confused with transition systems. Flowgraphs do not depict the dynamic property of a system. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 7 / 30
  • 8. Labels and Flowgraphs Labels and Flowgraphs Here is another example of a flowgraph Figure: System containing a scheduler with client processes P1 , . . . , Pn . Note that each Pi may have many other labelled ports and a port may bear any number of arcs. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 8 / 30
  • 9. Observation and Reactions Outline 1 Labels and Flowgraphs 2 Observation and Reactions 3 Concurrency Process Expressions 4 Structural Congruence 5 Reaction Rules John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 9 / 30
  • 10. Observation and Reactions Observation and Reactions The complementary label (b, ¯ is not to be thought of as a buffer or channel b) having some capacity. It is a means of synchronized action or handshake. Suppose we think of black boxes A and B as separate sequential processes. The defining equations are def A = a.A def A =¯ b.A def B = b.B def B = ¯.Bc John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 10 / 30
  • 11. Observation and Reactions Observation and Reactions The composite system consisting of A and B running concurrently, with no interdependence except that any action ¯ by A must be synchronized with an b action b by B and conversely. the transition a occurs, leading to states A and B holding simultaneously; the shared transition occurs, leading to A and B ; the transitions a and ¯ occur in either order, or simultaneously, leading to c A and B again; and so on. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 11 / 30
  • 12. Observation and Reactions Observation and Reactions We shall think of the labels b and ¯ as representing observable actions, or b observations. We observe b by interacting with it, i.e. by performing its complement ¯ and conversely. b, Observations = Interactions The shared transition in the figure above is unobservable; we can think of it as internal action or a reaction. Definition 4 (Reaction) Reaction is the interaction (i.e. mutual observation) between two components of the system, which will be denoted as τ ; being unobservable, it has no complement. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 12 / 30
  • 13. Observation and Reactions Observation and Reactions Definition 5 (Act) def Act = L ∪ {τ } John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 13 / 30
  • 14. Concurrency Process Expressions Outline 1 Labels and Flowgraphs 2 Observation and Reactions 3 Concurrency Process Expressions 4 Structural Congruence 5 Reaction Rules John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 14 / 30
  • 15. Concurrency Process Expressions Concurrency Process Expressions Summation i∈I αi .Pi Composition P|Q Restriction (new a) P, where a is a bound name and fn(P) is the set of all names occurring free, or those that are not bound to P. Definition 6 (Concurrent Process Expression) The set P of (concurrent) process expressions is defined by the following syntax: P := A < a1 , . . . , an > | αi .Pi | P1 |P2 | (new a) P i∈I where I is any finite indexing set. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 15 / 30
  • 16. Concurrency Process Expressions Concurrency Process Expressions Changing a bound name into a fresh name us called alpha-conversion. Two terms are structurally congruent if one is derived from the other by alpha-conversion. Example: (new b)a.b = (new b )a.b Alpha-conversion is also used to perform substitution Example: P = (new b)a.b {b/a}P = (new b )b.b John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 16 / 30
  • 17. Concurrency Process Expressions Concurrency Process Expressions To illustrate a reaction, let P = A |B, where A = ¯ and B = b.B . Thus b.A P ≡ ¯ |b.B , b.A so reaction between b and ¯ will occur. b We have the reaction P → A|B John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 17 / 30
  • 18. Concurrency Process Expressions Concurrency Process Expressions To illustrate an alternative reaction, let P = new a ((a.Q1 + b.Q2 )|¯.0) | (¯ 1 + ¯.R2 ) a b.R a P → new a Q1 |(¯ 1 + ¯.R2 ) b.R a and P → new a (Q2 |¯)|R1 a Note that, a’s in a.Q1 and ¯.R2 are different. Therefore, a P new a(Q1 |¯)|R2 a ¯ b.R P ≡ new a ((a .Q1 + b.Q2 )|a |(¯ 1 + ¯.R2 )) a John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 18 / 30
  • 19. Concurrency Process Expressions Concurrency Process Expressions To illustrate an alternative reaction, let P = new a ((a.Q1 + b.Q2 )|¯.0) | (¯ 1 + ¯.R2 ) a b.R a P → new a Q1 |(¯ 1 + ¯.R2 ) b.R a and P → new a (Q2 |¯)|R1 a Note that, a’s in a.Q1 and ¯.R2 are different. Therefore, a P new a(Q1 |¯)|R2 a ¯ b.R P ≡ new a ((a .Q1 + b.Q2 )|a |(¯ 1 + ¯.R2 )) a John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 18 / 30
  • 20. Structural Congruence Outline 1 Labels and Flowgraphs 2 Observation and Reactions 3 Concurrency Process Expressions 4 Structural Congruence 5 Reaction Rules John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 19 / 30
  • 21. Structural Congruence Structural Congruence Definition 7 (Process Context) A process context C is, informally speaking, a process expression containing a hole, represented by [ ]. Formally, process context are given by the syntax C := [ ] | α.C + M |new a C | C|P | P|C C[Q] denotes the results of filling the hole in the context C by the process Q. The elementary contexts are α.[ ] + M, new a [ ], [ ]|P, P|[ ]. Note in particular that C = [ ] is the identify context; in this case C[Q] = Q. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 20 / 30
  • 22. Structural Congruence Structural Congruence Definition 8 (Process Congruence) ∼ ∼ Let = be an equivalence relation over P, i.e. it is reflexive (P = P), ∼ ∼ ∼ ∼ symmetric (if P = Q then Q = P) and transitive (if P = Q and Q = R then ∼ ∼ P = R). Then = is said to be a process congruence if it is preserved by all ∼ elementary contexts; that is, if P = Q then ∼ α.P + M = α.Q + M ∼ new a P = new a Q ∼ P|R = Q|R ∼ R|P = R|Q John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 21 / 30
  • 23. Structural Congruence Structural Congruence Proposition 4.1 ∼ An arbitrary equivalence relation = is a process congruence if and only if , for all contexts C, ∼ ∼ P = Q implies C[P] = C[Q]. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 22 / 30
  • 24. Structural Congruence Structural Congruence Definition 9 (Structural Congruence) Structural Congruence, written ≡, is the process congruence over P determined by the following equations: 1 Change of bound name (alpha-conversion) 2 Reordering of terms in a summation 3 P|0 ≡ P, P|Q ≡ Q|P, P|(Q|R) ≡ (P|Q)|R 4 new a (P|Q) ≡ P|new a Q if a ∈ fn(P) / new a 0 ≡ 0, new ab P ≡ new ba P def 5 A(b) ≡ {b/a}PA if A(a) = PA John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 23 / 30
  • 25. Structural Congruence Structural Congruence Definition 10 (Standard Form) A process expression new a (M1 | . . . |Mn ), where each Mi is a non-empty sum, is said to be in standard form. (If n = 0 we take M1 | . . . | Mn to mean 0, If a is empty then there is no restriction.) Theorem 11 Every process is structurally congruent to a standard form. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 24 / 30
  • 26. Structural Congruence Structural Congruence Definition 10 (Standard Form) A process expression new a (M1 | . . . |Mn ), where each Mi is a non-empty sum, is said to be in standard form. (If n = 0 we take M1 | . . . | Mn to mean 0, If a is empty then there is no restriction.) Theorem 11 Every process is structurally congruent to a standard form. John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 24 / 30
  • 27. Structural Congruence Structural Congruence Linking Binary linking operator def P Q = new m({m/r}P | {m/l}Q) John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 25 / 30
  • 28. Structural Congruence Structural Congruence Linking in a more general case The linking operator can be generalised thus: def P Q = new m({m/r}P) | {m/l}Q) John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 26 / 30
  • 29. Reaction Rules Outline 1 Labels and Flowgraphs 2 Observation and Reactions 3 Concurrency Process Expressions 4 Structural Congruence 5 Reaction Rules John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 27 / 30
  • 30. Reaction Rules Reaction Rules REACT Rule TAU Rule John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 28 / 30
  • 31. Reaction Rules Reaction Rules Example 1: Q = ¯.(b.B|¯ a bC) Example 2: a.A|Q John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 29 / 30
  • 32. Reaction Rules Reaction Rules Example 3: P = new a((a.Q1 + b.Q2 )|¯.0)|(¯ 1 + ¯.R2 ) a b.R a John Justine Villar, Jhoirene Clemente () Concurrent Processes and Reaction January 10, 2013 30 / 30