Skip to content

Commit b68d095

Browse files
Updated with changes from submission
1 parent fab5469 commit b68d095

20 files changed

Lines changed: 1146 additions & 1144 deletions

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN cat ubuntu-repos.txt >> /etc/apt/sources.list
3838
RUN apt-get update \
3939
&& apt-get install -y --no-install-recommends gcc-4.4
4040
RUN ln -s /bin/gcc-4.4 /bin/gcc
41-
RUN rm -rf VariabilityExtraction
41+
RUN rm -rf Extraction
4242
RUN gcc --version
4343
RUN java -version
4444
RUN apt-get install -y --no-install-recommends bc
@@ -47,15 +47,15 @@ RUN apt-get install -y --no-install-recommends bc
4747
WORKDIR /home/user
4848
# Copy JAR from previous stage
4949
COPY --from=0 /home/user/target /home/user/target
50-
RUN cp target/VariabilityExtraction-*-jar-with* .
50+
RUN cp target/Extraction-*-jar-with* .
5151

5252
# Copy required scripts and properties
5353
COPY docker-resources/extract.sh /home/user/
5454
COPY docker-resources/entrypoint.sh /home/user/
5555
COPY docker-resources/fix-perms.sh /home/user/
5656
COPY docker-resources/KernelHaven.jar /home/user/
57-
COPY docker-resources/variability_analysis_BusyBox.properties /home/user/
58-
COPY docker-resources/variability_analysis_Linux.properties /home/user/
57+
COPY docker-resources/extraction_busybox.properties /home/user/
58+
COPY docker-resources/extraction_linux.properties /home/user/
5959

6060
RUN mkdir -p /home/user/extraction-results/output
6161
RUN chown user:user /home/user -R

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,68 @@
11
# VEVOS: Ground Truth Extraction
2-
32
VEVOS is a tool suite for the simulation of the evolution of clone-and-own projects and consists of two main components: The ground truth extraction, called VEVOS/Extraction and the variant simulation called VEVOS/Simulation.
43

54
This repository contains VEVOS/Extraction and thus the first part of the replication package for the paper _Simulating the Evolution of Clone-and-Own Projects with VEVOS_ submitted to the International Conference on Evaluation and Assessment in Software Engineering (EASE) 2022.
6-
VEVOS/Extraction is a java for extracting feature mappings, presence conditions, and feature models for each revision (withing a specified range of the commit-history) from an input software product line.
5+
VEVOS/Extraction is a java project for extracting feature mappings, presence conditions, and feature models for each revision (within a specified range of the commit-history) from an input software product line.
6+
7+
![](docs/extraction.png)
78

89
## Quick Start using Docker
9-
In the following, we provide instructions on how to quickly extract the ground truth of Linux or Busybox with the provided
10-
Docker setup.
10+
In the following, we provide instructions on how to quickly extract the ground truth of Linux or Busybox with the provided Docker setup.
1111

1212
### Requirements
1313
The only requirement is Docker. We provide batch and bash scripts that execute the necessary Docker setup and execution.
1414
We tested the Docker setup under Windows and Linux.
15-
We have not tested the setup on Mac, but you should be able to use follow the instructions for Linux.
15+
We have not tested the setup on Mac, but you should be able to use the instructions for Linux.
1616

1717
### Preparation
1818
#### Docker
1919
Docker must be installed on your system, and the Docker daemon must be running.
20-
For installation, follow the instructions given in the installation guide for your OS which you can find
20+
For installation, follow the instructions given in the installation guide for your OS which you can find
2121
[here](https://docs.docker.com/get-docker/).
22-
Under Linux, you should follow the optional
22+
Under Linux, you should follow the optional
2323
[post-installation instructions](https://docs.docker.com/engine/install/linux-postinstall/).
2424

2525
#### Repository
26-
Clone the repository to a location of your choice
26+
Clone the repository to a location of your choice
2727
```
28-
git clone https://github.com/VariantSync/Extraction.git
28+
git clone https://github.com/VariantSync/VEVOS_Extraction.git
2929
```
30-
Then, navigate to the repository's root directory in a terminal of your choice.
30+
Then, navigate to the repository's root directory in a terminal of your choice.
3131

3232
### Build the Docker Image
33-
Before the extraction can be executed, we have to build the Docker image. This can be done by executing the correspsonding build script in a terminal.
33+
Before the extraction can be executed, we have to build the Docker image. This can be done by executing the corresponding build script in a terminal.
3434

3535
- Linux terminal: `./build-docker-image.sh`
3636
- Windows CMD: `build-docker-image.bat`
3737

38+
This process may roughly take half an hour.
39+
3840
### Start the Ground Truth Extraction in a Docker Container
39-
We provide bash and batch scripts that start the ground truth extraction and copy all data to
41+
We provide bash and batch scripts that start the ground truth extraction and copy all data to
4042
_Extraction/extraction-results_ once the extraction is complete, or has been stopped.
41-
Start the extraction by executing the `start-extraction` script (see examples further below).
43+
Start the extraction by executing the `start-extraction` script (see examples further below).
4244
The basic syntax is the following:
4345

4446
- `start-extraction.(sh|bat) (linux|busybox) [commit-id/tag] [commit-id/tag]`
45-
- `(option-1|option-2)` -> You *must* provide one of the two.
47+
- `(option-1|option-2)` -> You *must* provide either a value for `option-1` or `option-2`.
4648
- `[option]` -> You *may* provide a value
4749

4850
The script must be provided with `busybox` or `linux` as first argument, in order to specify which SPL should be considered.
49-
In addition, you can optionally provide either one or two more arguments specifying a commit-id or git-tag.
51+
In addition, you can optionally provide either one or two more arguments specifying a commit-id or git-tag.
5052

5153
If you specify __no__ id or tag, the entire history is considered.
5254

53-
If you specify __exactly one__ id or tag, the extraction will only consider the one commit that is found under the id/tag.
54-
This can be used to quickly test whether everything is working as intended.
55+
If you specify __exactly one__ id or tag, the extraction will only consider the one commit that is found under the id/tag.
56+
This can be used to quickly test whether everything is working as intended or to run the extraction for one commit only (e.g., when no evolution information is necessary).
5557

5658
If you specify __two__ ids or tags, the extraction will consider the range of commits that lies between the first and the second
5759
commit. The commit retrieval follows the same logic as [git log](https://git-scm.com/docs/git-log), i.e., it will retrieve
5860
all commits that are ancestors of the second commit, but __not__ ancestors of the first commit.
5961

60-
- Windows CMD:
62+
- Windows CMD:
6163
- `start-extraction.bat busybox [id/tag] [id/tag]`
6264
- `start-extraction.bat linux [id/tag] [id/tag]`
63-
- Linux terminal:
65+
- Linux terminal:
6466
- `./start-extraction.sh busybox [id/tag] [id/tag]`
6567
- `./start-extraction.sh linux [id/tag] [id/tag]`
6668

@@ -70,8 +72,8 @@ The entire history of BusyBox can be extracted in about one day.
7072
For Linux, even considering only the commits between two minor revisions, e.g. v4.1 and v4.2, can take several days.
7173

7274
#### Errors in Log
73-
If the entire history of BusyBox or Linux is considered, large numbers of non-extractable commits are to be expected.
74-
Therefore, errors that appear in the log do not indicate a problem with the setup, but only indicate that a commit could not be processed.
75+
If the entire history of BusyBox or Linux is considered, non-extractable commits are to be expected.
76+
Therefore, errors that appear in the log do not necessarily indicate a problem with the setup, but only indicate that a commit could not be processed.
7577

7678
#### Examples:
7779
```
@@ -93,29 +95,29 @@ start-extraction.bat linux v4.3 v4.4
9395
```
9496

9597
### Stopping the Ground Truth Extraction
96-
You can stop the Docker container in which the ground truth extraction is running at any time. In this case, all
97-
collected data will be copied to _Extraction/extraction-results/_ as if the extraction finished successfully.
98+
You can stop the Docker container in which the ground truth extraction is running at any time. In this case, all
99+
collected data will be copied to _Extraction/extraction-results/_ as if the extraction finished successfully.
98100

99-
- Windows CMD:
101+
- Windows CMD:
100102
- `stop-extraction.bat busybox`
101103
- `stop-extraction.bat linux`
102-
- Linux terminal:
104+
- Linux terminal:
103105
- `./stop-extraction.sh busybox`
104106
- `./stop-extraction.sh linux`
105107

106108
### Custom Configuration
107-
You can find the properties files used by Docker under Extraction/docker-resources. By changing the properties
108-
for BusyBox or Linux respectively, you can adjust the ground truth extraction (e.g., change the log level,
109+
You can find the properties files used by Docker under Extraction/docker-resources. By changing the properties
110+
for BusyBox or Linux respectively, you can adjust the ground truth extraction (e.g., change the log level,
109111
number of threads, etc.). For your convenience, we set all properties to default values. __Note that you have to rebuild the Docker image in order for the changes to take effect__.
110112

111113
This can also be used in case you want to extract the ground truth for any other SPL besides Linux and BusyBox. However,
112114
please note that this requires the correct configuration of KernelHaven and possibly other preprocessing steps, that
113115
are not included in this project. In addition, the extractors that are used internally, i.e., KbuildMiner and KconfigReader
114-
might not be applicable to the chosen SPL. In this case, custom extractors have to be implemented and added to the dependencies
116+
might not be applicable to the chosen SPL. In this case, custom extractors have to be implemented and added to the dependencies
115117
in the _pom.xml_ file.
116118

117119
### Clean-Up
118-
You clean up all created images, container, and volumes via `docker system prune -a`. __DISCLAIMER: This will remove ALL docker objects, even the ones not related to ground truth extraction__. If you have other images, containers, or volumes that you do not want to loose, you can run the docker commands that refer to the objects related to the ground truth extraction.
120+
You can clean up all created images, container, and volumes via `docker system prune -a`. __DISCLAIMER: This will remove ALL docker objects, even the ones not related to ground truth extraction__. If you have other images, containers, or volumes that you do not want to loose, you can run the docker commands that refer to the objects related to the ground truth extraction.
119121
- Image: `docker rmi extraction`
120122
- Container:
121123
- `docker container rm extraction-busybox`
@@ -126,7 +128,7 @@ You clean up all created images, container, and volumes via `docker system prune
126128

127129
## Custom System Setup
128130
If you want to run the ground truth extraction without Docker, you will have to first set up the environment in which
129-
the extraction is executed.
131+
the extraction is executed.
130132

131133
### Limitations
132134
There are some limitations to the ground truth extraction that should be mentioned.
@@ -159,7 +161,7 @@ It is possible to use WSL to run the extraction on a Windows machine.
159161

160162
#### Installing WSL2 with Ubuntu 20 LTS
161163
- Follow the guide at https://docs.microsoft.com/en-us/windows/wsl/install-win10
162-
- Using WSL2 is strongly recommended, because the extraction under WSL1 will take a lifetime. You can check which WSL you
164+
- Using WSL2 is strongly recommended, because the extraction under WSL1 will take a lifetime. You can check which WSL you
163165
have installed by following the instructions here https://askubuntu.com/questions/1177729/wsl-am-i-running-version-1-or-version-2
164166
- You can list the installed distributions with `wsl --list --verbose`
165167
- Install Ubuntu 20 LTS via the Microsoft store
@@ -265,7 +267,7 @@ git clone https://github.com/torvalds/linux.git
265267

266268
Clone the Extraction repository:
267269
```
268-
git clone [email protected]:mse/VariantSync/Extraction.git
270+
git clone https://github.com/VariantSync/VEVOS_Extraction.git
269271
```
270272

271273
Navigate into the repo:

docker-resources/extract.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ then
1313
echo "Executing variability extraction of BusyBox."
1414
if [ $# == 1 ]
1515
then
16-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_BusyBox.properties
16+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_busybox.properties
1717
elif [ $# == 2 ]
1818
then
19-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_BusyBox.properties "$2"
19+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_busybox.properties "$2"
2020
elif [ $# == 3 ]
2121
then
22-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_BusyBox.properties "$2" "$3"
22+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_busybox.properties "$2" "$3"
2323
fi
2424
elif [ "$1" == 'linux' ]
2525
then
2626
echo "Executing variability extraction of Linux."
2727
if [ $# == 1 ]
2828
then
29-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_Linux.properties
29+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_linux.properties
3030
elif [ $# == 2 ]
3131
then
32-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_Linux.properties "$2"
32+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_linux.properties "$2"
3333
elif [ $# == 3 ]
3434
then
35-
java -jar VariabilityExtraction-1.0.0-jar-with-dependencies.jar variability_analysis_Linux.properties "$2" "$3"
35+
java -jar Extraction-1.0.0-jar-with-dependencies.jar extraction_linux.properties "$2" "$3"
3636
fi
3737
else
3838
echo "Select a SPL to extract from [ linux | busybox ]"

docker-resources/extraction_busybox.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ analysis.number_of_tasks = 5
4444
#######################################
4545

4646
# Do not change this
47-
analysis.class = de.variantsync.subjects.extraction.kh.VariabilityAnalysis
47+
analysis.class = de.variantsync.vevos.extraction.kh.VariabilityAnalysis
4848
preparation.class.0 = net.ssehub.kernel_haven.busyboot.PrepareBusybox
4949
analysis.output.type = csv
5050

docker-resources/extraction_linux.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ analysis.number_of_tasks = 3
4444
#######################################
4545

4646
# Do not change this
47-
analysis.class = de.variantsync.subjects.extraction.kh.VariabilityAnalysis
47+
analysis.class = de.variantsync.vevos.extraction.kh.VariabilityAnalysis
4848
analysis.output.type = csv
4949
analysis.code_block.consider_missing_bm_infos = false
5050

docs/extraction.png

239 KB
Loading

0 commit comments

Comments
 (0)