Subject: [boost] [msm] eUML guard/action location
From: Michael Caisse (boost_at_[hidden])
Date: 2009-12-06 20:55:27
Just a quick question about eUML syntax. I think the concept
is great. The placement of the guard and actions doesn't
strike me as natural.
CurrentState() + cool_event() = DestState() [Guard()]/(action())
There are a couple of reasons for this. One is the conceptual
ordering of how the UML machine works.
1. In CurrentState
2. Receive cool_event
3. Check for transitions matching cool_event
4. Found match
5. Verify guards
6. Guards pass
7. Handle CurrentState exit action
8. Take transition and handle transition action
9. Handle DestState entry action
10. Reside in DestState
Another reason that I find it unnatural is that the event/guard/action
is associated (in my mind) first with the transition leaving the
CurrentState. The transition obviously is associated with the DestState
but the event/guard portions "occur" while in the CurrentState. UML
already (via its notation) pulls together the event and action.
What do you think about this instead?
CurrentState() + cool_event()[Guard()]/(action()) = DestState()
I think it more closely matches the UML syntax.
Best regards -
-- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com