From: | "Oliver Wong" <owong@castortech.com> |
Newsgroups: | comp.compilers |
Date: | 20 Jan 2006 16:12:15 -0500 |
Organization: | GlobeTrotter |
References: | 06-01-037 |
Keywords: | analysis |
Posted-Date: | 20 Jan 2006 16:12:15 EST |
Thank you for your replies. I receive an answer to my specific question,
but after doing some more reading on DFA, I have a few more general
questions. First, I'd like to address the questions that have been directed
towards me.
> Why don't you use an formal translation of your verbose formulation?
> I.e.:
> * The write to x depends on y.
> * The write to x depends on z.
This is what I now do. The output is something like:
LeftAssignmentOccurrence: "x":21:5:Write
Occurences Participating in assignment value:
Occurrence: "y":21:14:Read
Occurrence: "z":21:19:Read
> Did you ever consider SSA, for use in your analysis and output?
The tool I'm working on needs to be able to preserve the original
formatting of the source code as much as possible (e.g. comments,
indentation style, etc.) which is why we haven't translated away from an AST
into other representations.
I've tried to read up on various types of DFAs, such as "def-use chains"
and "reaching definitions". Some of the articles I've read seem to imply
that I should already have a control flow graph before starting the
analysis, and other articles seem to imply that this the CFG should be built
up in parallel with the analysis. Can someone clear up what the proper
ordering is, or where I can go to read more about this?
In my current implementation, there is no explicit CFG being built at
all.
- Oliver
Return to the
comp.compilers page.
Search the
comp.compilers archives again.