theoretical foundations of the uml
play

Theoretical Foundations of the UML Lecture 8: Communicating - PowerPoint PPT Presentation

Theoretical Foundations of the UML Lecture 8: Communicating Finite-State Machines Joost-Pieter Katoen Lehrstuhl fr Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ss-16/theoretical-foundations-of-the-uml/


  1. Theoretical Foundations of the UML Lecture 8: Communicating Finite-State Machines Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ss-16/theoretical-foundations-of-the-uml/ 23. Mai 2016 Joost-Pieter Katoen Theoretical Foundations of the UML 1/21

  2. Outline Introduction 1 Communicating Finite-State Machines 2 Semantics of Communicating Finite-State Machines 3 Emptiness Problem for CFMs 4 Joost-Pieter Katoen Theoretical Foundations of the UML 2/21

  3. Overview Introduction 1 Communicating Finite-State Machines 2 Semantics of Communicating Finite-State Machines 3 Emptiness Problem for CFMs 4 Joost-Pieter Katoen Theoretical Foundations of the UML 3/21

  4. Specification to implementation Joost-Pieter Katoen Theoretical Foundations of the UML 4/21

  5. Specification to implementation Consider an MSGs as complete system specifications they describe a full set of possible system scenarios Joost-Pieter Katoen Theoretical Foundations of the UML 4/21

  6. Specification to implementation Consider an MSGs as complete system specifications they describe a full set of possible system scenarios Can we obtain “realisations“ that exhibit precisely these scenarios? Joost-Pieter Katoen Theoretical Foundations of the UML 4/21

  7. Specification to implementation Consider an MSGs as complete system specifications they describe a full set of possible system scenarios Can we obtain “realisations“ that exhibit precisely these scenarios? Map MSGs, i.e., scenarios onto an executable model model each process by a finite-state automaton that communicate via unbounded directed FIFO channels Joost-Pieter Katoen Theoretical Foundations of the UML 4/21

  8. Specification to implementation Consider an MSGs as complete system specifications they describe a full set of possible system scenarios Can we obtain “realisations“ that exhibit precisely these scenarios? Map MSGs, i.e., scenarios onto an executable model model each process by a finite-state automaton that communicate via unbounded directed FIFO channels ⇒ This yields Communicating Finite-state Machines Joost-Pieter Katoen Theoretical Foundations of the UML 4/21

  9. Intuition Joost-Pieter Katoen Theoretical Foundations of the UML 5/21

  10. The need for synchronisation messages Joost-Pieter Katoen Theoretical Foundations of the UML 6/21

  11. Overview Introduction 1 Communicating Finite-State Machines 2 Semantics of Communicating Finite-State Machines 3 Emptiness Problem for CFMs 4 Joost-Pieter Katoen Theoretical Foundations of the UML 7/21

  12. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  13. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Definition (communication actions, channels) Act ! p := { !( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of send actions by process p Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  14. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Definition (communication actions, channels) Act ! p := { !( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of send actions by process p Act ? p := { ?( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of receive actions by process p Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  15. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Definition (communication actions, channels) Act ! p := { !( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of send actions by process p Act ? p := { ?( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of receive actions by process p Act p := Act ! p ∪ Act ? p Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  16. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Definition (communication actions, channels) Act ! p := { !( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of send actions by process p Act ? p := { ?( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of receive actions by process p Act p := Act ! p ∪ Act ? p Act := � p ∈P Act p Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  17. Preliminaries Definition Let be a finite set of at least two (sequential) processes P be a finite set of message contents C Definition (communication actions, channels) Act ! p := { !( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of send actions by process p Act ? p := { ?( p, q, a ) | q ∈ P \ { p } , a ∈ C} the set of receive actions by process p Act p := Act ! p ∪ Act ? p Act := � p ∈P Act p Ch := { ( p, q ) | p, q ∈ P , p � = q } “channels“ Joost-Pieter Katoen Theoretical Foundations of the UML 8/21

  18. Communicating finite-state machines Definition A communicating finite-state machine (CFM) over P and C is a structure A = ((( S p , ∆ p )) p ∈P , D , s init , F ) where Joost-Pieter Katoen Theoretical Foundations of the UML 9/21

  19. Communicating finite-state machines Definition A communicating finite-state machine (CFM) over P and C is a structure A = ((( S p , ∆ p )) p ∈P , D , s init , F ) where D is a nonempty finite set of synchronization messages (or data) σ,m → p s ′ instead of ( s, σ, m, s ′ ) ∈ ∆ p We often write s − Joost-Pieter Katoen Theoretical Foundations of the UML 9/21

  20. Communicating finite-state machines Definition A communicating finite-state machine (CFM) over P and C is a structure A = ((( S p , ∆ p )) p ∈P , D , s init , F ) where D is a nonempty finite set of synchronization messages (or data) for each p ∈ P : S p is a non-empty finite set of local states (the S p are disjoint) ∆ p ⊆ S p × Act p × D × S p is a set of local transitions σ,m → p s ′ instead of ( s, σ, m, s ′ ) ∈ ∆ p We often write s − Joost-Pieter Katoen Theoretical Foundations of the UML 9/21

  21. Communicating finite-state machines Definition A communicating finite-state machine (CFM) over P and C is a structure A = ((( S p , ∆ p )) p ∈P , D , s init , F ) where D is a nonempty finite set of synchronization messages (or data) for each p ∈ P : S p is a non-empty finite set of local states (the S p are disjoint) ∆ p ⊆ S p × Act p × D × S p is a set of local transitions s init ∈ S A is the global initial state where S A := � p ∈P S p is the set of global states of A σ,m → p s ′ instead of ( s, σ, m, s ′ ) ∈ ∆ p We often write s − Joost-Pieter Katoen Theoretical Foundations of the UML 9/21

  22. Communicating finite-state machines Definition A communicating finite-state machine (CFM) over P and C is a structure A = ((( S p , ∆ p )) p ∈P , D , s init , F ) where D is a nonempty finite set of synchronization messages (or data) for each p ∈ P : S p is a non-empty finite set of local states (the S p are disjoint) ∆ p ⊆ S p × Act p × D × S p is a set of local transitions s init ∈ S A is the global initial state where S A := � p ∈P S p is the set of global states of A F ⊆ S A is the set of global final states σ,m → p s ′ instead of ( s, σ, m, s ′ ) ∈ ∆ p We often write s − Joost-Pieter Katoen Theoretical Foundations of the UML 9/21

  23. Communicating finite-state machines Example CFM A over P = { 1 , 2 } !(1 , 2 , req ) s 0 t 0 and C = { req , ack } ?(2 , 1 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) D = { } , , S 1 = { s 0 , s 1 , s 2 } s 1 t 1 S 2 = { t 0 , t 1 , t 2 } !(1 , 2 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) !(1,2, req ) ∆ 1 : s 0 − − − − − − → 1 s 0 ... s 2 ?(2 , 1 , req ) t 2 ?(2,1, req ) ∆ 2 : t 0 − − − − − − → 2 t 1 ... s init = ( s 0 , t 0 ) F = { ( s 2 , t 2 ) } Joost-Pieter Katoen Theoretical Foundations of the UML 10/21

  24. Communicating finite-state machines Example !(1 , 2 , req ) s 0 t 0 ?(2 , 1 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 1 t 1 !(1 , 2 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 2 ?(2 , 1 , req ) t 2 . . . . . . Joost-Pieter Katoen Theoretical Foundations of the UML 10/21

  25. Communicating finite-state machines Example !(1 , 2 , req ) !(1 , 2 , req ) s 0 t 0 ?(2 , 1 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 1 t 1 !(1 , 2 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 2 ?(2 , 1 , req ) t 2 req . . . . . . !(1 , 2 , req ) Joost-Pieter Katoen Theoretical Foundations of the UML 10/21

  26. Communicating finite-state machines Example !(1 , 2 , req ) !(1 , 2 , req ) s 0 t 0 !(1 , 2 , req ) ?(2 , 1 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 1 t 1 !(1 , 2 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 2 ?(2 , 1 , req ) t 2 req req . . . . . . !(1 , 2 , req ) !(1 , 2 , req ) Joost-Pieter Katoen Theoretical Foundations of the UML 10/21

  27. Communicating finite-state machines Example !(1 , 2 , req ) ?(2 , 1 , req ) !(1 , 2 , req ) s 0 t 0 !(1 , 2 , req ) ?(2 , 1 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 1 t 1 !(1 , 2 , req ) ?(1 , 2 , ack ) !(2 , 1 , ack ) s 2 ?(2 , 1 , req ) t 2 req . . . . . . !(1 , 2 , req ) !(1 , 2 , req ) ?(2 , 1 , req ) Joost-Pieter Katoen Theoretical Foundations of the UML 10/21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend