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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
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:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
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: -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
Free forum by Nabble | Edit this page |