This thesis presents how program flow analysis methods can be used to help the programmer understand data flow and data dependencies in programs. The design and implementation of an interactive query tool based on static analysis methods is presented. These methods include basic analysis and cross-reference analysis, intraprocedural data flow analysis, interprocedural data flow analysis and affect-chaining analysis.The novel concept of affect-chaining is introduced, which is the process of analysing flow of data between variables in a program. We present forward- and backward- affect-chaining, and also algorithms to compute these quantities. Also, a theorem about affect-chaining is proved.We have found that data flow problems appropriate for query applications often need to keep track of paths associated with data flows. By contrast, flow analysis in conventional compiler optimization