Boost Statechart: general questionss about what the library can do

Hi there, I am almost entirely new to state machines, finite automata (by almost I mean that I know the concept and very little of the theory). However I need to evaluate if the Boost library can meet the requirements of a project I plan to use it on. Basically I have two questions: First and most important: Is it possible to *ask* the state machine to go from a state A to a state B *automatically* ?? I mean, I am in state A. I need to go to State B, but I cannot go straight from A to B, I must go first through state C, D, E and finally B for example. Can the library automatically compute a path and generate the correct transitions (event)?? If it is not possible, I would like to know if it is a fundamental problem (theorical with state automata, common to any library implementation) or just something that Boost Statechart does not provide, but other implementations could. Note that it is not necessarily for me that the automata computes the "best" or "shortest" path (set of transitions) it must just generate correct transitions that I can log. My second question is easier, more implementation related, and I think the answer is yes, but anyway: When a transition is executed (automatically, or explicitely), can I call a function? That is, when an event is processed, can I implement some code that will be executed each time an event is processed ? Thank you!! Jean-Noël Ps: Is this the correct place to discuss Boost Statechart, since it is not yet part of the official Boost package (distribution) ?

Hi Jean-Noël
First and most important: Is it possible to *ask* the state machine to go from a state A to a state B *automatically* ??
I mean, I am in state A. I need to go to State B, but I cannot go straight from A to B, I must go first through state C, D, E and finally B for example. Can the library automatically compute a path and generate the correct transitions (event)??
Hmmm, at first that sounds more like a BGL problem than one for the statechart library. What you describe above is easy to do with an appropriately designed state machine but I'm not sure it would be the right abstraction. For what real-world problem do you plan to use Statechart?
When a transition is executed (automatically, or explicitely), can I call a function? That is, when an event is processed, can I implement some code that will be executed each time an event is processed ?
Yes, that is probably the feature every FSM library supports.
Ps: Is this the correct place to discuss Boost Statechart, since it is not yet part of the official Boost package (distribution) ?
Yes. HTH & Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
participants (2)
-
Andreas Huber
-
RIVASSEAU Jean Noel