Abstract

State machines (also referred to as finite state machines ) are used for modeling control and sequencing in a system. This is particularly important for real-time embedded systems, which are usually highly state dependent. In particular, the actions of a state dependent system depend not only on the inputs to the system but also on what happened previously in the system, which is captured as a state. A state machine can be used to depict the states of a system, subsystem, component, or object. Notations used to define state machines are the state transition diagram, state machine diagram, statechart, and state transition table. In highly state dependent systems, these notations help substantially to understand the complexity of these systems. A state machine specification is typically more precise and understandable than a textual or use case description. State machines can enhance or even replace use case descriptions of requirements by providing more precise specifications. In particular, state machines are essential for specifying systems with significant state dependent behavior. In the UML notation, a state transition diagram is referred to as a state machine diagram . The UML state machine diagram notation is based on Harel's statechart notation (Harel and Gery 1996; Harel and Politi 1998). In this book the terms state machine and state machine diagram are used interchangeably. This chapter refers to a traditional state transition diagram, which is not hierarchical, as a flat state machine and uses the term hierarchical state machine to refer to the concept of hierarchical state decomposition, a concept introduced by Harel. A brief overview of the state machine notation is given in Chapter 2 (Section 2.6). This chapter starts by considering the characteristics of flat state machines and then describes hierarchical state machines. To show the benefits of hierarchical state machines, this chapter starts with the simplest form of flat state machine and gradually shows how it can be improved upon to achieve the full modeling power of hierarchical state machines. The process of developing state machines from use cases is then described. Several examples are given throughout the chapter from two case studies, the Microwave Oven and Train Control state machines. Section 7.1 describes events and states in state machines. Section 7.2 introduces the Microwave Oven Control state machine example.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.