Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 call graphs / object graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

meissnersd
Senior Member

34 Posts

Posted - Jun 17 2007 :  1:55:28 PM  Show Profile  Reply with Quote
On thing that is really hard is understanding large code bases. This is a common problem when starting on a new project. Often there is a large legacy code base.

Since you have parsed the files and symbols already, how about a call graph visualizer. It would be really nice to see what methods call each other in tree form.

Other useful views:
Inheritance of course
Object membership view. What objects contain other objects.
Include file hierarchy.

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jun 18 2007 :  07:21:41 AM  Show Profile  Reply with Quote
@call graph: this wouldn't work the moment you invoke virtual functions since VA wouldn't know which implementation would be used at runtime.

@inheritance: check out the Object Browser from the IDE's view menu.

@membership tree: similar to call graphs, expansion would be impossible the moment you encounter pointers or references to base classes. VA wouldn't know what class the reference or pointer really points to.

@include file hierarchy: see this thread: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6384
Go to Top of Page

meissnersd
Senior Member

34 Posts

Posted - Jun 18 2007 :  2:33:13 PM  Show Profile  Reply with Quote
I don't see why you think it "wont work" with virtual functions.
The compiler doesn't know where the code will go until run time when the object is passed in the the overriden method gets invoked.
That is a complicated situation.
You need to show that complexity in the call graph browser.

Code analysis is complex....that is why I see an opportunity for a good tool to help me. :-)

If it was simple I would not need a tool.

The same argument applies to a membership graph.

This is a common problem with any call graph visualizer. The tree can get really big and bushy. You need a graph browser that can be little smarter, that can only show a portion of the tree the user is interested in.

I guess my point is that Visual Assist X already had done a lot of the hard work of being able to understand the code.

A GUI to visualize it would be a really useful tool.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jun 18 2007 :  4:26:41 PM  Show Profile  Reply with Quote
Just taking virtual functions for a moment, consider a GUI framework where you create forms by deriving your own classes from the GUI framework base classes, over-riding virtual functions in the base class.

Once you get beyond a trivial application this part alone gives you a massive number of classes... and remember that often the actual type create is determined at run time, in response to user interaction, or some other external variable.

I agree that a good tool to handle all of this information, and help you see what is going on would be very useful. At the same time I have some idea of how far away from this VA is... it is all of the "edge" cases, all of the things that still manage to confuse our parser, especially when you get into macro's.

zen is the art of being at one with the two'ness
Go to Top of Page

meissnersd
Senior Member

34 Posts

Posted - Jun 20 2007 :  2:22:34 PM  Show Profile  Reply with Quote
Ok I can understand it being hard to implement

But check out doxygen. Is is a well known open source C++ code comment extractor. You can configure it to generate call graphs and object dependency graphs along with the comments. But it is really slow and the diagrams are off embedded in a html tree.

I was just thinking using Visuall assist x would be better since you can parse on the fly from within the tool.
Go to Top of Page

meissnersd
Senior Member

34 Posts

Posted - Jun 20 2007 :  2:23:37 PM  Show Profile  Reply with Quote
here is the link
http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jun 22 2007 :  08:18:56 AM  Show Profile  Reply with Quote
I have asked internally to get a second opinion on this. I see the appeal, but I also see some of the problems with doing this properly from within VAX.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000