[OFFTOPIC] Time varying FSMs

[OFFTOPIC] Time varying FSMs

Oleg Goldshmidt pub at goldshmidt.org
Wed Jan 28 20:04:12 IST 2015


Omer Zak <w1 at zak.co.il> writes:

> After a brief Google search:
> Does anyone know about any research, theory or practice of time-varying
> finite state machines?

Short answer: I don't. ;-) I'll offer a couple of thoughts, anyway.

> I mean FSMs which might grow a new state, remove a state, add/subtract
> transitions by means of meta-rules.

I suppose it may be possible to write a FSM in such a way that
adding/removing the allowed states and transitions dynamically would be
possible. This would not be enough, though: any "interesting" FSM would
not just formally move from one state to another but do custom stuff as
a part of a transition, and one would want to create and load such
custom code dynamically.

I would *intuitively* think that an environment that has a comprehensive
meta-object protocol (MOP), e.g., Common Lisp/CLOS, would allow one, in
principle, to construct/modify/destroy new states/transitions/custom
reactors at runtime. Were I presented with a research problem involving
such "dynamic" state machines this would be the first direction I'd
look. Macros (real ones, not cpp-kind) may also help a lot.

Without a MOP the task may be (a lot?) more difficult. Whether it is
possible (in a reasonable time frame, practically) or not I cannot say
with confidence, not after a few minutes of sctratching my head. I
suspect (again, *intuitively*) that one difficulty may be that the state
machine might need to know something about the future capabilities at
construction time. If you manage to specify a common interface to all
the components and generate compliant implementations then maybe you can
manipulate your state machine at the level of base/interface classes
even in statically typed environments. Dynamic typing could
help. Another serious difficulty would be generating implementations at
runtime, but this difficulty seems practical rather than conceptual.
 
I don't know how much it helps.

-- 
Oleg Goldshmidt | pub at goldshmidt.org



More information about the Linux-il mailing list