Below you find an incomplete SMV program. The incomplete parts are indicated by a "???".
We have three lamps, lamp1, lamp2, and lamp3, which we model as boolean variables. Any lamp has value "0" if it is "off"; it has value "1" if it is "on". The system may start off at any initial state. At any state, the next state is determined as follows: for any of the three lamps, lampk (where k=1,2,3):
MODULE main VAR lamp1 : boolean; lamp2 : boolean; lamp3 : boolean; ASSIGN init(lamp1) := ???; init(lamp2) := ???; init(lamp3) := ???; next(lamp1) := case ( ??? ) : ???; ( ??? ) : ???; 1 : ???; esac; next(lamp2) := case ( ??? ) : ???; ( ??? ) : ???; 1 : ???; esac; next(lamp3) := case ( ??? ) : ???; ( ??? ) : ???; 1 : ???; esac; SPEC ??? SPEC ??? SPEC ??? SPEC ???
Thus, you can earn a total of ten points for completing this homework.
Michael Huth (huth@cis.ksu.edu)