This preview shows page 104 - 107 out of 182 pages.
Encapsulation of internal states using entry and exit pointsUML 2 defines entry points and exit points as an extension of state-charts that allow for additional hierarchization of states. An exit point is anexternally visible pseudo-state that is immediately associated with aninternal state. An exit point is an externally visible pseudo-state that has itsorigin in an internal state. A super state within a state machine can havearbitrarily many entry and exit points that can be identified by a name[Rumbaugh et al. 2005].Figure 6-18shows a state diagram of UML that possesses two explic-itly defined entry points (“enter new destination” and “last destination”) aswell as one exit point (“navigation successful”) along with the modelingelements introduced in section 6.7.1.Automaton 1Automaton 2
Subscribe to view the full document.
866Model-Based Requirements DocumentationFigure 6-18 State diagram in UML 2 notationThe state diagram in figure 6-18 documents the reactive behavior of a nav-igation device. Initially, the system is in the state “device ready”. By select-ing “navigate to…”, the system changes into the super state “navigationactive” and, within the super state, into the sub state “enter destinationdata” by making use of the entry point “enter new destination”. Alterna-tively, the system changes from the state “device ready” into the internalstate “route calculation” of the super state “navigation active” by makinguse of the entry point “last destination” as soon as the event “navigate tolast destination” occurs. Once the system is in the state “navigation active:enter destination data”, the system transitions into the state “navigationactive: route calculation” if the condition that the destination data is validhas been met. Once the route is calculated in the state “navigation active: route cal-culation”, the system transitions into the state “navigation active: outputroute”. If a deviation from the route is detected (event: “deviation from cal-culated route”) in the state “navigation active: route calculation”, the driveris notified (activity: “notify driver”). From the state “navigation active”, thesystem transitions into the state “device ready” once the event “cancel”occurs. If the system is in the state “navigation active: route calculation”and the destination is reached, the system exits the super state “navigationactive” via the exit point “navigation successful” to transition into the state“device ready”.Route calculationOutput routeEnterdestination data Navigation activeDevice readySelected³QDYLJDWH#WR«´6HOHFWHG#³FDQFHO³Last destinationArrive at destinationDestination dataentered[destination data valid]Route calculated6HOHFWHG#³QDYLJDWH#WR#ODVW#GHVWLQDWLRQ³Deviation fromcalculated route /notify driverEnter new destinationNavigationsuccessful
6.8Summary876.8SummaryAlong with using natural language to document requirements, require-ments can be documented by means of models. Typically, natural language
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.
Temple University Fox School of Business ‘17, Course Hero Intern
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.
University of Pennsylvania ‘17, Course Hero Intern
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.
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 )