84 6 model based requirements documentation eg if

This preview shows page 103 - 105 out of 182 pages.

84 6 Model-Based Requirements Documentation (e.g., “if automaton A is in state 4”). Figure 6-16 shows a behavior model for a navigation device of a vehicle by means of a statechart. The naviga- tion device is initially in the state “navigation device inactive”. Figure 6-16 Simplified statechart of a vehicular navigation device Transition into super state By turning on the navigation device (event: “navigation device activated”), the system transitions into the super state “navigation device active” (more precisely, the system transitions into the initial state “no GPS signal” of the super state “navigation device active”). The super state “navigation device active” is refined by a partial automaton that consists of two states. For example, if a GPS signal is received in the state “navigation device active: no GPS signal” 8 . the system transitions into the state “navigation device active: GPS signal” and issues a notification. If the device is deactivated while in the state “navigation device active” (event: “navigation device deac- tivated”), the system transitions into the state “navigation device inactive”. 6.7.2 UML State Diagrams Modeling reactive behavior of a system using UML In order to model reactive system behavior, Unified Modeling Language (UML) [OMG 2007] offers so-called state machines that are essentially based on statecharts. Figure 6-17 shows the most important modeling ele- ments of UML state diagrams. The notation of the modeling elements of UML state diagrams has largely been adopted from statecharts. However, UML 2 extends the modeling elements of statecharts, e.g., by the ability to define explicit entry and exit points of hierarchical states [OMG 2007] . 8. For unique identification, a state that is part of a super state is referenced by “super state: state”. The state “no GPS signal” in the super state “navigation device active” is therefore referenced as “navigation device active: no GPS signal”.
Image of page 103

Subscribe to view the full document.

6.7 Requirements Modeling in the Behavioral Perspective 85 Figure 6-17 Modeling elements of state machines as defined by the UML 2 States and transitions Just as in statecharts, a state defines a period of time in which a system shows a particular behavior and waits for a particular event to occur. A transition is triggered by an event that occurs in a particular state and describes the change from one state to the next. A transition can be dependent on a condition. In addition, the system can perform actions that are directed toward the system or its environment. Hierarchization and concurrency Depending on the purpose of the model, state machines allow hierar- chically combining states into super states, thereby abstracting from the potentially very complex behavior of these states. Aside from hierarchi- cally decomposing states by means of partial automata, a state can be decomposed into several concurrent state machines. Just as in statecharts, synchronization of concurrent state machines can be achieved using con- ditions.
Image of page 104
Image of page 105

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes