Book contents
- Frontmatter
- Contents
- Preface
- Annotated Table of Contents
- Acknowledgments
- PART I Overview
- PART II Software Modeling
- 6 Use Case Modeling
- 7 Static Modeling
- 8 Object and Class Structuring
- 9 Dynamic Interaction Modeling
- 10 Finite State Machines
- 11 State-Dependent Dynamic Interaction Modeling
- PART III Architectural Design
- PART IV Case Studies
- Appendix A Catalog of Software Architectural Patterns
- Appendix B Teaching Considerations
- Glossary
- Answers to Exercises
- Bibliography
- Index
10 - Finite State Machines
from PART II - Software Modeling
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- Annotated Table of Contents
- Acknowledgments
- PART I Overview
- PART II Software Modeling
- 6 Use Case Modeling
- 7 Static Modeling
- 8 Object and Class Structuring
- 9 Dynamic Interaction Modeling
- 10 Finite State Machines
- 11 State-Dependent Dynamic Interaction Modeling
- PART III Architectural Design
- PART IV Case Studies
- Appendix A Catalog of Software Architectural Patterns
- Appendix B Teaching Considerations
- Glossary
- Answers to Exercises
- Bibliography
- Index
Summary
Finite state machines are used for modeling the control and sequencing view of a system or object. Many systems, such as real-time systems, are highly state-dependent; that is, their actions depend not only on their inputs but also on what has previously happened in the system. Notations used to define finite state machines are the state transition diagram, statechart, and state transition table. In highly state-dependent systems, these notations can help greatly by providing insight into understanding the complexity of these systems.
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 1988; Harel and Politi 1998). In this book, the terms statechart and state machine diagram are used interchangeably. We refer to a traditional state transition diagram, which is not hierarchical, as a flat statechart and use the term hierarchical statechart to refer to the concept of hierarchical state decomposition. A brief overview of the statechart notation is given in Chapter 2 (Section 2.6).
This chapter starts by considering the characteristics of flat statecharts and then describes hierarchical statecharts. To show the benefits of hierarchical statecharts, this chapter starts with the simplest form of flat statechart and gradually shows how it can be improved upon to achieve the full modeling power of hierarchical statecharts. Several examples are given throughout the chapter from two case studies, the Automated Teller Machine and Microwave Oven finite state machines.
- Type
- Chapter
- Information
- Software Modeling and DesignUML, Use Cases, Patterns, and Software Architectures, pp. 151 - 176Publisher: Cambridge University PressPrint publication year: 2011