Code Analysis

Code Analysis

To help support the development of large programs, a good IDE will have several kinds of code analysis tools. One of the most basic is a call graph browser. A call graph, as the name implies, simply provides a graphical representation of function calls in the program. A call graph allows you to start at any function in your program and trace up or down the call tree to view program flow. Additionally, a call graph browser will also give you the option to view function parameters.

For object-oriented languages, IDEs will also provide a class browser. A class browser allows you to graphically view the relationships between classes, including superclasses and subclasses.

Another useful code analysis tool is a context sensitive search tool. This may be a stand-alone tool or may be integrated into the editor or other code analysis tools. For a simple program, simply searching for a variable or function name based on a text search may be sufficient. In a large program, searching for a common text string may produce hundreds of irrelevant matches. A good search tool understands the syntax of your program and allows you to limit your search in one of two manners, by syntax or by scope. A syntax limited search would look for a text string matching only the designated syntax. For instance, you could search for global variables while excluding functions and local variables of the same name. A scope limited search would look for a text string only within a function, library, or other type of code block. You should make sure the search tool allows you to specify both syntax and scope limiters at the same time. Other common search features include the ability to do case sensitive searches and complete word versus partial word searches.



Software Development. Building Reliable Systems
Software Development: Building Reliable Systems
ISBN: 0130812463
EAN: 2147483647
Year: 1998
Pages: 193
Authors: Marc Hamilton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net