1

I need to create a dependency graph for a software suite that I am working on. In the past the company I work for has always done this manually, but I am guessing that there is a tool somewhere that will do what we need.

The software I am working with is Ada95, and has about 200 code modules/files, with about 40 packages. I need to create a map that will trace every output, individually, back to each input or constant that will have an impact on the output. Does anybody know of a tool that would accomplish this? Or even just partially accomplish it?

cwheat
  • 13
  • 2

1 Answers1

3

AdaCore's GPS (available from http://libre.adacore.com) comes with a command line tool named gnatinspect. You can use this tool to load all cross-reference information generated by the compiler (assuming you are compiling with GNAT). This creates a sqlite database (gnatinspect.db) which contains all information you need. gnatinspect itself provides a number of pre-made queries that might get you at least partially to where you want to go.

You could also look at ASIS, as a way to do this kind of queries directly on the code. I am told this is not so easy to use the first time around though.

There is also an older tool provided with gnat (gnatxref) which does something similar, although it is being superceded by gnatinspect.

Finally, you could look at gnat2xml as an alternative to ASIS if you are more comfortable parsing XML files.

manuBriot
  • 2,755
  • 13
  • 21