Adaptation of a Refactoring DSL for the Object-Oriented Paradigm
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 fo...
Saved in:
Published in | Acta cybernetica (Szeged) Vol. 25; no. 4; pp. 817 - 846 |
---|---|
Main Authors | , , |
Format | Journal Article |
Language | English |
Published |
Szeged
Laszlo Nyul
18.03.2021
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | 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. |
---|---|
ISSN: | 0324-721X 2676-993X |
DOI: | 10.14232/actacyb.284280 |