|analyzing dependencies in code email@example.com (eliben) (2007-11-16)|
|Re: analyzing dependencies in code firstname.lastname@example.org (2007-11-17)|
|Re: analyzing dependencies in code email@example.com (IndianTechie) (2007-11-17)|
|Re: analyzing dependencies in code SidTouati@inria.fr (Sid Touati) (2007-12-13)|
|Date:||Sat, 17 Nov 2007 22:11:32 -0800 (PST)|
|Posted-Date:||18 Nov 2007 12:22:02 EST|
On Nov 16, 1:42 pm, eliben <eli...@gmail.com> wrote:
> I have a bunch of rather convoluted C code that uses a lot of global
> variables. I'm trying to see if I can devise some automatic way of
> analyzing this code, helping me understand it.
> Suppose I can obtain the AST for this code (using c2c). I want to
> analyze the AST and, given some global variable V, understand which
> other global variables it affects, and what functions can be called as
> a result of a change in it.
> I tried approaching this the ad-hoc way, but it's becoming
> complicated. I see some parallels to dataflow analysis here, though it
> seems to be a bit different.
why would it be different? It is the same as data flow analysis,
except that you need to create a def-use chain only for globals.
> Any ideas of proven methods to do this right ?
can't think of why anyone would want to re-invent the wheel or how the
other technique would be more efficient than data flow analysis.
Return to the
Search the comp.compilers archives again.