Re: Moose-dev Digest, Vol 124, Issue 2

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

Re: Moose-dev Digest, Vol 124, Issue 2

bharath
many thanks for confirming i can post this query here. I was talking about something like the xref screen shot at 
I used this for C/C++ projects long back.. Not sure if pasting that png is a good idea.

The current project I work on has a big code base. When i say 'understand code flow' I would like to write a query that will return the chain of all methods invoking a particular method as well the methods this will invoke.

Simple scenario: Suppose there exists a set of classes having particular methods as show below:

AC::AMethod -> BC::BMethod -> CC::CMethod -> DC::DMethod -> EC::EMethod

To serve a client call for a particular scenario, the entry point from client code is Amethod in Class AC. 
This in turn invokes BMethod of BC, 
which invokes CMethod of class CC, 
which invokes DMethod in DC 
then finally invoked EMethod of class EC and returns to the client code.

The query/queries when given method name CC::CMethod should return

AC::AMethod -> BC::BMethod 
and
DC::DMethod -> EC::Emethod

In an actual code base, chances are that there are multiple code flow paths invoking CC::CMethod and multiple methods invoked by CC::CMethod. All these paths that represent different scenarios should be reported. This should help delete all possible dynamic interactions at method level. Currently (I think) I know how to do this at a class level using moose model.

Regards,
Bharat



On Fri, Dec 2, 2016 at 4:30 PM, <[hidden email]> wrote:
Send Moose-dev mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://www.list.inf.unibe.ch/listinfo/moose-dev
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moose-dev digest..."


Today's Topics:

   1. newbie question on moose model (Bharat Shetty)
   2. Re: newbie question on moose model (Tudor Girba)


----------------------------------------------------------------------

Message: 1
Date: Thu, 1 Dec 2016 20:16:02 +0530
From: Bharat Shetty <[hidden email]>
To: [hidden email]
Subject: [Moose-dev] newbie question on moose model
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

This is more like a user question. But do not know of  moose-users mailing
list. Apologies if there is one.

I recently started exploring moose model, tried out the example at the
moosebook site using ArgoUML and some of my own java projects(imported
using jdt2famix. And am fairly comfortable with the features described in
the moose book.

Question:
Can i use the same to understand code flow ? I see there are methods to get
a FAMIXMethod's invoked by and invokes methods. But there are no concrete
example for analysing code flows. Has anyone tried this? or is it possible
at all.

Regards,
Bharat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.list.inf.unibe.ch/pipermail/moose-dev/attachments/20161201/8262a9b7/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 1 Dec 2016 15:57:28 +0100
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Subject: [Moose-dev] Re: newbie question on moose model
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Hi,

First of all, welcome. This is the correct mailing list :).

Could you detail what you mean by code flow? It is best to pick a particular case study and a very specific problem and work from there. Could you describe such a specific problem?

Cheers,
Doru


> On Dec 1, 2016, at 3:46 PM, Bharat Shetty <[hidden email]> wrote:
>
> This is more like a user question. But do not know of  moose-users mailing list. Apologies if there is one.
>
> I recently started exploring moose model, tried out the example at the moosebook site using ArgoUML and some of my own java projects(imported using jdt2famix. And am fairly comfortable with the features described in the moose book.
>
> Question:
> Can i use the same to understand code flow ? I see there are methods to get a FAMIXMethod's invoked by and invokes methods. But there are no concrete example for analysing code flows. Has anyone tried this? or is it possible at all.
>
> Regards,
> Bharat
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Be rather willing to give than demanding to get."






------------------------------

Subject: Digest Footer

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


------------------------------

End of Moose-dev Digest, Vol 124, Issue 2
*****************************************


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

Re: Moose-dev Digest, Vol 124, Issue 2

bharath
Apologies for typo

In an actual code base, chances are that there are multiple code flow paths invoking CC::CMethod and multiple methods invoked by CC::CMethod. All these paths that represent different scenarios should be reported. This should help delete all possible dynamic interactions at method level. Currently (I think) I know how to do this at a class level using moose model.

delete should have been 'understand'

Regards,
Bharat

On Fri, Dec 2, 2016 at 7:49 PM, Bharat Shetty <[hidden email]> wrote:
many thanks for confirming i can post this query here. I was talking about something like the xref screen shot at 
I used this for C/C++ projects long back.. Not sure if pasting that png is a good idea.

The current project I work on has a big code base. When i say 'understand code flow' I would like to write a query that will return the chain of all methods invoking a particular method as well the methods this will invoke.

Simple scenario: Suppose there exists a set of classes having particular methods as show below:

AC::AMethod -> BC::BMethod -> CC::CMethod -> DC::DMethod -> EC::EMethod

To serve a client call for a particular scenario, the entry point from client code is Amethod in Class AC. 
This in turn invokes BMethod of BC, 
which invokes CMethod of class CC, 
which invokes DMethod in DC 
then finally invoked EMethod of class EC and returns to the client code.

The query/queries when given method name CC::CMethod should return

AC::AMethod -> BC::BMethod 
and
DC::DMethod -> EC::Emethod

In an actual code base, chances are that there are multiple code flow paths invoking CC::CMethod and multiple methods invoked by CC::CMethod. All these paths that represent different scenarios should be reported. This should help delete all possible dynamic interactions at method level. Currently (I think) I know how to do this at a class level using moose model.

Regards,
Bharat



On Fri, Dec 2, 2016 at 4:30 PM, <[hidden email]> wrote:
Send Moose-dev mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://www.list.inf.unibe.ch/listinfo/moose-dev
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moose-dev digest..."


Today's Topics:

   1. newbie question on moose model (Bharat Shetty)
   2. Re: newbie question on moose model (Tudor Girba)


----------------------------------------------------------------------

Message: 1
Date: Thu, 1 Dec 2016 20:16:02 +0530
From: Bharat Shetty <[hidden email]>
To: [hidden email]
Subject: [Moose-dev] newbie question on moose model
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

This is more like a user question. But do not know of  moose-users mailing
list. Apologies if there is one.

I recently started exploring moose model, tried out the example at the
moosebook site using ArgoUML and some of my own java projects(imported
using jdt2famix. And am fairly comfortable with the features described in
the moose book.

Question:
Can i use the same to understand code flow ? I see there are methods to get
a FAMIXMethod's invoked by and invokes methods. But there are no concrete
example for analysing code flows. Has anyone tried this? or is it possible
at all.

Regards,
Bharat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.list.inf.unibe.ch/pipermail/moose-dev/attachments/20161201/8262a9b7/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 1 Dec 2016 15:57:28 +0100
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Subject: [Moose-dev] Re: newbie question on moose model
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Hi,

First of all, welcome. This is the correct mailing list :).

Could you detail what you mean by code flow? It is best to pick a particular case study and a very specific problem and work from there. Could you describe such a specific problem?

Cheers,
Doru


> On Dec 1, 2016, at 3:46 PM, Bharat Shetty <[hidden email]> wrote:
>
> This is more like a user question. But do not know of  moose-users mailing list. Apologies if there is one.
>
> I recently started exploring moose model, tried out the example at the moosebook site using ArgoUML and some of my own java projects(imported using jdt2famix. And am fairly comfortable with the features described in the moose book.
>
> Question:
> Can i use the same to understand code flow ? I see there are methods to get a FAMIXMethod's invoked by and invokes methods. But there are no concrete example for analysing code flows. Has anyone tried this? or is it possible at all.
>
> Regards,
> Bharat
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Be rather willing to give than demanding to get."






------------------------------

Subject: Digest Footer

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


------------------------------

End of Moose-dev Digest, Vol 124, Issue 2
*****************************************



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

Re: Moose-dev Digest, Vol 124, Issue 2

abergel
In reply to this post by bharath
Dear Bharat,

You are asking a very valid question. Having invocations between C / C++ functions would be great to have. 
Kind of related, we did some assessment of the includes between .c, .h, .cpp, .hpp files. We were able to do a graph as:

Each circle is a file, and arrow are includes relationship. Size is the number of lines of code. Color indicates part of an architecture.

But yes, it would be great to have the control flow between functions, even an approximation.

Cheers,
Alexandre


On Dec 2, 2016, at 11:19 AM, Bharat Shetty <[hidden email]> wrote:

many thanks for confirming i can post this query here. I was talking about something like the xref screen shot at 
    http://sourcenav.sourceforge.net/screenshots/
I used this for C/C++ projects long back.. Not sure if pasting that png is a good idea.

The current project I work on has a big code base. When i say 'understand code flow' I would like to write a query that will return the chain of all methods invoking a particular method as well the methods this will invoke.

Simple scenario: Suppose there exists a set of classes having particular methods as show below:

AC::AMethod -> BC::BMethod -> CC::CMethod -> DC::DMethod -> EC::EMethod

To serve a client call for a particular scenario, the entry point from client code is Amethod in Class AC. 
This in turn invokes BMethod of BC, 
which invokes CMethod of class CC, 
which invokes DMethod in DC 
then finally invoked EMethod of class EC and returns to the client code.

The query/queries when given method name CC::CMethod should return

AC::AMethod -> BC::BMethod 
and
DC::DMethod -> EC::Emethod

In an actual code base, chances are that there are multiple code flow paths invoking CC::CMethod and multiple methods invoked by CC::CMethod. All these paths that represent different scenarios should be reported. This should help delete all possible dynamic interactions at method level. Currently (I think) I know how to do this at a class level using moose model.

Regards,
Bharat



On Fri, Dec 2, 2016 at 4:30 PM, <[hidden email]> wrote:
Send Moose-dev mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://www.list.inf.unibe.ch/listinfo/moose-dev
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moose-dev digest..."


Today's Topics:

   1. newbie question on moose model (Bharat Shetty)
   2. Re: newbie question on moose model (Tudor Girba)


----------------------------------------------------------------------

Message: 1
Date: Thu, 1 Dec 2016 20:16:02 +0530
From: Bharat Shetty <[hidden email]>
To: [hidden email]
Subject: [Moose-dev] newbie question on moose model
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

This is more like a user question. But do not know of  moose-users mailing
list. Apologies if there is one.

I recently started exploring moose model, tried out the example at the
moosebook site using ArgoUML and some of my own java projects(imported
using jdt2famix. And am fairly comfortable with the features described in
the moose book.

Question:
Can i use the same to understand code flow ? I see there are methods to get
a FAMIXMethod's invoked by and invokes methods. But there are no concrete
example for analysing code flows. Has anyone tried this? or is it possible
at all.

Regards,
Bharat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.list.inf.unibe.ch/pipermail/moose-dev/attachments/20161201/8262a9b7/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 1 Dec 2016 15:57:28 +0100
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Subject: [Moose-dev] Re: newbie question on moose model
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Hi,

First of all, welcome. This is the correct mailing list :).

Could you detail what you mean by code flow? It is best to pick a particular case study and a very specific problem and work from there. Could you describe such a specific problem?

Cheers,
Doru


> On Dec 1, 2016, at 3:46 PM, Bharat Shetty <[hidden email]> wrote:
>
> This is more like a user question. But do not know of  moose-users mailing list. Apologies if there is one.
>
> I recently started exploring moose model, tried out the example at the moosebook site using ArgoUML and some of my own java projects(imported using jdt2famix. And am fairly comfortable with the features described in the moose book.
>
> Question:
> Can i use the same to understand code flow ? I see there are methods to get a FAMIXMethod's invoked by and invokes methods. But there are no concrete example for analysing code flows. Has anyone tried this? or is it possible at all.
>
> Regards,
> Bharat
> _______________________________________________
> Moose-dev mailing list
[hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Be rather willing to give than demanding to get."






------------------------------

Subject: Digest Footer

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


------------------------------

End of Moose-dev Digest, Vol 124, Issue 2
*****************************************

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

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




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