streamflyer icon indicating copy to clipboard operation
streamflyer copied to clipboard

Rethink FSM design to match a Mealy machine more closely.

Open thomas001 opened this issue 8 years ago • 0 comments

The current StateMachine and its surrounding classes seem to model a very particular kind of FSM: Every state has a fixed set of associated transitions and other states can only choose to reach this state with all of its associated transitions or with none of them. This is kind of different from the usual definition of a Mealy automaton (= deterministic finite state transducer), where each state has a list of transition symbols (tokens in our case) and associated with each transition symbol a state and output. Though the model of streamflyer is not less expressive than the standard model, it leads to larger (= more states) FSMs which are harder to understand.

Please consider changing streamflyer's FSM API towards modelling a Mealy machine more closely. Thank you.

References:

  • https://en.wikipedia.org/wiki/Mealy_machine
  • https://en.wikipedia.org/wiki/Finite-state_transducer

thomas001 avatar Dec 13 '16 14:12 thomas001