Font Size: a A A

Research And Implementation Of Software Refactoring Method For Loop Parallelization

Posted on:2020-12-08Degree:MasterType:Thesis
Country:ChinaCandidate:M M WeiFull Text:PDF
GTID:2428330572957152Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the development of multi-core processors,multi-threaded programming plays an increasingly important role in improving software quality service.The loop,while containing rich parallelism,becomes the most time-consuming part of software execution due to its complexity and variety.Therefore,how to achieve loop parallelization becomes a hotspot in high performance computing.This paper presents an automated refactoring approach that loop-oriented parallelization and an automatic interactive refactoring tool(R-loop)is implemented based on Abstract Syntax Tree of the Eclipse JDT environment.The main works as follows.1)Parallelism analysis and implement.First,normalize the constraint loop and analyze the dependencies such as loop data dependencies and loop control dependencies.At the same time,eliminate those dependencies,according to their respective reasons and characteristics.Second,some threaded-operations are added to implement the loop parallelization under the Java Executor mechanism.At last,we evaluate the execution time and acceleration ratio for the manual refactoring,which provides a theoretical for the automated refactoring.2)Automated refactoring for loop parallelization.The logic of transformation and the pre-conditions of automated refactoring are set up by combining with some software static analysis methods.Then through the analysis method of Abstract Syntax Tree to make the source program parse into an abstract tree,and confirm the correspondences between each variable in the source program and each node in the AST.Finally,we finish the work of automated refactoring for loop parallelization by adding,deleting,modifying the nodes.3)The design and implementation of automatic refactoring tool.According to the refactoring method,an automatic interactive refactoring tool named R-Loop is implemented in the environment of Eclipse JDT.Meanwhile,the process of tool's implementation and preview interfaces are shown in detail.Finally,the Crypt,Lufact,Series,SOR,SparseMatmulti,MonteCarlo in Java Grande Forum benchmark suite are used to evaluate the performance of R-Loop.Experimental results show that R-loop can complete the parallelization in a short time,it also ensures the consistency of behavior before and after refactoring,and the efficiency of programs execution has also been improved.
Keywords/Search Tags:Software refactoring, Loop parallelism, Software static analysis, Abstract Syntax Tree, R-Loop
PDF Full Text Request
Related items