Font Size: a A A

Method For Repairing Floating-point Program Precision Defects Based On Program Rewritin

Posted on:2024-06-17Degree:MasterType:Thesis
Country:ChinaCandidate:Y Z WangFull Text:PDF
GTID:2568307106983249Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the continuous development of computer science and technology,floating point numbers are widely used in modern computer systems,providing an important computing support for upper applications.However,floating point is essentially an approximate representation of real numbers,so the essence of floating point operation is imprecise,and round-off error and precision loss are inevitable.Due to the huge input space corresponding to floating-point programs,the interval distribution of accuracy defects is irregular,making it very difficult to detect and repair accuracy defects.It is also very difficult to manually fix precision defects in floating-point programs.Nowadays,the complexity of floating-point programs continues to increase.Even with a deep understanding of floating-point operations and numerical analysis,it is usually only possible to repair some program fragments or expressions,making it difficult to optimize the entire floating-point program.Studying how to fix precision defects in floating-point programs and improve the accuracy of floating-point calculations is an important topic in current computer science research.This article proposes a method for repairing precision defects in floating-point programs,based on the basic theory of precision defect repair and expression transformation,to improve the accuracy of floating-point calculations.The main research content and contributions of this article are as follows:1.A floating-point program accuracy defect repair method based on program rewriting is proposed.This method filters and isolates specific precision operations in floating-point programs,performs semantic analysis and reorganization of the program,and uses automated tools to rewrite the restructured expressions to fix precision defects.The experimental results show that in the 10 functions on GSL,the average accuracy of this method has been improved by 5.2 percentage points,with the proportion of errors less than 1 ULP as the indicator,and some functions have been improved by 20.0 percentage points.2.Implemented a tool FPTool that converts floating-point expressions of C language types to FPcore format.By using stack operations,floating-point expressions in C language programs can be effectively converted to FPcore format,solving the problem of original program expressions not being directly used as input parameters for herbie.3.Designed and implemented a set of testing tools suitable for mathematical functions in GSL.By analyzing the characteristics of different functions,test data with uniform distribution in the floating-point domain was generated within different intervals,avoiding the problem of uneven distribution of traditional testing programs’ test sets;Use mpfr and mpmath to obtain accurate test predictions,avoiding errors caused by inaccurate test predictions during accuracy testing;Performance testing was conducted using techniques based on instruction barriers and beat counters,and then the improved 4d detection method was used to process the test data,ultimately obtaining accurate test results and improving the reliability of function testing.
Keywords/Search Tags:program rewriting, numerical accuracy, floating point program, static analysis, defect repair
PDF Full Text Request
Related items