SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
An AsmL Semantics for
 Dynamic Structures in UML-RT

Stefan Leue, Alin Stef˘nescu, and Wei Wei
                  ¸ a

       Software Engineering Group
         University of Konstanz

             3–October–2006
Motivation


   → Dynamic reconfigurations are inherent to many applications.
   → Capturing them at design time is not easy.

     • the UML-RT profile supports dynamic structures:
         – runtime creation of capsules    optional capsules
         – multiple containment     plugin capsules
         – dynamic connections     unwired ports
     • a precise semantics of such concepts is needed for the formal
       analysis of UML-RT models


   We use the AsmL specification framework to give an executable
   semantics to dynamic structures in UML-RT.

                                                                       2
Abstract State Machines (ASM) and AsmL


  Abstract State Machines (ASM) used for the semantics
    • ASMs are transitions systems with
       → states described by sets with relations and functions
       → transitions described by update rules
    • AsmL is a specific implementation for ASMs
       → object-oriented concepts, strong type system, tool support


  An executable AsmL specification for UML-RT models:
    • semantics of UML-RT specified in AsmL
    • translation of a given UML-RT model into AsmL
    • analysis of the AsmL specification using the SpecExplorer tool
      (simulation, model-checking, testing)

                                                                      3
UML-RT and Rational Rose Real-Time

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




  In UML 2.0
  Structured Classes that may have ports and internal structure
  (depicted by Composite Structures diagrams)
                                                                  4
Ports and connectors

   class Port                  class ConnectorEnd
   name as String              capsuleRole as CapsuleRole or Null
   protocol as Protocol        port as Port
   isRelay as Boolean
   isWired as Boolean          class Connector
   isPublic as Boolean         end1 as ConnectorEnd
   peerPort as Port or Null    end2 as ConnectorEnd

   Only ports with compatible protocols can be connected.

   Rose RealTime supports dynamic connections of unwired ports.


   In UML 2.0
   Ports and connectors were newly introduced in UML 2.0, but with
   a slightly more general semantics than in UML-RT.
                                                                     5
Capsules




   class CapsuleClass                      class CapsuleRole                 class CapsuleInstance

   name as String                          name as String                    name as String
   super as CapsuleClass                   capsuleClass as CapsuleClass      capsuleClass as CapsuleClass
   subcapsuleRoles as Set of CapsuleRole   parent as CapsuleRole or Null     subcapsules as Set of CapsuleRole
   ports as Set of Port                    kind as CapsuleRoleKind           ports as Set of Port
   connectors as Set of Connector          isSubstitutable as Boolean        importedIn as Set of CapsuleRole
   behaviour as StateMachine or Null       inst as CapsuleInstance or Null   state as State


   with CapsuleRoleKind = {fixed capsule, optional capsule, plugin capsule}


                                                                                                                 6
Dynamic structures in UML-RT




    • fixed capsule role – incarnated at initialization time of parent
       → In UML 2.0: composition (isComposite=true)
           Graphically: nested box with solid outline
    • optional capsule role – incarnated/destroyed at runtime
       → In UML 2.0: composition with variable multiplicity for parts
    • plugin capsule role – filled in at runtime
       → In UML 2.0: aggregation (isComposite=false)
         Graphically: nested box with dashed outline                    7
Capsule incarnation




   incarnate(capsuleRole as CapsuleRole)
   require capsuleRole.inst = null
   instance := new CapsuleInstance(...)
   createSubcapsuleRoles(instance)
   createPorts(instance)
   incarnateAllFixedRoles(instance)
   connectPorts(instance)
   capsuleRole.inst = instance
   if capsuleRole.kind = optional connectPorts(capsuleRole.parent,capsuleRole)

   In Rose RealTime, optional capsules can be incarnated on different
                                                                                 8
   execution threads.
Capsule importation




   import(instance as CapsuleInstance, pluginRole as CapsuleRole)
   require pluginRole.instance = null
   require instance <> null
   require compatibleCapsuleRoles(pluginRole, instance.capsuleClass)
   connectPorts(pluginRole.parent, pluginRole, instance)
   pluginRole.inst := instance
   add pluginRole to instance.importedIn

   Constraint: A port of the imported capsule instance cannot be
   simultaneously connected in two different plugin roles.
                                                                       9
Capsule deportation and destruction




     • Basically, ’undo’ of importation and incarnation

     • Deportation of capsule instance CI from capsule role CR:
        → remove all connectors to CI from CR.parent
        → remove CR from the set CI.importedIn

     • Destruction of a capsule role CR:
        → destroy connections to and in CR
        → recursively destroy all owned fixed and optional capsules roles
        → Semantic variation point: Destroy or keep the owned
           subcapsule instances that are imported in another capsule role
                                                                            10
Next steps



     • integrate the semantics of state machines and communication
       services (as supported by Rational Rose Realtime tool)
     • analysis of generated AsmL code using SpecExplorer
       (simulation, testing, model checking)
     • semantics for the UML 2.0 composite structures



                                               Thank you for attention!




                                                                          11

Mais conteúdo relacionado

Destaque

SiriusCon2016 - ASML's MDE Going Sirius
SiriusCon2016 - ASML's MDE Going SiriusSiriusCon2016 - ASML's MDE Going Sirius
SiriusCon2016 - ASML's MDE Going Sirius
Obeo
 
SiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
SiriusCon2016 - Modelling Spacecraft On-board Software with SiriusSiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
SiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
Obeo
 
Production planning & control
Production planning & controlProduction planning & control
Production planning & control
amirthakarthi
 

Destaque (15)

SiriusCon2016 - ASML's MDE Going Sirius
SiriusCon2016 - ASML's MDE Going SiriusSiriusCon2016 - ASML's MDE Going Sirius
SiriusCon2016 - ASML's MDE Going Sirius
 
The Street Analysis- ASML
The Street Analysis- ASMLThe Street Analysis- ASML
The Street Analysis- ASML
 
SiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
SiriusCon2016 - Modelling Spacecraft On-board Software with SiriusSiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
SiriusCon2016 - Modelling Spacecraft On-board Software with Sirius
 
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
 
Digital in 2017: Central Asia
Digital in 2017: Central AsiaDigital in 2017: Central Asia
Digital in 2017: Central Asia
 
the brain ,parts and functions
 the brain ,parts and functions the brain ,parts and functions
the brain ,parts and functions
 
Production planning & control & Forecasting
Production planning & control & ForecastingProduction planning & control & Forecasting
Production planning & control & Forecasting
 
Digital in 2017: Western Asia
Digital in 2017: Western AsiaDigital in 2017: Western Asia
Digital in 2017: Western Asia
 
The human brain presentation
The human brain presentationThe human brain presentation
The human brain presentation
 
Digital in 2017: Eastern Asia
Digital in 2017: Eastern AsiaDigital in 2017: Eastern Asia
Digital in 2017: Eastern Asia
 
Production planning & control
Production planning & controlProduction planning & control
Production planning & control
 
2016 Digital Yearbook
2016 Digital Yearbook2016 Digital Yearbook
2016 Digital Yearbook
 
SAP Production Planning
SAP Production PlanningSAP Production Planning
SAP Production Planning
 
2017 Digital Yearbook
2017 Digital Yearbook2017 Digital Yearbook
2017 Digital Yearbook
 
Digital in 2017 Global Overview
Digital in 2017 Global OverviewDigital in 2017 Global Overview
Digital in 2017 Global Overview
 

Semelhante a Slides for a talk on UML Semantics in Genoa in 2006

plsql tutorialhub....
plsql tutorialhub....plsql tutorialhub....
plsql tutorialhub....
Abhiram Vijay
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
Scala Italy
 

Semelhante a Slides for a talk on UML Semantics in Genoa in 2006 (20)

Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
 
Aligning OCL and UML
Aligning OCL and UMLAligning OCL and UML
Aligning OCL and UML
 
Modular Mathematical Modelling of Biological Systems
Modular Mathematical Modelling of Biological SystemsModular Mathematical Modelling of Biological Systems
Modular Mathematical Modelling of Biological Systems
 
Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)
 
Modelling and Simulation Concepts
Modelling and Simulation ConceptsModelling and Simulation Concepts
Modelling and Simulation Concepts
 
Basics of kotlin ASJ
Basics of kotlin ASJBasics of kotlin ASJ
Basics of kotlin ASJ
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin
 
Kotlin- Basic to Advance
Kotlin- Basic to Advance Kotlin- Basic to Advance
Kotlin- Basic to Advance
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
 
Code Generation 2014 - ALF, the Standard Programming Language for UML
Code Generation 2014  - ALF, the Standard Programming Language for UMLCode Generation 2014  - ALF, the Standard Programming Language for UML
Code Generation 2014 - ALF, the Standard Programming Language for UML
 
What's new in Scala and the Scala IDE for Eclipse for 2.8.0
What's new in Scala and the Scala IDE for Eclipse for 2.8.0What's new in Scala and the Scala IDE for Eclipse for 2.8.0
What's new in Scala and the Scala IDE for Eclipse for 2.8.0
 
plsql tutorialhub....
plsql tutorialhub....plsql tutorialhub....
plsql tutorialhub....
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
 
Drilling the Async Library
Drilling the Async LibraryDrilling the Async Library
Drilling the Async Library
 
Exploring Kotlin language basics for Android App development
Exploring Kotlin language basics for Android App developmentExploring Kotlin language basics for Android App development
Exploring Kotlin language basics for Android App development
 
Python coroutine
Python coroutinePython coroutine
Python coroutine
 

Último

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
heathfieldcps1
 
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
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Último (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Slides for a talk on UML Semantics in Genoa in 2006

  • 1. An AsmL Semantics for Dynamic Structures in UML-RT Stefan Leue, Alin Stef˘nescu, and Wei Wei ¸ a Software Engineering Group University of Konstanz 3–October–2006
  • 2. Motivation → Dynamic reconfigurations are inherent to many applications. → Capturing them at design time is not easy. • the UML-RT profile supports dynamic structures: – runtime creation of capsules optional capsules – multiple containment plugin capsules – dynamic connections unwired ports • a precise semantics of such concepts is needed for the formal analysis of UML-RT models We use the AsmL specification framework to give an executable semantics to dynamic structures in UML-RT. 2
  • 3. Abstract State Machines (ASM) and AsmL Abstract State Machines (ASM) used for the semantics • ASMs are transitions systems with → states described by sets with relations and functions → transitions described by update rules • AsmL is a specific implementation for ASMs → object-oriented concepts, strong type system, tool support An executable AsmL specification for UML-RT models: • semantics of UML-RT specified in AsmL • translation of a given UML-RT model into AsmL • analysis of the AsmL specification using the SpecExplorer tool (simulation, model-checking, testing) 3
  • 4. UML-RT and Rational Rose Real-Time ROOM (1994) & UML (1997) UML-RT (1998) supported by Rational Rose Real-Time In UML 2.0 Structured Classes that may have ports and internal structure (depicted by Composite Structures diagrams) 4
  • 5. Ports and connectors class Port class ConnectorEnd name as String capsuleRole as CapsuleRole or Null protocol as Protocol port as Port isRelay as Boolean isWired as Boolean class Connector isPublic as Boolean end1 as ConnectorEnd peerPort as Port or Null end2 as ConnectorEnd Only ports with compatible protocols can be connected. Rose RealTime supports dynamic connections of unwired ports. In UML 2.0 Ports and connectors were newly introduced in UML 2.0, but with a slightly more general semantics than in UML-RT. 5
  • 6. Capsules class CapsuleClass class CapsuleRole class CapsuleInstance name as String name as String name as String super as CapsuleClass capsuleClass as CapsuleClass capsuleClass as CapsuleClass subcapsuleRoles as Set of CapsuleRole parent as CapsuleRole or Null subcapsules as Set of CapsuleRole ports as Set of Port kind as CapsuleRoleKind ports as Set of Port connectors as Set of Connector isSubstitutable as Boolean importedIn as Set of CapsuleRole behaviour as StateMachine or Null inst as CapsuleInstance or Null state as State with CapsuleRoleKind = {fixed capsule, optional capsule, plugin capsule} 6
  • 7. Dynamic structures in UML-RT • fixed capsule role – incarnated at initialization time of parent → In UML 2.0: composition (isComposite=true) Graphically: nested box with solid outline • optional capsule role – incarnated/destroyed at runtime → In UML 2.0: composition with variable multiplicity for parts • plugin capsule role – filled in at runtime → In UML 2.0: aggregation (isComposite=false) Graphically: nested box with dashed outline 7
  • 8. Capsule incarnation incarnate(capsuleRole as CapsuleRole) require capsuleRole.inst = null instance := new CapsuleInstance(...) createSubcapsuleRoles(instance) createPorts(instance) incarnateAllFixedRoles(instance) connectPorts(instance) capsuleRole.inst = instance if capsuleRole.kind = optional connectPorts(capsuleRole.parent,capsuleRole) In Rose RealTime, optional capsules can be incarnated on different 8 execution threads.
  • 9. Capsule importation import(instance as CapsuleInstance, pluginRole as CapsuleRole) require pluginRole.instance = null require instance <> null require compatibleCapsuleRoles(pluginRole, instance.capsuleClass) connectPorts(pluginRole.parent, pluginRole, instance) pluginRole.inst := instance add pluginRole to instance.importedIn Constraint: A port of the imported capsule instance cannot be simultaneously connected in two different plugin roles. 9
  • 10. Capsule deportation and destruction • Basically, ’undo’ of importation and incarnation • Deportation of capsule instance CI from capsule role CR: → remove all connectors to CI from CR.parent → remove CR from the set CI.importedIn • Destruction of a capsule role CR: → destroy connections to and in CR → recursively destroy all owned fixed and optional capsules roles → Semantic variation point: Destroy or keep the owned subcapsule instances that are imported in another capsule role 10
  • 11. Next steps • integrate the semantics of state machines and communication services (as supported by Rational Rose Realtime tool) • analysis of generated AsmL code using SpecExplorer (simulation, testing, model checking) • semantics for the UML 2.0 composite structures Thank you for attention! 11