Property redefinitions [message #625060] |
Tue, 02 October 2007 02:19 |
Dave Carlson Messages: 402 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C80468.5AEE84B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I have a question about use of Property redefinitions. I interpret the =
following quote from the UML 2.1.1 spec to mean that when a subclass =
includes a property whose name is equal to a property in one of its =
general classes, then it should be treated as a redefinition even if =
there is no explicit redefinition between those properties in the model.
"All redefinitions should be made explicit with the use of a =
{redefines <x>} property string. Matching features in subclasses without =
an explicit redefinition result in a redefinition that need not be shown =
in the notation. Redefinition prevents inheritance of a redefined =
element into the redefinition context thereby making the name of the =
redefined element available for reuse, either for the redefining =
element, or for some other."
If that's correct, then should the model validation throw an error if =
the subclass property type or multiplicity is not compatible with the =
implicitly redefined property? I've done some testing in RSM 7 and if I =
create an explicit property redefinition, then I do get a validation =
error for incompatible type or multiplicity. But no error without the =
redefinition. I expect that it would be computationally expensive to =
check for matching properties of *every* property during validation. =
But this constraint from the spec does not appear to be enforced.
Do I have the correct interpretation of the spec?
Also, it is very difficult to create property redefinitions in RSM 7 =
(using the UML properties dialog, not the properties tabs), and without =
the {redefines xxx} notation in a diagram it's nearly impossible to know =
when a refinition has been added.
Thanks,
Dave Carlson
------=_NextPart_000_0006_01C80468.5AEE84B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have a question about use of Property =
redefinitions. I interpret the following quote from the UML 2.1.1 =
spec=20
to mean that when a subclass includes a property whose name is =
equal to a=20
property in one of its general classes, then it should be treated as a=20
redefinition even if there is no explicit redefinition between those =
properties=20
in the model.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV>
<P><FONT face=3DArial size=3D2>"All redefinitions should be made =
explicit with the=20
use of a {redefines <x>} property string. Matching features in=20
subclasses without an explicit redefinition result in a redefinition =
that need=20
not be shown in the notation. Redefinition prevents inheritance of a =
redefined=20
element into the redefinition context thereby making the name of the =
redefined=20
element available for reuse, either for the redefining element, or for =
some=20
other."</FONT></P></DIV></BLOCKQUOTE>
<P dir=3Dltr><FONT face=3DArial size=3D2>If that's correct, then should =
the=20
model validation throw an error if the subclass property type or=20
multiplicity is not compatible with the implicitly redefined =
property? =20
I've done some testing in RSM 7 and if I create an explicit property=20
redefinition, then I do get a validation error for incompatible =
type or=20
multiplicity. But no error without the redefinition. I =
expect that=20
it would be computationally expensive to check for matching properties =
of=20
*every* property during validation. But this constraint from the =
spec does=20
not appear to be enforced.</FONT></P>
<P dir=3Dltr><FONT face=3DArial size=3D2>Do I have the correct =
interpretation of the=20
spec?</FONT></P>
<P dir=3Dltr><FONT face=3DArial size=3D2>Also, it is very difficult to =
create property=20
redefinitions in RSM 7 (using the UML properties dialog, not the =
properties=20
tabs), and without the {redefines xxx} notation in a diagram it's =
nearly=20
impossible to know when a refinition has been added.</FONT></P>
<P dir=3Dltr><FONT face=3DArial size=3D2>Thanks,</FONT></P>
<P dir=3Dltr><FONT face=3DArial size=3D2> Dave =
Carlson</FONT></P></BODY></HTML>
------=_NextPart_000_0006_01C80468.5AEE84B0--
|
|
|
Powered by
FUDForum. Page generated in 0.03218 seconds