SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
trib

Automatic Synthesis of Dis             ed Transition Systems

                                ut



             PhD Candidate:    Alin Stef˘nescu
                                    ¸ a
              Supervised by:   Prof. Javier Esparza

                    February 13th, A.D. 2006
Design of Complex Systems


                 Specification vs. Implementation
   Wanted: a correct implementation w.r.t. the specification.


   Two approaches:
     • Given a specification and an implementation, check if the
       implementation satisfies the specification
                                                   [Model Checking]
     • From a given specification, automatically construct an
       implementation
                                                       → [Synthesis]
I. Synthesis... In which setting?
Synthesis: The Sequential Case




         Specification
Synthesis: The Sequential Case




                                        ?
                        +               ⇒

         Specification       One Agent
Synthesis: The Sequential Case




                                        ?
                        +               ⇒

         Specification       One Agent       Implementation
Synthesis: The Distributed Case




  Specification
Synthesis: The Distributed Case




                                        ?
                 +                  ⇒


  Specification        Team of
                 Communicating Agents
Synthesis: The Distributed Case




                                        ?
                 +                  ⇒


  Specification        Team of
                 Communicating Agents

                                            Distributed Implementation
The Problem



                                                ?
                             +                  ⇒

 Labeled Transition System       Distribution       Distributed Transition System



   Synthesis of Distributed Transition Systems
         Input: Given a labeled transition system TS and
                 a distribution ∆ of actions over a set of agents,
         Output: Build, if possible, a distributed transition system over
                 ∆ whose global state space is equivalent to TS

   equivalent : graph-isomorphic / trace-equivalent / bisimilar
Building a House...



                         roof


                 floor
      2                        3

          wall          wall

                 floor
      0                        1
Building a House...



                                        roof
                         roof
                                        floor
                 floor                  Agent 1
      2                        3
                                   +
          wall          wall            roof
                                        wall
                 floor
      0                        1
                                       Agent 2

      Distribution of {floor,wall,roof} over {1,2}:
       • Σlocal (1)={roof,floor}, Σlocal (2)={roof,wall}
      • dom(roof)={1,2}, dom(floor)={1}, dom(wall)={2}
Building a House...



                                        roof
                         roof
                                        floor
                 floor                  Agent 1
      2                        3
                                   +
          wall          wall            roof
                                        wall
                 floor
      0                        1
                                       Agent 2
Building a House...



                                        roof             roof
                         roof                        0          1
                                        floor             floor
                 floor                  Agent 1       Agent 1
      2                        3                 ?
                                   +             ⇒
          wall          wall            roof             roof
                                        wall         0          1
                                                         wall
                 floor
      0                        1
                                       Agent 2       Agent 2
Synchronous Products of Transition Systems


   A synchronous product of transition systems consists of a set of
   local transition systems synchronizing on common actions.


   An action is executed if only if all local transition systems from its
   domain are able to execute that action.

                                                                     roof


         roof                  roof                          floor
                                                   0,1                 1,1
     0          1          0          1
         floor                  wall
                                                      wall          wall

                                                             floor
                                                   0,0                 1,0
Building a House...



                                        roof                 roof
                         roof                            0          1
                                        floor                 floor
                 floor                  Agent 1           Agent 1
      2                        3
                                   +             ⇒
          wall          wall            roof                 roof
                                        wall             0          1
                                                             wall
                 floor
      0                        1
                                       Agent 2           Agent 2

                    The specification is implementable!
Building a House... Not Always Possible!



                                        roof                    roof
                         roof                               0          1
                                        floor                    floor
                 floor                  Agent 1              Agent 1
      2                        3
                                   +               ⇒
          wall          wall            roof                    roof
                                        wall                0          1
                                                                wall
                 floor
      0                        1
                                       Agent 2              Agent 2

                     When the edge (1,wall,3) is deleted,
                 the specification is no longer implementable!
Asynchronous Automata

  Asynchronous automata [Zielonka87] generalize the synchronous
  products allowing more communication during synchronization.

  An action is executed only for chosen tuples of local states of its
  domain.

                                           roof
       1 →floor 2

                                    0, 1          2, 2
       0 →wall 1

   (0, 0) →roof (1, 1)           wall      roof

   (0, 1) →roof (2, 2)
                                    0, 0          1, 1 floor 2, 1
Asynchronous Automata
  Asynchronous automata [Zielonka87] generalize the synchronous
  products allowing more communication during synchronization.

  An action is executed only for chosen tuples of local states of its
  domain.

                                           roof
       1 →floor 2

                                    0, 1          2, 2
       0 →wall 1

   (0, 0) →roof (1, 1)           wall      roof

   (0, 1) →roof (2, 2)
                                    0, 0          1, 1 floor 2, 1

  Not implementable as a synchronous product! (cf. wall roof floor)
Synthesis Flow – the whole truth

                      Specification
             Global behavior and distribution


                           TEST
             Is the specification distributable?
                                          no
                                                Heuristics
                         yes           Try to refine the specification
                                       so as to become distributable
                                           if possible
                        Synthesis
               Core algorithms + heuristics


              Distributed implementation
                      Desired format
II. Distributed systems... Characterizations?
The Diamonds of Independence

   A distribution generates an independence relation        ⊆Σ×Σ

                    a b ⇔ dom(a) ∩ dom(b) = ∅

   The independent and forward diamond rules are:
                    ID                                FD
              1               1               1                 1
          a       a b     a       b       a       b   a b   a       b
         2        =⇒     2            4   2       3   =⇒    2           3
          b               b       a                         b       a
              3               3                                 4




   The global state space of a distributed system satisfies ID and FD.
Characterizations


   Characterizations of ‘distributable’ global transitions systems given
   in the literature:
              [Zielonka87], [Morin98,99], [CastellaniMukundThiagarajan99]

     • modulo isomorphism: theory of regions
       (ID and FD necessary, but not sufficient)
     • modulo trace-equivalence:
        → SP: product languages
        → A ID and FD necessary and sufficient
            A:

     • modulo bisimulation: by some modifications of the above
Traces of Distributed Transition Systems


   The execution trace language Tr (TS) = the set of all possible
   finite executions of TS starting in an initial state.
     • any execution trace language Tr (TS) is prefix-closed

     • For any asynchronous automaton A Tr (A is ID-closed,
                                       A,    A)
       i.e., uabv ∈ Tr (A ∧ a b ⇒ ubav ∈ Tr (A
                         A)                   A)

     • For any deterministic asynch. aut. A Tr (A is FD-closed,
                                           A,    A)
       i.e., ua ∈ Tr (A ∧ ub ∈ Tr (A ∧ a b ⇒ uab ∈ Tr (A
                       A)           A)                  A)

   Zielonka’s Theorem (variant)
   For any prefix-closed ID-FD-closed regular language L, there exists
   a finite deterministic asynch. automaton A with Tr (A = L.
                                            A            A)
Languages of Distributed Transition Systems


                                             ID-closed prefix-closed
                               Tr (NAA) =
                                             regular languages


      finite unions of                                   ID-FD-closed
 prefix-closed regular = Tr (NSP)          Tr (DAA) = prefix-closed
   product languages                                    regular languages


        prefix-closed regular
                             = Tr (DSP)
          product languages



   Several other variants classified:
     → global final states / local final states / acyclic specifications
III. Implementability Test... How difficult?
The Implementability Test



   Distributed Implementability
      Instance: a transition system TS and
                 a distribution ∆ of actions over a set of agents
     Question: Is there a distributed transition system over ∆
               equivalent with TS?


   distributed transition system : SP / A A
   equivalent : isomorphic / trace-equivalent / bisimilar

   Previous characterizations provide decision procedures, leading
   easily to upper bounds. We filled most of the missing lower bounds.
Complexity Bounds Overview



   Synchronous products (with one global initial state)
    Specification (TS)   Isomorphism   Trace Equivalence   Bisim. (determ. impl.)
    Nondeterministic    NP-complete
                                      PSPACE-complete      PSPACE-complete
    Deterministic        P [Mor98]




   Asynchronous automata (with multiple global initial states)
    Specification (TS)   Isomorphism   Trace Equivalence   Bisim. (determ. impl.)
    Nondeterministic    NP-complete   PSPACE-complete
                                                                    P
    Deterministic        P [Mor98]          P
Complexity Bounds Overview



   Synchronous products (with one global initial state)
    Specification (TS)   Isomorphism   Trace Equivalence   Bisim. (determ. impl.)
    Nondeterministic    NP-complete
                                      PSPACE-complete      PSPACE-complete
    Deterministic        P [Mor98]
    Acyclic & Nondet.   NP-complete
                                       coNP-complete        coNP-complete
    Acyclic & Determ.    P [Mor98]



   Asynchronous automata (with multiple global initial states)
    Specification (TS)   Isomorphism   Trace Equivalence   Bisim. (determ. impl.)
    Nondeterministic    NP-complete   PSPACE-complete
                                                                    P
    Deterministic        P [Mor98]           P
    Acyclic & Nondet.   NP-complete    coNP-complete
                                                                    P
    Acyclic & Determ.    P [Mor98]           P
IV. Synthesis of deterministic asynchronous
        automata... More efficient?
A Heuristic for Smaller Asynchronous Automata


    • Zielonka’s procedure outputs
      very large asynchronous automata
    • Usually smaller asynchronous automata accepting the same
      language exist
    • Heuristic idea
      Unfold the initial transition system guided by Zielonka’s
      construction and test if any of the intermediary transition
      systems is already asynchronous (modulo isomorphism):


                  unfold                           unfold
     Initial TS              Intermediary TS                Zielonka’s automaton


                           test if asynchronous!
Some Special Cases



   Using the characterization for implementability modulo
   isomorphism, we gave alternatives to Zielonka’s construction in the
   particular cases of:

     • transitive distributions

     • conflict-free specifications

     • acyclic specifications
Relaxed Synthesis


   If the initial specification is not ‘distributable’...
   Relaxed synthesis problem
   Given a distribution ∆ and a transition system TS, find an
   asynchronous automaton A over ∆ such that Tr (A ⊆ Tr (TS)
                             A                         A)
           A)
   and Σ(A = Σ(TS).
   We proved the above problem to be undecidable.

   Proposed NP-complete heuristic:
   IDFD subautomaton synthesis problem
   Given a transition system TS, find a reachable subautomaton A
   with Σ(A) = Σ(TS) satisfying ID&FD.
V. A Case Study – Mutual exclusion
Synthesis Flow – reloaded

                      Specification
             Global behavior and distribution


                           TEST
             Is the specification distributable?
                                          no
                                                Heuristics
                         yes           Try to refine the specification
                                       so as to become distributable
                                           if possible
                        Synthesis
               Core algorithms + heuristics


              Distributed implementation
                      Desired format
Mutual Exclusion (n=2)



     • actions: Σ := {req 1 , enter 1 , exit 1 , req 2 , enter 2 , exit 2 }
     • processes: Proc := {A1 , A2 , V1 , V2 }


         req 1     enter 1    exit 1      req 2     enter 2    exit 2
   dom {A1 , V1 } {A1 , V2 } {A1 , V1 } {A2 , V2 } {A2 , V1 } {A2 , V2 }


   → req 1 and req 2 are independent
   → each action involves only one process and one variable
Regular Specification for Mutex(2)



   Behavior Mutex of a mutual exclusion algorithm:
     • the runs are interleavings of the local behaviours
       (reqi enteri exiti )∗
     • forbid sequences where enter 1 is followed by enter 2 without
       exit 1 in between (mutual exclusion)
     • forbid sequences where req 1 is followed by two enter 2 without
       enter 1 in between (strong absence of starvation)
     • any execution of Mutex is the prefix of another execution of
       Mutex (deadlock freedom)
Global Automaton (1) – FD not satisfied



                                           req 1   req 2
               exit 1                                                        exit 2
                                req 2                        req 1
                   enter 1                                              enter 2

                             exit 1                            exit 2
                  req 2                                                    req 1

                                        enter 1    enter 2

                enter 1                   exit 1   exit 2                 enter 2


                    req 2                                                req 1

     enter 1                                                                          enter 2
Global Automaton (2) – Distributable



                                   req 1   req 2
       exit 1                                                      exit 2
                        req 2                      req 1
           enter 1                                            enter 2

                     exit 1                          exit 2
          req 2                                                  req 1

                                enter 1
                                                                 enter 2

                                  exit 1

                                                               req 1

                                                                            enter 2
Global Automaton of the Solution




                               req 1      req 2
   exit 1
                                                                   enter 2
                      req 2                        req 1
            enter 1                                                                         exit 2
                      exit 1                               exit 2
                                                                                 exit 2
                                                           req 1
      req 2
                               enter 1   enter 1                                                     req 2
                                                                     exit 2              req 1


                                exit 1                      enter 2              req 2                       req 1
                                                                               enter 2                               enter 2
                                                               req 1                                                           req 1

                                                                              enter 1
Synthesized Mutex(2) Algorithm



   Initialization: v1 := 0; v2 := 0
                                           Agent 1   Agent 2
     ncs 1 :   [NCS1];                               ncs 2 : [NCS2];
                 case (v1 = 0): v1 := 1; goto e1               case (v2   = 0): v2 := 1; goto   e2
                                               ′
                 case (v1 = 2): v1 := 1; goto e1               case (v2   = 2): v2 := 3; goto   e2
                                               ′
                 case (v1 = 3): v1 := 4; goto e1       e2 :    await v1   ∈ {0, 2, 3, 4} then
        e1 :     await v2 ∈ {0, 1} then                        case (v1   = 0): v1 := 2; goto   cs 2
                 case (v2 = 0): goto cs 1                      case (v1   = 2): v1 := 0; goto   cs 2
                 case (v2 = 1): goto cs ′
                                        1                      case (v1   = 3): v1 := 2; goto   cs 2
         ′
        e1 :     await v2 ∈ {2, 3} then                        case (v1   = 4): v1 := 1; goto   cs 2
                 case (v2 = 2): v2 := 0; goto cs 1    cs 2 : [CS2];
                 case (v2 = 3): v2 := 1; goto cs ′
                                                 1             case (v2   = 1): v2 := 2; goto ncs 2
      cs 1 :   [CS1]; v1 := 0; goto ncs 1                      case (v2   = 3): v2 := 0; goto ncs 2
      cs ′ :
         1     [CS1]; v1 := 3; goto ncs 1



   Particularity: Priority is given to the first process in case both processes
   request access
Prototype Implementations

   Prototypes to support the full synthesis cycle:
     • Synchronous products:
        → Via projections on local alphabets [translation to the input of
           the reachability checkers of the Model-Checking Kit]

     • Asynchronous automata:
        → heuristics for finding an ID-FD subautomata [implementation
           in the constraint-based logic programming framework Smodels]
        → unfolding-based heuristics for Zielonka [implementation in C]

     • Benchmarks: mutual exclusion, dining philosophers.
       E.g., for mutual exclusion with N processes:
         → original Zielonka’s construction can handle only N=2 processes
                        (specification size: |TS| = 14, |Proc| = 4, |Σ| = 6)
         → our heuristics can handle up to N=5 processes
                (specification size: |TS| = 25, 537, |Proc| = 10, |Σ| = 15)
VI. Coming to an end... Contributions?
Related Papers (DBLP)



  Many of the results of this thesis appeared in:
Contributions

   Synthesis of synchronous products and asynchronous automata:

     • A careful study and survey of characterizations of the global
       structure (graph isomorphism) and behaviors (traces of
       executions) of the two theoretical models with several variants

     • Matching computational complexity bounds for the
       implementability tests for several combinations

     • Alternatives to Zielonka’s construction in special cases

     • Several heuristics for finding smaller synthesized solutions

     • Prototype implementations for most of the algorithms


                                                         ¡ Thank you !

Contenu connexe

Dernier

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 

Dernier (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 

En vedette

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
 

En vedette (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...
 

Automatic Synthesis of Distributed Systems

  • 1. trib Automatic Synthesis of Dis ed Transition Systems ut PhD Candidate: Alin Stef˘nescu ¸ a Supervised by: Prof. Javier Esparza February 13th, A.D. 2006
  • 2. Design of Complex Systems Specification vs. Implementation Wanted: a correct implementation w.r.t. the specification. Two approaches: • Given a specification and an implementation, check if the implementation satisfies the specification [Model Checking] • From a given specification, automatically construct an implementation → [Synthesis]
  • 3. I. Synthesis... In which setting?
  • 4. Synthesis: The Sequential Case Specification
  • 5. Synthesis: The Sequential Case ? + ⇒ Specification One Agent
  • 6. Synthesis: The Sequential Case ? + ⇒ Specification One Agent Implementation
  • 7. Synthesis: The Distributed Case Specification
  • 8. Synthesis: The Distributed Case ? + ⇒ Specification Team of Communicating Agents
  • 9. Synthesis: The Distributed Case ? + ⇒ Specification Team of Communicating Agents Distributed Implementation
  • 10. The Problem ? + ⇒ Labeled Transition System Distribution Distributed Transition System Synthesis of Distributed Transition Systems Input: Given a labeled transition system TS and a distribution ∆ of actions over a set of agents, Output: Build, if possible, a distributed transition system over ∆ whose global state space is equivalent to TS equivalent : graph-isomorphic / trace-equivalent / bisimilar
  • 11. Building a House... roof floor 2 3 wall wall floor 0 1
  • 12. Building a House... roof roof floor floor Agent 1 2 3 + wall wall roof wall floor 0 1 Agent 2 Distribution of {floor,wall,roof} over {1,2}: • Σlocal (1)={roof,floor}, Σlocal (2)={roof,wall} • dom(roof)={1,2}, dom(floor)={1}, dom(wall)={2}
  • 13. Building a House... roof roof floor floor Agent 1 2 3 + wall wall roof wall floor 0 1 Agent 2
  • 14. Building a House... roof roof roof 0 1 floor floor floor Agent 1 Agent 1 2 3 ? + ⇒ wall wall roof roof wall 0 1 wall floor 0 1 Agent 2 Agent 2
  • 15. Synchronous Products of Transition Systems A synchronous product of transition systems consists of a set of local transition systems synchronizing on common actions. An action is executed if only if all local transition systems from its domain are able to execute that action. roof roof roof floor 0,1 1,1 0 1 0 1 floor wall wall wall floor 0,0 1,0
  • 16. Building a House... roof roof roof 0 1 floor floor floor Agent 1 Agent 1 2 3 + ⇒ wall wall roof roof wall 0 1 wall floor 0 1 Agent 2 Agent 2 The specification is implementable!
  • 17. Building a House... Not Always Possible! roof roof roof 0 1 floor floor floor Agent 1 Agent 1 2 3 + ⇒ wall wall roof roof wall 0 1 wall floor 0 1 Agent 2 Agent 2 When the edge (1,wall,3) is deleted, the specification is no longer implementable!
  • 18. Asynchronous Automata Asynchronous automata [Zielonka87] generalize the synchronous products allowing more communication during synchronization. An action is executed only for chosen tuples of local states of its domain. roof 1 →floor 2 0, 1 2, 2 0 →wall 1 (0, 0) →roof (1, 1) wall roof (0, 1) →roof (2, 2) 0, 0 1, 1 floor 2, 1
  • 19. Asynchronous Automata Asynchronous automata [Zielonka87] generalize the synchronous products allowing more communication during synchronization. An action is executed only for chosen tuples of local states of its domain. roof 1 →floor 2 0, 1 2, 2 0 →wall 1 (0, 0) →roof (1, 1) wall roof (0, 1) →roof (2, 2) 0, 0 1, 1 floor 2, 1 Not implementable as a synchronous product! (cf. wall roof floor)
  • 20. Synthesis Flow – the whole truth Specification Global behavior and distribution TEST Is the specification distributable? no Heuristics yes Try to refine the specification so as to become distributable if possible Synthesis Core algorithms + heuristics Distributed implementation Desired format
  • 21. II. Distributed systems... Characterizations?
  • 22. The Diamonds of Independence A distribution generates an independence relation ⊆Σ×Σ a b ⇔ dom(a) ∩ dom(b) = ∅ The independent and forward diamond rules are: ID FD 1 1 1 1 a a b a b a b a b a b 2 =⇒ 2 4 2 3 =⇒ 2 3 b b a b a 3 3 4 The global state space of a distributed system satisfies ID and FD.
  • 23. Characterizations Characterizations of ‘distributable’ global transitions systems given in the literature: [Zielonka87], [Morin98,99], [CastellaniMukundThiagarajan99] • modulo isomorphism: theory of regions (ID and FD necessary, but not sufficient) • modulo trace-equivalence: → SP: product languages → A ID and FD necessary and sufficient A: • modulo bisimulation: by some modifications of the above
  • 24. Traces of Distributed Transition Systems The execution trace language Tr (TS) = the set of all possible finite executions of TS starting in an initial state. • any execution trace language Tr (TS) is prefix-closed • For any asynchronous automaton A Tr (A is ID-closed, A, A) i.e., uabv ∈ Tr (A ∧ a b ⇒ ubav ∈ Tr (A A) A) • For any deterministic asynch. aut. A Tr (A is FD-closed, A, A) i.e., ua ∈ Tr (A ∧ ub ∈ Tr (A ∧ a b ⇒ uab ∈ Tr (A A) A) A) Zielonka’s Theorem (variant) For any prefix-closed ID-FD-closed regular language L, there exists a finite deterministic asynch. automaton A with Tr (A = L. A A)
  • 25. Languages of Distributed Transition Systems ID-closed prefix-closed Tr (NAA) = regular languages finite unions of ID-FD-closed prefix-closed regular = Tr (NSP) Tr (DAA) = prefix-closed product languages regular languages prefix-closed regular = Tr (DSP) product languages Several other variants classified: → global final states / local final states / acyclic specifications
  • 27. The Implementability Test Distributed Implementability Instance: a transition system TS and a distribution ∆ of actions over a set of agents Question: Is there a distributed transition system over ∆ equivalent with TS? distributed transition system : SP / A A equivalent : isomorphic / trace-equivalent / bisimilar Previous characterizations provide decision procedures, leading easily to upper bounds. We filled most of the missing lower bounds.
  • 28. Complexity Bounds Overview Synchronous products (with one global initial state) Specification (TS) Isomorphism Trace Equivalence Bisim. (determ. impl.) Nondeterministic NP-complete PSPACE-complete PSPACE-complete Deterministic P [Mor98] Asynchronous automata (with multiple global initial states) Specification (TS) Isomorphism Trace Equivalence Bisim. (determ. impl.) Nondeterministic NP-complete PSPACE-complete P Deterministic P [Mor98] P
  • 29. Complexity Bounds Overview Synchronous products (with one global initial state) Specification (TS) Isomorphism Trace Equivalence Bisim. (determ. impl.) Nondeterministic NP-complete PSPACE-complete PSPACE-complete Deterministic P [Mor98] Acyclic & Nondet. NP-complete coNP-complete coNP-complete Acyclic & Determ. P [Mor98] Asynchronous automata (with multiple global initial states) Specification (TS) Isomorphism Trace Equivalence Bisim. (determ. impl.) Nondeterministic NP-complete PSPACE-complete P Deterministic P [Mor98] P Acyclic & Nondet. NP-complete coNP-complete P Acyclic & Determ. P [Mor98] P
  • 30. IV. Synthesis of deterministic asynchronous automata... More efficient?
  • 31. A Heuristic for Smaller Asynchronous Automata • Zielonka’s procedure outputs very large asynchronous automata • Usually smaller asynchronous automata accepting the same language exist • Heuristic idea Unfold the initial transition system guided by Zielonka’s construction and test if any of the intermediary transition systems is already asynchronous (modulo isomorphism): unfold unfold Initial TS Intermediary TS Zielonka’s automaton test if asynchronous!
  • 32. Some Special Cases Using the characterization for implementability modulo isomorphism, we gave alternatives to Zielonka’s construction in the particular cases of: • transitive distributions • conflict-free specifications • acyclic specifications
  • 33. Relaxed Synthesis If the initial specification is not ‘distributable’... Relaxed synthesis problem Given a distribution ∆ and a transition system TS, find an asynchronous automaton A over ∆ such that Tr (A ⊆ Tr (TS) A A) A) and Σ(A = Σ(TS). We proved the above problem to be undecidable. Proposed NP-complete heuristic: IDFD subautomaton synthesis problem Given a transition system TS, find a reachable subautomaton A with Σ(A) = Σ(TS) satisfying ID&FD.
  • 34. V. A Case Study – Mutual exclusion
  • 35. Synthesis Flow – reloaded Specification Global behavior and distribution TEST Is the specification distributable? no Heuristics yes Try to refine the specification so as to become distributable if possible Synthesis Core algorithms + heuristics Distributed implementation Desired format
  • 36. Mutual Exclusion (n=2) • actions: Σ := {req 1 , enter 1 , exit 1 , req 2 , enter 2 , exit 2 } • processes: Proc := {A1 , A2 , V1 , V2 } req 1 enter 1 exit 1 req 2 enter 2 exit 2 dom {A1 , V1 } {A1 , V2 } {A1 , V1 } {A2 , V2 } {A2 , V1 } {A2 , V2 } → req 1 and req 2 are independent → each action involves only one process and one variable
  • 37. Regular Specification for Mutex(2) Behavior Mutex of a mutual exclusion algorithm: • the runs are interleavings of the local behaviours (reqi enteri exiti )∗ • forbid sequences where enter 1 is followed by enter 2 without exit 1 in between (mutual exclusion) • forbid sequences where req 1 is followed by two enter 2 without enter 1 in between (strong absence of starvation) • any execution of Mutex is the prefix of another execution of Mutex (deadlock freedom)
  • 38. Global Automaton (1) – FD not satisfied req 1 req 2 exit 1 exit 2 req 2 req 1 enter 1 enter 2 exit 1 exit 2 req 2 req 1 enter 1 enter 2 enter 1 exit 1 exit 2 enter 2 req 2 req 1 enter 1 enter 2
  • 39. Global Automaton (2) – Distributable req 1 req 2 exit 1 exit 2 req 2 req 1 enter 1 enter 2 exit 1 exit 2 req 2 req 1 enter 1 enter 2 exit 1 req 1 enter 2
  • 40. Global Automaton of the Solution req 1 req 2 exit 1 enter 2 req 2 req 1 enter 1 exit 2 exit 1 exit 2 exit 2 req 1 req 2 enter 1 enter 1 req 2 exit 2 req 1 exit 1 enter 2 req 2 req 1 enter 2 enter 2 req 1 req 1 enter 1
  • 41. Synthesized Mutex(2) Algorithm Initialization: v1 := 0; v2 := 0 Agent 1 Agent 2 ncs 1 : [NCS1]; ncs 2 : [NCS2]; case (v1 = 0): v1 := 1; goto e1 case (v2 = 0): v2 := 1; goto e2 ′ case (v1 = 2): v1 := 1; goto e1 case (v2 = 2): v2 := 3; goto e2 ′ case (v1 = 3): v1 := 4; goto e1 e2 : await v1 ∈ {0, 2, 3, 4} then e1 : await v2 ∈ {0, 1} then case (v1 = 0): v1 := 2; goto cs 2 case (v2 = 0): goto cs 1 case (v1 = 2): v1 := 0; goto cs 2 case (v2 = 1): goto cs ′ 1 case (v1 = 3): v1 := 2; goto cs 2 ′ e1 : await v2 ∈ {2, 3} then case (v1 = 4): v1 := 1; goto cs 2 case (v2 = 2): v2 := 0; goto cs 1 cs 2 : [CS2]; case (v2 = 3): v2 := 1; goto cs ′ 1 case (v2 = 1): v2 := 2; goto ncs 2 cs 1 : [CS1]; v1 := 0; goto ncs 1 case (v2 = 3): v2 := 0; goto ncs 2 cs ′ : 1 [CS1]; v1 := 3; goto ncs 1 Particularity: Priority is given to the first process in case both processes request access
  • 42. Prototype Implementations Prototypes to support the full synthesis cycle: • Synchronous products: → Via projections on local alphabets [translation to the input of the reachability checkers of the Model-Checking Kit] • Asynchronous automata: → heuristics for finding an ID-FD subautomata [implementation in the constraint-based logic programming framework Smodels] → unfolding-based heuristics for Zielonka [implementation in C] • Benchmarks: mutual exclusion, dining philosophers. E.g., for mutual exclusion with N processes: → original Zielonka’s construction can handle only N=2 processes (specification size: |TS| = 14, |Proc| = 4, |Σ| = 6) → our heuristics can handle up to N=5 processes (specification size: |TS| = 25, 537, |Proc| = 10, |Σ| = 15)
  • 43. VI. Coming to an end... Contributions?
  • 44. Related Papers (DBLP) Many of the results of this thesis appeared in:
  • 45. Contributions Synthesis of synchronous products and asynchronous automata: • A careful study and survey of characterizations of the global structure (graph isomorphism) and behaviors (traces of executions) of the two theoretical models with several variants • Matching computational complexity bounds for the implementability tests for several combinations • Alternatives to Zielonka’s construction in special cases • Several heuristics for finding smaller synthesized solutions • Prototype implementations for most of the algorithms ¡ Thank you !