On Wed, Aug 23, 2017 at 6:20 AM Bakul Shah <[email protected]> wrote:
> This is a Mealy machine, where the next state > depends on the current state and current input (in s/w not > much use for a Moore machine unless you are driving/simulating > some regular physical process, in which case you don't need > any input parameter). > This is a Moore machine. In a Moore machine, the next state can depend on both the current state and the inputs, but any *output* being produced during a given state can only depend on the state. Note that the next state is not considered to be an output of the machine. A Mealy machine would be producing an output throughout its operation which responds in real time to changes to the inputs, where the relationship between the inputs and the output depends on the state of the FSM. In order to have a Mealy machine in software, you'd either need to be polling the inputs between state transitions to keep the output up to date, or represent the "output" as a function value which gets called with the polled inputs whenever the output is polled. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
