Chapter 6 Advanced State Modeling Nested State Diagram

  • Slides: 14
Download presentation
Chapter - 6 Advanced State Modeling

Chapter - 6 Advanced State Modeling

Nested State Diagram • 6. 1. 1. Problems with flat state diagram – State

Nested State Diagram • 6. 1. 1. Problems with flat state diagram – State diagrams have been often criticized because they allegedly are impractical for large problems. – Unstructured state diagrams – N independent boolean attributes that affect control. Representing such an object a single flat state diagram would require 2 n States. By partitioning the state into n independent state diagrams, however, only 2 n states are required. – State diagram in Figure in which n 2 transitions are needed to connect every state to every other state. It can be reduced as low as n transitions.

Nested State Diagram • 6. 1. 2. Expanding the states – Organize a model

Nested State Diagram • 6. 1. 2. Expanding the states – Organize a model is by having a high level diagram with sub diagrams expanding certain states. Vending machine state diagram Submachine: Dispense. Item submachine of vending machine

Nested State Diagram for phone line with Activities Nested states for a phone line

Nested State Diagram for phone line with Activities Nested states for a phone line

6. 2. Nested States: you can nest states to an arbitrary depth. Composite State:

6. 2. Nested States: you can nest states to an arbitrary depth. Composite State: labels the outer contour that entirely encloses the nested states. Active in previous diagram and Forward is present diagram is composite state.

6. 3. Signal Generalization • Organize signals into a generalization hierarchy with inheritance of

6. 3. Signal Generalization • Organize signals into a generalization hierarchy with inheritance of signal attributes.

6. 4. Concurrency • State model implicitly supports concurrency among the objects. • In

6. 4. Concurrency • State model implicitly supports concurrency among the objects. • In general, objects are autonomous entities that can act and change state independent of one another. • 6. 4. 1. Aggregation Concurrency • 6. 4. 2. Concurrency within an object

6. 4. 1. Aggregation Concurrency • A state diagram for an assembly is a

6. 4. 1. Aggregation Concurrency • A state diagram for an assembly is a collection of state diagram, one for each part. The aggregate state corresponds to the combined states of all the parts. • Aggregation is “and-relationship”. • Aggregate state is one state from the first diagram, and a state from second diagram and a state from each other diagram. In the more interesting cases, the part states interact.

6. 4. 1. Aggregation Concurrency

6. 4. 1. Aggregation Concurrency

6. 4. 2. Concurrency within an object 6. 4. 3. synchronization of concurrent Activities

6. 4. 2. Concurrency within an object 6. 4. 3. synchronization of concurrent Activities

Sample State Diagram for Programmable thermostate

Sample State Diagram for Programmable thermostate

Sample State Diagram for Programmable thermostate

Sample State Diagram for Programmable thermostate

Sample State Diagram for Programmable thermostate

Sample State Diagram for Programmable thermostate

thank you

thank you