1 / 22

Dynamic Model

Dynamic Model. Show the temporal order of operations Control model Show the sequence of operations that occur in response to external stimuli Do not worry about what operations do what they operate on how they are implemented. Dynamic Model. Consists of multiple state diagrams

dympna
Download Presentation

Dynamic Model

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 Model • Show the temporal order of operations • Control model • Show the sequence of operations that occur in response to external stimuli • Do not worry about • what operations do • what they operate on • how they are implemented

  2. Dynamic Model • Consists of multiple state diagrams • One for each class with important dynamic behavior • Shows • states of objects and activities performed in states • conditions under which events cause transitions • transitions and actions produced by events

  3. Terminology • States - determined by the values of an object’s attributes and links • have a duration in time • may be associated with activities • Activities - operations performed by an object • take time to complete

  4. Terminology • Events - external stimuli • instantaneous • may produce state transitions • may produce actions • Conditions - boolean functions of object values • “guard” state transitions

  5. Terminology • Actions - instantaneous operations performed by an object Triggered by • an event that produces a state transition • entering a state • exiting a state • an event that does not cause a state transition • soentry and exit actions are not performed

  6. State 1 do:activity entry/action2 exit/action3 event/action4 State 2 . . . Graphical Notation Event(attrs)[cond]/ action1 Ordering of Actions • actions on incoming transition • entry action • activity and event action as appropriate • exit action • actions on outgoing transition

  7. Ready do: monitor DDE msgs Example: Helper_App Registering entry/Register(mimetype, this) do: monitor DDE msgs DDE_exception Stop Ack/start_service DDE_exception IO_Exception Ack Ack ChangeURL(file, url)/ Send_file(file, url) Spawn_viewer(appname, file) Wait Changing URL

  8. Nesting State Diagrams • Helps organize and modularize SDs • A way to manage complexity • Two forms of nesting • Refinement • add detail to a state • permits inheritance of transitions • Concurrency (aggregation) • aggregates objects, each with their own SDs

  9. Substate-1 Notation for Refinement Superstate event 1 Substate-2 event 2 event 3

  10. Registering entry/Register(mimetype, this) do: monitor DDE msgs Ready do: monitor DDE msgs Wait Example: Helper_App ChangeURL(file, url)/ Send_file(file, url) Spawn_viewer(. . .) IO_Exception Ack/start_service Ack Ack Changing URL DDE_exception Stop

  11. Registering entry/Register(this) Ready Wait Example:Browser_Listener ChangeURL(file,url) [url/=lastUrl and type =HTML] / sendURL(url,frame) ChangeURL(file,url) [url=lastUrl or type/=HTML] Ack/ start_service Ack DDE_exception Stop

  12. Substate-1 Substate-3 Substate-2 Substate-4 Notation for Concurrency Superstate event 1 event 2

  13. Ready Example:Browser_Slave Frame_manager Rec_URL_manager Registering entry/Register(this) DDE_exception Wait RecURL(url,frame) / B_activate Ack/ start_service Stop Ack / B_OpenURL(url,frame) ChangeURL(file,url) / UpdateFrameVector (frame) Ack Ack Wait

  14. Example: WEB Class Web_Student Browser_Wrapper Mreceiver Browser_Slave Web_Instructor Helper_App1 Browser_Wrapper Msender Browser_Listener ... Helper_App9

  15. Dynamic Model: Creation Tips • Create SDs only for object classes with meaningful dynamic behavior • Check consistency between • SDs on shared activities • SDs and object model • Use scenarios to • Begin construction of SDs • Check completeness of SDs

  16. Dynamic Model: Creation Tips (cont.) • Let application determine granularity • Distinguish between activities and actions • Make use of entry and exit actions for multiple transitions • Make use of nested SDs to reduce complexity • Distinguish SDs for super and subclasses

  17. Functional Model • Describes computations within a system • Specifies what happens • Shows how output values are derived from input values • Is not concerned with when computations are performed • Consists of multiple data flow (DF) diagrams

  18. Terminology • Process - transforms data values • Data flow - connects output of a process or object to the input of another process or obj • Actor - active object that drives the DF by producing or consuming data values • Data store - passive object that stores data for later use

  19. Graphical Notation Process: Data flow between Processes: Process name data name Process name Process name Data store or file object: Data flow that results in a data store: Name of data store Name of data store

  20. Graphical Notation (cont.) Actor objects (as source or sink of data: d1 Process name d2 Actor1 Actor2 Composition, duplication, and decomposition of data values: d1 d1 composite d1 composite d2 d2

  21. Example: Banking application accounts Account Bank Select name balance request Customer Update

  22. Functional Model: Creation Tips • Create FM only for objects/processes with meaningful data flow • Start simple • one process with correct inputs and outputs • Refine to next level by expanding the process • Continue to refine one process at a time • Check consistency between the inputs and outputs

More Related