Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Substitution issue
Substitution issue [message #477528] Tue, 17 June 2008 12:15 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
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 Go to previous message
james bruck is currently offline james bruckFriend
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 Go to previous message
james bruck is currently offline james bruckFriend
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
>
>
>
Previous Topic:UML Primitive types and non-primitive types
Next Topic:Diagram -> Model -> Diagram - how to do this?
Goto Forum:
  


Current Time: Tue Aug 16 04:32:27 GMT 2022

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

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

Back to the top