Preserving Instance State during Refactorings in Live Environments - Archive ouverte HAL
Article Dans Une Revue Future Generation Computer Systems Année : 2020

Preserving Instance State during Refactorings in Live Environments

Résumé

An important activity of software evolution consists in applying refactorings to enhance the quality of the code without changing its behaviour. Having a proper refactoring tool is a must-to in any professional development environment. In addition, live programming allows faster development than the usual edit-compile-debug process. During live programming sessions, the developer can directly manipulate instances and modify the state of the running program. However, when a complex refactoring is performed, instances may be corrupted (i.e., their state is lost). For example, when pushing an instance variable to a superclass there is a moment where the superclass does not have yet acquired the new instance variable and the subclass does not have it any more. It means that the value assigned to this instance variable in existing instances is lost after the refactoring. This problem is not anecdotal since 36% of the refactorings described in Fowler's catalogue corrupt instances when used in a live programming context. There is a need to manually migrate, regenerate or reload instances from persistent sources. This manual fix lowers the usefulness of live programming. In this context of live programming, we propose, AtomicRefactoring, a new solution based on Dynamic Software Update to preserve the state of the application after performing refactorings. We provide a working extension to the existing refactoring tool developed for the language Pharo (a new offspring inheriting from Smalltalk), allowing application developers to perform complex refactorings preserving the live state of the running program.
Fichier principal
Vignette du fichier
main.pdf (829.77 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02541754 , version 1 (14-04-2020)

Identifiants

Citer

Pablo Tesone, Guillermo Polito, Luc Fabresse, Noury Bouraqadi, Stéphane Ducasse. Preserving Instance State during Refactorings in Live Environments. Future Generation Computer Systems, inPress, ⟨10.1016/j.future.2020.04.010⟩. ⟨hal-02541754⟩
194 Consultations
223 Téléchargements

Altmetric

Partager

More