Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Interface realisation
Interface realisation [message #1522527] Mon, 22 December 2014 11:12 Go to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,

If I create an interface with two operations and a class that realises
that interface using the "InterfaceRealization" edge only one (the
first) operation is shown in the operations compartment (after F4). Is
this by design or is this a bug in Papyrus?

TIA

Joost


Cheers,

Joost
Re: Interface realisation [message #1547818 is a reply to message #1522527] Mon, 05 January 2015 17:15 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,


When pressing F4, are you trying to display the operations on the Class, or on the Realized Interface?

If I reproduce your steps:

- Pressing F4 on the Interface gives me all the operations (As expected)
- Pressing F4 on the Class gives me nothing (Probably not as expected, but I don't see the "Only one operation" behavior)

Creating a Generalization between 2 classes shows the expected behavior (i.e. all Operations are displayed in both the Super- and Sub- Class), so I guess there is no specific support for Interface Realization links (Only for Generalizations).

I don't know if the UML Specification says anything about that. For inherited attributes, it's clear that Interface's attributes are not Inherited via an InterfaceRealization link, but I didn't see anything for Operations. In general, Operation inheritance in UML is not really specified.


HTH,
Camille


Camille Letavernier
Re: Interface realisation [message #1551256 is a reply to message #1547818] Wed, 07 January 2015 14:06 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi Camille,

Thanks for your response. I have tried to reproduce the problem in a
complete new project but that did not succeed. So no problems any more.



Joost


Cheers,

Joost
Re: Interface realisation [message #1551265 is a reply to message #1547818] Wed, 07 January 2015 14:11 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
On 05/01/15 18:15, Camille Letavernier wrote:
> Hi,
>
>
> When pressing F4, are you trying to display the operations on the Class,
> or on the Realized Interface?
>
> If I reproduce your steps:
>
> - Pressing F4 on the Interface gives me all the operations (As expected)
> - Pressing F4 on the Class gives me nothing (Probably not as expected,
> but I don't see the "Only one operation" behavior)
I would have expected to see the operations, as the link is "Realized
Interface "


Gr

Joost


Cheers,

Joost
Re: Interface realisation [message #1551296 is a reply to message #1551265] Wed, 07 January 2015 14:36 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Joost,

I think this would be as expected. Interface realization does not have
Generalization semantics, so features of an interface are not inherited
by realizing classifiers (only by specializing interfaces). The UML is
quite vague about how a realizing classifier is expected to realize the
features of its interfaces (it's a semantic variation point).

Cheers,

Christian


On 2015-01-07 14:11:04 +0000, Joost Kraaijeveld said:

> On 05/01/15 18:15, Camille Letavernier wrote:
>> Hi,
>>
>>
>> When pressing F4, are you trying to display the operations on the Class,
>> or on the Realized Interface?
>>
>> If I reproduce your steps:
>>
>> - Pressing F4 on the Interface gives me all the operations (As expected)
>> - Pressing F4 on the Class gives me nothing (Probably not as expected,
>> but I don't see the "Only one operation" behavior)
> I would have expected to see the operations, as the link is "Realized
> Interface "
>
>
> Gr
>
> Joost
Re: Interface realisation [message #1551432 is a reply to message #1551296] Wed, 07 January 2015 16:21 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07-01-15 15:36, Christian W. Damus wrote:
> Hi, Joost,
>
> I think this would be as expected. Interface realization does not
> have Generalization semantics, so features of an interface are not
> inherited by realizing classifiers (only by specializing
> interfaces). The UML is quite vague about how a realizing
> classifier is expected to realize the features of its interfaces
> (it's a semantic variation point)

In the current specification (2.4.1) is stated "For behavioral
features, the implementing classifier will have an operation or
reception for every operation or reception, respectively, defined by
the interface." (7.3.25, semantics). My expectation was based on this.

The 2.5 beta 2 specification does not have such explicit statement but
that states "Instead, an Interface specification is implemented or
realized by a BehavioredClassifier, which means that the
BehavioredClassifier presents a public facade that conforms to the
Interface specification." (10.4.3 Semantics). And I cannot see another
implementation than that if an interface has an operation the
realizing BehavioredClassifier should have such an operation. But I
may be missing alternative implementations.

Gr

Joost

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlStXO0ACgkQ0VJKUkHcX7/XfACdEJsaLIhQQWpIkRP1Q+WZTPT8
lkgAn1pCoP4AT9ZStVJ+IOmr3sDgvCw9
=yNde
-----END PGP SIGNATURE-----


Cheers,

Joost
Re: Interface realisation [message #1551453 is a reply to message #1551432] Wed, 07 January 2015 16:36 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Joost,

Yes, for behavioral features I agree with your interpretation. I just
don't know that any kind of "inheritance" as such is implied as with
generalizations. I rather think not, that instead the implementing
classifier has to define its own corresponding behavioral features (or
inherit them from general classifiers), but I could be wrong!
(wouldn't be the first time)

Christian

On 2015-01-07 16:21:01 +0000, Joost Kraaijeveld said:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07-01-15 15:36, Christian W. Damus wrote:
>> Hi, Joost,
>>
>> I think this would be as expected. Interface realization does not
>> have Generalization semantics, so features of an interface are not
>> inherited by realizing classifiers (only by specializing
>> interfaces). The UML is quite vague about how a realizing
>> classifier is expected to realize the features of its interfaces
>> (it's a semantic variation point)
>
> In the current specification (2.4.1) is stated "For behavioral
> features, the implementing classifier will have an operation or
> reception for every operation or reception, respectively, defined by
> the interface." (7.3.25, semantics). My expectation was based on this.
>
> The 2.5 beta 2 specification does not have such explicit statement but
> that states "Instead, an Interface specification is implemented or
> realized by a BehavioredClassifier, which means that the
> BehavioredClassifier presents a public facade that conforms to the
> Interface specification." (10.4.3 Semantics). And I cannot see another
> implementation than that if an interface has an operation the
> realizing BehavioredClassifier should have such an operation. But I
> may be missing alternative implementations.
>
> Gr
>
> Joost
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iEYEARECAAYFAlStXO0ACgkQ0VJKUkHcX7/XfACdEJsaLIhQQWpIkRP1Q+WZTPT8
> lkgAn1pCoP4AT9ZStVJ+IOmr3sDgvCw9
> =yNde
> -----END PGP SIGNATURE-----
Re: Interface realisation [message #1697004 is a reply to message #1522527] Sat, 30 May 2015 17:29 Go to previous messageGo to next message
Dalibor Krleza is currently offline Dalibor KrlezaFriend
Messages: 1
Registered: May 2015
Junior Member
This is seriously problematic. If you have a class that is realized by an interface, all behavioral features should be available for the class as well.

If you create an interface with one operation, and you realize a class based on this interface, the operation should be accessible in sequence diagram, but is not. While on generalization this works just fine.

In Java, this should look like

public class SomeClass implements SomeInterface {
...
}

In the UML Superstructure 2.4.1, page 89, it says
"An interface realization relationship between a classifier and an interface implies that the classifier supports the set of
features owned by the interface, and any of its parent interfaces. For behavioral features, the implementing classifier will
have an operation or reception for every operation or reception, respectively, defined by the interface.
"

This is pretty clear description of the expected behavior, however this is not supported by Papyrus as I see it right now.

Or I am missing something.
Re: Interface realisation [message #1697083 is a reply to message #1697004] Mon, 01 June 2015 13:16 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
No Message Body

Camille Letavernier
Re: Interface realisation [message #1707999 is a reply to message #1697004] Fri, 11 September 2015 10:47 Go to previous message
Hans Huckebein is currently offline Hans HuckebeinFriend
Messages: 15
Registered: January 2015
Junior Member
When I run the Model Validator on a specialisation of an Interface, I got warnings that an invaild type is specialized. I do not see a way to inherit from an interface in uml.
Previous Topic:OSGI Framework Bundle Exception
Next Topic:How to Create a GeneralizationSet on a class diagram
Goto Forum:
  


Current Time: Tue Apr 16 16:05:33 GMT 2024

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

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

Back to the top