[Qt-interest] Qml & State Machines

K. Frank kfrank29.c at gmail.com
Fri Dec 3 21:22:03 CET 2010


Hello Steve -

On Fri, Dec 3, 2010 at 2:23 PM, Stephen Kelly wrote:
>
> K. Frank wrote:
>
>> ...
>> But trying to
>> transform what I've called "extended state variables" into pure
>> enumerated state values can become fully unmanageable for
>> realistic (and not overly complicated) problems.  (Among other
>> things, the number of states can explode exponentially.)
> ...
> I had a large nested state machine where all possible states of about 2
> variables were represented as a QState...
>
> That's when I saw sense and drew out the whole thing in sheets of A4 paper
> and postIt notes. I looked at the result and then designed a much simpler
> system which manipulates a 'property bag'. I presume that's what you mean by
> 'extended state variables'.

Yes, I would say so.

Obviously the enumerated states and transitions control the
property bag.  To me the key thing that makes some datum an
extended state variable is that it also controls (at least in part)
the topology of the state machine -- i.e., which transitions occur
in response to which events.  So if your property bag also
controls the transitions (presumably through guard conditions),
then it is a bag of exactly what I meant by extended state variables.

> ...
> All the best,
>
> Steve.

Happy State-Hacking!


K. Frank




More information about the Qt-interest-old mailing list