Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Use of ^-Operator
Use of ^-Operator [message #69035] Thu, 19 March 2009 18:51 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hi all,

what is the general use of the message operator ^. I can specify in an
post condition, that the message was called within the execution of an
operation, but that makes only sense in the context of any behavioral
aspects like activity diagrams or interaction, or am i wrong? I'm a
little bit confused, how an OCL engine could check, whether an operation
was called?
Imho, the one and only situation in which this is possible is for
example in an interaction, where you can call the operation, specified
in the ^-Operator, wihtin the BehaviorExecution of the Operation, that
calls the other operation.
So, am i right, that this message operators only make sense in context
of behavior specification, as well as the whole state machine concepts
of ocl only make sense in the context of an UML state machine?

Thx
Timothy
Re: Use of ^-Operator [message #69120 is a reply to message #69035] Fri, 20 March 2009 00:51 Go to previous message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Timothy,

I have seen the message assertion used more often as an oblique way of
specifying an operation's algorithm than in any other capacity. I don't
know what expectation there may be that a tool would implement
evaluation of these expressions, but as you surmise (and I agree), it
could be challenging to do it efficiently.

I can imagine that a technology such as AspectJ, with its support for
control flows and call chains, could be employed in an implementation.
In an environment like OSGi, one could even weave in such constraints
and weave them out again on the fly.

The message expressions are most naturally used, I suppose, in the
postconditions of behavioral specifications (such as Operations and
Behaviors) but they could also be employed in trigger guards. In an
invariant context I think they would make less sense.

HTH,

Christian


Timothy Marc wrote:
> Hi all,
>
> what is the general use of the message operator ^. I can specify in an
> post condition, that the message was called within the execution of an
> operation, but that makes only sense in the context of any behavioral
> aspects like activity diagrams or interaction, or am i wrong? I'm a
> little bit confused, how an OCL engine could check, whether an operation
> was called?
> Imho, the one and only situation in which this is possible is for
> example in an interaction, where you can call the operation, specified
> in the ^-Operator, wihtin the BehaviorExecution of the Operation, that
> calls the other operation.
> So, am i right, that this message operators only make sense in context
> of behavior specification, as well as the whole state machine concepts
> of ocl only make sense in the context of an UML state machine?
>
> Thx
> Timothy
Previous Topic:VariableCS.initExpr = null when parsing a Tuplizing query
Next Topic:Multiple output values in postcondition
Goto Forum:
  


Current Time: Fri Apr 19 20:56:22 GMT 2024

Powered by FUDForum. Page generated in 0.02996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top