Your SlideShare is downloading. ×
0
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Slides for a talk on UML Semantics in Genoa in 2006
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Slides for a talk on UML Semantics in Genoa in 2006

346

Published on

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
346
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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

×