A method and apparatus to generate a test suite from an abstract state
machine (ASM) involves generating a finite state machine (FSM) for the
ASM, and generating the test suite from the FSM. An initial state of the
ASM is selected. A first encoding having a plurality of bits is generated
to represent the initial state. Each bit of the first encoding represents
a result of an evaluation of a non-trivial guard condition of the ASM.
The initial state is associated with the first encoding in the data
structure for the FSM. At least one other states of the ASM are
identified that result from applying at least one actions of the ASM to
the initial state. At least one other encodings are generated, each of
the at least one other encodings corresponding to one of the at least one
other states, and for each one of the at least one other states, when the
corresponding of the at least one other encodings is not the same as the
any one encoding already associated with a state in the data structure,
data is included in the data structure associating the one of the at
least one other states and a corresponding of the at least one other
encodings.