|
Re: Specifying an action of a transition [message #1052963 is a reply to message #1052954] |
Wed, 01 May 2013 11:29   |
Eclipse User |
|
|
|
Hi
IMHO the UML Expression tree was a worthy historic attempt which OCL
demonstrated to be misguided. Expressions are much too interesting to
use a naive tree.
All expressions have an associated language. For instance Fortan gives
you **. Java gives you 32 bit silent wraparound. OCL is more
polymorphic, but still very specific once you get down to the details.
If you want naive expressions, it's probably easiest to use
OpaqueExpressions with an 'GoodGuyExpression' language for which you
will write a specification.
Regards
Ed Willink
On 01/05/2013 15:34, Goood Guy wrote:
> Hi,
>
> I want to specify an action for a transition of a state machine and I
> cannot figure out how to model it. I want to enter an expression as an
> action, for example "x=5". I found some diagrams, where exactly that
> was defined. Consider the "--key_count" operation in the following
> diagram
>
>
>
> Source:
> http://en.wikipedia.org/wiki/UML_state_machine#Actions_and_transitions
>
> The "effect" attribute of a Transition can be a Behavior.
> For example Activity and OpaqueBehavior are Behaviors.
>
> I do not want to use Activity, because it is specified by an Operation
> or a Reception and not by an Expression.
>
> I do not want to use OpaqueBehavior, because I do not want to stick to
> a specific language, but to abstract arithmetic expressions.
>
> I would like to use org.eclipse.uml2.uml.Expression (a structured
> tree) or something similar instead.
>
>
|
|
|
Re: Specifying an action of a transition [message #1053454 is a reply to message #1052954] |
Mon, 06 May 2013 00:36  |
Eclipse User |
|
|
|
Those are not actually expressions as expressions are not meant for side effects. Those are indeed behaviors.
You can use an OpaqueBehavior (with the effect behavior as a bunch of strings) or as a proper Activity. Don't worry about the Specification of a behavior. That is only used when a behavior is the method of an operation or reception. But behaviors can be used in other contexts as well, when the specification will not be set.
Cheers,
Rafael
http://abstratt.com/blog
|
|
|
Powered by
FUDForum. Page generated in 0.05659 seconds