
82 Model-Based Testing for Embedded Systems
Side latch
Inactive
Active
[isInState('on_d']
Warm
Set temperature Set defrost
off_d
inc
Hot
dec
Defrosting
time_d
Toasting
time/off
[else]
push/on
stop/off
defrost [not
isInState('active)']
defrost [not
isinstate('active)']
off
On_d
FIGURE 4.3
A hierarchical state machine model.
an excessive set of states. Therefore, it is preferable to use a data variable for this purpose.
One option to do so is via extended finite state machines, where for instance, the transitions
may refer to variables containing numerical data.
Figure 4.4 shows a more detailed model of a toaster that contains several variables. This
model also contains the region ...