Font Size: a A A

Pyreview:A Python Source Code Analysis Tool Based On Abstract Syntax Tree Differencing Algorithm

Posted on:2017-04-30Degree:MasterType:Thesis
Country:ChinaCandidate:Q Y LiFull Text:PDF
GTID:2308330485461771Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
A key issue in software analysis is the identification of particular changes that occur across several versions of a program. Information from the code changes can help developers better understand the software function points and the evolution process, thus to improve the maintenance job. Unfortunately, as far as we know, there are no robust tools developed for Python, focused on this area. For that reason, we present Pyreview, a Python source code analysis tool, based on abstract syntax tree differencing algorithm.In this paper, our contributions are mainly as followed:·Present a new way to calculate the distance of two strings and reduce the runtime complexity of nodes list permutation. The experiment shows that for 9 GIT repositories, Pyreview can find 1606 code changes and the precision and recall rate of the result are both higher than 98%. Besides that, Pyreview can averagely reduce the running time by 20%.·Present a new set of rules for code change extraction based on Python syntax details, which can classify changes in Python source code into different change kinds automatically.·Present a specific way for gapped clone code detection. The process can handle the situation when statements are inserted into or deleted from the code block.As a Python source code analysis tool, Pyreview can be used in code change extraction, clone code detection, code change evolution analysis and some related areas. In the future, we want Pyreview to be a basic infrastructure in Python source code analysis area.
Keywords/Search Tags:code structural comparison, code change extraction, clone code detection
PDF Full Text Request
Related items