1 / 25

Dynamic Modeling

Dynamic Modeling. Chapter 11 Part of Analysis Modeling. Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001). Dynamic Modeling. Addresses the dynamic, or behavioral, aspects of a system. Both Inter- and Intra- object interactions are considered.

brookes
Download Presentation

Dynamic Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)

  2. Dynamic Modeling • Addresses the dynamic, or behavioral, aspects of a system. • Both Inter- and Intra- object interactions are considered. • Intra-object Statecharts. • Inter-object Interaction Diagrams • Produces a Dynamic Model

  3. Dynamic Model • Includes: • Interaction Diagrams • Collaboration Diagrams • Sequence Diagrams • Message Sequence Description • Statechart Diagrams (if needed)

  4. Overview of Dynamic Modeling • Review of Interaction Modeling • What the different types of interaction diagrams look like • How to choose which to use. • How to perform Dynamic Analysis in COMET • Determining which objects to include in the dynamic model. • Comparison of state vs. non-state oriented dynamic analysis.

  5. Object Interaction Modeling • Objects and Messages are represented on an Interaction Diagram • Objects are instances of classes • Messages consist Events coupled with the data that accompanies them, or their attributes. • message = event (attributes) • e.g.: ATM Card Inserted (Card ID, Expiration Date) • Messages represent data passed from one object to another. • Messages may or may not trigger actions

  6. Collaboration Diagrams • Collaboration diagrams depict messages going from one object to another. • Messages should have sequence numbers to indicate order.

  7. Sequence Diagrams • Sequence Diagrams capture time sequence of interactions between objects. • Because the diagram depicts the time sequence, message sequence numbers are not necessary, but my be included. • Note that the lifelines are dashed – we do not determine object lifecycles in the analysis modeling phase.

  8. Collaboration vs. Squence • Only one or the other is needed. • COMET prescribes a slight preference for collaboration diagrams. • An important part of design modeling is synthesizing the collaboration diagrams – hence collaboration diagrams must be created for all sequence diagrams anyways. • During the analysis modeling, COMET emphasizes capturing the information passed from one object to another, rather than the action taken when a message arrives.

  9. What Interaction Diagrams Show • Scenarios of Use Cases • A Scenario is a particular path through a Use Case. • Alternative paths may be selected based on conditions. • Generic interaction diagrams show all scenarios. • Instance interaction diagrams show a single scenario.

  10. Message Labels • Message labels take the following form: • sequence expression: message name (attributes) • Sequence Expressions may include: • Message Sequence Number • Recurrence • Iteration • Condition • Attributes are arguments, data, or parameters sent with the message • e.g.: 2.6 [Valid]: Valid PIN

  11. Message Sequence Numbering • Message sequence numbers in COMET consist of: • [first optional letter sequence] [numeric sequence] [second optional letter sequence] • e.g.: • A1 • 1a • Use1.3invalid

  12. Message Labeling (example)

  13. Message Sequence Description • The message sequence description is a narrative describing the interactions on an interaction diagram. • Typically used to provide additional information that is not easy or appropriate to represent on the interaction diagrams.

  14. Dynamic Analysis • Determines how analysis model objects interact with each other. • Begins with a Use Case • The sequence of internal interactions started by external inputs defined in a Use Case are “followed” through the system to eventual system output. • Is Iterative. • First objects associated with a use case are identified. • Then their interactions are considered and re-considered.

  15. Non-State Dependent Dynamic Analysis • Determine interface object(s). • Determine internal objects. • Determine object collaboration. • Consider alternative sequences.

  16. Non-State Dependent Dynamic Analysis (example) Use Case Name: View Workstation Status Actor: Factory Operator Summary: Factory operator views the status of one or more workstations Precondition: Factory operator is logged in. Description: Factory operator requests view of the status of one or more factory workstations. The request may be made on demand, or by subscription to receive notification of status changes. Alternatives: Factory workstation is down. Warning message is displayed. Postcondition: Workstation status has been displayed.

  17. Non-State Dependent Dynamic Analysis (example, cont)

  18. State-Dependant Dynamic Analysis • Determine Objects and Interactions. • Determine the interface object(s). • Determine the state-dependant control object(s). • Determine other internal objects. • Determine object collaboration. • Execute the Statechart. • Consider Alternative Sequences.

  19. Executing the Statechart • For each state transition caused by a message, determine all the actions that result from the change in state and the objects that execute the identified actions and activities. • For each triggered or enabled object, determine the messages generated and their destinations. • Show the determined internal and external messages on both the statechart and the interaction diagram.

  20. State-Dependant Dynamic Analysis (banking example) • Determine the main sequence:

  21. State-Dependant Dynamic Analysis (banking example, cont) • Execute the statechart

  22. State-Dependant Dynamic Analysis (banking example) • Determine Alternative Sequences

  23. State-Dependant Dynamic Analysis (banking example) • Refine the statechart to include alternative sequences.

  24. Summary • Dynamic Analysis determines how objects interact to accomplish Use Cases. • The Dynamic Model consists of: • Interaction Diagrams (Collaboration or Sequence) • Statechart Diagrams (if necessary) • Message Sequence Descriptions

  25. Summary (cont) • Dynamic Analysis can be state or non-state dependent. • Dynamic Analysis consists of: • Determining external and internal objects. • Determining object collaborations. • Considering alternative sequences.

More Related