Skip to content

SpitfireSatya/asyncify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desynchronizer

A tool for automatic refactoring of Synchronous Javascript API to their Asynchronous equivalents. This repository contains the artifact for "Automatic Migration from Synchronous to Asynchronous JavaScript APIs" (OOPSLA 2021)

Verification of Artifact

Refer to the Getting Started document for instructions for running the evaluation for this paper.

About the API

Asyncify (Desynchronizer) exports 3 functions, all of which return a promise upon completion. They are as follows:

  • showTransformationsAndTransform(pathToCallgraphCSV: string): This method accepts 1 argument, path to the callgraph csv, returns a list of suggested transformations and changes associated with each transformation as a text file and html report, and applies all transformations automatically.
  • showTransformations(pathToCallgraphCSV: string): This method accepts 1 argument, path to the callgraph csv, and returns a list of suggested transformations and changes associated with each transformation as a text file and html report.
  • transform(pathToCallgraphCSV: string, nodesToTransform?: Array): This method accepts 1 argument, path to the callgraph csv, and applies all transformations automatically. Optionally, a second parameter containing an array of nodes (generated by showTrasnformations) may be provided to apply transformation to only a subset of the suggested transformations.

Build the code

Run npm run build to build the project with Webpack.
The build artifacts will be stored in the dist/ directory.
To execute the code, run node dist/asyncify.js.
Note: Entry point for project is set to index.ts.

Running unit tests

Run npm run mocha to execute the unit tests via Mocha/Chai/Sinon.
Note: CLI output only, no files generated.

Generate Code coverage Report for unit tests

Run npm run test to generate unit test coverage report using nyc.
Report location: reports/coverage.

Generate TSLint Html Report

Run npm run lint to generate a json and html lint report using TSLint-Html-report.
Report location: reports/tslint-html-report

Generate Code-Duplicity Report

Run npm run jscpd to generate a json and html duplicity report using JSCPD-Html-report.
Report location: reports/code-duplicity

Building the container

  • Create a zip of all the contents of the asyncify directory (except node modules) into a file called "asyncify.zip"
    • Ensure that this is present in the root of the project.
  • Build the container using the command:
    • sudo docker build -t desynchronizer .
  • Follow the steps in Getting Started to verify the evaluation.
    • Or use the below command to run the container:
      • sudo docker run --name desynchronizer -it desynchronizer bash

About

Refactoring Javascript code from sync to async.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •