Saturday, April 9, 2011

Analyzing C/C++ include file dependencies

Have you ever been looking for a tool that you can query for things like:
  • Which include files does file XXX.cpp include directly ?
  • Which include files does file XXX.cpp include recursively ?
  • Which files include XXX.h ?
  • How does file XXX.cpp include file YYY.h ?
  • How much lines of code have to be recompiled if I touch file YYY.h ?
  • How does project P1 depend on project P2 ?
  • What include statements can be removed from file F because they are implied by other include statements in that same file ?
  • ...and more
Would you also like to 
  • Visualize dependency graphs ?
  • Automatically track violations in case certain projects are not supposed to include from other projects ?
  • Have a tool that is free under GPLv3, open source and cross-platform ?
In a series of blog posts, we will systematically develop exactly such a tool using swi-prolog and python 2.

No comments:

Post a Comment