Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » checking the attributes of client and supplier in dependency
checking the attributes of client and supplier in dependency [message #1020728] Mon, 18 March 2013 20:17 Go to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Hi,

I want to define a profile with two stereotypes (suppose C1, C2) that are the extension of metaclass Class. they both have the same attribute with the same type (suppose attribute1).
There is another stereotype which is the extension of dependency. and this dependency would be from C1 to C2.
I could define the client and supplier members of this dependency with OCL. but I cannot check when two classes of C1 and C2 are connected with this dependency, the value of their attribute for attribute1 must be the same.

I appriciate if anyone can help me.

Thanks
Re: checking the attributes of client and supplier in dependency [message #1020989 is a reply to message #1020728] Tue, 19 March 2013 10:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It seems very unwise, and probably ill-formed, to have two same-named
attributes.

Wouldn't it be better to have C1 and C2 extend Cbase so that there was
only one attribute and that the attribute was inherently consistent?

Regards

Ed Willink


On 18/03/2013 20:17, Jeni Martin wrote:
> Hi,
> I want to define a profile with two stereotypes (suppose C1, C2) that
> are the extension of metaclass Class. they both have the same
> attribute with the same type (suppose attribute1). There is another
> stereotype which is the extension of dependency. and this dependency
> would be from C1 to C2.
> I could define the client and supplier members of this dependency with
> OCL. but I cannot check when two classes of C1 and C2 are connected
> with this dependency, the value of their attribute for attribute1 must
> be the same.
>
> I appriciate if anyone can help me.
>
> Thanks
Re: checking the attributes of client and supplier in dependency [message #1021131 is a reply to message #1020989] Tue, 19 March 2013 15:07 Go to previous messageGo to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Thank you so much for your reply.
But I want to have a constraint to say whenever this dependency is between this two classes, the value a specific attributes must be the same. to make it better, suppose the name of attributes are different.

thank you so much
Re: checking the attributes of client and supplier in dependency [message #1021150 is a reply to message #1021131] Tue, 19 March 2013 15:21 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

What's wrong with

extension_A.a = extension_B.b

?

Regards

Ed Willink

On 19/03/2013 15:07, Jeni Martin wrote:
> Thank you so much for your reply.
> But I want to have a constraint to say whenever this dependency is
> between this two classes, the value a specific attributes must be the
> same. to make it better, suppose the name of attributes are different.
>
> thank you so much
Previous Topic:Checking ocl syntax
Next Topic:Build an OCL AST - Set OperationCallExp{source,argument,name}
Goto Forum:
  


Current Time: Thu Mar 28 10:45:19 GMT 2024

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

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

Back to the top