Software Product Lines Extraction from Bytecode based applications
Tewfik Ziadi*, and Lom M. Hillah*+
*Sorbonne Université, Laboratoire d'Informatique de Paris 6 (LIP6), CNRS, Paris, France
+Univ. Paris Nanterre
Contact: {firstname.lastname}@lip6.fr
Abstract
This paper presents a Software Product Line (SPL) extraction approach to handle legacy software systems running on the Java Virtual Machine (JVM), for which the source code is unavailable, and factor in all input programming languages for the JVM. The approach extracts from the bytecode of a collection of software variants created using the Clone-And-Own approach a full SPL with its feature model. We provide a full implementation and integration in the BUT4Reuse framework. An early experiment was carried out on the ArgoUML case study and preliminary results are discussed.
Resources regarding the paper
In the rest of this document, we will name the two instances of Eclipse you will use:
- Eclipse-Initial is the one in which you will install the BUT4Reuse plugin, and import the Bytecode Adapter project. It is the Eclipse you start with.
- Eclipse-Runtime is the one launched from Eclipse-Initial. It contains the deployed Bytecode Adapter.
- First, install in Eclipse-Initial the BUT4Reuse Eclipse plugin, following the instructions from BUT4Reuse code repository on Github:
https://github.com/but4reuse/but4reuse/wiki/Installation
- Then, import in Eclipse-Initial the Bytecode Adapter project (see download link below) as an existing Eclipse project: menu File -> Import... -> General -> Existing Projects into Workspace.
- Finally, deploy the Bytecode Adapter in a new Eclipse runtime (Eclipse-Runtime): right-click on the project org.but4reuse.adapters.bytecode -> Run as -> Eclipse Application.
This case study is programmed in Java. The procedure below is extracted from the BUT4Reuse user manual, which you can refer to for further guidance: https://github.com/but4reuse/but4reuse/wiki/UserManual
- In the Eclipse-Runtime, import the ArgoumlSPLBytecodeExtraction project as an existing project (see download link below)
- If the BUT4Reuse perspective is not open (cf. Fig. 9 in the paper), please open it first: menu Window -> Open perspective -> Other... then select BUT4Reuse.
- Create an Artefact Model at the root of the project: right-click on the project -> new -> ArtefactModel. Name it as you like, or keep the default, but keep the .artefactmodel extension.
- Select the eigth artifacts of the ArgoUML variants located in the variants folder (cf. Fig 9 in the paper), drag and drop them onto the Input Drop view. Save the Artefact Model.
To just show the decomposition of each variant into Atomic Bytecode Elements (ABEs) and their count, right-click on the corresponding artifact under the Artefact Model, then select Show Elements.
To launch the complete exraction process, right-click on the Artefact Model itself and select Feature Identification.
Expect the process to run for approximately 35 to 40 minutes, depending on the characteristics of your hardware and the current load.
The outcomes of the extraction process can be explored using the BUT4Reuse capabilities: Visualiser of blocks, Constraints Discovery, WordClouds/Word Cloud TF-IDF, Visualiser Menu, and Metrics. The BUT4Reuse user manual provides more information to help you get familiar with the capabilities of the tool: https://github.com/but4reuse/but4reuse/wiki/UserManual
We also provide, for comparison with your own experiment outcomes, an Eclipse project, ArgoUMLSPLBytecodeExtraction-ExperimentResults (see download link below) containing the results of the experiment discussed in the paper.
This case study is programmed in Scala.
Use the same procedure as for the ArgoUML case study to explore the variants of the Bank System artifacts, and to launch the extraction experiment.
Like in the ArgoUML case study, we provide two Eclipse projects (see download link below):
- Download (292 KB) the Bytecode Adapter, to be imported as an Eclipse project in Eclipse-Initial.
- Download (28.3 MO) the ArgoUML product variants (ArgoumlSPLBytecodeExtraction project), to be imported in Eclipse-Runtime.
- Download (34.8 MO) the ArgoUML case study results (ArgoumlSPLBytecodeExtraction-ExperimentResults project), to be imported in Eclipse-Runtime (or Eclipse-Initial).
- Download (58 KO) the Bank system variants (BankSPLBytecodeExtraction project), to be imported in Eclipse-Runtime (launched from Eclipse-Initial).
- Download (679 KO) the Bank system experiment results (BankSPLBytecodeExtraction-ExperimentResults project), to be imported in Eclipse-Runtime (or Eclipse-Initial).