News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Data Flow Analysis

Started by cman, May 30, 2005, 12:28:35 AM

Previous topic - Next topic

cman

Can data flow analysis be performed during the parse of a source file ( forward flow analysis at least? ) . Is this a bad idea , if so ( seperation of concerns , ect... ). Thanks .... :U

tenkey

Sounds like a bad idea.

Do you want to be managing sets of values at the same time you're creating a symbol table?
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

Randall Hyde

Quote from: cman on May 30, 2005, 12:28:35 AM
Can data flow analysis be performed during the parse of a source file ( forward flow analysis at least? ) . Is this a bad idea , if so ( seperation of concerns , ect... ). Thanks .... :U

You can begin building the AST (abstract syntax tree) upon which you'll do the DFA, but successful data flow analysis generally requires random access to the AST. So generally, DFA occurs after the entire file is scanned and parsed (generally, this is a precursor to optimization, which occurs after code generation).
Cheers,
Randy Hyde