OCL init and derivation constraints on the same property [message #19422] |
Sun, 22 April 2007 04:42  |
Eclipse User |
|
|
|
Originally posted by: maiera.de.ibm.com
The OCL 2.0 spec seems to allow usage of init constraints and derivation
constraints on the same property, for example in 7.3.7, it says "Initial
and derivation expressions may be mixed together after one context.".
Having both init and derivation constraints on the same property to me
sounds like an overspecification of the initial value of the property.
(I assume that the derivation constraint also must be satisfied for the
initial value).
My question is:
Why would not the derivation constraint always be sufficient to
determine the initial value ?
Andy
|
|
|
Re: OCL init and derivation constraints on the same property [message #19559 is a reply to message #19422] |
Mon, 23 April 2007 12:56   |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Andy,
That's a very good question, and one that has puzzled me, too. At any point
in time, the value of a derived property is equal to the value of its
derivation expression. So, one would suppose that the initial value must
also be computable using the same expression.
Perhaps this just allows a modeler to more clearly indicate what the
expected initial value of a property is, as this is a boundary state that
is interesting independently of whether the property is derived or not.
Cheers,
Christian
Andreas Maier wrote:
> The OCL 2.0 spec seems to allow usage of init constraints and derivation
> constraints on the same property, for example in 7.3.7, it says "Initial
> and derivation expressions may be mixed together after one context.".
>
> Having both init and derivation constraints on the same property to me
> sounds like an overspecification of the initial value of the property.
> (I assume that the derivation constraint also must be satisfied for the
> initial value).
>
> My question is:
>
> Why would not the derivation constraint always be sufficient to
> determine the initial value ?
>
> Andy
|
|
|
Re: OCL init and derivation constraints on the same property [message #19814 is a reply to message #19559] |
Wed, 25 April 2007 02:16   |
Eclipse User |
|
|
|
Originally posted by: maiera.de.ibm.com
Christian,
If even you are puzzled about this, then it is time to raise an issue
asking for clarification ... I have done that by mail to OMG issues:
--- begin of issue ---
The OCL 2.0 spec seems to allow usage of initialization constraints and
derivation constraints on the same property. For example in 7.3.7, it
says "Initial and derivation expressions may be mixed together after one
context.", which is a string indication that it is not precluded. Having
both initialization and derivation constraints is an overspecification
of the initial value of the property, since the derivation constraint
must be satisfied at any time, which probably includes the
initialization time.
Also, the spec does not seem to contain a statement about how many
initialization and derivation constraints are allowed on a property. By
the nature of these constraints, it seems sensible to have at most one
of them.
The following clarifications are suggested to address this issue:
(1) clarify whether "at any time" for derivation constraints includes
the initialization. Suggestion: Derivation should include initialization.
(2) clarify whether both kinds of constraints are allowed on the same
property. Suggestion: Both are allowed but must not be contradictory.
(3) clarify how many initialization and derivation constraints are
allowed on a property. Suggestion: At most one initialization constraint
and at most one derivation constraint.
--- end of issue ---
Thanks!
Andy
Christian W. Damus wrote:
> Hi, Andy,
>
> That's a very good question, and one that has puzzled me, too. At any point
> in time, the value of a derived property is equal to the value of its
> derivation expression. So, one would suppose that the initial value must
> also be computable using the same expression.
>
> Perhaps this just allows a modeler to more clearly indicate what the
> expected initial value of a property is, as this is a boundary state that
> is interesting independently of whether the property is derived or not.
>
> Cheers,
>
> Christian
>
>
> Andreas Maier wrote:
>
>> The OCL 2.0 spec seems to allow usage of init constraints and derivation
>> constraints on the same property, for example in 7.3.7, it says "Initial
>> and derivation expressions may be mixed together after one context.".
>>
>> Having both init and derivation constraints on the same property to me
>> sounds like an overspecification of the initial value of the property.
>> (I assume that the derivation constraint also must be satisfied for the
>> initial value).
>>
>> My question is:
>>
>> Why would not the derivation constraint always be sufficient to
>> determine the initial value ?
>>
>> Andy
>
|
|
|
Re: OCL init and derivation constraints on the same property [message #19915 is a reply to message #19814] |
Wed, 25 April 2007 09:13  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Andy,
I am, in general, easily puzzled.
I thought that the OCL specification included a well-formedness constraint
stipulating that only one of each of derive|init constraint can be
specified for any given property in the same classifier context, but now I
don't see it any longer.
See? I'm confused again. :-D
Christian
Andreas Maier wrote:
> Christian,
> If even you are puzzled about this, then it is time to raise an issue
> asking for clarification ... I have done that by mail to OMG issues:
>
> --- begin of issue ---
> The OCL 2.0 spec seems to allow usage of initialization constraints and
> derivation constraints on the same property. For example in 7.3.7, it
> says "Initial and derivation expressions may be mixed together after one
> context.", which is a string indication that it is not precluded. Having
> both initialization and derivation constraints is an overspecification
> of the initial value of the property, since the derivation constraint
> must be satisfied at any time, which probably includes the
> initialization time.
>
> Also, the spec does not seem to contain a statement about how many
> initialization and derivation constraints are allowed on a property. By
> the nature of these constraints, it seems sensible to have at most one
> of them.
>
> The following clarifications are suggested to address this issue:
>
> (1) clarify whether "at any time" for derivation constraints includes
> the initialization. Suggestion: Derivation should include initialization.
>
> (2) clarify whether both kinds of constraints are allowed on the same
> property. Suggestion: Both are allowed but must not be contradictory.
>
> (3) clarify how many initialization and derivation constraints are
> allowed on a property. Suggestion: At most one initialization constraint
> and at most one derivation constraint.
> --- end of issue ---
>
> Thanks!
>
> Andy
<snip>
|
|
|
Powered by
FUDForum. Page generated in 0.05385 seconds