OCL extensions [message #55286] |
Thu, 08 May 2008 17:28  |
Eclipse User |
|
|
|
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 #55420 is a reply to message #55313] |
Fri, 09 May 2008 22:31  |
Eclipse User |
|
|
|
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 17:17  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03260 seconds