Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Understanding property redefinition
Understanding property redefinition [message #477428] Fri, 23 May 2008 13:51 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hi,

I always have language problems with active and passive, so in the context of
property redefinition, is the "redefinee" the property that's being redefined,
or is it the redefining property?

I assume that the "redefinee" is the property that is being redefined. But then
something is wrong in the spec. (p. 125):

"A redefining property is consistent with a redefined property if the type of
the redefining property conforms to the type of the redefined property"

But the OCL definition does it exactly the other way round.

Property::isConsistentWith(redefinee : RedefinableElement) : Boolean
[...]
let prop : Property = redefinee.oclAsType(Property) in
(prop.type.conformsTo(self.type) and [...]


Is my english just too bad, or is there just another inconsistency between text
and OCL, and if this is the case, who's right, Text or OCL?

Thanks for the english lessons...
Felix
Re: Understanding property redefinition [message #477448 is a reply to message #477428] Mon, 26 May 2008 15:03 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

I think you have a point.

The descriptive paragraph in the spec seems to be correct. The redefinining
property must conform to the redefined property.
I believe that the "redefinee" *should* be the property being redefined, but
it looks like whoever wrote the OCL took redefinee to mean the opposite.
If you take "redefinee" to mean the opposite of the property being redefined
then it works out :).

The UML2 implementation uses the terminology in the spec. to be consistent
(..ly confusing ).

You may want to raise an issue with OMG on that point.

Cheers,
-James.


"Felix Dorner" <felix_do@web.de> wrote in message
news:g16i4m$ir8$1@build.eclipse.org...
> Hi,
>
> I always have language problems with active and passive, so in the context
> of property redefinition, is the "redefinee" the property that's being
> redefined, or is it the redefining property?
>
> I assume that the "redefinee" is the property that is being redefined. But
> then something is wrong in the spec. (p. 125):
>
> "A redefining property is consistent with a redefined property if the type
> of the redefining property conforms to the type of the redefined property"
>
> But the OCL definition does it exactly the other way round.
>
> Property::isConsistentWith(redefinee : RedefinableElement) : Boolean
> [...]
> let prop : Property = redefinee.oclAsType(Property) in
> (prop.type.conformsTo(self.type) and [...]
>
>
> Is my english just too bad, or is there just another inconsistency between
> text and OCL, and if this is the case, who's right, Text or OCL?
>
> Thanks for the english lessons...
> Felix
Re: Understanding property redefinition [message #477449 is a reply to message #477448] Mon, 26 May 2008 16:04 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
James Bruck wrote:
> Hi Felix,
>
> I think you have a point.

Hi James, thanks for your reply. My usual "bridge" to distinguish is "employer
and employee", those map quite well to their German translations, and this time
they didn't fail me neither. When do I ever learn that I am more clever than
this spec.., I wouldn't ask anymore then. ;-)

Anyway, I am now thinking that it should actually be that each classifier
mutually conforms to the other, iow, they must be the same, otherwise:

Given a Class

A
a:A

and a specialized Class

B extends A
a:B

This is the case when the type of the redefining property conforms to the
redefined property type.

Now suppose in an Operation, I expect an instance of A but I get an instance of B.

I assume an A so I could set the 'a' property to an A => bang! I can't because
for a B 'a' must be a B (or a subtype) which A isn't.


If you change the interpretation, you get the same problems when you try read
the attribute:

A
b:B

B extends A
b:A

You think you look at an A, but actually look at a B. Try to read the attribute
into a variable of type B

var aB : B = instance.b => bang!


What do you think?
Felix
Re: Understanding property redefinition [message #477463 is a reply to message #477449] Mon, 02 June 2008 15:01 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

Sorry about the late reply.

Consider a concrete example from the UML metamodel:

Class::superClass:Class is the redefining property that redefines
Classifier::general:Classifier ( Classifier::general is the redefined
property ).
In this case, the type of Class::superClass *Class* must conform to the type
of Classifier::general *Classifier*.

I think the constriant is correctly written indicating the type of the
redefining property should be consistent with the type of the redefined
property (the redefinee).


I'm not sure I fully understand the objection in your example.

Cheers,
- James.




"Felix Dorner" <felix_do@web.de> wrote in message
news:g1en1a$pu1$1@build.eclipse.org...
> James Bruck wrote:
>> Hi Felix,
>>
>> I think you have a point.
>
> Hi James, thanks for your reply. My usual "bridge" to distinguish is
> "employer and employee", those map quite well to their German
> translations, and this time they didn't fail me neither. When do I ever
> learn that I am more clever than this spec.., I wouldn't ask anymore then.
> ;-)
>
> Anyway, I am now thinking that it should actually be that each classifier
> mutually conforms to the other, iow, they must be the same, otherwise:
>
> Given a Class
>
> A
> a:A
>
> and a specialized Class
>
> B extends A
> a:B
>
> This is the case when the type of the redefining property conforms to the
> redefined property type.
>
> Now suppose in an Operation, I expect an instance of A but I get an
> instance of B.
>
> I assume an A so I could set the 'a' property to an A => bang! I can't
> because for a B 'a' must be a B (or a subtype) which A isn't.
>
>
> If you change the interpretation, you get the same problems when you try
> read the attribute:
>
> A
> b:B
>
> B extends A
> b:A
>
> You think you look at an A, but actually look at a B. Try to read the
> attribute into a variable of type B
>
> var aB : B = instance.b => bang!
>
>
> What do you think?
> Felix
Re: Understanding property redefinition [message #626630 is a reply to message #477428] Mon, 26 May 2008 15:03 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

I think you have a point.

The descriptive paragraph in the spec seems to be correct. The redefinining
property must conform to the redefined property.
I believe that the "redefinee" *should* be the property being redefined, but
it looks like whoever wrote the OCL took redefinee to mean the opposite.
If you take "redefinee" to mean the opposite of the property being redefined
then it works out :).

The UML2 implementation uses the terminology in the spec. to be consistent
(..ly confusing ).

You may want to raise an issue with OMG on that point.

Cheers,
-James.


"Felix Dorner" <felix_do@web.de> wrote in message
news:g16i4m$ir8$1@build.eclipse.org...
> Hi,
>
> I always have language problems with active and passive, so in the context
> of property redefinition, is the "redefinee" the property that's being
> redefined, or is it the redefining property?
>
> I assume that the "redefinee" is the property that is being redefined. But
> then something is wrong in the spec. (p. 125):
>
> "A redefining property is consistent with a redefined property if the type
> of the redefining property conforms to the type of the redefined property"
>
> But the OCL definition does it exactly the other way round.
>
> Property::isConsistentWith(redefinee : RedefinableElement) : Boolean
> [...]
> let prop : Property = redefinee.oclAsType(Property) in
> (prop.type.conformsTo(self.type) and [...]
>
>
> Is my english just too bad, or is there just another inconsistency between
> text and OCL, and if this is the case, who's right, Text or OCL?
>
> Thanks for the english lessons...
> Felix
Re: Understanding property redefinition [message #626631 is a reply to message #477448] Mon, 26 May 2008 16:04 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
James Bruck wrote:
> Hi Felix,
>
> I think you have a point.

Hi James, thanks for your reply. My usual "bridge" to distinguish is "employer
and employee", those map quite well to their German translations, and this time
they didn't fail me neither. When do I ever learn that I am more clever than
this spec.., I wouldn't ask anymore then. ;-)

Anyway, I am now thinking that it should actually be that each classifier
mutually conforms to the other, iow, they must be the same, otherwise:

Given a Class

A
a:A

and a specialized Class

B extends A
a:B

This is the case when the type of the redefining property conforms to the
redefined property type.

Now suppose in an Operation, I expect an instance of A but I get an instance of B.

I assume an A so I could set the 'a' property to an A => bang! I can't because
for a B 'a' must be a B (or a subtype) which A isn't.


If you change the interpretation, you get the same problems when you try read
the attribute:

A
b:B

B extends A
b:A

You think you look at an A, but actually look at a B. Try to read the attribute
into a variable of type B

var aB : B = instance.b => bang!


What do you think?
Felix
Re: Understanding property redefinition [message #626645 is a reply to message #477449] Mon, 02 June 2008 15:01 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

Sorry about the late reply.

Consider a concrete example from the UML metamodel:

Class::superClass:Class is the redefining property that redefines
Classifier::general:Classifier ( Classifier::general is the redefined
property ).
In this case, the type of Class::superClass *Class* must conform to the type
of Classifier::general *Classifier*.

I think the constriant is correctly written indicating the type of the
redefining property should be consistent with the type of the redefined
property (the redefinee).


I'm not sure I fully understand the objection in your example.

Cheers,
- James.




"Felix Dorner" <felix_do@web.de> wrote in message
news:g1en1a$pu1$1@build.eclipse.org...
> James Bruck wrote:
>> Hi Felix,
>>
>> I think you have a point.
>
> Hi James, thanks for your reply. My usual "bridge" to distinguish is
> "employer and employee", those map quite well to their German
> translations, and this time they didn't fail me neither. When do I ever
> learn that I am more clever than this spec.., I wouldn't ask anymore then.
> ;-)
>
> Anyway, I am now thinking that it should actually be that each classifier
> mutually conforms to the other, iow, they must be the same, otherwise:
>
> Given a Class
>
> A
> a:A
>
> and a specialized Class
>
> B extends A
> a:B
>
> This is the case when the type of the redefining property conforms to the
> redefined property type.
>
> Now suppose in an Operation, I expect an instance of A but I get an
> instance of B.
>
> I assume an A so I could set the 'a' property to an A => bang! I can't
> because for a B 'a' must be a B (or a subtype) which A isn't.
>
>
> If you change the interpretation, you get the same problems when you try
> read the attribute:
>
> A
> b:B
>
> B extends A
> b:A
>
> You think you look at an A, but actually look at a B. Try to read the
> attribute into a variable of type B
>
> var aB : B = instance.b => bang!
>
>
> What do you think?
> Felix
Previous Topic:user-defined Primitive types in static profiles
Next Topic:UML State Machine and its context
Goto Forum:
  


Current Time: Mon Mar 30 11:32:39 GMT 2020

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

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

Back to the top