SlideShare a Scribd company logo
Shared-Memory Systems and Charts


                   Remi MORIN
                    ´
               Universite de la M´diterran´e
                        ´        e        e
   Laboratoire d’Informatique Fondamentale de Marseille



CSR 2011                                         June 2011
Peterson’s mutual exclusion protocol



Process 1                   Process 2
 repeat:                     repeat:
   f[1] ← true;                f[2] ← true;
   Turn ← 2;                   Turn ← 1;
   wait (f[2] = false          wait (f[1] = false
            or Turn = 1);               or Turn = 2);
   Critical Section(1);        Critical Section(2);
   f[1] ← false;               f[2] ← false;




                                                        1
Executions as partial orders (pomsets)

                     Process 1   Process 2

              f[1]←true               f[2]←true
                                      Turn←1
                 Turn←2
                                      Turn=2
Time




                                      C.S.(2)
                                      f[2]←false
              f[2]=false
                 C.S.(1)



                                                   2
Foreword
   Model and semantics
    Expressive power  MSO logic
    Specifications with automata
    Checking SMC specifications



                    2
A simple model for shared-memory systems
Let Σ be a fixed alphabet.
A shared-memory system consists of
 • a set of registers R, a set of data D,
 • a set of processes P
 • for each action a ∈ Σ: a non-empty subset Loc(a) ⊆ P
 • an initial configuration ı ∈ Q
 • some final configurations F ⊆ Q.
 • and for each action a ∈ Σ: a set of rules ∆a
  • A configuration is a mapping q : R → D
  • A rule is a triple ρ = (ν, a, ν′ ) where ν, ν′ : R ⇀ D

                   Guard             Update
                                                             3
Sequential operational semantics
For any two states q, q′ ∈ Q and any rule ρ = (ν, a, ν′ ) ∈ ∆a ,
we denote by
 • aρ = a the action performed by ρ
 • Rρ = dom(ν) the subset of registers read by ρ
 • Wρ = dom(ν′ ) the subset of registers modified by ρ


           ρ
We put q→q′ if
  • q|Rρ = ν                                  (the rule is enabled in q)

  • q′ |Wρ = ν′                               (the rule is applied in q′ )

  • q′ (r) = q(r) for all r ∈ R  Wρ (nothing else happens inbetween)


                                                                             4
Special case [Zielonka, RAIRO, 1987]




An asynchronous automaton is an SMS such that

 • P = R and

 • for all rules ρ ∈ ∆a , Rρ = Loc(a) = Wρ .




                                                5
May-Occur-Concurrently relation

Let ρ, ρ′ ∈ ∆ be two rules.
We put ρ ρ′ if

 • Loc(aρ ) ∩ Loc(aρ′ ) = ∅,

 • Wρ ∩ (Rρ′ ∪ Wρ′ ) = ∅ and

 • Wρ′ ∩ (Rρ ∪ Wρ ) = ∅.


Intuitively, two rules may occur concurrently if they correspond to
actions occurring on disjoint sets of processes and if each rule does
not modify the registers read or written by the other.



                                                                        6
Partial-order semantics (1/2)
Let t = (E, , η) be a labeled partial order, i.e. a partially
ordered multiset (for short: a pomset) over Σ.
A run of t is a mapping ρ : E → ∆ such that

R0 : For all e ∈ E, aρ(e) = η(e)
                                       (rule action matches event action)

R1 : For all e1 , e2 ∈ E with ρ(e1 ) ρ(e2 ), e1   e2 or e2     e1
                             (dependent rules cannot occur concurrently)

R2 : For all e1 , e2 ∈ E with e1 — 2 , ρ(e1 ) ρ(e2 )
                                  ≺e
                                         (waiting means rule dependency)

where x— means: x ≺ y and x ≺ z
        ≺y                                    y implies z = y.


                                                                            7
Partial-order semantics (2/2)
Let H be a downward-closed subset of events (a prefix of t).
The configuration qρ,H reached after H with run ρ is such that
               
               ν′ (r)          if e = max{f ∈ H | r ∈ Wρ(e) }
                 ρ(e)
    qρ,H (r) =
               qρ,H (r) = ı(r) if there is no such event


A run ρ of t is applicable if the rule ρ(e) is enabled in qρ,↓e{e}
for all events e ∈ E.
An applicable run of t = (E, , η) is accepting if qρ,E ∈ F.


Definition

The language L(S) recognized by S collects all pomsets which
admit some accepting run.
                                                                      8
Foreword
    Model and semantics
   Expressive power  MSO logic
    Specifications with automata
    Checking SMC specifications



                    8
Question!
Let Σ = {p, c} and L be the set of all ladders.

       p        c           p       c             p   c




       Does any SMS recognize this language?

                                                          9
MSO logic



The language of all ladders is MSO-definable by the conjunc-
tion of the following sentences:

               ∀y : Pc (y) → ∃x.(Pp (x) ∧ x—≺y)
               ∀x, z : Pp (x) → ∃y.(Pc (y) ∧ x—≺y))
               ∀x, y : (Pp (y) ∧ x   y) → Pp (x)




                                                              10
Cut-bounded languages
The (universal) cut-width of t = (E, , η) is

CW(t) =      max         #{ (h, e) ∈ H x (E  H) | h—≺e }   p   c
          H prefix of t



Definition
The cut-bound B ∈ N ∪ {∞} of L is

                   sup{ CW(t) | t ∈ L }

L is cut-bounded if its cut-bound is  ∞.

Example
The language of all ladders is not cut-bounded.

                                                                    11
First result
                   MSO-definable languages




               ¢


                                            Cut-bounded languages
                                                               ¢


Pomset languages



Theorem (Expressive power of shared-memory systems)

A pomset language is recognized by some finite SMS iff
it is MSO-definable and cut-bounded .

                                                                    12
Deterministic rules and weak unambiguity

A shared-memory system has deterministic rules if for all
actions a ∈ Σ and all valuations ν ∈ V there exists at most
one rule (ν, a, ν′ ) ∈ ∆.
A shared-memory system is weakly-unambiguous if each
pomset from L(S) admits a unique accepting run.


Theorem (Expressive power equivalence)

The language of any finite shared-memory system is the
language of a weakly-unambiguous finite shared-memory
system with deterministic rules.


                                                              13
Unambiguous case
                   MSO-definable languages




               ¢
                                            Media-bounded languages
                                                                 ¢

                                              Cut-bounded languages
                                                                 ¢


Pomset languages



Theorem ≃ [M., IJFCS, 2010]

A pomset language is recognized by some unambiguous finite
SMS iff it is MSO-definable and media-bounded .

                                                                      14
Deterministic case
                   MSO-definable languages




               ¢
                                                        Media-bounded languages
                                                                             ¢

                                                          Cut-bounded languages
                                                                             ¢


Pomset languages             Consistent and coherent languages


Theorem ≃ [M., CONCUR’08]

A pomset language is recognized by some deterministic finite
SMS iff it is MSO-definable, media-bounded, coherent and
consistent .
                                                                                  15
Foreword
    Model and semantics
    Expressive power  MSO logic
   Specifications with automata
    Checking SMC specifications



                    15
How to concatenate two pomsets?


                  a                      a
                         ?
b       x                =
                  a            b         a




    We have to distinguish between a’s



                                             16
How to concatenate two pomsets?

a
                                a
                                a

                      ?
         a
                                a

a


         a      b
                    ;           a

                                a
                                a        b
                                a
a
                                a




    We have to distinguish between a’s

                                             17
Pomsets with gates
Let G be a finite and non-empty set of gates .
We consider the extended alphabet Γ = Σ x 2G  {∅}.
We put (a, H)   Γ (a′ , H′ ) if H ∩ H′ ≠ ∅ or a = a′ .


Definition (Pomsets with gates)

A shared-memory chart (an SMC) is a pomset t = (E, , η) over
Γ such that we have either e1        e2 or e2 e1 for any two
events e1 and e2 with η(e1 ) Γ η(e2 ).


We denote by SMC the set of all SMCs.


                                                               18
Product of SMCs
                                  a, {x}                              a, {x}


  b, {x}            x                         =
                                  a, {y}          b, {x}              a, {y}


Definition (Product of pomsets with gates)

Given two SMCs t1 = (E1 , 1 , η1 ) and t2 = (E2 , 2 , η2 ) the
asynchronous product t1 · t2 is the pomset t = (E, , η) where
E = E1 ∪ E2 , η = η1 ∪ η2 , and is the transitive closure of

            1   ∪   2   ∪{(e1 , e2 ) ∈ E1 x E2 | η(e1 )   Γ η(e2 )}


                                                                               19
Rational SMC languages
                                             a
     a, {x}
                                             a

                 a, {x, y}                   a
                                             a
     a, {x}


                 a, {x}      b, {y}
                                      ;      a
                                             a      b
                                             a
     a, {x}
                                             a


Definition (Automata over pomsets with gates)

An SMC specification is an automaton A = (Q, ı, →, F) where Q
is a finite set of states, with initial state ı, → ⊆ Q x SMC x Q
is a finite set of transitions labeled by SMCs, and F ⊆ Q is a
subset of final states.
                                                                  20
SMCs vs. Mazurkiewicz traces and MSCs
Any Mazurkiewicz trace can be regarded as an SMC where
each action is a gate and each event labeled by a is associated
with the set of actions dependent with a.
Similarly any message sequence chart can be regarded as an
SMC where gates are processes and each event is associated
with the (single) process where it occurs.
Moreover these identifications preserve the product of
traces and MSCs

In that way, SMCs appear as a formal generalization
of both Mazurkiewicz traces and message sequence
charts.

                                                                  21
Foreword
    Model and semantics
    Expressive power  MSO logic
    Specifications with automata
   Checking SMC specifications



                    21
How to detect unbounded specifications?


Definition

Let t = (E, , η) be an SMC. The communication graph of t is the
directed graph CG(t) = (V, →) over the set V = e∈E π2 (η(e))
of active gates in t such that g → g′ if there are e, e′ ∈ E for
which g ∈ π2 (η(e)), g′ ∈ π2 (η(e′ )) and

 • either η(e)   Γ η(e′ )

 • or e— ′ .
        ≺e




                                                                   22
Checking unboundedness

Theorem

The pomset language LΣ (A) of an SMC specification A is
                                       t1   tn
cut-bounded iff for any loop q0 →...→qn = q0 , all connected
components of the communication graph CG(t1 · ... · tn ) are
strongly connected.




Consequently checking for cut-boundedness of a given SMC specification is
decidable. It is actually easy to show that this problem is co-NP-complete.




                                                                              23
How to detect non-implementable specifications?

  We cannot decide whether an SMC specification describes
  an implementable language, since this question is already
  undecidable for Mazurkiewicz traces.
   Definition

  An SMC specification is loop-connected if for all loops
    t1   tn
  q0 →...→qn = q0 the communication graph of the SMC t1 · ... · tn
  is connected.
   Theorem

  A cut-bounded language is MSO-definable if and only if it is
  the language of a loop-connected SMC specification.


                                                                     24
Conclusion
• We have presented a characterization of the expressive
  power of shared-memory systems
  1. in terms of logic definability and cut-boundedness
  2. in terms of automata over pomsets with gates.

• This model of concurrency and this algebraic framework
  generalize the theory of Mazurkiewicz traces and
  message sequence charts.

• These results should be extended soon to systems with
  autoconcurrency .

• A simpler notion of communication graph may be designed.


                                                             25
Questions?
Unambiguity  determinism

An SMS is unambiguous if each pomset admits at most one
applicable run.


An SMS is deterministic if for each a ∈ Σ and each reachable
configuration q, there exists at most one rule ρ ∈ ∆a such that
  ρ
q→q′ .

Clearly:
         Any deterministic SMS is unambiguous.



                                                                 26

More Related Content

What's hot

FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
IJESM JOURNAL
 
Automata languages and computation
Automata languages and computationAutomata languages and computation
Automata languages and computationKarthik Velou
 
The Effective Fragment Molecular Orbital Method
The Effective Fragment Molecular Orbital MethodThe Effective Fragment Molecular Orbital Method
The Effective Fragment Molecular Orbital Methodcsteinmann
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural Networks
Alina Leidinger
 
Lattices, sphere packings, spherical codes
Lattices, sphere packings, spherical codesLattices, sphere packings, spherical codes
Lattices, sphere packings, spherical codes
wtyru1989
 
Simple effective decipherment via combinatorial optimization
Simple effective decipherment via combinatorial optimizationSimple effective decipherment via combinatorial optimization
Simple effective decipherment via combinatorial optimizationAttaporn Ninsuwan
 
Poster Partial And Complete Observables
Poster Partial And Complete ObservablesPoster Partial And Complete Observables
Poster Partial And Complete Observablesguest9fa195
 
visualizing and measuring the geometry of bert
visualizing and measuring the geometry of bertvisualizing and measuring the geometry of bert
visualizing and measuring the geometry of bert
taeseon ryu
 

What's hot (9)

FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
FURTHER CHARACTERIZATIONS AND SOME APPLICATIONS OF UPPER AND LOWER WEAKLY QUA...
 
Automata languages and computation
Automata languages and computationAutomata languages and computation
Automata languages and computation
 
The Effective Fragment Molecular Orbital Method
The Effective Fragment Molecular Orbital MethodThe Effective Fragment Molecular Orbital Method
The Effective Fragment Molecular Orbital Method
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural Networks
 
Lattices, sphere packings, spherical codes
Lattices, sphere packings, spherical codesLattices, sphere packings, spherical codes
Lattices, sphere packings, spherical codes
 
Jokyokai20111124
Jokyokai20111124Jokyokai20111124
Jokyokai20111124
 
Simple effective decipherment via combinatorial optimization
Simple effective decipherment via combinatorial optimizationSimple effective decipherment via combinatorial optimization
Simple effective decipherment via combinatorial optimization
 
Poster Partial And Complete Observables
Poster Partial And Complete ObservablesPoster Partial And Complete Observables
Poster Partial And Complete Observables
 
visualizing and measuring the geometry of bert
visualizing and measuring the geometry of bertvisualizing and measuring the geometry of bert
visualizing and measuring the geometry of bert
 

Viewers also liked

Csr2011 june14 15_15_romashchenko
Csr2011 june14 15_15_romashchenkoCsr2011 june14 15_15_romashchenko
Csr2011 june14 15_15_romashchenkoCSR2011
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCSR2011
 
Csr2011 june16 14_00_kari
Csr2011 june16 14_00_kariCsr2011 june16 14_00_kari
Csr2011 june16 14_00_kariCSR2011
 
Csr2011 june14 09_30_grigoriev
Csr2011 june14 09_30_grigorievCsr2011 june14 09_30_grigoriev
Csr2011 june14 09_30_grigorievCSR2011
 
Csr2011 june15 11_00_sima
Csr2011 june15 11_00_simaCsr2011 june15 11_00_sima
Csr2011 june15 11_00_simaCSR2011
 
Layla的故事(下)
Layla的故事(下)Layla的故事(下)
Layla的故事(下)shihfang Ma
 
Y7 Module 1 Vocabulary
Y7 Module 1 VocabularyY7 Module 1 Vocabulary
Y7 Module 1 Vocabularycurriea
 
Csr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCsr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCSR2011
 

Viewers also liked (8)

Csr2011 june14 15_15_romashchenko
Csr2011 june14 15_15_romashchenkoCsr2011 june14 15_15_romashchenko
Csr2011 june14 15_15_romashchenko
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansen
 
Csr2011 june16 14_00_kari
Csr2011 june16 14_00_kariCsr2011 june16 14_00_kari
Csr2011 june16 14_00_kari
 
Csr2011 june14 09_30_grigoriev
Csr2011 june14 09_30_grigorievCsr2011 june14 09_30_grigoriev
Csr2011 june14 09_30_grigoriev
 
Csr2011 june15 11_00_sima
Csr2011 june15 11_00_simaCsr2011 june15 11_00_sima
Csr2011 june15 11_00_sima
 
Layla的故事(下)
Layla的故事(下)Layla的故事(下)
Layla的故事(下)
 
Y7 Module 1 Vocabulary
Y7 Module 1 VocabularyY7 Module 1 Vocabulary
Y7 Module 1 Vocabulary
 
Csr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCsr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanov
 

Similar to Csr2011 june17 12_00_morin

"SSC" - Geometria e Semantica del Linguaggio
"SSC" - Geometria e Semantica del Linguaggio"SSC" - Geometria e Semantica del Linguaggio
"SSC" - Geometria e Semantica del Linguaggio
Alumni Mathematica
 
Contributions to connectionist language modeling and its application to seque...
Contributions to connectionist language modeling and its application to seque...Contributions to connectionist language modeling and its application to seque...
Contributions to connectionist language modeling and its application to seque...
Francisco Zamora-Martinez
 
Topological Inference via Meshing
Topological Inference via MeshingTopological Inference via Meshing
Topological Inference via Meshing
Don Sheehy
 
Introduction to the theory of optimization
Introduction to the theory of optimizationIntroduction to the theory of optimization
Introduction to the theory of optimization
Delta Pi Systems
 
Unit ii
Unit iiUnit ii
Unit ii
TPLatchoumi
 
Class 37: Computability in Theory and Practice
Class 37: Computability in Theory and PracticeClass 37: Computability in Theory and Practice
Class 37: Computability in Theory and Practice
David Evans
 
Maximizing Submodular Function over the Integer Lattice
Maximizing Submodular Function over the Integer LatticeMaximizing Submodular Function over the Integer Lattice
Maximizing Submodular Function over the Integer Lattice
Tasuku Soma
 
1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt
Marvin886766
 
Алексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВАлексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВ
Minsk Linux User Group
 
Cb25464467
Cb25464467Cb25464467
Cb25464467
IJERA Editor
 
Site visit presentation 2012 12 14
Site visit presentation 2012 12 14Site visit presentation 2012 12 14
Site visit presentation 2012 12 14Mitchell Wand
 
IVR - Chapter 6 - Sparsity, shrinkage and wavelets
IVR - Chapter 6 - Sparsity, shrinkage and waveletsIVR - Chapter 6 - Sparsity, shrinkage and wavelets
IVR - Chapter 6 - Sparsity, shrinkage and wavelets
Charles Deledalle
 
XtremeDistil: Multi-stage Distillation for Massive Multilingual Models
XtremeDistil: Multi-stage Distillation for Massive Multilingual ModelsXtremeDistil: Multi-stage Distillation for Massive Multilingual Models
XtremeDistil: Multi-stage Distillation for Massive Multilingual Models
Subhabrata Mukherjee
 
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
Paris Women in Machine Learning and Data Science
 
Pointing the Unknown Words
Pointing the Unknown WordsPointing the Unknown Words
Pointing the Unknown Words
hytae
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsAleksandr Yampolskiy
 
Advances in Directed Spanners
Advances in Directed SpannersAdvances in Directed Spanners
Advances in Directed Spanners
Grigory Yaroslavtsev
 
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping LemmaTheory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
PRAVEENTALARI4
 
Dependent Type Semantics and its Davidsonian extensions
Dependent Type Semantics and its Davidsonian extensionsDependent Type Semantics and its Davidsonian extensions
Dependent Type Semantics and its Davidsonian extensions
Daisuke BEKKI
 

Similar to Csr2011 june17 12_00_morin (20)

"SSC" - Geometria e Semantica del Linguaggio
"SSC" - Geometria e Semantica del Linguaggio"SSC" - Geometria e Semantica del Linguaggio
"SSC" - Geometria e Semantica del Linguaggio
 
draft
draftdraft
draft
 
Contributions to connectionist language modeling and its application to seque...
Contributions to connectionist language modeling and its application to seque...Contributions to connectionist language modeling and its application to seque...
Contributions to connectionist language modeling and its application to seque...
 
Topological Inference via Meshing
Topological Inference via MeshingTopological Inference via Meshing
Topological Inference via Meshing
 
Introduction to the theory of optimization
Introduction to the theory of optimizationIntroduction to the theory of optimization
Introduction to the theory of optimization
 
Unit ii
Unit iiUnit ii
Unit ii
 
Class 37: Computability in Theory and Practice
Class 37: Computability in Theory and PracticeClass 37: Computability in Theory and Practice
Class 37: Computability in Theory and Practice
 
Maximizing Submodular Function over the Integer Lattice
Maximizing Submodular Function over the Integer LatticeMaximizing Submodular Function over the Integer Lattice
Maximizing Submodular Function over the Integer Lattice
 
1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt
 
Алексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВАлексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВ
 
Cb25464467
Cb25464467Cb25464467
Cb25464467
 
Site visit presentation 2012 12 14
Site visit presentation 2012 12 14Site visit presentation 2012 12 14
Site visit presentation 2012 12 14
 
IVR - Chapter 6 - Sparsity, shrinkage and wavelets
IVR - Chapter 6 - Sparsity, shrinkage and waveletsIVR - Chapter 6 - Sparsity, shrinkage and wavelets
IVR - Chapter 6 - Sparsity, shrinkage and wavelets
 
XtremeDistil: Multi-stage Distillation for Massive Multilingual Models
XtremeDistil: Multi-stage Distillation for Massive Multilingual ModelsXtremeDistil: Multi-stage Distillation for Massive Multilingual Models
XtremeDistil: Multi-stage Distillation for Massive Multilingual Models
 
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
Ultra-efficient algorithms for testing well-parenthesised expressions by Tati...
 
Pointing the Unknown Words
Pointing the Unknown WordsPointing the Unknown Words
Pointing the Unknown Words
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random Permutations
 
Advances in Directed Spanners
Advances in Directed SpannersAdvances in Directed Spanners
Advances in Directed Spanners
 
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping LemmaTheory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
 
Dependent Type Semantics and its Davidsonian extensions
Dependent Type Semantics and its Davidsonian extensionsDependent Type Semantics and its Davidsonian extensions
Dependent Type Semantics and its Davidsonian extensions
 

More from CSR2011

Csr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCsr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCSR2011
 
Csr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCsr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCSR2011
 
Csr2011 june18 14_00_sudan
Csr2011 june18 14_00_sudanCsr2011 june18 14_00_sudan
Csr2011 june18 14_00_sudanCSR2011
 
Csr2011 june18 15_45_avron
Csr2011 june18 15_45_avronCsr2011 june18 15_45_avron
Csr2011 june18 15_45_avronCSR2011
 
Csr2011 june18 09_30_shpilka
Csr2011 june18 09_30_shpilkaCsr2011 june18 09_30_shpilka
Csr2011 june18 09_30_shpilkaCSR2011
 
Csr2011 june18 12_00_nguyen
Csr2011 june18 12_00_nguyenCsr2011 june18 12_00_nguyen
Csr2011 june18 12_00_nguyenCSR2011
 
Csr2011 june18 11_00_tiskin
Csr2011 june18 11_00_tiskinCsr2011 june18 11_00_tiskin
Csr2011 june18 11_00_tiskinCSR2011
 
Csr2011 june18 11_30_remila
Csr2011 june18 11_30_remilaCsr2011 june18 11_30_remila
Csr2011 june18 11_30_remilaCSR2011
 
Csr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCsr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCSR2011
 
Csr2011 june17 16_30_blin
Csr2011 june17 16_30_blinCsr2011 june17 16_30_blin
Csr2011 june17 16_30_blinCSR2011
 
Csr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCsr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCSR2011
 
Csr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCsr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCSR2011
 
Csr2011 june17 12_00_morin
Csr2011 june17 12_00_morinCsr2011 june17 12_00_morin
Csr2011 june17 12_00_morinCSR2011
 
Csr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCsr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCSR2011
 
Csr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCsr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCSR2011
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCSR2011
 
Csr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCsr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCSR2011
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCSR2011
 
Csr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCsr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCSR2011
 
Csr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCsr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCSR2011
 

More from CSR2011 (20)

Csr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCsr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoff
 
Csr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoffCsr2011 june18 15_15_bomhoff
Csr2011 june18 15_15_bomhoff
 
Csr2011 june18 14_00_sudan
Csr2011 june18 14_00_sudanCsr2011 june18 14_00_sudan
Csr2011 june18 14_00_sudan
 
Csr2011 june18 15_45_avron
Csr2011 june18 15_45_avronCsr2011 june18 15_45_avron
Csr2011 june18 15_45_avron
 
Csr2011 june18 09_30_shpilka
Csr2011 june18 09_30_shpilkaCsr2011 june18 09_30_shpilka
Csr2011 june18 09_30_shpilka
 
Csr2011 june18 12_00_nguyen
Csr2011 june18 12_00_nguyenCsr2011 june18 12_00_nguyen
Csr2011 june18 12_00_nguyen
 
Csr2011 june18 11_00_tiskin
Csr2011 june18 11_00_tiskinCsr2011 june18 11_00_tiskin
Csr2011 june18 11_00_tiskin
 
Csr2011 june18 11_30_remila
Csr2011 june18 11_30_remilaCsr2011 june18 11_30_remila
Csr2011 june18 11_30_remila
 
Csr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanovCsr2011 june17 17_00_likhomanov
Csr2011 june17 17_00_likhomanov
 
Csr2011 june17 16_30_blin
Csr2011 june17 16_30_blinCsr2011 june17 16_30_blin
Csr2011 june17 16_30_blin
 
Csr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCsr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhanin
 
Csr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhaninCsr2011 june17 09_30_yekhanin
Csr2011 june17 09_30_yekhanin
 
Csr2011 june17 12_00_morin
Csr2011 june17 12_00_morinCsr2011 june17 12_00_morin
Csr2011 june17 12_00_morin
 
Csr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCsr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyi
 
Csr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCsr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonati
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
 
Csr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCsr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminski
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
 
Csr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyiCsr2011 june17 11_30_vyalyi
Csr2011 june17 11_30_vyalyi
 
Csr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonatiCsr2011 june17 11_00_lonati
Csr2011 june17 11_00_lonati
 

Csr2011 june17 12_00_morin

  • 1. Shared-Memory Systems and Charts Remi MORIN ´ Universite de la M´diterran´e ´ e e Laboratoire d’Informatique Fondamentale de Marseille CSR 2011 June 2011
  • 2. Peterson’s mutual exclusion protocol Process 1 Process 2 repeat: repeat: f[1] ← true; f[2] ← true; Turn ← 2; Turn ← 1; wait (f[2] = false wait (f[1] = false or Turn = 1); or Turn = 2); Critical Section(1); Critical Section(2); f[1] ← false; f[2] ← false; 1
  • 3. Executions as partial orders (pomsets) Process 1 Process 2 f[1]←true f[2]←true Turn←1 Turn←2 Turn=2 Time C.S.(2) f[2]←false f[2]=false C.S.(1) 2
  • 4. Foreword Model and semantics Expressive power MSO logic Specifications with automata Checking SMC specifications 2
  • 5. A simple model for shared-memory systems Let Σ be a fixed alphabet. A shared-memory system consists of • a set of registers R, a set of data D, • a set of processes P • for each action a ∈ Σ: a non-empty subset Loc(a) ⊆ P • an initial configuration ı ∈ Q • some final configurations F ⊆ Q. • and for each action a ∈ Σ: a set of rules ∆a • A configuration is a mapping q : R → D • A rule is a triple ρ = (ν, a, ν′ ) where ν, ν′ : R ⇀ D Guard Update 3
  • 6. Sequential operational semantics For any two states q, q′ ∈ Q and any rule ρ = (ν, a, ν′ ) ∈ ∆a , we denote by • aρ = a the action performed by ρ • Rρ = dom(ν) the subset of registers read by ρ • Wρ = dom(ν′ ) the subset of registers modified by ρ ρ We put q→q′ if • q|Rρ = ν (the rule is enabled in q) • q′ |Wρ = ν′ (the rule is applied in q′ ) • q′ (r) = q(r) for all r ∈ R Wρ (nothing else happens inbetween) 4
  • 7. Special case [Zielonka, RAIRO, 1987] An asynchronous automaton is an SMS such that • P = R and • for all rules ρ ∈ ∆a , Rρ = Loc(a) = Wρ . 5
  • 8. May-Occur-Concurrently relation Let ρ, ρ′ ∈ ∆ be two rules. We put ρ ρ′ if • Loc(aρ ) ∩ Loc(aρ′ ) = ∅, • Wρ ∩ (Rρ′ ∪ Wρ′ ) = ∅ and • Wρ′ ∩ (Rρ ∪ Wρ ) = ∅. Intuitively, two rules may occur concurrently if they correspond to actions occurring on disjoint sets of processes and if each rule does not modify the registers read or written by the other. 6
  • 9. Partial-order semantics (1/2) Let t = (E, , η) be a labeled partial order, i.e. a partially ordered multiset (for short: a pomset) over Σ. A run of t is a mapping ρ : E → ∆ such that R0 : For all e ∈ E, aρ(e) = η(e) (rule action matches event action) R1 : For all e1 , e2 ∈ E with ρ(e1 ) ρ(e2 ), e1 e2 or e2 e1 (dependent rules cannot occur concurrently) R2 : For all e1 , e2 ∈ E with e1 — 2 , ρ(e1 ) ρ(e2 ) ≺e (waiting means rule dependency) where x— means: x ≺ y and x ≺ z ≺y y implies z = y. 7
  • 10. Partial-order semantics (2/2) Let H be a downward-closed subset of events (a prefix of t). The configuration qρ,H reached after H with run ρ is such that  ν′ (r) if e = max{f ∈ H | r ∈ Wρ(e) } ρ(e) qρ,H (r) = qρ,H (r) = ı(r) if there is no such event A run ρ of t is applicable if the rule ρ(e) is enabled in qρ,↓e{e} for all events e ∈ E. An applicable run of t = (E, , η) is accepting if qρ,E ∈ F. Definition The language L(S) recognized by S collects all pomsets which admit some accepting run. 8
  • 11. Foreword Model and semantics Expressive power MSO logic Specifications with automata Checking SMC specifications 8
  • 12. Question! Let Σ = {p, c} and L be the set of all ladders. p c p c p c Does any SMS recognize this language? 9
  • 13. MSO logic The language of all ladders is MSO-definable by the conjunc- tion of the following sentences: ∀y : Pc (y) → ∃x.(Pp (x) ∧ x—≺y) ∀x, z : Pp (x) → ∃y.(Pc (y) ∧ x—≺y)) ∀x, y : (Pp (y) ∧ x y) → Pp (x) 10
  • 14. Cut-bounded languages The (universal) cut-width of t = (E, , η) is CW(t) = max #{ (h, e) ∈ H x (E H) | h—≺e } p c H prefix of t Definition The cut-bound B ∈ N ∪ {∞} of L is sup{ CW(t) | t ∈ L } L is cut-bounded if its cut-bound is ∞. Example The language of all ladders is not cut-bounded. 11
  • 15. First result MSO-definable languages ¢ Cut-bounded languages ¢ Pomset languages Theorem (Expressive power of shared-memory systems) A pomset language is recognized by some finite SMS iff it is MSO-definable and cut-bounded . 12
  • 16. Deterministic rules and weak unambiguity A shared-memory system has deterministic rules if for all actions a ∈ Σ and all valuations ν ∈ V there exists at most one rule (ν, a, ν′ ) ∈ ∆. A shared-memory system is weakly-unambiguous if each pomset from L(S) admits a unique accepting run. Theorem (Expressive power equivalence) The language of any finite shared-memory system is the language of a weakly-unambiguous finite shared-memory system with deterministic rules. 13
  • 17. Unambiguous case MSO-definable languages ¢ Media-bounded languages ¢ Cut-bounded languages ¢ Pomset languages Theorem ≃ [M., IJFCS, 2010] A pomset language is recognized by some unambiguous finite SMS iff it is MSO-definable and media-bounded . 14
  • 18. Deterministic case MSO-definable languages ¢ Media-bounded languages ¢ Cut-bounded languages ¢ Pomset languages Consistent and coherent languages Theorem ≃ [M., CONCUR’08] A pomset language is recognized by some deterministic finite SMS iff it is MSO-definable, media-bounded, coherent and consistent . 15
  • 19. Foreword Model and semantics Expressive power MSO logic Specifications with automata Checking SMC specifications 15
  • 20. How to concatenate two pomsets? a a ? b x = a b a We have to distinguish between a’s 16
  • 21. How to concatenate two pomsets? a a a ? a a a a b ; a a a b a a a We have to distinguish between a’s 17
  • 22. Pomsets with gates Let G be a finite and non-empty set of gates . We consider the extended alphabet Γ = Σ x 2G {∅}. We put (a, H) Γ (a′ , H′ ) if H ∩ H′ ≠ ∅ or a = a′ . Definition (Pomsets with gates) A shared-memory chart (an SMC) is a pomset t = (E, , η) over Γ such that we have either e1 e2 or e2 e1 for any two events e1 and e2 with η(e1 ) Γ η(e2 ). We denote by SMC the set of all SMCs. 18
  • 23. Product of SMCs a, {x} a, {x} b, {x} x = a, {y} b, {x} a, {y} Definition (Product of pomsets with gates) Given two SMCs t1 = (E1 , 1 , η1 ) and t2 = (E2 , 2 , η2 ) the asynchronous product t1 · t2 is the pomset t = (E, , η) where E = E1 ∪ E2 , η = η1 ∪ η2 , and is the transitive closure of 1 ∪ 2 ∪{(e1 , e2 ) ∈ E1 x E2 | η(e1 ) Γ η(e2 )} 19
  • 24. Rational SMC languages a a, {x} a a, {x, y} a a a, {x} a, {x} b, {y} ; a a b a a, {x} a Definition (Automata over pomsets with gates) An SMC specification is an automaton A = (Q, ı, →, F) where Q is a finite set of states, with initial state ı, → ⊆ Q x SMC x Q is a finite set of transitions labeled by SMCs, and F ⊆ Q is a subset of final states. 20
  • 25. SMCs vs. Mazurkiewicz traces and MSCs Any Mazurkiewicz trace can be regarded as an SMC where each action is a gate and each event labeled by a is associated with the set of actions dependent with a. Similarly any message sequence chart can be regarded as an SMC where gates are processes and each event is associated with the (single) process where it occurs. Moreover these identifications preserve the product of traces and MSCs In that way, SMCs appear as a formal generalization of both Mazurkiewicz traces and message sequence charts. 21
  • 26. Foreword Model and semantics Expressive power MSO logic Specifications with automata Checking SMC specifications 21
  • 27. How to detect unbounded specifications? Definition Let t = (E, , η) be an SMC. The communication graph of t is the directed graph CG(t) = (V, →) over the set V = e∈E π2 (η(e)) of active gates in t such that g → g′ if there are e, e′ ∈ E for which g ∈ π2 (η(e)), g′ ∈ π2 (η(e′ )) and • either η(e) Γ η(e′ ) • or e— ′ . ≺e 22
  • 28. Checking unboundedness Theorem The pomset language LΣ (A) of an SMC specification A is t1 tn cut-bounded iff for any loop q0 →...→qn = q0 , all connected components of the communication graph CG(t1 · ... · tn ) are strongly connected. Consequently checking for cut-boundedness of a given SMC specification is decidable. It is actually easy to show that this problem is co-NP-complete. 23
  • 29. How to detect non-implementable specifications? We cannot decide whether an SMC specification describes an implementable language, since this question is already undecidable for Mazurkiewicz traces. Definition An SMC specification is loop-connected if for all loops t1 tn q0 →...→qn = q0 the communication graph of the SMC t1 · ... · tn is connected. Theorem A cut-bounded language is MSO-definable if and only if it is the language of a loop-connected SMC specification. 24
  • 30. Conclusion • We have presented a characterization of the expressive power of shared-memory systems 1. in terms of logic definability and cut-boundedness 2. in terms of automata over pomsets with gates. • This model of concurrency and this algebraic framework generalize the theory of Mazurkiewicz traces and message sequence charts. • These results should be extended soon to systems with autoconcurrency . • A simpler notion of communication graph may be designed. 25
  • 32. Unambiguity determinism An SMS is unambiguous if each pomset admits at most one applicable run. An SMS is deterministic if for each a ∈ Σ and each reachable configuration q, there exists at most one rule ρ ∈ ∆a such that ρ q→q′ . Clearly: Any deterministic SMS is unambiguous. 26