Boost logo

Boost Users :

From: RIVASSEAU Jean Noel (JN.RIVASSEAU_at_[hidden])
Date: 2006-03-13 05:36:37


Hi Andreas

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?

Actually, after I sent the mail I thought some more and yes, I realised that this can be more of a graph problem (shortest path or such...) so it would be easy to with the BGL.
But I'd like to do it with Boost Statechart since my real-world problem is at heart a state problem (statechart).

What I am trying to do is:

* I have an embedded software to *test*. I am trying to develop a framework for somewhat automatically testing the software. If I look at the specification of the software, I have lots of possible states (specs mention a lot of UML like diagrams). I need to test if the software correctly respects the specification, that is, if it correctly changes from one state to another according to a given event.

Since the diagrams are complex, and thus the state space is huge (sometimes more than 100 states), I'd like for my framework to be able to automatically go to a given state, to be able to test the software in that particular state. Eg, if you just start by powering up the device, I'd like to compute the paths (and thus, events, that have to be translated to commands sent to the embedded device) to go to a particular state.

Do you think Boost Statechart would be a good abstraction? If yes, how can I implement some of the Boost algorithms for graphs (such as shortest path) to achieve what I need? Is it even possible from a technical point of view to convert a fsm to a graph and run BGL algorithms on it ? I am already quite familiar with the BGL as I used it extensively one year ago.

Thanks.

> 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.

Ok.

Regards

Jean-Noël


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net