Adaptation of a Refactoring DSL for the Object-Oriented Paradigm

Keywords: verifiable refactoring, scheme-based refactoring, microrefactoring, program equivalence

Abstract

Many development environments offer refactorings aimed at improving non-functional properties of software, but we have no guarantees that these transformations indeed preserve the observable behavior of the source code they are applied on. An existing domain-specific language makes it possible to formalize automatically verifiable refactorings via instantiating predefined transformation schemes with conditional term rewrite rules.

We present a proposal for adapting this language from the functional to the object-oriented programming paradigm, using Java instead of Erlang as a representative. The behavior-preserving property of discussed refactorings is characterized with a multilayered definition of equivalence for Java programs, including the conformity relation of class hierarchies. Based on the decomposition of a complex refactoring rule, we show how new transformation schemes can be identified, along with modifications and extensions of the description language required to accommodate them. Finally, we formally define the chosen base refactoring as a composition of scheme instances.

Downloads

Download data is not yet available.
Published
2021-03-18
How to Cite
Németh, D. J., Horpácsi, D., & Tejfel, M. (2021). Adaptation of a Refactoring DSL for the Object-Oriented Paradigm. Acta Cybernetica, 25(4), 817-846. https://doi.org/10.14232/actacyb.284280