Re: calling graph and data dependency analysis

Marko =?ISO-8859-1?Q?M=E4kel=E4?= <Marko.Makela@HUT.FI>
13 Oct 2001 23:01:50 -0400

          From comp.compilers

Related articles
calling graph and data dependency analysis lg6e@cobra.cs.virginia.edu (Lin Gu) (2001-10-12)
Re: calling graph and data dependency analysis Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (2001-10-13)
Re: calling graph and data dependency analysis zk@intland.com (Zsolt Koppany) (2001-10-13)
| List of all articles for this month |
From: Marko =?ISO-8859-1?Q?M=E4kel=E4?= <Marko.Makela@HUT.FI>
Newsgroups: comp.compilers,comp.software-eng
Date: 13 Oct 2001 23:01:50 -0400
Organization: Helsinki University of Technology, CS lab
References: 01-10-048
Keywords: analysis
Posted-Date: 13 Oct 2001 23:01:50 EDT

>>>>> "Lin" == Lin Gu <lg6e@cobra.cs.virginia.edu> writes:


Lin> Tracing the calling from module to module and the data
Lin> depencency is quite important in software design style
Lin> analysis. Are there any freely available tools to trace those
Lin> relationship between modules and files?


You could have a look at Doxygen (http://www.doxygen.org), which does
a pretty good job for C, C++ and Java. As far as I know, it doesn't
produce call graphs, but it does produce class hierarchies
(inheritance graphs) and collaboration diagrams (which illustrate
object encapsulation relations).


Lin> It seems gcc -MM only treat header files, but i need to look into
Lin> the function bodies to extract calling information.


You might be able to tweak Doxygen to do that. Even if it doesn't
contain a full parser, you could recognize function calls based on the
declared function names (which Doxygen must keep in some data
structure) and some simple rules, e.g. "a reserved function name
inside {} braces followed by a left parenthesis is a function call".
Of course, such a solution may fail when given some pathological input
(especially when the code is C++), but it would probably work for a
given set of input files.


Marko


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.