| Fortran is a popular high-performance computing language,which is widely used in the fields of numerical analysis and scientific computing because of its efficient numerical computing functions.As the scale and computational complexity of Fortran programs continue to increase,illegal computation caused by function transfer frequently appear.The existing data flow analysis methods and illegal computation detection methods are not enough to solve this problem.Therefore,the article focuses on the detection of illegal computation caused by function transfer in Fortran programs,mainly including the following contents:(1)Illegal Computation Detection Model in Function Transfer.By summarizing the illegal calculation mode in the Fortran function transfer,the defect detection model of this type of illegal computation is defined.Illegal computation in function transfer are described formally by defect state machines.(2)Fortran Callback Data Flow Analysis Method.Using the callback function call graph to describe the function call relationship generated by the callback,proposing a complex number interval calculation method to improve the accuracy of Fortran program data flow analysis,and proposing an interval calculation method based on mutable function summaries to realize the data flow analysis of callbacks in Fortran programs.(3)Illegal computation detection method in function transfer.According to the detection model of illegal computation in function transfer,the detection algorithm and framework of illegal computation in function transfer are proposed.The state transition of the defect state machine is controlled by the detection algorithm,and the Fortran function transfer data flow analysis method is applied in the detection algorithm to complete the detection of illegal computation.The article implements the static analysis tool DTS SMPS to detect illegal computation caused by function transfer in Fortran.Using DTS_SMPS detect open source Fortran projects,and compare the detection time,false positive rate and false positive rate with other Fortran static analysis tools.The experimental results show that the average false alarm rate of DTS_SMPS is 26.8%,and the average false negative.rate is 11.7%,which has a better detection consequence that verifying the validity and usability of the method proposed in the article. |