Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL extensions
OCL extensions [message #55286] Thu, 08 May 2008 21:28 Go to next message
Eclipse UserFriend
Originally posted by: asma.charfi.com

Hi,
What type of constraints OCL can not express?
is there OCL extensions that we should use to express this contraints? I
heard about xocl (executable ocl) and ocl for real time...
did so have an idea about these extensions?

thank you
Asma
Re: OCL extensions [message #55313 is a reply to message #55286] Thu, 08 May 2008 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Asma,

One of my favourite constraints that cannot be expressed in OCL is from
the UML Superstructure specification's definition of the Constraint
metaclass:

[2] Evaluating the value specification for a constraint must not have
side effects.

Concerning executable OCL, OCL for real-time, and other dialects: I
have not evaluated any of these for consideration of how they may or may
not relate to the MDT OCL component.

Cheers,

Christian


charfi asma wrote:
> Hi,
> What type of constraints OCL can not express?
> is there OCL extensions that we should use to express this contraints? I
> heard about xocl (executable ocl) and ocl for real time...
> did so have an idea about these extensions?
>
> thank you
> Asma
>
>
Re: OCL extensions [message #55420 is a reply to message #55313] Sat, 10 May 2008 02:31 Go to previous message
Eclipse UserFriend
Originally posted by: asma.charfi.com

Hi Christian,
thank you for the answer , but I did not understand "have not side effect"
I think it means that evaluating constraint did not change the environment
of the constraint , (we can check if this constraint is respected or not)
but we did not modifiy the model. am I right?
can you explain more or give me an example of a constraint that have a side
effect?
thank you a lot
Asma

"Christian W. Damus" <give.a.damus@gmail.com> a
Re: OCL extensions [message #55446 is a reply to message #55420] Fri, 09 May 2008 21:17 Go to previous message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Asma,

One of the basic properties of OCL is that it is a side-effect-free
language. Essentially, this means that the evaluation of expressions
cannot alter the state of the model on which they are evaluated.

So, for example, if OCL were allowed to have side-effects, then a
constraint could create model elements or modify their attributes. I
cannot think of a *correct* constraint that would have side-effects.
Validation with side-effects falls into the scope of QVT, in which
transformations can be used to ensure the well-formedness of a target
model in addition to merely checking for correspondence of the target
with the source.

HTH,

Christian


charfi asma wrote:
> Hi Christian,
> thank you for the answer , but I did not understand "have not side effect"
> I think it means that evaluating constraint did not change the environment
> of the constraint , (we can check if this constraint is respected or not)
> but we did not modifiy the model. am I right?
> can you explain more or give me an example of a constraint that have a side
> effect?
> thank you a lot
> Asma
>
> "Christian W. Damus" <give.a.damus@gmail.com> a écrit dans le message de
> news: fvv6mc$pne$1@build.eclipse.org...
>> Hi, Asma,
>>
>> One of my favourite constraints that cannot be expressed in OCL is from
>> the UML Superstructure specification's definition of the Constraint
>> metaclass:
>>
>> [2] Evaluating the value specification for a constraint must not have side
>> effects.
>>
>> Concerning executable OCL, OCL for real-time, and other dialects: I have
>> not evaluated any of these for consideration of how they may or may not
>> relate to the MDT OCL component.
>>
>> Cheers,
>>
>> Christian
>>
>>
>> charfi asma wrote:
>>> Hi,
>>> What type of constraints OCL can not express?
>>> is there OCL extensions that we should use to express this contraints? I
>>> heard about xocl (executable ocl) and ocl for real time...
>>> did so have an idea about these extensions?
>>>
>>> thank you
>>> Asma
>
>
Previous Topic:Is there a version of org.eclipse.ocl.ecore that is compatible with EMF 2.2?
Next Topic:About EValidator checkArgumentConform constraint
Goto Forum:
  


Current Time: Wed Apr 24 14:52:41 GMT 2024

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

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

Back to the top