Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL query for Coupling between Object
OCL query for Coupling between Object [message #495891] Fri, 06 November 2009 09:31 Go to next message
No real name is currently offline No real name
Messages: 4
Registered: November 2009
Junior Member
Hi OCL Community,

I want to represent OCL query for Coupling between Objects: Basically coupling between class counts a number of other classes to which the class is coupled. Classes are coupled when methods are declared in one class use attribute of other classes.

Any body have an idea, how to calculate this in OCL, I am using EMF model to execute my queries.

Thanks in advance.
Albert
Re: OCL query for Coupling between Object [message #496380 is a reply to message #495891] Mon, 09 November 2009 14:46 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4014
Registered: July 2009
Senior Member
Hi Albert

If you use more precise language, you will find it quite easy and
perhaps impossible without redefinition.

A coupling is the size of the couplings, which is a set of classes.

The couplings of a class C is the union of the couplings of all the
operations of C excluding C.

The couplings of an operation C::O is the union of the
referredProperty.class of all PropertyCallExp within the operation body
excluding C.

?? what about the transitive call hierarchy ??

?? what about overridden methods that have extended coupling ??

Regards

Ed Willink


albertlala96@yahoo.com wrote:
> Hi OCL Community,
>
> I want to represent OCL query for Coupling between Objects: Basically
> coupling between class counts a number of other classes to which the
> class is coupled. Classes are coupled when methods are declared in one
> class use attribute of other classes.
>
> Any body have an idea, how to calculate this in OCL, I am using EMF
> model to execute my queries.
>
> Thanks in advance.
> Albert
>
Previous Topic:Accessing OCL invariants from model diagram
Next Topic:OCL Query and Liflines
Goto Forum:
  


Current Time: Thu Jul 31 07:38:00 EDT 2014

Powered by FUDForum. Page generated in 0.01389 seconds