Boost logo

Boost :

Subject: Re: [boost] [msm] eUML guard/action location
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-12-07 14:22:10


Christophe Henry wrote:
>
> >CurrentState() + cool_event()[Guard()]/(action()) = DestState()
>
> It's a good idea and it surely matches the UML syntax better. I think
> the operator precedence will also work. There are however 2 issues:
>
> - the current order "CurrentState() + cool_event() = DestState()
> [Guard()]/(action())" has been chosen to closely match the "normal"
> row syntax. Only guard and action have been inverted because of
> operator precedence.

The "normal" and suggested syntax seem consistent, though the guard/action are less visible among transitions with them by not hanging off the right. It also means that viewing the transitions is harder or contains more whitespace. That is, the start/event/next flow is interrupted.

I do like the choice of [] for the condition (guard) and () for the behavior (action).

> - anonymous events. In this case, you have no event, so your syntax
> would become:
>
> CurrentState() [Guard()]/(action()) = DestState()

What about this:

   CurrentState() any[Guard()]/(action()) = DestState()

Pick another name for "any" if you like.

> But now the guard/action are "attached" to the source state, which
> means 2 grammars to support with the corresponding flow of compiler
> risks and compile-time increases.

By requiring a special type for anonymous events when there's a guard/action, you eliminate that problem.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk