Font Size: a A A

An Empirical Study On Defects In Python Interpreters

Posted on:2022-03-10Degree:MasterType:Thesis
Country:ChinaCandidate:A Y SunFull Text:PDF
GTID:2518306557967789Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Python is an interpreted programming language that has been widely used in many fields.The successful execution of a Python program depends on both the Python program's correctness and the Python interpreter's correctness.As infrastructure software,there are many defects in the Python interpreter.Exploring the defects of Python interpreters can help developers and maintainers of Python interpreters detect and fix these defects and help users of Python avoid risks.Therefore,based on previous empirical research work on the defects of compilers and other open source software,we conduct an empirical study on the defects in two mainstream Python interpreters:CPython and Py Py.The main content of this article includes the following parts:(1)Analysis of interpreter defects characteristic.Through quantitative analysis of 23,823 defect reports and 2015 test cases in CPython and Py Py,defect characteristics are analyzed from multiple dimensions such as conventional statistical information of defect reports,defect occurrence location,defect trigger mode,and defect priority distribution.At the same time,the correlation between the number of defects in the source file and the complexity of the code,and the correlation between defect components and priority are also studied.The study found that: the scale of the test program required to trigger the defect is very small;the defects of the Python interpreter are extremely unevenly distributed in the components and source files,and the vast majority of the defects are distributed in a few components and source files.At the same time,the source files There is a strong correlation between the number of defects in the source file and the code size of the source file.(2)Analysis of interpreter defect repair work.Through the quantitative analysis of 17016 revisions in CPython and Py Py,the focus is on the amount of code changed during the defect repair of the interpreter and the repair time of the defect.At the same time,the correlation between the repair time and priority of interpreter defects is also studied.The research found that: the defect repair work is not complicated from the number of files and code lines changed during defect repair,but the defect repair time is generally longer,and it even takes more than a year for nearly 15% of the defects It can be repaired;the priority of the defect has no obvious relationship with the component,but has a significant correlation with the repair time.(3)Analysis of the root cause of interpreter defects.First,random sampling is used to identify400 CPython defects and 110 Py Py defects from the data set.Secondly,through an iterative method,the root causes of these defects are analyzed and classified,and finally the classification results and specific defects are passed.The example explores the main problems and challenges currently faced by the interpreter.The study found that: semantic errors are the most important root cause of defects,accounting for far more than other types of errors.At the same time,with the development of software,semantic errors are increasing,and errors related to platforms,interpreters and performance are on the decline.
Keywords/Search Tags:Empirical research, python interpreter, software defect, CPython, PyPy
PDF Full Text Request
Related items