Skip to main content



      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 16:17 Go to next message
Eclipse UserFriend
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 06:02 Go to previous messageGo to next message
Eclipse UserFriend
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 11:07 Go to previous messageGo to next message
Eclipse UserFriend
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 11:21 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 04:58:01 EDT 2025

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

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

Back to the top