Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » extents in UML and OCL
extents in UML and OCL [message #49719] Fri, 25 January 2008 08:31 Go to next message
Eclipse User
Originally posted by: krzysztof_kaczmarski.o2.pl

Hi All,

Do UML's ReadExtentAction and OCL's allInstances return only instances
of a given classifier or also instances of its specializations?
I cannot find this in the specifications.

Thanks in advance,
Krzysztof
Re: extents in UML and OCL [message #49749 is a reply to message #49719] Fri, 25 January 2008 09:34 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Krzysztof,

MDT OCL interprets allInstances() literally as returning all objects whose
type conforms to the target classifier. i.e., including specializations

I think this is the only useful interpretation for UML, itself, in which so
many metaclasses are abstract. They would have empty extents under the
other interpretation.

Regarding the ReadExtentAction, you might ask on the UML2 newsgroup ...
perhaps there is already an issue asking for clarification that somebody
knows about.

Cheers,

Christian

Krzysztof Kaczmarski wrote:

> Hi All,
>
> Do UML's ReadExtentAction and OCL's allInstances return only instances
> of a given classifier or also instances of its specializations?
> I cannot find this in the specifications.
>
> Thanks in advance,
> Krzysztof
Re: extents in UML and OCL [message #49837 is a reply to message #49749] Fri, 25 January 2008 10:59 Go to previous messageGo to next message
Eclipse User
Originally posted by: krzysztof_kaczmarski.o2.pl

Thanks Christian.
I understand that MDT's implementation comes from creative reading of
the specification.

I sent the same mail to the uml2 newsgroup but misspelled the group name:)

Regards,
Krzysztof


Christian W. Damus wrote:
> Hi, Krzysztof,
>
> MDT OCL interprets allInstances() literally as returning all objects whose
> type conforms to the target classifier. i.e., including specializations
>
> I think this is the only useful interpretation for UML, itself, in which so
> many metaclasses are abstract. They would have empty extents under the
> other interpretation.
>
> Regarding the ReadExtentAction, you might ask on the UML2 newsgroup ...
> perhaps there is already an issue asking for clarification that somebody
> knows about.
>
> Cheers,
>
> Christian
>
> Krzysztof Kaczmarski wrote:
>
>> Hi All,
>>
>> Do UML's ReadExtentAction and OCL's allInstances return only instances
>> of a given classifier or also instances of its specializations?
>> I cannot find this in the specifications.
>>
>> Thanks in advance,
>> Krzysztof
>
Re: extents in UML and OCL [message #49867 is a reply to message #49837] Fri, 25 January 2008 13:00 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Krzysztof,

Heh heh ... I don't know about "creative reading." I thought it was an
obvious interpretation!

In any case, this is only MDT OCL's default behaviour. In fact, by default,
the extent of any class is lazily computed (and cached) from the instances
in the current Resource.

However, you can customize this implementation for your application. Simply
provide your own "extent map" to the org.eclipse.ocl.OCL object or
implement a custom EvaluationEnvironment that implements the
createExtentMap() method.

HTH,

Christian


Krzysztof Kaczmarski wrote:

> Thanks Christian.
> I understand that MDT's implementation comes from creative reading of
> the specification.
>
> I sent the same mail to the uml2 newsgroup but misspelled the group name:)
>
> Regards,
> Krzysztof
>

-----8<-----
Re: extents in UML and OCL [message #49895 is a reply to message #49867] Fri, 25 January 2008 14:13 Go to previous messageGo to next message
Eclipse User
Originally posted by: krzysztof_kaczmarski.o2.pl

Hi, Christian

It would be obvious interpretation if extent was somewhere explicitly
defined. My feeling is that an 'object model' (as a set of commonly
understood notions) must be somehow defined in specifications like
this. Otherwise questions like: what is class, what is object, what is
reference, what is value, what is extent, what is type and many other
will appear sooner or later.

Cheers,
Krzysztof


Christian W. Damus wrote:
> Hi, Krzysztof,
>
> Heh heh ... I don't know about "creative reading." I thought it was an
> obvious interpretation!
>
> In any case, this is only MDT OCL's default behaviour. In fact, by default,
> the extent of any class is lazily computed (and cached) from the instances
> in the current Resource.
>
> However, you can customize this implementation for your application. Simply
> provide your own "extent map" to the org.eclipse.ocl.OCL object or
> implement a custom EvaluationEnvironment that implements the
> createExtentMap() method.
>
> HTH,
>
> Christian
>
>
> Krzysztof Kaczmarski wrote:
>
>> Thanks Christian.
>> I understand that MDT's implementation comes from creative reading of
>> the specification.
>>
>> I sent the same mail to the uml2 newsgroup but misspelled the group name:)
>>
>> Regards,
>> Krzysztof
>>
>
> -----8<-----
Re: extents in UML and OCL [message #49925 is a reply to message #49895] Fri, 25 January 2008 14:53 Go to previous message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Krzysztof,

I think it is explicitly defined.

From the Semantics of Classifier metaclass in the 2.1 Superstructure:

"A Classifier may participate in generalization relationships
with other Classifiers. An instance of a specific Classifier
is also an (indirect) instance of each of the general
Classifiers."

And from the Semantics of ReadExtentAction:

"The extent of a classifier is the set of all instances of a
classifier that exist at any one time."

From these two statements, as long as the term "instance" means the same in
both, I conclude that the extent of a classifier includes the extents of
its specializations.

HTH,

Christian


Krzysztof Kaczmarski wrote:

> Hi, Christian
>
> It would be obvious interpretation if extent was somewhere explicitly
> defined. My feeling is that an 'object model' (as a set of commonly
> understood notions) must be somehow defined in specifications like
> this. Otherwise questions like: what is class, what is object, what is
> reference, what is value, what is extent, what is type and many other
> will appear sooner or later.
>
> Cheers,
> Krzysztof
>
>
> Christian W. Damus wrote:
>> Hi, Krzysztof,
>>
>> Heh heh ... I don't know about "creative reading." I thought it was an
>> obvious interpretation!
>>
>> In any case, this is only MDT OCL's default behaviour. In fact, by
>> default, the extent of any class is lazily computed (and cached) from the
>> instances in the current Resource.
>>
>> However, you can customize this implementation for your application.
>> Simply provide your own "extent map" to the org.eclipse.ocl.OCL object or
>> implement a custom EvaluationEnvironment that implements the
>> createExtentMap() method.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Krzysztof Kaczmarski wrote:
>>
>>> Thanks Christian.
>>> I understand that MDT's implementation comes from creative reading of
>>> the specification.
>>>
>>> I sent the same mail to the uml2 newsgroup but misspelled the group
>>> name:)
>>>
>>> Regards,
>>> Krzysztof
>>>
>>
>> -----8<-----
Previous Topic:How to access operation return values in OCL postconditions ?
Next Topic:[OCL Tools] Downloads
Goto Forum:
  


Current Time: Thu Apr 17 14:33:47 EDT 2014

Powered by FUDForum. Page generated in 0.02571 seconds