UML state machine: Difference between revisions

Content deleted Content added
Rubyuser (talk | contribs)
m typos & highlighting
No edit summary
Line 155:
</ref>
 
Orthogonal regions address the frequent problem of a combinatorial increase in the number of states when the behavior of a system is fragmented into independent, concurrently active parts. For example, apart from the main keypad, a computer keyboard has an independent numeric keypad. From the previous discussion, recall the two states of the main keypad already identified: "default" and "caps_locked" (see Figure 1). The numeric keypad also can be in two states—"numbers" and "arrows"—depending on whether Num Lock is active. The complete state space of the keyboard in the standard decomposition is the cross-Cartesian product of the two components (main keypad and numeric keypad) and consists of four states: "default–numbers," "default–arrows," "caps_locked–numbers," and "caps_locked–arrows." However, this is unnatural because the behavior of the numeric keypad does not depend on the state of the main keypad and vice versa. Orthogonal regions allow you to avoid mixing the independent behaviors as a cross-Cartesian product and, instead, to keep them separate, as shown in Figure 4.
 
[[Image:UML state machine Fig4.png|thumb|upright=3|center|Figure 4: Two orthogonal regions (main keypad and numeric keypad) of a computer keyboard]]