$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [msm] eUML guard/action location
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2009-12-07 04:37:01
Hi Michael,
>What do you think about this instead?
>
>CurrentState() + cool_event()[Guard()]/(action()) = DestState()
>
>I think it more closely matches the UML syntax.
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.
- anonymous events. In this case, you have no event, so your syntax
would become:
CurrentState() [Guard()]/(action()) = DestState()
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.
The first issue is only my worry that users would be confused (eUML
already being quite a change). I'd be interested to hear from others
about it.
The second issue is not so big that it's not worth a try.
I think I'll have a look at it and if it works we can then decide
which one we prefer.
Regards,
Christophe