Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dillon: CSE470:DYN & FUNC MODELLING1 Dynamic Model l Show the temporal order of operations l Control model »Show the sequence of operations that occur.

Similar presentations


Presentation on theme: "Dillon: CSE470:DYN & FUNC MODELLING1 Dynamic Model l Show the temporal order of operations l Control model »Show the sequence of operations that occur."— Presentation transcript:

1 Dillon: CSE470:DYN & FUNC MODELLING1 Dynamic Model l Show the temporal order of operations l 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 Dillon: CSE470:DYN & FUNC MODELLING2 Dynamic Model l 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 Dillon: CSE470:DYN & FUNC MODELLING3 Terminology l States - determined by the values of an object’s attributes and links »have a duration in time »may be associated with activities l Activities - operations performed by an object »take time to complete

4 Dillon: CSE470:DYN & FUNC MODELLING4 Terminology l Events - external stimuli »instantaneous »may produce state transitions »may produce actions l Conditions - boolean functions of object values »“guard” state transitions

5 Dillon: CSE470:DYN & FUNC MODELLING5 Terminology l 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 –so entry and exit actions are not performed

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

7 Dillon: CSE470:DYN & FUNC MODELLING7 Example: Helper_App Registering entry/Register(mimetype, this) do: monitor DDE msgs Ready do: monitor DDE msgs Ack/start_service WaitChanging URL Ack ChangeURL(file, url)/ Send_file(file, url) Spawn_viewer(appname, file) Ack IO_Exception Stop DDE_exception

8 Dillon: CSE470:DYN & FUNC MODELLING8 Nesting State Diagrams l Helps organize and modularize SDs »A way to manage complexity l Two forms of nesting »Refinement –add detail to a state –permits inheritance of transitions »Concurrency (aggregation) –aggregates objects, each with their own SDs

9 Dillon: CSE470:DYN & FUNC MODELLING9 Notation for Refinement Substate-1 Substate-2 Superstate event 3 event 1 event 2

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

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

12 Dillon: CSE470:DYN & FUNC MODELLING12 Notation for Concurrency Substate-1 Substate-2 Substate-3 Substate-4 Superstate event 1 event 2

13 Dillon: CSE470:DYN & FUNC MODELLING13 Example:Browser_Slave Registering entry/Register(this) Ready Ack/ start_service Ack ChangeURL(file,url) / UpdateFrameVector (frame) Stop DDE_exception Wait RecURL(url,frame) / B_activate Ack / B_OpenURL(url,frame) Ack Frame_managerRec_URL_manager

14 Dillon: CSE470:DYN & FUNC MODELLING14 Example: WEB Class Browser_WrapperMreceiverBrowser_Slave Web_Student Web_Instructor Browser_WrapperMsenderBrowser_Listener Helper_App1 Helper_App9......

15 Dillon: CSE470:DYN & FUNC MODELLING15 Dynamic Model: Creation Tips l Create SDs only for object classes with meaningful dynamic behavior l Check consistency between »SDs on shared activities »SDs and object model l Use scenarios to »Begin construction of SDs »Check completeness of SDs

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

17 Dillon: CSE470:DYN & FUNC MODELLING17 Functional Model l 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 l Consists of multiple data flow (DF) diagrams

18 Dillon: CSE470:DYN & FUNC MODELLING18 Terminology l Process - transforms data values l Data flow - connects output of a process or object to the input of another process or obj l Actor - active object that drives the DF by producing or consuming data values l Data store - passive object that stores data for later use

19 Dillon: CSE470:DYN & FUNC MODELLING19 Graphical Notation Data flow between Processes:Process: Process name data name Data store or file object: Name of data store Data flow that results in a data store:

20 Dillon: CSE470:DYN & FUNC MODELLING20 Graphical Notation (cont.) Actor objects (as source or sink of data: Process name Actor2Actor1 d2d1 Composition, duplication, and decomposition of data values: d1 d2 composited1composite d1 d2

21 Dillon: CSE470:DYN & FUNC MODELLING21 Example: Banking application Bank Select accounts Customer name Update Account request balance

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


Download ppt "Dillon: CSE470:DYN & FUNC MODELLING1 Dynamic Model l Show the temporal order of operations l Control model »Show the sequence of operations that occur."

Similar presentations


Ads by Google