|
Boost : |
Subject: Re: [boost] [msm]how to distinguish region ids?
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2011-06-27 15:53:44
> No, My request is junction pseudo state.
> Here is a exsample model.
>
> E1[G1]/A1 [G4]/A4
> S1------------+ +--------->S4
> E2[G2]/A2 V | [G5]/A5
> S2----------->J-+--------->S5
> E3[G3]/A3 A | [G6]/A6
> S3------------+ +--------->S6
>
> If we can use the junction pseudo state, we write only 6 transitions in
> the code.
> I know the transition below is equivalent.
>
> E1 [G1 && G4] / A1;A4
> S1 ----------------------->S4
>
> E1 [G1 && G2] / A1;A5
> S1 ----------------------->S5
>
> ...
>
> But we have to write 9 transitions.
> The difference is 3+3 or 3*3.
>
> This is my request.
Ah yes I remember now. Yes, it clearly means less transitions. The cost of
it is the extra complexity added by the following case:
If we are in S1 and G1 is true and A1 will cause G4 to become true, do we
switch to S4?
Answer no, because the guards are evaluated prior to any action.
Yes it makes sense, but there is a risk of mistakes and these are hard to
spot.
However, it still makes a welcome addition for power users so msm should
support it. I still have a few big features to pack but this one is clearly
on my radar and I'll give it a try someday (though to be frank, I still have
no idea of how to implement it ;-) )
> And I also requested the choice pseudo state.
> But you didn't like this semantics. And I agreed.
> We can use the (normal) state with guard only (event-less) transition
> instead of the choice pseudo state.
> So I cancelled the my request.
Yes I think this feature adds not much to the party and is dangerous (as
noted in "Real Time UML"). If you move to the choice pseudo state and all
outgoing guards are false, you are in an undefined state and I'm not a fan
of undefined behaviour.
> BTW, I'm trying to write the guideline for UML modelers.
> In the guideline, the relation between the UML element and the msm element
> will be described.
> And it will be also described how to use the msm better.
>
> I will show it to you when completing it.
Oh yes please, it will probably be very interesting! Specifically, I'm
interested in an outside view of the points where msm does not follow the
standard. Usually it is wanted that way, but I might have missed some
subleties.
Christophe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk