I have a little problem that involves modeling a state machine.
I have managed to do a little bit of knowledge engineering and 'reverse engineer' a set of primitive deterministic rules that determine state as well as state transitions.
I would like to know what the best practices are regarding:
How to rigorously test my states and state transitions to make sure that the system cannot end up in an undetermined state.
How to enforce state transition requirements (for example, it should be impossible to go directly from stateFoo to StateFooBar, i.e. to imbue each state with 'knowledge' about the states it can transition to.
Ideally, I would like to use clean, pattern based design, with templates wherever possible.
I do need somewhere to start though and I would be grateful for any pointers (no pun intended), that are sent my way.
Be sure to take a look at the Boost Statechart Library.