SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
An ASM semantics for the communication layer in
          Rational Rose Real-Time

           Stefan Leue    Alin Stef˘nescu
                               ¸ a
                              speaking

             Software Engineering Group
               University of Konstanz

                  7–November–2005
IMCOS project at the University of Konstanz


   People:
     • Prof. Stefan Leue
     • Wei Wei
     • Alin Stef˘nescu
            ¸ a

   Project IMCOS:
     • “incomplete but fully automated methods for the analysis and
       verification of concurrent, object-oriented software systems”
     • buffer-boundedness scalable test for RoseRT models and other
       communicating machines                        (stage: mature)
     • model checking RoseRT models              (stage: in progress)


                                                                        2
Motivation



   Goal: formal analysis of models as implemented by a tool
   (Rational Rose Real Time)

     • Formal semantics of model behavior is essential
        → tuned analysis algorithms
        → tool documentation also sometimes too informal
        → not enough UML-RT formalization
     • Executable semantics
        → Abstract State Machines (tool support)
        → previous ASM modeling for UML parts available




                                                              3
UML-RT and Rational Rose Real-Time

  ROOM (1994) & UML (1997)   UML-RT (1998)




                                             4
UML-RT and Rational Rose Real-Time

  ROOM (1994) & UML (1997)    UML-RT (1998)
                        supported by Rational Rose Real-Time




                                                               4
UML-RT and Rational Rose Real-Time

  ROOM (1994) & UML (1997)    UML-RT (1998)
                        supported by Rational Rose Real-Time
                    port




                                     state machine
                capsule




                                                               4
UML-RT and Rational Rose Real-Time

  ROOM (1994) & UML (1997)    UML-RT (1998)
                        supported by Rational Rose Real-Time
                     port



                             →
                                   ←

                                         state machine
                 capsule
                       Communication Services
  Goal:
    • understand and formalize the communication services in
      RoseRT with Java as underlying detail and target language

                                                                  4
Communication layer specified by UML-RT


                                →
                                    ←



  all communication exclusively via asynchronous message passing

    • p2p connections via ports (sole public interface) regulated by
      binary protocols
    • event-driven paradigm
    • priority-based message dispatching
    • run-to-completion behavior
      → messages arriving while capsule busy are queued

                                                                       5
ASM formalism



    • We choose Abstract State Machines (ASM) introduced by
      Gurevich as semantic envelope for our formalization.
    • ASMs are transitions systems with
       → states described by sets with relations and functions
       → initial state
       → transitions described by update rules controlling the
         modification of functions
    • Multi-agents ASMs (used for our concurrent setting)
       → a set of (sequential) agents
       → each executing a program consisting of ASM rules.




                                                                 6
UML-RT capsule signature in ASM




  static domain Capsule
  static interface: Capsule → P(Port)
  static stateMachine: Capsule → StateMachine
  currMessage: Capsule → Message

  static domain Port
  static capsule: Port → Capsule
  static inSignals: Port → P(Signal)
  static outSignals: Port → P(Signal)
  static conjugate: Port → Port
  constraint ∀p ∈ Port :
     p.conjugate.conjugate = p ∧ p.outSignals ⊆ p.conjugate.inSignals
                                                                        7
Communication layer implemented by RoseRT

   Controller 1                                 Controller N
   capsules                         ...         capsules
   messages in transit                          messages in transit
   scheduler                                    scheduler


   all communication is in the hands of controllers

     • each controller runs on a separate thread
     • one-to-many relation between controllers and capsules
     • scheduler iteratively dispatches messages to capsules

   Although one thinks of each capsule as a separate ‘active agent’,
   we add in ASM agents only for controllers, and not for capsules
   (concurrency is at the level of controllers only).
                                                                       8
Topology of a controller

   Each controller organizes messages in global FIFO queues
                                  8
                                  <  m ···   m · · · (priority 0)
              internal messages     ···
                                     m ···   m · · · (priority 6)
                                  :
                                  8
                                  < m ···    m · · · (priority 0)
             incoming messages      ···
                                     m ···   m · · · (priority 6)
                                  :

              deferred messages       m ··· m ···

   static domain Controller
   static controller : Capsule → Controller
   internalQueue: Controller × Priority → Message∗
   incomingQueue: Controller × Priority → Message∗
   deferredQueue: Controller × Priority → Message∗
                                                                    9
Message dispatching (scheduler behavior)

                                    8
                                    <  m ···   m · · · (priority 0)
                internal messages     ···
                                       m ···   m · · · (priority 6)
                                    :
                                    8
                                    < m ···    m · · · (priority 0)
               incoming messages      ···
                                       m ···   m · · · (priority 6)
                                    :


   In an infinite loop, the scheduler of each controller:
     1   selects the highest-priority non-empty queue of incoming messages
     2   appends it to the queue of internal messages with the same priority
     3   pops the first message in the highest-priority non-empty queue of
         internal messages and
     4   dispatch it to the corresponding capsule for processing

                                                                               10
Scheduler behavior in ASM

   internal queues (Q0, . . . , Q6)   + incoming queues (Q0, . . . , Q6)

   For each agent a ∈ Agent associated to a controller:
   Rule SchedulerMessageDispatching (Self )
      let ctrl=Self .controller in
          seq
              appendHighestIncomingQueueToInternal(crtl)
              let msg=firstHighestInternalMessage(ctrl) in
                      messageProcessing (msg,msg.destinationPort.capsule)
                     dequeue(msg,ctrl.internalQueue(msg.priority ))

   where e.g.
   messageProcessing (msg ,capsule) ≡
      seq
          capsule.currMessage := msg
          stateMachineExecution(capsule.stateMachine, msg )
          capsule.currMessage := nil
                                                                            11
Actions under focus



                                   →
                                       ←



     • Send – port.signal.send(priority )
     • Invoke – port.signal.invoke
     • Reply – port.signal.reply

     • Defer – defer
     • Recall – port.recall(ahead)
     • Purge – port.purge


                                            12
Send (asynchronous message)



                                        →



   port.signal.send(priority ) ≡
      let (destCtrl=port.conjugate.capsule.controller ∧
          originCtrl=port.capsule.controller ∧
          msg= port.conjugate, signal, priority , port )
      in
          if (destCtrl == originCtrl) then
              enqueue(msg,destCtrl.internalQueue(priority ))
          else
              enqueue(msg,destCtrl.incomingQueue(priority ))



                                                               13
Invoke (procedure call)

   {Capsule A invokes capsule B}: A sends a message to B for
   processing, waits for a reply from B, then continues its execution


   RoseRT restrictions
     • invokes are allowed only inside a controller
     • no circular invokes
     • invokes cannot be deferred

   Implementation details
     • invoked messages are directly sent to destination capsule for
       processing (no queues involved)
     • replies to invokes are specially handled by controllers
            currReplyInvoke: Controller → Message
                                                                        14
Reply


                                   →
                                       ←



   While processing a message, a capsule may reply to the sender

     • the reply must be send via the port the original messages was
       received
     • the semantics depending on the original message msg:
         → if msg is an (ordinary) send, then reply is also an ordinary send
           with the same priority
         → if msg is an invoke, then reply will just place an
           acknowledgment in a dedicated holder on the sender’s
           controller
                                                                               15
Defer – recall – purge



   While processing a message, a capsule may defer it, and recall it
   sometime later. Batches of deferred messages may be simply
   discarded (purged), if expired.

     • a global queue of deferred messages per controller
     • all defer/recall/purge operations explicit in action code
     • this approach diverges from e.g. UML 2.0 recomandation:
        → states may have lists of deferrable events
        → deferred events are automatically reconsidered when “a state is
            reached where either the event is no longer deferred or where
            the event triggers a transition.”



                                                                            16
Next steps

     • towards an executable semantics for RoseRT (communication)

     • adding timing facilities
       → timeouts as special messages
     • RoseRT state machines
       → based on existing ASM semantics for UML state diagrams
     • simulation and testing of the ASM model
       → looking into Spec Explorer from Microsoft (and AsmL)
     • incorporating communication details into a model checker
       → playing with Bogor from Kansas University


                                  Critics and suggestions are welcome!
                                                                         17

Contenu connexe

Tendances

Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronizationvinay arora
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationWayne Jones Jnr
 
Synchronization
SynchronizationSynchronization
SynchronizationMohd Arif
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linuxSusant Sahani
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating SystemsRitu Ranjan Shrivastwa
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationAnas Ebrahim
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlockstech2click
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmSouvik Roy
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferSneh Prabha
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronizationAli Ahmad
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process SynchronizationSonali Chauhan
 
20080426 distributed algorithms_pedone_lecture02
20080426 distributed algorithms_pedone_lecture0220080426 distributed algorithms_pedone_lecture02
20080426 distributed algorithms_pedone_lecture02Computer Science Club
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)Nagarajan
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OSC.U
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process SynchronizationHaziq Naeem
 

Tendances (20)

Os3
Os3Os3
Os3
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
OSCh7
OSCh7OSCh7
OSCh7
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linux
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and Synchronization
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlocks
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's Algorithm
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded buffer
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
20080426 distributed algorithms_pedone_lecture02
20080426 distributed algorithms_pedone_lecture0220080426 distributed algorithms_pedone_lecture02
20080426 distributed algorithms_pedone_lecture02
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process Synchronization
 
Monitors
MonitorsMonitors
Monitors
 

Similaire à Slides for a talk on UML Semantics in Nuremberg in 2005

Mpage Scicomp14 Bynd Tsk Geom
Mpage Scicomp14 Bynd Tsk GeomMpage Scicomp14 Bynd Tsk Geom
Mpage Scicomp14 Bynd Tsk Geommpage_colo
 
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...Sergey Staroletov
 
RAFT Consensus Algorithm
RAFT Consensus AlgorithmRAFT Consensus Algorithm
RAFT Consensus Algorithmsangyun han
 
Ibm websphere mq
Ibm websphere mqIbm websphere mq
Ibm websphere mqRakeshtoodi
 
Ultra-scalable Architectures for Telecommunications and Web 2.0 Services
Ultra-scalable Architectures for Telecommunications and Web 2.0 ServicesUltra-scalable Architectures for Telecommunications and Web 2.0 Services
Ultra-scalable Architectures for Telecommunications and Web 2.0 ServicesMauricio Arango
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time KernelsArnav Soni
 
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessAccelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessIgor Sfiligoi
 
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim CrontabsPaolo Negri
 
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Paolo Negri
 
Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Javier Tallón
 
Messaging for Modern Applications
Messaging for Modern ApplicationsMessaging for Modern Applications
Messaging for Modern ApplicationsTom McCuch
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbitjakehofman
 

Similaire à Slides for a talk on UML Semantics in Nuremberg in 2005 (20)

Ch3-2
Ch3-2Ch3-2
Ch3-2
 
Kali linux
Kali linuxKali linux
Kali linux
 
Mpage Scicomp14 Bynd Tsk Geom
Mpage Scicomp14 Bynd Tsk GeomMpage Scicomp14 Bynd Tsk Geom
Mpage Scicomp14 Bynd Tsk Geom
 
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
 
RAFT Consensus Algorithm
RAFT Consensus AlgorithmRAFT Consensus Algorithm
RAFT Consensus Algorithm
 
Ibm websphere mq
Ibm websphere mqIbm websphere mq
Ibm websphere mq
 
Pg amqp
Pg amqpPg amqp
Pg amqp
 
PostgreSQL: meet your queue
PostgreSQL: meet your queuePostgreSQL: meet your queue
PostgreSQL: meet your queue
 
Ultra-scalable Architectures for Telecommunications and Web 2.0 Services
Ultra-scalable Architectures for Telecommunications and Web 2.0 ServicesUltra-scalable Architectures for Telecommunications and Web 2.0 Services
Ultra-scalable Architectures for Telecommunications and Web 2.0 Services
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time Kernels
 
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessAccelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
 
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs
%w(map reduce).first - A Tale About Rabbits, Latency, and Slim Crontabs
 
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
 
Isola 12 presentation
Isola 12 presentationIsola 12 presentation
Isola 12 presentation
 
Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?
 
Messaging for Modern Applications
Messaging for Modern ApplicationsMessaging for Modern Applications
Messaging for Modern Applications
 
Deep Learning in theano
Deep Learning in theanoDeep Learning in theano
Deep Learning in theano
 
WMQ, WMB and EIP
WMQ, WMB and EIPWMQ, WMB and EIP
WMQ, WMB and EIP
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbit
 
Apache Storm
Apache StormApache Storm
Apache Storm
 

Dernier

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
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
 

Dernier (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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
 

Slides for a talk on UML Semantics in Nuremberg in 2005

  • 1. An ASM semantics for the communication layer in Rational Rose Real-Time Stefan Leue Alin Stef˘nescu ¸ a speaking Software Engineering Group University of Konstanz 7–November–2005
  • 2. IMCOS project at the University of Konstanz People: • Prof. Stefan Leue • Wei Wei • Alin Stef˘nescu ¸ a Project IMCOS: • “incomplete but fully automated methods for the analysis and verification of concurrent, object-oriented software systems” • buffer-boundedness scalable test for RoseRT models and other communicating machines (stage: mature) • model checking RoseRT models (stage: in progress) 2
  • 3. Motivation Goal: formal analysis of models as implemented by a tool (Rational Rose Real Time) • Formal semantics of model behavior is essential → tuned analysis algorithms → tool documentation also sometimes too informal → not enough UML-RT formalization • Executable semantics → Abstract State Machines (tool support) → previous ASM modeling for UML parts available 3
  • 4. UML-RT and Rational Rose Real-Time ROOM (1994) & UML (1997) UML-RT (1998) 4
  • 5. UML-RT and Rational Rose Real-Time ROOM (1994) & UML (1997) UML-RT (1998) supported by Rational Rose Real-Time 4
  • 6. UML-RT and Rational Rose Real-Time ROOM (1994) & UML (1997) UML-RT (1998) supported by Rational Rose Real-Time port state machine capsule 4
  • 7. UML-RT and Rational Rose Real-Time ROOM (1994) & UML (1997) UML-RT (1998) supported by Rational Rose Real-Time port → ← state machine capsule Communication Services Goal: • understand and formalize the communication services in RoseRT with Java as underlying detail and target language 4
  • 8. Communication layer specified by UML-RT → ← all communication exclusively via asynchronous message passing • p2p connections via ports (sole public interface) regulated by binary protocols • event-driven paradigm • priority-based message dispatching • run-to-completion behavior → messages arriving while capsule busy are queued 5
  • 9. ASM formalism • We choose Abstract State Machines (ASM) introduced by Gurevich as semantic envelope for our formalization. • ASMs are transitions systems with → states described by sets with relations and functions → initial state → transitions described by update rules controlling the modification of functions • Multi-agents ASMs (used for our concurrent setting) → a set of (sequential) agents → each executing a program consisting of ASM rules. 6
  • 10. UML-RT capsule signature in ASM static domain Capsule static interface: Capsule → P(Port) static stateMachine: Capsule → StateMachine currMessage: Capsule → Message static domain Port static capsule: Port → Capsule static inSignals: Port → P(Signal) static outSignals: Port → P(Signal) static conjugate: Port → Port constraint ∀p ∈ Port : p.conjugate.conjugate = p ∧ p.outSignals ⊆ p.conjugate.inSignals 7
  • 11. Communication layer implemented by RoseRT Controller 1 Controller N capsules ... capsules messages in transit messages in transit scheduler scheduler all communication is in the hands of controllers • each controller runs on a separate thread • one-to-many relation between controllers and capsules • scheduler iteratively dispatches messages to capsules Although one thinks of each capsule as a separate ‘active agent’, we add in ASM agents only for controllers, and not for capsules (concurrency is at the level of controllers only). 8
  • 12. Topology of a controller Each controller organizes messages in global FIFO queues 8 < m ··· m · · · (priority 0) internal messages ··· m ··· m · · · (priority 6) : 8 < m ··· m · · · (priority 0) incoming messages ··· m ··· m · · · (priority 6) : deferred messages m ··· m ··· static domain Controller static controller : Capsule → Controller internalQueue: Controller × Priority → Message∗ incomingQueue: Controller × Priority → Message∗ deferredQueue: Controller × Priority → Message∗ 9
  • 13. Message dispatching (scheduler behavior) 8 < m ··· m · · · (priority 0) internal messages ··· m ··· m · · · (priority 6) : 8 < m ··· m · · · (priority 0) incoming messages ··· m ··· m · · · (priority 6) : In an infinite loop, the scheduler of each controller: 1 selects the highest-priority non-empty queue of incoming messages 2 appends it to the queue of internal messages with the same priority 3 pops the first message in the highest-priority non-empty queue of internal messages and 4 dispatch it to the corresponding capsule for processing 10
  • 14. Scheduler behavior in ASM internal queues (Q0, . . . , Q6) + incoming queues (Q0, . . . , Q6) For each agent a ∈ Agent associated to a controller: Rule SchedulerMessageDispatching (Self ) let ctrl=Self .controller in seq appendHighestIncomingQueueToInternal(crtl) let msg=firstHighestInternalMessage(ctrl) in messageProcessing (msg,msg.destinationPort.capsule) dequeue(msg,ctrl.internalQueue(msg.priority )) where e.g. messageProcessing (msg ,capsule) ≡ seq capsule.currMessage := msg stateMachineExecution(capsule.stateMachine, msg ) capsule.currMessage := nil 11
  • 15. Actions under focus → ← • Send – port.signal.send(priority ) • Invoke – port.signal.invoke • Reply – port.signal.reply • Defer – defer • Recall – port.recall(ahead) • Purge – port.purge 12
  • 16. Send (asynchronous message) → port.signal.send(priority ) ≡ let (destCtrl=port.conjugate.capsule.controller ∧ originCtrl=port.capsule.controller ∧ msg= port.conjugate, signal, priority , port ) in if (destCtrl == originCtrl) then enqueue(msg,destCtrl.internalQueue(priority )) else enqueue(msg,destCtrl.incomingQueue(priority )) 13
  • 17. Invoke (procedure call) {Capsule A invokes capsule B}: A sends a message to B for processing, waits for a reply from B, then continues its execution RoseRT restrictions • invokes are allowed only inside a controller • no circular invokes • invokes cannot be deferred Implementation details • invoked messages are directly sent to destination capsule for processing (no queues involved) • replies to invokes are specially handled by controllers currReplyInvoke: Controller → Message 14
  • 18. Reply → ← While processing a message, a capsule may reply to the sender • the reply must be send via the port the original messages was received • the semantics depending on the original message msg: → if msg is an (ordinary) send, then reply is also an ordinary send with the same priority → if msg is an invoke, then reply will just place an acknowledgment in a dedicated holder on the sender’s controller 15
  • 19. Defer – recall – purge While processing a message, a capsule may defer it, and recall it sometime later. Batches of deferred messages may be simply discarded (purged), if expired. • a global queue of deferred messages per controller • all defer/recall/purge operations explicit in action code • this approach diverges from e.g. UML 2.0 recomandation: → states may have lists of deferrable events → deferred events are automatically reconsidered when “a state is reached where either the event is no longer deferred or where the event triggers a transition.” 16
  • 20. Next steps • towards an executable semantics for RoseRT (communication) • adding timing facilities → timeouts as special messages • RoseRT state machines → based on existing ASM semantics for UML state diagrams • simulation and testing of the ASM model → looking into Spec Explorer from Microsoft (and AsmL) • incorporating communication details into a model checker → playing with Bogor from Kansas University Critics and suggestions are welcome! 17