Home » Modeling » UML2 » Substitution issue
Substitution issue [message #477528] |
Tue, 17 June 2008 12:15 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi,
again a question, wether this is a bug (or a not-yet-implemented constraint)
in the UML2 SDK, concerning the Substitution element.
The spec defines a substitution as a valid replacement at runtime, where the
substituting classsifier is allowed to be present, instead of the classifier
marked as contract in the Substitution. It sounds a bit like the Adapter
pattern in Java, etc.
I created a Interace IA with a operation IA::foo(). Two classes are created,
Class A, that has an InterfaceRealization for Interface IA and Class B, that
owns a Substitution with contract A. Class B doesn't realize the interface
IA.
IMHO the validation should fail, because A is not replaceable at runtime,
due to the fact, that B doesn't implement the interface IA. But the
validation succeeds.
Is the a bug or did i missinteprete the spec?
Thanks
--Timothy
|
|
|
Re: Substitution issue [message #477544 is a reply to message #477528] |
Fri, 20 June 2008 16:05 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Timothy,
I've had a look over the spec and ther does seem to be a missing constraint
(as with your isLeaf example). I will raise another issue with the OMG to
get that corrected.
Cheers,
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:g389tj$7d6$1@build.eclipse.org...
> Hi,
>
> again a question, wether this is a bug (or a not-yet-implemented
> constraint) in the UML2 SDK, concerning the Substitution element.
> The spec defines a substitution as a valid replacement at runtime, where
> the substituting classsifier is allowed to be present, instead of the
> classifier marked as contract in the Substitution. It sounds a bit like
> the Adapter pattern in Java, etc.
>
> I created a Interace IA with a operation IA::foo(). Two classes are
> created, Class A, that has an InterfaceRealization for Interface IA and
> Class B, that owns a Substitution with contract A. Class B doesn't realize
> the interface IA.
>
> IMHO the validation should fail, because A is not replaceable at runtime,
> due to the fact, that B doesn't implement the interface IA. But the
> validation succeeds.
>
> Is the a bug or did i missinteprete the spec?
>
> Thanks
>
> --Timothy
>
>
>
|
|
|
Re: Substitution issue [message #626734 is a reply to message #477528] |
Fri, 20 June 2008 16:05 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Timothy,
I've had a look over the spec and ther does seem to be a missing constraint
(as with your isLeaf example). I will raise another issue with the OMG to
get that corrected.
Cheers,
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:g389tj$7d6$1@build.eclipse.org...
> Hi,
>
> again a question, wether this is a bug (or a not-yet-implemented
> constraint) in the UML2 SDK, concerning the Substitution element.
> The spec defines a substitution as a valid replacement at runtime, where
> the substituting classsifier is allowed to be present, instead of the
> classifier marked as contract in the Substitution. It sounds a bit like
> the Adapter pattern in Java, etc.
>
> I created a Interace IA with a operation IA::foo(). Two classes are
> created, Class A, that has an InterfaceRealization for Interface IA and
> Class B, that owns a Substitution with contract A. Class B doesn't realize
> the interface IA.
>
> IMHO the validation should fail, because A is not replaceable at runtime,
> due to the fact, that B doesn't implement the interface IA. But the
> validation succeeds.
>
> Is the a bug or did i missinteprete the spec?
>
> Thanks
>
> --Timothy
>
>
>
|
|
|
Goto Forum:
Current Time: Thu Apr 25 14:03:23 GMT 2024
Powered by FUDForum. Page generated in 0.03580 seconds
|