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
 Support static slicing
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jmihalicza
Ketchup Master

Hungary
66 Posts

Posted - Oct 29 2005 :  7:53:29 PM  Show Profile
Maybe it is not that well known, so I am going to tell some words about what slicing is.
Slicing is about focusing on some special cross-sections of the code. The typical question addressed by slicing sounds like 'What is the role of this variable/function/class etc.?'. Or the example in the 'mark functions via methods popup' thread: 'What do those ...xy... named functions do? Is each of them implemented correctly?'
There is static slicing (where VA could be applicable) that is about narrowing the amount of code the developer sees during a specific task, and there is also dynamic slicing addressing run-time questions like how the value of this variable use to change during some executions of the code.

I've just dared to put this theoretical-seeming stuff here 'coz I really believe that even some limited implementation of it would be very very useful.

Some people think VA to be 'just' a very intelligent syntax highlighter. I don't agree, but please correct me if I am totally on a wrong path. I rather think VA to be a tool that helps me understanding the code more easily. It provides lots of useful views of (parts of )the code. I have just quickly put together a list of some features from this point of view:
  • OFIW: What kind of files does the solution contain?
  • OFIW/FSIW: (assuming a name convention) What derivatives of this class are?
  • FSIW: What classes are in the xy namespace?
  • FSIW: In what files does the implementation of this namespace/class/template function reside
  • Next/Prev by context: Where is this variable referenced in this scope?
  • ALT-O: How does the interface/implementation of this module/class look like?
  • navigation bar/HCB: what are the base classes of this class
  • navigation bar/HCB: what is the signature of this function/method
  • HCB: what is this symbol about
  • ALT-M: what methods/functions are in this class/module

Especially in large projects where it is physically impossible to know each part of the source code (that tends to be more million lines) these tools are vital.

The doxygen documentation tool (another utility that targets the understanding of code) has a setting that makes it create links to the references of a symbol. I miss this from VA. The opposite direction is implemented (ALT-G), so it is a bit like ALT-O without the ability to jump back from the header, ok, I am sorry this was a bit sarcastic.
I know that it is not a simple thing as to implement as to design but it would be damn useful.
In VS2005 there is a similar thing where it tries to generate the static call graph, but it is unusable because of both speed and accuracy problems.

Features that I would use often if existed:
  • Where is/are this/these symbol(s) referenced from (permanent list like find results to be able to process one by one)?
  • Where is/are this/these symbol(s) implemented/defined (list)?
  • Focus on these namespaces/classes/functions/file paths: hide everything else as if they didn't exist (near invisible syntax highlight in source code, nothing in OFIW, FSIW)
  • Hide these namespaces/classes etc. just another variation of the previous
  • Where is this file (header) (optionally indirectly) referenced (included) from?
These would also be answers for the majority of the refactoring feature requests.
Among its basic advantages this hiding stuff would also make VA do more what I want because of the narrower symbol space. Less ALT-G or autocomplete mistakes.

feline
Whole Tomato Software

United Kingdom
16105 Posts

Posted - Oct 30 2005 :  11:41:11 AM  Show Profile
i am not really familiar with this concept of "slicing", but i have often tried to answer many of these questions myself in the code i am using. refactoring support is on the cards for VA at some point in the future, and as you say, there is considerable overlap with a lot of these questions.

i will ask support and see what they say. what you are asking for is definitely interesting. the real question is how feasible is it, and how to set about implementing it. we cannot really make VA all things to all people, since the feature set would get just slightly out of control but this does seem to fit in well with my assumptions about how refactoring would have to be written.

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