[ragel-users] hsm with statecharts
Pazzo Da Legare
pazzodalegare at gmail.com
Mon Feb 2 10:35:58 UTC 2009
Dear Adrian,
Thank you for your answer...AND for your tool!
I didn't find any straight way to express action inheritance. A
solution could be translating (from a custom language) a hsm machine
to a fsm and use ragel for implementation.
I think translation would be quite straight and probably I'm going this way.
Thanks again,
pazzo
2009/2/2 Adrian Thurston <thurston at complang.org>:
> Ragel wasn't designed to support the HSM paradigm. What you can do is use arbitrary ragel expressions as transitions when building state charts but I don't think this is the same.
>
> Adrian
> ------Original Message------
> From: Pazzo Da Legare
> To: ragel-users at complang.org
> ReplyTo: ragel-users at complang.org
> Sent: Jan 27, 2009 6:20 PM
> Subject: [ragel-users] hsm with statecharts
>
> 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
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
>
More information about the ragel-users
mailing list