[Better Comment Initiative] FamixAssociation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Better Comment Initiative] FamixAssociation

Usman Bhatti
FAMIXAssociation is an abstract superclass for relationships between Famix named entities. It defines a polymorphic API refined by subclasses: essentially from, to, next and previous.

From and To properties are abstract at this level, but specific implementations can have multiple ends and properties. 
For example, FAMIXInheritance has:
(i) From mapped to the subclass;
(ii) To mapped to the superclass.
Next and Previous properties provide an order of the appearence of these associations in code. The order is calculated within a particular relationship for example, method invocation order within a calling method (from).
For example in java, the following code
 method a() { b(); c(); }
will produce two invocation associations first from method a to method b, and second from method a to method c. These associations are bound together and can be navigated with previous and next.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative] FamixAssociation

Tudor Girba-2
Excellent.

Doru

On Wed, Nov 23, 2011 at 3:56 PM, Usman Bhatti <[hidden email]> wrote:

> FAMIXAssociation is an abstract superclass for relationships between Famix
> named entities. It defines a polymorphic API refined by subclasses:
> essentially from, to, next and previous.
> From and To properties are abstract at this level, but specific
> implementations can have multiple ends and properties.
> For example, FAMIXInheritance has:
> (i) From mapped to the subclass;
> (ii) To mapped to the superclass.
> Next and Previous properties provide an order of the appearence of these
> associations in code. The order is calculated within a particular
> relationship for example, method invocation order within a calling method
> (from).
> For example in java, the following code
>  method a() { b(); c(); }
> will produce two invocation associations first from method a to method b,
> and second from method a to method c. These associations are bound together
> and can be navigated with previous and next.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>



--
www.tudorgirba.com
"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative] FamixAssociation

abergel
In reply to this post by Usman Bhatti
> For example in java, the following code
>  method a() { b(); c(); }
> will produce two invocation associations first from method a to method b, and second from method a to method c. These associations are bound together and can be navigated with previous and next.

Maybe use another example:

method a() { b(); c(); c(); a() }

How many associations?

Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative] FamixAssociation

Nicolas Anquetil

----- Mail original -----

> De: "Alexandre Bergel" <[hidden email]>
> À: "Moose-related development" <[hidden email]>
> Envoyé: Mercredi 23 Novembre 2011 16:50:46
> Objet: [Moose-dev] Re: [Better Comment Initiative] FamixAssociation
> > For example in java, the following code
> >  method a() { b(); c(); }
> > will produce two invocation associations first from method a to
> > method b, and second from method a to method c. These associations
> > are bound together and can be navigated with previous and next.
>
> Maybe use another example:
>
> method a() { b(); c(); c(); a() }
>
> How many associations?


4 invocations:

a->b
next: a->c
next: a->c
next: a->a

nicolas

> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev