DOC PREVIEW
SJSU CMPE 133 - Dynamic Models

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lesson 3-7a: Dynamic ModelsLesson ObjectivesModeling BehaviorEventsEvents (cont’d)ScenariosExample: Scenario for a Phone LineEvent Trace DiagramEvent Trace Diagram for a Phone CallWhat are STDs?What are STDs? (cont’d)Slide 12Slide 13Discussion QuestionsDynamic Models - Page L3-7a-1© M.E. Fayad 2000-2006M.E. FayadLesson 3-7a:Dynamic ModelsLesson 3-7a:Dynamic Models Object-OrientedModeling &ApplicationsDynamic Models - Page L3-7a-2© M.E. Fayad 2000-2006M.E. FayadLesson ObjectivesLesson ObjectivesUnderstand behavior analysisUnderstand the following terms: State Event  Decision tablesLearn how to develop: Scenarios  Event Traces STDs (Moore Machine & Mealy Machine, etc.)ObjectivesDynamic Models - Page L3-7a-3© M.E. Fayad 2000-2006M.E. FayadModeling Behavior•The modeling notation that are used to model behavior, must captures the concepts of:–Behavior–Transition–The calculation of “next mode of behavior” given the “present mode of behavior” and the occurrence of a particular “transition condition”•One simple technique to model behavior is State Transition Diagram (STD).•Other behavior modeling techniques are:– Petri Nets -- Decision Tables–An algorithm -- State ChartsDynamic Models - Page L3-7a-4© M.E. Fayad 2000-2006M.E. FayadEvents•Event is something that happens at a point of time.•An event has no duration.•An event is simply an occurrence that is fast compared to the granularity of the time scale of a given abstraction.•One event may logically precede or follow another, or the events may be unrelated.•Two events that are unrelated are said to be concurrent; they have no effect on each other.•In MODELING, DO NOT establish an ordering between concurrent events because they can occur in any order.Dynamic Models - Page L3-7a-5© M.E. Fayad 2000-2006M.E. FayadEvents (cont’d)•Any realistic model of a distributed system must include concurrent events and activities.•Every event is a unique occurrence . Examples: Flight 1001 departs from Reno and Flight 1234 departs from Cairo are both instances of event class called airplane flight departs. •An event conveys information from one object to another.•Events include error conditions as well as normal occurrences. Examples: time-out and transaction aborted are typical error eventsDynamic Models - Page L3-7a-6© M.E. Fayad 2000-2006M.E. FayadScenarios•A scenario is a sequence of events that occurs during one particular execution of a system.•A scenario can include all events in the system or can only include these events that are generated by a certain object in that system.•A scenario can be a historical record of executing or simulating the execution of a system or an object.Dynamic Models - Page L3-7a-7© M.E. Fayad 2000-2006M.E. FayadExample: Scenario for a Phone Line•Caller lifts receiver•dial tone begins•caller dials digit (5)•dial tone ends•caller dials digit (5)•caller dials digit (5)•caller dials digit (1)•caller dials digit (2)•caller dials digit (3)•caller dials digit (4)•called phone begins ringing•ringing tone appears in calling phone•called party answers•called phone stop ringing•ringing tone disappears in calling phone•phones are connected•called party hangs up•phones are disconnected•caller hangs upDynamic Models - Page L3-7a-8© M.E. Fayad 2000-2006M.E. FayadEvent Trace Diagram•Each event transmits information from one object to another.•Example:–dial tone begins event transmits a signal from the phone line to the caller.•In Event Trace:–Identify sender and receiver objects of each event.•Event Trace Diagram (ETD) shows the sequence of events and the object exchanging these events.•ETD shows object as a vertical line and each event as a horizontal line from the sender to the receiver.Dynamic Models - Page L3-7a-9© M.E. Fayad 2000-2006M.E. FayadEvent Trace Diagram for a Phone CallCallerPhone lineCalleecaller lifts receiverdial tone beginsdials (5)dial tone endsdials (5)dials (5)dials (1)dials (2)dials (3)dials (4)ringing tonetone stopphone ringsanswers phone ringing stopsphone connectedphone connectedcallee hangs upconnection brokenconnection brokenDynamic Models - Page L3-7a-10© M.E. Fayad 2000-2006M.E. FayadWhat are STDs?•STD stands for State Transition Diagram•A STD is a graphical representation of a finite state machine (FSM).•FSM is an abstract behavioral model of a real imaginary thing.•The thing exists in one of a finite number of states between which it can transition or can be made to transition under certain conditions.•The allowed transitions between states must be determined or postulated.Dynamic Models - Page L3-7a-11© M.E. Fayad 2000-2006M.E. FayadWhat are STDs? (cont’d)•A state is mode of behavior and denoted by a box.•Transitions between the modes are shown as directed lines labeled by a transition condition.•A “transition condition” is any expression “X” in When X”–“When the water boils...” is an event–“When it is raining outside ...” is a proposition–“When it is 9 am and it is sunny or cloudy...” is a logical expression.•A transition only occurs out of a mode when one of its exit transition conditions becomes true.Dynamic Models - Page L3-7a-12© M.E. Fayad 2000-2006M.E. FayadWhat are STDs? (cont’d)•Transitions back to the same mode are allowed, for transition conditions containing events.•Several conditions may be present between any two modes.•Every mode must be associated with one or more transitions.•An initial transition must be shown.•A mode should be appropriately named.Dynamic Models - Page L3-7a-13© M.E. Fayad 2000-2006M.E. Fayad•Moore Machines or Moore’s STDs•Mealy Machines or Mealy’s STDs•Harel’s State ChartsWhat are STDs? (cont’d)Dynamic Models - Page L3-7a-14© M.E. Fayad 2000-2006M.E. FayadWhat is an event?What is a scenario? What is equivalent to a scenario?What is an event trace? What is a state? What are the state properties?What is a transition ? What are the transition properties?Name several techniques for model behaviorDiscussion QuestionsDiscussion


View Full Document

SJSU CMPE 133 - Dynamic Models

Download Dynamic Models
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Dynamic Models and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Dynamic Models 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?