Next: About this document
Up: No Title
CMU 15-671Models of Software SystemsFall 1995
Sequences, Induction; State Machines
Garlan & Wing Homework 4 Due: 20 September 1995
Problem 1.
Chapter 7 of SEM: 7.1, 7.2, 7.3
Problem 2.
Chapter 8 of SEM: 8.2, 8.3, 8.7, 8.8
Problem 3.
A certain simple answering machine (not unlike the one on my desk) has
two buttons (``play'' and ``save'')
and (of course) can receive messages. If someone plays the
messages and doesn't save them, they are erased/overwritten when the
next incoming message is received. The answering machine only holds a
specified
number of messages; when it reaches full capacity, it refuses to accept
new messages. The answering machine can be modeled by the state
machine AnsMachine whose state transition diagram is below.
- Give a 4-tuple description for this state machine.
- Give three execution fragments of AnsMachine, at least one
of which is not an execution.
- Give both a finite and an infinite execution of AnsMachine.
- For each of the following, indicate whether or not it is an
event-based trace of AnsMachine.
- play save msg msg play
- msg msg msg play save msg msg msg
- msg play save msg msg play msg msg msg
- Give two examples of state-based traces of AnsMachine.
- Give two sequences of states which are not state-based
traces of AnsMachine.
- What are the reachable states of this machine?
- Is AnsMachine's event-based behavior finite or infinite?
- Can a state machine with an
infinite trace have an infinite behavior? Give an example or explain
why not.
Norman Papernick
Tue Apr 2 12:06:55 EST 1996