An automated refactoring approach for asynchronous mechanism
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    As synchronous blocking wastes system resources and affects program performance in concurrent processing,an automatic refactoring approach based on the asynchronous mechanism of CompletableFuture was proposed.Firstly,several static analyses by Wala static program analysis tool,such as visitor pattern analysis,alias analysis,and data flow analysis were used in this approach,so that the operation mode of shared variable data was determined.Then four asynchronous refactoring modes were set based on the asynchronous mechanism of CompletableFuture.Finally,the code was refactored according to different modes.An automatic tool AsynRef was implemented by Eclipse and four large-scale practical applications such as HSQLDB,Jenkins,JGroups,and SPECjbb2005 were automatically refactored by AsynRef.AsynRef was evaluated via the number of refactored locks,changed lines of code,accuracy,program performance after refactoring.Among the 919 synchronous methods contained in the four programs,387 asynchronous mechanism conversions were completed.After Asynref was used for asynchronous mechanism refactoring,the program execution performance was improved by 8% to 39%.AsynRef can refactor for aynchronized mechanism effectively.Compared to manual refactoring,the refactoring efficiency is improved significantly.

    Reference
    Related
    Cited by
Get Citation

JI Minghan, QI Lin, ZHANG Yang, DONG Shicheng, LI Chaoshuai. An automated refactoring approach for asynchronous mechanism[J]. Journal of Hebei University of Science and Technology,2021,42(5):499-507

Copy
Related Videos

Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:June 15,2021
  • Revised:September 22,2021
  • Adopted:
  • Online: November 04,2021
  • Published:
Article QR Code