[ragel-users] hsm with statecharts

Pazzo Da Legare pazzodalegare at gmail.com
Fri Jan 30 21:33:09 UTC 2009

Dear All,

I will try again and I hope someone could help me.
I would like to know if with ragel statechart one can have state
hierarchy, states and substates; with substates inheriting actions
from their parent state.



2009/1/28 Pazzo Da Legare <pazzodalegare at gmail.com>:
> Dear ML,
> again with hsm (hierarchical state machine) question. I had a look
> around but I cannot find any clue.I'm trying to post my question on
> this subject.
> Hsm, defined by David Harel, introduced a state hierarchy (see i.e.
> http://www.state-machine.com/resources/glossary.htm#Harel_statecharts
> for more infos). I would like to express state hierarchy with ragel
> statechart but I cannot find a comfortable solution. One way is to
> convert Hsm machine in a flat Fsm (with no state hierarchy) and then
> define the latter in ragel, this step could be automated but I wonder
> if there is a straight way.
> Simple example: suppose we have 3 state S1, S11 and S12, with S12 and
> S11 are substate of S1, and 3 signal s0, s1, s2 where s0 is handled
> only by S1 and, say S12; s1 and s2 are handled by S12 and S11.
> With a "pseudo notation" like signal/action -> <newstate> (-> indicate
> transition):
> S1 {s0/action_s0_S1}
> S11 {s1/action_s1_S11 , s2/action_s2_S11 -> S12}
> S12 {s1/action_s1_S12 -> S11, s2/action_s2_S12, s0/action_s0_S12}
> For the signal 's0' I would like to have in S12 the action
> 'action_s0_S12' but in S1 the action defined by the super-state S1,
> action_s0_S1.
> Thank you in advance for your help!
> pazzodalegare

More information about the ragel-users mailing list