Process Algebra
Book: Chapter 8
The Main Issue
 Q: When are two models equivalent?
 A: When they satisfy different
   properties.

 Q: Does this mean that the models
  have different executions?
What is process algebra?
   An abstract description for nondeterministic
    and concurrent systems.
   Focuses on the transitions observed rather
    than on the states reached.
   Main correctness criterion: conformance
    between two models.
   Uses: system refinement, model checking,
    testing.
Different models may have
   the same set of executions!


                        e   d      a        a      e
    d        a


         b          c               b      c


a-insert coin, b-press pepsi, c-press pepsi-light
                 d-obtain pepsi, e-obtain pepsi-light
Actions: Act={a,b,c,d}{}.
  Agents: E, E’, F, F1, F2, G1, G2, …

                 E                      F
                          e   d   a         a        e
    d        a
                 E’               F1            F2
         b            c             b       c
                                  G1            G2
Agent E may evolve into agent E’.
Agent F may evolve into F1 or F2.
Events.
            E                     F
        a            
                            a        a        

            E’               F1           F2
    b            c            b       c
                             G1           G2

E—aE’, F—aF1, F—aF2, F1—aG1,

F2—aG2. G1—F, G1—F.
Actions and co-actions
        E                            F
       a                     a        a    
        E’                     F1        F2
    b        c                   b       c
                               G1        G2

For each action a, except for , there is a co-
action a. a and a interact (a input, a output).
The coaction of a is a.
Notation
          E           a.(b+c)
          a           (actually, a.((b.0)+(c.0))
              F       E—aF
      b           c   F—bG
    G             H   F—cH
                      0 – deadlock/termination.
a.E – execute a, then continue according to E.
E+F – execute according to E or to F.
E||F – execute E and F in parallel.
Conventions
   “.” has higher priority than “+”.
   “.0” or “.(0||0||…||0)” is omitted.
CCS - calculus of concurrent systems
[Milner]. Syntax
   a,b,c, … actions, A, B, C - agents.
   a,b,c, coactions of a,b,c. -silent action.
   nil - terminate.
   a.E - execute a, then behave like E.
    + - nondeterministic choice.
    || - parallel composition.
   L - restriction: cannot use letters of L.
   [f] - apply mapping function f between
           between letters.
Semantics (proof rule and axioms).
Structural Operational Semantics SOS

   a.p –a p
   p—ap’ |-- p+q –a p’
   q—aq’ |-- p+q –a q’
   p—ap’ |-- p|q –a p’|q
   q—aq’ |-- p|q –a p|q’
   p—ap’, q—aq’ |-- p|q – p’|q’
   p—ap’ , a  R |-- pL –a p’R
   p—ap’ |-- p[m]—m(a)p’[m]
Action Prefixing
a.E—aE (Axiom)

Thus, a.(b.(c||c)+d)—a(b.(c||c)+d).
Choice
   E—aE’                    F—aF’
  (E+F)—aE’               (E+F)—aF’

 b.(c||c)—b(c||c).
Thus,
  (b.(c||c)+e)—b(c||c).

If E—aE’ and F—aF’, then E+F has a
   nondeterministic choice.
Concurrent Composition
 E—aE’           F—aF’
E||F—aE’||F   E||F—aE||F’

E—aE’, F—aF’
 ————————
 E||F—E’||F’

c—c0, c—c0, c||c—0||0,
c||c—c0||c, c||c—cc||0.
Restriction
   E—aE’, a, a R
   —————————
     ER –aE’R
In this case: allows only internal
  interaction of c.
c||c—0||0 c||c—c0||c
c||c—cc||0
(c||c)  {c}—(0||0) {c}
Relabeling
     E—aE’
     ————
  E[m] –m(a)E’[m]

No axioms/rules for agent 0.
Examples
        a    a.E||b.F     b
    E||b.F              a.E||F
         b                a
               E||F
Derivations              a.(b.(c||c)+d)
                                     a
                     b      b.(c||c)+d
                                          d

                   (c||c)       c         0
                       c
        
              (0||c)        (c||0)
               c            c

              (0||0)
Modeling binary variable

                        set_1
set_0                                       set_1
is_0?
              C0                    C1      is_1?
                        set_0



        C0=is_0? . C0 + set_1 . C1 + set_0 . C0

        C1=is_1? . C1 + set_0 . C0 + set_1 . C1
Equational Definition
           E                     F
          a              a        a    
           E’               F1       F2
       b        c            b       c
                            G1       G2

E=a.(b..E+c..E)       E—aE’, A=E
F=a.b..F+a.c..F         A—aE’
Trace equivalence:
Systems have same finite sequences.

         E                         F
     a                     a           a


 b           c                             c
                               b       b



 E=a.(b+c)                     F=(a.b)+a.(b+c)
                 Same traces
Failures: comparing also what we
   cannot do after a finite sequence.

             E                     F
                           a               a
            a

        b        c                             c
                               b       b


Failure of agent E: (σ, X), where after executing
σ from E, none of the events in X is enabled.
Agent F has failure (a, {c}), which is not a failure
of E.
Simulation equivalence
                E                    F
            a       a                    a
        b               b        b       b

        c               d    c               d

   Relation over set of agents S. RSS.
   ERF
   If E’ R F’ and E’—aE’’, then there exists F’’,
    F’—aF’’, and E’’ R F’’.
Simulation equivalence
                   E                       F
               a       a                       a

           b               b           b       b

           c               d       c               d


   Relation over set of agents S. RSS.
   ERF
   If E’ R F’ and E’—aE’’, then there exists F’’,
     F’—aF’’, and E’’ R F’’.
Here, simulation works only in
    one direction. No equivalence!
                       want to establish
                   E                                 F
               a       a                                 a
                               symmetrically
           b               b                     b       b
                               necessarily

           c               d                 c               d

                               problem!!!
   Relation over set of agents S. RSS.
   ERF
   If E’ R F’ and E’—aE’’, then there exists F’’,
     F’—aF’’, and E’’ R F’’.
Simulation equivalent
  but not failure equivalent

            E                   F
        a       a
                                    a

    b                               b



Left agent a.b+a has a failure (a,{b}).
Bisimulation: same relation
  simulates in both directions

             E                        F
         a       a
                                          a

     b                                    b



Not in this case: different simulation relations.
Hierarchy of equivalences

               Bisimulation


  Simulation                  Failure


                 Trace
Example:
      a   s1     b    s2
 s0               c
          d           s3                     b
                                a       t1          t2
                           t0       a
                                             t4 c
A=a.((b.nil)+(c.d.A))                    d          t3
B=(a.(b.nil))+(a.c.d.B)
Bisimulation between G1 and G2


      Let N= N1 U N2
      A relation R : N1 x N2 is a bisumulation if
       If (m,n) in R then
       1. If m—am’ then n’:n—an’
                      and (m’,n’) in R
       2. If n—an’ then m’:m—am’
                      and (m’,n’) in R.
      Other simulation relations are possible, I.e.,
       m=a=> m’ when m—…—a—m’.
Algorithm for bisimulation:

    Partition N into blocks B1B2…Bn=N.
    Initially: one block, containing all of N.
    Repeat until no change:
       Choose a block Bi and a letter a.
       If some of the transitions of Bi move to
          some block Bj and some not, partition
          Bi accordingly.
    At the end: Structures bisimilar if initial states
     of two structures are in same blocks.
Correctness of algorithm

    Invariant: if (m,n) in R then m and n remain
     in the same block throughout the algorithm.
    Termination: can split only a finite number of
     times.
Example:
     a     s1     b     s2
s0                 c
           d           s3                        b
                                    a       t1          t2
                               t0       a
                                                 t4 c
                                             d          t3
{s0,s1,s2,s3,t0,t1,t2,t3,t4}
Example:
     a     s1      b     s2
s0                  c
           d             s3                        b
                                      a       t1          t2
                                 t0       a
                                                   t4 c
                                               d          t3
{s0,s1,s2,s3,t0,t1,t2,t3,t4} split on a.
{s0,t0},{s1,s2,s3,t1,t2,t3,t4}
Example:
       a     s1      b     s2
  s0                  c
             d             s3                      b
                                      a       t1          t2
                                 t0       a
                                                   t4 c
                                               d          t3
{s0,t0},{s1,s2,s3,t1,t2,t3,t4} split on b
{s0,t0},{s1,t1},{s0,s2,s3,t2,t3,t4}
Example:
     a   s1    b     s2
s0              c
         d          s3                      b
                               a       t1          t2
                          t0       a
                                            t4 c
                                        d          t3
{s0,t0},{s1,t1},{s2,s3,t2,t3,t4} split on c
{s0,t0},{s1},{t1},{s2,s3,t2,t3,t4}
Example:
       a    s1    b     s2
  s0               c
            d          s3                      b
                                  a       t1          t2
                             t0       a
                                               t4 c
                                           d          t3
{s0,t0},{s1},{t1},{s2,s3,t2,t3,t4} split on c

  {s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3}
Example:
       a    s1    b    s2
  s0               c
            d          s3                     b
                                 a       t1          t2
                            t0       a
                                              t4 c
                                          d          t3
{s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d
   {s0,t0},{s1},{t1},{t4},{s3, t3},{s2,t2}
Example:
       a    s1     b     s2
  s0                c
            d           s3                      b
                                   a       t1          t2
                              t0       a
                                                t4 c
                                            d          t3
{s0,t0},{s1},{t1},{t4},{s2,t2},{s3,t3} split on a
   {s0},{t0},{s1},{t1},{t4},{s3, t3},{s2,t2}
Example:
          a    s1     b    s2
     s0                c
               d           s3                      b
                                     a       t1           t2
                                t0       a
                                                   t4 c
                                              d           t3
{s0},{t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d
      {s0},{t0},{s1},{t1},{t4},{s3},{t3},{s2,t2}

More Related Content

PDF
13.4 Katesismo Pagsulong Ng Parokya
PDF
ฝ่ายสวัสดิการ
PPTX
Compiler First Set Follow Set Brief
PDF
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
PDF
Advanced data structures and algorithms
PDF
Data type a la carte
PDF
Finite automata
PPT
Chapter 2 pc
13.4 Katesismo Pagsulong Ng Parokya
ฝ่ายสวัสดิการ
Compiler First Set Follow Set Brief
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
Advanced data structures and algorithms
Data type a la carte
Finite automata
Chapter 2 pc

Similar to Process Algebra (11)

PPTX
Lec 11 Functions of discrete structure .pptx
PPTX
Complete and Interpretable Conformance Checking of Business Processes
PDF
Inverse function
PPTX
Education Field for the composition function
PPT
PreCalc Section 1.6.ppt
PPT
Topic 3 Inverse of function, steps to find inverse and properties of inverse
PPT
Functions
PPT
Functions
PDF
5.6 Function inverse. A handout.
PPTX
Functions, one to one, onto function, inverse function
Lec 11 Functions of discrete structure .pptx
Complete and Interpretable Conformance Checking of Business Processes
Inverse function
Education Field for the composition function
PreCalc Section 1.6.ppt
Topic 3 Inverse of function, steps to find inverse and properties of inverse
Functions
Functions
5.6 Function inverse. A handout.
Functions, one to one, onto function, inverse function
Ad

More from jonecx (11)

PDF
Latex tutorial
PDF
BPMN
PDF
tdt4260
PDF
Tdt4242
PDF
SDL 2000 Tutorial
PDF
Owl syntax
PDF
Duplicate detection
PDF
Hickman threat modeling
PDF
NTNU EiT evaluation guideline
PDF
K-means clustering exercise based on eucalidean distance
PDF
BPMN by Example
Latex tutorial
BPMN
tdt4260
Tdt4242
SDL 2000 Tutorial
Owl syntax
Duplicate detection
Hickman threat modeling
NTNU EiT evaluation guideline
K-means clustering exercise based on eucalidean distance
BPMN by Example
Ad

Recently uploaded (20)

PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Architecture types and enterprise applications.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Hybrid model detection and classification of lung cancer
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Unlock new opportunities with location data.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
A comparative study of natural language inference in Swahili using monolingua...
Architecture types and enterprise applications.pdf
STKI Israel Market Study 2025 version august
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Hindi spoken digit analysis for native and non-native speakers
Hybrid model detection and classification of lung cancer
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Benefits of Physical activity for teenagers.pptx
Taming the Chaos: How to Turn Unstructured Data into Decisions
Enhancing emotion recognition model for a student engagement use case through...
Tartificialntelligence_presentation.pptx
observCloud-Native Containerability and monitoring.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Zenith AI: Advanced Artificial Intelligence
sustainability-14-14877-v2.pddhzftheheeeee
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Chapter 5: Probability Theory and Statistics
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Unlock new opportunities with location data.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network

Process Algebra

  • 2. The Main Issue Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the models have different executions?
  • 3. What is process algebra?  An abstract description for nondeterministic and concurrent systems.  Focuses on the transitions observed rather than on the states reached.  Main correctness criterion: conformance between two models.  Uses: system refinement, model checking, testing.
  • 4. Different models may have the same set of executions! e d a a e d a b c b c a-insert coin, b-press pepsi, c-press pepsi-light d-obtain pepsi, e-obtain pepsi-light
  • 5. Actions: Act={a,b,c,d}{}. Agents: E, E’, F, F1, F2, G1, G2, … E F e d a a e d a E’ F1 F2 b c b c G1 G2 Agent E may evolve into agent E’. Agent F may evolve into F1 or F2.
  • 6. Events. E F a   a a   E’ F1 F2 b c b c G1 G2 E—aE’, F—aF1, F—aF2, F1—aG1, F2—aG2. G1—F, G1—F.
  • 7. Actions and co-actions E F  a   a a  E’ F1 F2 b c b c G1 G2 For each action a, except for , there is a co- action a. a and a interact (a input, a output). The coaction of a is a.
  • 8. Notation E a.(b+c) a (actually, a.((b.0)+(c.0)) F E—aF b c F—bG G H F—cH 0 – deadlock/termination. a.E – execute a, then continue according to E. E+F – execute according to E or to F. E||F – execute E and F in parallel.
  • 9. Conventions  “.” has higher priority than “+”.  “.0” or “.(0||0||…||0)” is omitted.
  • 10. CCS - calculus of concurrent systems [Milner]. Syntax  a,b,c, … actions, A, B, C - agents.  a,b,c, coactions of a,b,c. -silent action.  nil - terminate.  a.E - execute a, then behave like E.  + - nondeterministic choice.  || - parallel composition.  L - restriction: cannot use letters of L.  [f] - apply mapping function f between between letters.
  • 11. Semantics (proof rule and axioms). Structural Operational Semantics SOS  a.p –a p  p—ap’ |-- p+q –a p’  q—aq’ |-- p+q –a q’  p—ap’ |-- p|q –a p’|q  q—aq’ |-- p|q –a p|q’  p—ap’, q—aq’ |-- p|q – p’|q’  p—ap’ , a  R |-- pL –a p’R  p—ap’ |-- p[m]—m(a)p’[m]
  • 12. Action Prefixing a.E—aE (Axiom) Thus, a.(b.(c||c)+d)—a(b.(c||c)+d).
  • 13. Choice E—aE’ F—aF’ (E+F)—aE’ (E+F)—aF’ b.(c||c)—b(c||c). Thus, (b.(c||c)+e)—b(c||c). If E—aE’ and F—aF’, then E+F has a nondeterministic choice.
  • 14. Concurrent Composition E—aE’ F—aF’ E||F—aE’||F E||F—aE||F’ E—aE’, F—aF’ ———————— E||F—E’||F’ c—c0, c—c0, c||c—0||0, c||c—c0||c, c||c—cc||0.
  • 15. Restriction E—aE’, a, a R ————————— ER –aE’R In this case: allows only internal interaction of c. c||c—0||0 c||c—c0||c c||c—cc||0 (c||c) {c}—(0||0) {c}
  • 16. Relabeling E—aE’ ———— E[m] –m(a)E’[m] No axioms/rules for agent 0.
  • 17. Examples a a.E||b.F b E||b.F a.E||F b a E||F
  • 18. Derivations a.(b.(c||c)+d) a b b.(c||c)+d d (c||c) c 0 c  (0||c) (c||0) c c (0||0)
  • 19. Modeling binary variable set_1 set_0 set_1 is_0? C0 C1 is_1? set_0 C0=is_0? . C0 + set_1 . C1 + set_0 . C0 C1=is_1? . C1 + set_0 . C0 + set_1 . C1
  • 20. Equational Definition E F  a   a a  E’ F1 F2 b c b c G1 G2 E=a.(b..E+c..E) E—aE’, A=E F=a.b..F+a.c..F A—aE’
  • 21. Trace equivalence: Systems have same finite sequences. E F a a a b c c b b E=a.(b+c) F=(a.b)+a.(b+c) Same traces
  • 22. Failures: comparing also what we cannot do after a finite sequence. E F a a a b c c b b Failure of agent E: (σ, X), where after executing σ from E, none of the events in X is enabled. Agent F has failure (a, {c}), which is not a failure of E.
  • 23. Simulation equivalence E F a a a b b b b c d c d  Relation over set of agents S. RSS.  ERF  If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’.
  • 24. Simulation equivalence E F a a a b b b b c d c d  Relation over set of agents S. RSS.  ERF  If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’.
  • 25. Here, simulation works only in one direction. No equivalence! want to establish E F a a a symmetrically b b b b necessarily c d c d problem!!!  Relation over set of agents S. RSS.  ERF  If E’ R F’ and E’—aE’’, then there exists F’’, F’—aF’’, and E’’ R F’’.
  • 26. Simulation equivalent but not failure equivalent E F a a a b b Left agent a.b+a has a failure (a,{b}).
  • 27. Bisimulation: same relation simulates in both directions E F a a a b b Not in this case: different simulation relations.
  • 28. Hierarchy of equivalences Bisimulation Simulation Failure Trace
  • 29. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c A=a.((b.nil)+(c.d.A)) d t3 B=(a.(b.nil))+(a.c.d.B)
  • 30. Bisimulation between G1 and G2  Let N= N1 U N2  A relation R : N1 x N2 is a bisumulation if If (m,n) in R then 1. If m—am’ then n’:n—an’ and (m’,n’) in R 2. If n—an’ then m’:m—am’ and (m’,n’) in R.  Other simulation relations are possible, I.e., m=a=> m’ when m—…—a—m’.
  • 31. Algorithm for bisimulation:  Partition N into blocks B1B2…Bn=N.  Initially: one block, containing all of N.  Repeat until no change: Choose a block Bi and a letter a. If some of the transitions of Bi move to some block Bj and some not, partition Bi accordingly.  At the end: Structures bisimilar if initial states of two structures are in same blocks.
  • 32. Correctness of algorithm  Invariant: if (m,n) in R then m and n remain in the same block throughout the algorithm.  Termination: can split only a finite number of times.
  • 33. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,s1,s2,s3,t0,t1,t2,t3,t4}
  • 34. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,s1,s2,s3,t0,t1,t2,t3,t4} split on a. {s0,t0},{s1,s2,s3,t1,t2,t3,t4}
  • 35. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,t0},{s1,s2,s3,t1,t2,t3,t4} split on b {s0,t0},{s1,t1},{s0,s2,s3,t2,t3,t4}
  • 36. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,t0},{s1,t1},{s2,s3,t2,t3,t4} split on c {s0,t0},{s1},{t1},{s2,s3,t2,t3,t4}
  • 37. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,t0},{s1},{t1},{s2,s3,t2,t3,t4} split on c {s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3}
  • 38. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d {s0,t0},{s1},{t1},{t4},{s3, t3},{s2,t2}
  • 39. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0,t0},{s1},{t1},{t4},{s2,t2},{s3,t3} split on a {s0},{t0},{s1},{t1},{t4},{s3, t3},{s2,t2}
  • 40. Example: a s1 b s2 s0 c d s3 b a t1 t2 t0 a t4 c d t3 {s0},{t0},{s1},{t1},{t4},{s2,s3,t2,t3} split on d {s0},{t0},{s1},{t1},{t4},{s3},{t3},{s2,t2}