1. 12

  2. 2

    Nice article! I’ve never considered finding the product of multiple smaller state machines to construct a larger, more complex state machine.

    What did you use to make your charts?

    1. 2

      At the end of the article there is a reference to http://madebyevan.com/fsm/

      I am presuming that’s what the author has used.

      If you are looking to automagically generate layed-out state machine diagrams from state machine definition, take a look at SMC http://smc.sourceforge.net/SmcGallery.htm (it uses graphviz engine for the layouts) (and generates code… this is one way though, it will not read your code and convert it into a state machine :-) )

    2. 2

      if you like this, then you might want to check out hierarchical-state-machine (hsm) as well. as opposed to vanilla state-machines, in hsm’s, adding new states don’t cause a NxM explosion of state/event problem. states are in a well defined hierarchy, with unhandled child events handled by parent states etc. etc.