Font Size: a A A

Research And Implementation Of Fortran Interprocedural Path Analysis Method

Posted on:2024-07-17Degree:MasterType:Thesis
Country:ChinaCandidate:Y F WuFull Text:PDF
GTID:2568306944957419Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Fortran language is one of the most popular programming languages in the field of scientific computing.With the continuous progress of related research,the requirements for the computational processing power and quality of Fortran programs are becoming higher and higher.The complexity of corresponding software and code is also increasing,and the nested use of branches,loops and function calls is also becoming more and more complex.The availability of programs is positively correlated with the reliability of path analysis.The existing methods of interprocedural path generation are difficult to generate interprocedural paths for complex programs,and cannot detect and remove unreachable paths in advance,resulting in low efficiency of interprocedural path generation.To solve the above problems,this paper proposes an interprocess path generation model,and makes the following researches around this model:(1)Aiming at the problem of increasing the execution times of all loop structures in generating basic path set,this paper proposes a basic path set generation method based on K loop processing.Firstly,based on the depthfirst search strategy,combined with the critical path method and backtracking method,the inner path of the function is generated,and the reachability and linear independence of the inner path of the function are determined.The loop structure on the selected initial inaccessible inner path is divided into the loop structure that has influence on the path accessibility and the loop structure that has no influence on the path accessibility.Then,the execution times of the loop structure that has influence on the path accessibility are increased.Generate the base path set of the function until the path is reachable and added to the base path set or up to K times.(2)In order to solve the problem of non-uniform symbols of the same variable caused by cross-function in interprocess path analysis,this paper proposes an interprocess path generation method based on symbol mapping.Firstly,a Symbol Mapping Model SMM is established for the inter-process path generation process.The mapping set of parameters and arguments is added when the inner path of the called function is selected at the function call point.Then,the symbol expression of each variable is calculated during the inter-process path generation process.At the same time,the interval operation technique is used to calculate the value of each variable,and the inaccessible path between processes is found in time and the generation of this path is stopped,so as to reduce the generation of inaccessible paths between processes.The above method is implemented in DTS_Fortran,a self-developed program analysis tool,and verified by four open source projects.Experimental results show that the interprocedural path generation model proposed in this paper can not only generate the basic path set for 98%functions,reduce the execution times of the loop structure that has no influence on the path accessibility,and improve the generation efficiency of the basic path set,but also generate the interprocedural path for complex function calling programs,and find the inaccessible path as early as possible in the process of generating the interprocedural path.Reduce the waste of computer resources.
Keywords/Search Tags:Interprocedural path, Basic path set, Function call, Symbol mapping, Fortran language
PDF Full Text Request
Related items