Specifically, each node represents a procedure and each edge (f, g) indicates that procedure f calls procedure g. Thus, a cycle in the graph indicates recursive procedure calls. Call graphs are a basic program analysis result that can be used for human understanding of programs, or as a basis for further analyses, such as an analysis that tracks the flow of values between procedures. Publication » Constructing the Call Graph of a Program. Article Constructing the Call Graph of a Program Barbara G. Ryder IEEE Transactions on Software Engineering. OOPls CallGphConst, F05 Ryder, B.G., 'Constructing the Call Graph of a Program,' Software Engineering, IEEE Transactions on, vol. 216– 226, May 1979 Grove, D., DeFouw, G., Dean, J., and Chambers, C. Call graph construction in object-oriented languages. One simple application of call graphs is finding procedures that are never called. Call graphs can be dynamic or static.
A dynamic call graph is a record of an execution of the program, e. Thus, a dynamic call graph can be exact, but only describes one run of the program. A static call graph is a call graph intended to represent every possible run of the program. The exact static call graph is undecidable. That is, every call relationship that occurs is represented in the graph, and possibly also some call relationships that would never occur in actual runs of the program. Call graphs can be defined to represent varying degrees of precision. A more precise call graph more precisely approximates the behavior of the real program, at the cost of taking longer to compute and more memory to store. The most precise call graph is fully context- sensitive, which means that for each procedure, the graph contains a separate node for each call stack that procedure can be activated with. A fully context- sensitive call graph can be computed dynamically easily, although it may take up a large amount of memory. Fully context- sensitive call graphs are usually not computed statically, because it would take too long for a large program. The least precise call graph is context- insensitive, which means that there is only one node for each procedure. With languages that feature dynamic dispatch, such as Java and C++, computing a static call graph precisely requires alias analysis results. Conversely, computing precise aliasing requires a call graph. Many static analysis systems solve the apparent infinite regress by computing both simultaneously. This term is frequently used in the compiler and binary translation community. By tracking a call graph, it may be possible to detect anomalies of program execution or code injection attacks. This function is only available in Mac OS X Leopardpprof tool, part of open- source google- perftools. Code. Analyst from AMD (released under GPL)Static (for C language), for getting call graphs without running of application: doxygen : Uses graphviz to generate static call/inheritance diagramscflow : GNU cflow is able to generate the direct and inverted call graph of a C programegypt : a small Perl script that uses gcc and Graphviz to generate the static call graph of a C program. CCTree : Native Vim plugin that can display static call graphs by reading a cscope database. Works for C programs. Implemented as a patch to gcc; works for C and C++ programs. PHP, perl, python. Devel: :NYTProf : a perl performance analyser and call chart generatorphp. Call. Graph : a call graph generator for PHP programs that uses Graphviz. It is written in PHP and requires at least PHP 5. Python programs that uses Graphviz. Must be used together with gprof (and a glue script, such as gprof. Unix philosophy doesn't handle graphics by itself. Call graph construction in object- oriented languages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |