| Data flow analysis technique is a kind of program static analysis techniques, which can gather the semantic information of the program and confirm the definition and use of variable by algebraic method. According to the data flow analysis, we can find the action of the program in running without running the program in fact, which can help to understand program. Data flow analysis is widely applied to software engineering, such as compiler optimization, program validation, debugging, testing, understanding, slicing,parallelizing and so on. Program static data flow analysis is one of the important measures adopted by program testing. Recurring to the Program static analysis tools, errors in the program can be more straightway discovered and traced. Data flow analysis is a very important program static analysis technique, which can play an important role in guaranteeing software quality and reliability. But the whole-program data flow analysis become more complex and difficult due to the appearance of procedure call. At present, the model and arithmetics of interprocedural analysis is still in discussing, and there is still not one concise, united, expressive interprocedural analysis model. In this paper, we want to discuss the design thought and implement method of whole-program data flow analysis tool by the researching of interprocedural analysis technique.At first we introduce some basic knowledge of data flow analysis and some representative data flow analysis technique. Then we simply analyze existing technique of data flow analysis and familiar strategy dealing with procedure call. We propose an elementary framework of interprocedural data flow analysis, which can pick-up information striding over procedure. At the same time, we also discuss the transfer of parameters among procedures and context-sensitive interprocedural points-to analysis and so on. At last we focus on the design thought and implement method of our data flow analysis tool. Using the FLEX, BYACC and post-analyses tool, we construct the general parser for C source code, which does the lexical analysis, syntactical analysis and post-analysis for the C source code and then abstract the syntax and put it into the common information database. The common information database is composed of the information table, which organizes the syntactical meaning of the program efficiently through the tree-style structure, and it offers general organization style of the information for different maintains tools. The data flow analysis tool use the outer interface of the common information database getting the information of the common information database to inspect whether the definition and use of data is illogical or not according to the specifications. |