Variable assignment and dependency tool?

K

Kurt Schwemmer

I've been tasked with cleaning up a big C++ project that extensively
uses global variables.

What would be very useful is a tool that would parse the code and
create a dependency tree of variables. So the parser would look at
the rvalue symbols in an assigment and make them dependencies of the
lvalue. So you'd know how all the variables are related and delete
unused branches of variables etc. I realize that a tool like this
could get much more complex than what I've mentioned...

Does anyone know if a tool like this exists? Can you point me in the
right direction if it does?

Thanks,
Kurt Schwemmer
 
G

Gianni Mariani

Kurt said:
I've been tasked with cleaning up a big C++ project that extensively
uses global variables.

What would be very useful is a tool that would parse the code and
create a dependency tree of variables. So the parser would look at
the rvalue symbols in an assigment and make them dependencies of the
lvalue. So you'd know how all the variables are related and delete
unused branches of variables etc. I realize that a tool like this
could get much more complex than what I've mentioned...

Does anyone know if a tool like this exists? Can you point me in the
right direction if it does?

No, but I regulary toss doxygen at code to make it more understandable.
It takes a little time to create a config file but I wrote a "dox"
target in MakeXS that performs all that magic. (If you want to use
MakeXS, drop me a note and I'll put a newer version of the doxygen
config template that will create a better result).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top