kirancodes.me
To Proof Maintenance & Beyond!

Automated Refactoring to Reactive Programming

Mirko Köhler, Guido Salvaneschi

Abstract

Reactive programming languages and libraries, such as ReactiveX, have been shown to significantly improve software design and have seen important industrial adoption over the last years. Asynchronous applications - which are notoriously error-prone to implement and to maintain - greatly benefit from reactive programming because they can be defined in a declarative style, which improves code clarity and extensibility. In this paper, we tackle the problem of refactoring existing software that has been designed with traditional abstractions for asynchronous programming. We propose 2Rx, a refactoring approach to automatically convert asynchronous code to reactive programming. Our evaluation on top-starred GitHub projects shows that 2Rx is effective with the most common asynchronous constructs, covering 12.7% of projects with asynchronous computations, and it can provide a refactoring for 91.7% of their occurrences.

BibTeX
@inproceedings{Koehler-Salvaneschi:ASE19,
  author    = {Mirko K{\"{o}}hler and
               Guido Salvaneschi},
  title     = {Automated Refactoring to Reactive Programming},
  booktitle = {ASE},
  pages     = {835--846},
  publisher = {{IEEE}},
  year      = {2019},
}

Related papers