Skip to content

Commit 6b05b21

Browse files
committed
docs: refined install instructions
1 parent 9e7e2ae commit 6b05b21

2 files changed

Lines changed: 64 additions & 32 deletions

File tree

INSTALL.md

Lines changed: 58 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Installation
22
## Installation Instructions
3-
In the following, we describe how to build the Docker image and run the experiments in Docker containers.
3+
In the following, we describe how to replicate the validation from our paper (Section 5) step-by-step.
4+
The instructions explain how to build the Docker image and run the validation in a Docker container.
45

5-
### Install Docker (if required)
6+
### 1. Install Docker (if required)
67
How to install Docker depends on your operating system.
78

8-
#### Windows or Mac
9-
You can find download and installation instructions [here](https://www.docker.com/get-started).
10-
11-
#### Linux Distributions
12-
How to install Docker on your system, depends on your distribution. However, the chances are high that Docker is part of your distributions package database.
9+
- Windows or Mac: You can find download and installation instructions [here](https://www.docker.com/get-started).
10+
- Linux Distributions: How to install Docker on your system, depends on your distribution. However, the chances are high that Docker is part of your distributions package database.
1311
Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions.
1412

15-
### Open a Suitable Terminal
13+
Then, start the docker deamon.
14+
15+
### 2. Open a Suitable Terminal
1616
```
1717
# Windows Command Prompt:
1818
- Press 'Windows Key + R' on your keyboard
@@ -27,31 +27,53 @@ Docker's [documentation](https://docs.docker.com/engine/install/) contains instr
2727
- Press 'ctrl + alt + T' on your keyboard
2828
```
2929

30-
### Build the Docker Container
31-
To build the Docker container you can run the build script corresponding to your OS
30+
Clone this repository to a directory of your choice using git:
31+
```shell
32+
git clone https://github.com/VariantSync/DiffDetective.git
33+
```
34+
Then, navigate to the root of your local clone of this repository.
35+
```shell
36+
cd DiffDetective
37+
```
38+
39+
### 3. Build the Docker Container
40+
To build the Docker container you can run the `build` script corresponding to your operating system:
3241
```
3342
# Windows:
3443
.\build.bat
3544
# Linux/Mac (bash):
3645
./build.sh
3746
```
3847

39-
## Verification & Expected Output
48+
## 4. Verification & Replication
49+
50+
### Running the Replication or Verification
51+
To execute the replication you can run the `execute` script corresponding to your operating system with `replication` as first argument.
52+
53+
#### Windows:
54+
`.\execute.bat replication`
55+
#### Linux/Mac (bash):
56+
`./execute.sh replication`
57+
58+
> WARNING!
59+
> The replication will at least require an hour and might require up to a day depending on your system.
60+
> Therefore, we offer a short verification (5-10 minutes) which runs DiffDetective on only four of the datasets.
61+
> You can run it by providing "verification" as argument instead of "replication" (i.e., `.\execute.bat verification`, `./execute.sh verification`).
62+
> If you want to stop the execution, you can call the provided script for stopping the container in a separate terminal.
63+
> When restarted, the replication will continue processing by restarting at the last unfinished repository.
64+
> #### Windows:
65+
> `.\stop-execution.bat`
66+
> #### Linux/Mac (bash):
67+
> `./stop-execution.sh`
4068
41-
### Running the Verification
42-
To run the verification you can run the script corresponding to your OS with `verification` as first argument. The verification should take about 10-20 minutes depending on your hardware.
43-
```
44-
# Windows:
45-
.\execute.bat verification
46-
# Linux/Mac (bash):
47-
./execute.sh verification
48-
```
4969
The results of the verification will be stored in the [results](results) directory.
5070

5171
### Expected Output of the Verification
52-
The aggregated results of the verification can be found in the following files.
72+
The aggregated results of the verification/replication can be found in the following files.
73+
The example file content shown below should match your results when running the _verification_.
74+
(Note that the links below only have a target _after_ running the replication or verification.)
5375

54-
- The [speed statistics](results/validation/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
76+
- The [speed statistics](results/validation/current/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
5577
```
5678
#Commits: 14527
5779
Total commit process time is: 12.427866666666667min
@@ -60,7 +82,7 @@ The aggregated results of the verification can be found in the following files.
6082
Median commit process time is: 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3___xorg-server___19ms
6183
Average commit process time is: 51.330075032697735ms
6284
```
63-
- The [classification results](results/validation/ultimateresult.metadata.txt) contain information about how often each pattern was found, and more.
85+
- The [classification results](results/validation/current/ultimateresult.metadata.txt) contain information about how often each pattern was matched, and more.
6486
```
6587
repository: <NONE>
6688
total commits: 18046
@@ -95,9 +117,19 @@ The aggregated results of the verification can be found in the following files.
95117
#Error[#else or #elif without #if]: 9
96118
#Error[not all annotations closed]: 6
97119
```
98-
99-
(Note that the above links only have a target after running the verification.)
100-
The processing times might deviate.
120+
121+
Moreover, the results comprise the (LaTeX) tables that are part of our paper and appendix.
122+
The processing times might deviate because performance depends on your hardware.
123+
124+
### (Optional) Running DiffDetective on Custom Datasets
125+
You can also run DiffDetective on other datasets by providing the path to the dataset file as first argument to the execution script:
126+
127+
#### Windows:
128+
`.\execute.bat path\to\custom\dataset.md`
129+
#### Linux/Mac (bash):
130+
`./execute.sh path/to/custom/dataset.md`
131+
132+
The input file must have the same format as the other dataset files (i.e., repositories are listed in a Markdown table). You can find [dataset files](docs/datasets.md) in the [docs](docs) folder.
101133

102134
## Troubleshooting
103135

@@ -111,7 +143,7 @@ The processing times might deviate.
111143

112144
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
113145

114-
### No results after verification, or 'cannot create directory '../results/difftrees': Permission denied'
146+
### No results after verification, or 'cannot create directory '../results/validation/current': Permission denied'
115147
`Problem:` This problem can occur due to how permissions are managed inside the Docker container. More specifically, it will appear, if Docker is executed with elevated permissions (i.e., `sudo`) and if there is no [results](results) directory because it was deleted manually. In this case, Docker will create the directory with elevated permissions, and the Docker user has no permissions to access the directory.
116148

117149
`Fix:` If there is a _results_ directory delete it with elevated permission (e.g., `sudo rm -r results`).

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This replication package consists of four parts:
1616
4. **Dataset Overview**: We provide an overview of the 44 inspected datasets with updated links to their repositories in the file [docs/datasets.md][dataset].
1717

1818
## 1. DiffDetective
19-
_DiffDetective_ is a java library and command-line tool to parse and classify edits to variability in git histories of preprocessor-based software product lines by creating [variation tree diffs][difftree_class] and operating on them.
19+
DiffDetective is a java library and command-line tool to parse and classify edits to variability in git histories of preprocessor-based software product lines by creating [variation tree diffs][difftree_class] and operating on them.
2020

2121
We offer a [Docker](https://www.docker.com/) setup to easily __replicate__ the validation performed in our paper.
2222
In the following, we provide a quickstart guide for running the replication.
@@ -26,14 +26,14 @@ You can find detailed information on how to install Docker and build the contain
2626
Start the docker deamon.
2727
Clone this repository.
2828
Open a terminal and navigate to the root directory of this repository.
29-
To build the Docker container you can run the _build_ script corresponding to your OS.
29+
To build the Docker container you can run the `build` script corresponding to your operating system.
3030
#### Windows:
3131
`.\build.bat`
3232
#### Linux/Mac (bash):
3333
`./build.sh`
3434

3535
### 1.2 Start the replication
36-
To execute the replication you can run the _execute_ script corresponding to your OS with `replication` as first argument.
36+
To execute the replication you can run the `execute` script corresponding to your operating system with `replication` as first argument.
3737

3838
#### Windows:
3939
`.\execute.bat replication`
@@ -42,9 +42,9 @@ To execute the replication you can run the _execute_ script corresponding to you
4242

4343
> WARNING!
4444
> The replication will at least require an hour and might require up to a day depending on your system.
45-
> Therefore, we offer a short verification (5-10 minutes) which runs _DiffDetective_ on only four of the datasets.
45+
> Therefore, we offer a short verification (5-10 minutes) which runs DiffDetective on only four of the datasets.
4646
> You can run it by providing "verification" as argument instead of "replication" (i.e., `.\execute.bat verification`, `./execute.sh verification`).
47-
> If you want to stop the replication, you can call the provided script for stopping the container in a separate terminal.
47+
> If you want to stop the execution, you can call the provided script for stopping the container in a separate terminal.
4848
> When restarted, the replication will continue processing by restarting at the last unfinished repository.
4949
> #### Windows:
5050
> `.\stop-execution.bat`
@@ -98,7 +98,7 @@ The forked repositories are listed in the [replication datasets](docs/replicatio
9898
These repositories are used when running the replication as described under `1.2`.
9999

100100
## 5. Running DiffDetective on Custom Datasets
101-
You can also run _DiffDetective_ on other datasets by providing the path to the dataset file as first argument to the execution script:
101+
You can also run DiffDetective on other datasets by providing the path to the dataset file as first argument to the execution script:
102102

103103
#### Windows:
104104
`.\execute.bat path\to\custom\dataset.md`

0 commit comments

Comments
 (0)