DOC PREVIEW
SJSU CMPE 133 - More about Dynamic Models

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 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 24 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 24 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 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lesson 3-7b: More about Dynamic ModelsLesson ObjectivesModes of BehaviorObject Mode DiagramPatterns of BehaviorMoore Machines or Moore’s STDMoore’s STD: ExampleMealy MachinesInitial & Final TransitionsObject Behavior ModelObject DynamicsTransition ConditionsTransition ActionsMore on Transition ActionsSlide 15Slide 16Activities and ActionsMealy’s STD: NotationA Car ExampleIgnition STDTransmission STDAccelerator STDBrake STDDiscussion QuestionsMore on Dynamic Models - Page L3-7b-1© M.E. Fayad 2000-2006 M.E. FayadLesson 3-7b:More about Dynamic ModelsLesson 3-7b:More about Dynamic Models Object-OrientedModeling &ApplicationsMore on Dynamic Models - Page L3-7b-2© M.E. Fayad 2000-2006 M.E. FayadLesson ObjectivesLesson ObjectivesLearn about the modes of behaviorUnderstand object mode diagram and patterns of behaviorLearn about moore and Mealy machines.Understand object dynamic and concurrencyLearn the concepts of STDsLearn the notation of state charts or STDLearn how to develop a STDObjectivesMore on Dynamic Models - Page L3-7b-3© M.E. Fayad 2000-2006 M.E. FayadModes of Behavior•Behavior is the way in which machine, organ or mechanism works with respect to its efficiency. The way in which some things reacts to its environment.•Things often exhibit several modes of behaviors, each of which can be named.•In a particular mode of behavior an instance may be involved in an interaction with another instance, transforming, processing input information into output.More on Dynamic Models - Page L3-7b-4© M.E. Fayad 2000-2006 M.E. FayadObject Mode Diagram•Object Mode Diagram is a model that illustrates the modes of behavior of an object.•Each mode in the diagram is denoted by a named box•The interpretation of each mode is briefly indicated in the name in the box.•A more detailed definition of each mode should be in the data or object dictionary.•Object Mode Diagram exposes the modes of behavior of a class of things but hides the details of how transitions between the modes occur.•Example:OpenClosedOpeningClosingDoorMore on Dynamic Models - Page L3-7b-5© M.E. Fayad 2000-2006 M.E. FayadPatterns of Behavior•Instances of a class can exhibit a common pattern of behavior by moving between different modes of behavior in a deterministic manner.•A description of behavior in terms of modes is a qualitative description.•The pattern is a form between modes associated by the “may-be / is-followed by” relationship. Example:–“On” is followed by “Off”–“Off” is followed by “On”•The may-be / is-followed-by relationship determines which mode follows which other mode in time, not space.•A transition is the term that describes when an instance moves from one mode of behavior to another.More on Dynamic Models - Page L3-7b-6© M.E. Fayad 2000-2006 M.E. FayadMoore Machines or Moore’s STD•A Moore Machine is a type of finite state machine (FSM).•Specific activities are associated with the states, regardless of the history of transitions to a state.•Example:–When I am angry I frown but when I am happy I smile.More on Dynamic Models - Page L3-7b-7© M.E. Fayad 2000-2006 M.E. FayadMoore’s STD: Example OpenTurn on light Closed1. Turn on dishwasher2. Watch TV OpeningSound alarm ClosingSound alarmDoorMore on Dynamic Models - Page L3-7b-8© M.E. Fayad 2000-2006 M.E. FayadMealy Machines•A Mealy Machine is a type of finite state machine (FSM).•Specific actions are associated with specific transitions.More on Dynamic Models - Page L3-7b-9© M.E. Fayad 2000-2006 M.E. FayadInitial & Final Transitions•An initial transition, with no previous mode, denotes the “creation or appearance” event, such as open account.•The initial transition is labeled with the transition condition that caused the thing to be “created” or to “appear” in the domain.•Actions and activities may be associated with the “creation” transitions.•A final transition from each final mode, to no other state, denotes the “deletion” event, such as close account.•Each final transition is labeled with the transition condition that caused the thing to be “deleted”.•Actions and activities may be associated with the “deletion” transitions.More on Dynamic Models - Page L3-7b-10© M.E. Fayad 2000-2006 M.E. FayadObject Behavior Model•The model describing the behavior of a class of things is termed Class Behavior Model, Dynamic Model, or Control Model.•For Object Modeling:–Modes have a finite lifetime.–Transitions take infinitesimal duration.–Zero or more initial transitions are required.–Zero or more final transitions are required.More on Dynamic Models - Page L3-7b-11© M.E. Fayad 2000-2006 M.E. FayadObject Dynamics•The Class Behavior Model or STD describes the possible behavior of any instance.•Each instance is considered to be in only one of the modes at a time.•Objects having a STD with a 2 or more modes are called Dynamic Objects.•Objects having a STD with only one mode are called Static Objects.•Things that apparently exhibit 2 or more fairly independent “threads” of behavior can be modeled by a 2 or more “synchronized” STDs, such as human arms and head.More on Dynamic Models - Page L3-7b-12© M.E. Fayad 2000-2006 M.E. FayadTransition Conditions•A transition condition can be defined as any proposition “X” in the sentence “When X”.•“X” is a proposition, denoting an event that can be true or false:–It is time to stop or It is noon.•X is a proposition denoting a condition that can be true or false:–The light is on.•A simple logical expression involving at most one event and one or more conditions:–It is time to slow down or it is time to stop.•A complex logical expression of the form:–(a1 and b1) xor (a2 and b2),.... xor (an and bn).•A transition is taken when the transition condition is true.More on Dynamic Models - Page L3-7b-13© M.E. Fayad 2000-2006 M.E. FayadTransition Actions•When an instance transitions from one mode to another it changes the way in which it interacts with its environment; that is, it changes its behavior.•This is called Transition Actions and are simple expression “Y” in “When X do Y”.•IN STD, the changes in behavior are recorded along the transition condition.More on Dynamic Models - Page L3-7b-14© M.E. Fayad 2000-2006 M.E. FayadThe transition actions of an object are limited to:Starting/Enabling a new


View Full Document

SJSU CMPE 133 - More about Dynamic Models

Download More about 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 More about 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 More about 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?