VAmPiRE: Variantenerhaltende Refactorings für Feature-Orienterte Software-Produktlinien Variant-Preserving Refactoring for Feature-Oriented Software Product Lines
Refactoring is the process of restructuring the internals of a software system (e.g., source code) while preserving the external, user-visible behavior. It has been proposed more than two decades ago as a countermeasure for architectural decays, design flaws and code pollution. As a result of applying refactorings, the system is easier to understand and to maintain and less risky to change. Due to the aforementioned benefits that come with refactoring, it has been subject to comprehensive reasearch, especially for object-oriented systems, and can be considered to be a well-explored technology. However, with respect to software product lines (SPLs), refactoring is rather poorly investigated. Although most of implementation approaches rely on exisiting programming languages and paradigms, the traditional refactorings such as proposed by Fowler et al. (see Refactoring home page) can not be applied. The reason is that for SPLs, we have to take the variability explicitly into account as an additional dimension. As a result, refactoring for SPLs has to preserve the behavior of potentially thousends of programs instead of one. Obviously, this ia a challenging, non-trivial task not yet solved. With VAmPiRE, we want to provide a first step towards practical refactorings for software product lines. VAmPiRE is an Eclipse Plugin that supports developers with refactoring of feautre-oriented software product lines. To this end, VAmPiRE relies on different existing tools for SPL development, namely FeatureIDE, FeatureHouse, and Fuji.
In the following, we explain how to use VAmPiRe by exemplary application of the Pull Up Method (PUM) refactoring. First, you have to download the respective .jar file (see below).
1.Initialization -- Starting the Refactoring Wizard
As a starting Point, you need a FeatureIDE project that has been developed with FeatureHouse. We used TankWar, a shoot 'em up game, developed as an SPL. You can download the version we used for evaluating the PUM refactoring in the download part of this site.
To initiate the PUM refactoring, you have two possibilities. First, you can right-click on a role (i.e., a .java file in a certain feature module) in the package explorer and then choose VAmPiRe refactoring ->Pull Up Method. Alternatively, you select a method (either the signature or the whole body) in the editor, then right-click and proceed as with the aforementionmed option. In both cases, if the refactoring is applicable (e.g., the corresponding feature has a direct parent feature), the inital wizard page for the PUM refactoring should appear, similarly to the following figure:
VAmPiRE is an Eclipse plug-in which requires other plugins to be used. The current version the following plug-ins
- Eclipse Juno SR 2 (RCP and RAP), version 188.8.131.5230211-1820
- FeatureIDE, version 184.108.40.206305292036 with the following features:
- Feature Modeling, version 220.127.116.11305292036
- FeatureIDE extension for FeatureHouse, version 18.104.22.168305292036
- FeatureIDE example projects, version 22.214.171.124305292036 (only necessary for applying refacotrings to existing FOP examples)
- Fuji, (last version: 2012-03-26)
Download the following .jar file, copy it into the dropin folder of you Eclipse IDE and restart Eclipse (it it is open)
The TankWar product line for download: TankWar (with FeatureHouse)