Skip to content

Commit d566abb

Browse files
committed
readme refinements
1 parent 61226bc commit d566abb

3 files changed

Lines changed: 30 additions & 50 deletions

File tree

INSTALL.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,39 @@ You can then build the library and run the demo as follows:
2323
stack run
2424
```
2525

26-
## Expected Output
26+
## What Is There to See
27+
Our demo runs several independent examples.
28+
Each example is separated by a red headline and consists of a series of edits applied to a source code fragment.
29+
For each edit, we first show its type and the feature context under which that edit was made:
2730

28-
The demo will run three examples as described in the [README](README.md):
31+
==== Run ins_tree(11, 4, 0) under context = "SafeStack" giving us ====
2932

30-
1. Alice's part of the motivating example shown in Figure 1 in the paper.
31-
2. Bob's part of the motivating example shown in Figure 3 in the paper.
32-
3. Examples of Edit Patterns from the Evaluation (Section 5).
33+
where an abstract syntax tree (AST) whose root has ID 11 is inserted below node 4 in the current AST at index 0 under feature context "SafeStack".
34+
(The first edit will always be `identity` under context `null`. This is a technical detail necessary to show the initial state of the example.)
35+
Afterwards, the code that is a result of this edit is shown, similar to Figure 1 in the paper:
36+
37+
![Alice](meta/pop_v2.png)
38+
39+
## Expected Output / If You Cannot Get it Running
40+
41+
By default, the following examples are executed in this order:
42+
43+
1. Motivating example
44+
- Alice's part of the motivating example shown in Figure 1 in the paper.
45+
- Bob's part of the motivating example shown in Figure 3 in the paper. As the synchronisation of code and feature traces across clones is subject to future work, this example simulates how we envision the synchronisation.
46+
2. Examples of edit patterns from the evaluation (Section 5): For each pattern we show how to reproduce it in the general case and when an outer scope (eg., a method) is already assigned the target mapping. We omitted AddIfdef* as it is just a repitition of AddIfdef with arbitrary contexts and code fragments. As AddIfdefElse has to be reproduced using two variants, we need two different examples here, one for the if-branch and one for the else-branch.
3347

3448
If you see the following output after `stack run`, the build process and execution of the demo were successful.
35-
The colours in your terminal might deviate from the following screenshots:
49+
The colours in your terminal might deviate from the following screenshots.
50+
The following screenshots also display the entire default output of the demo in case you were not able to install the stack or get the demo running.
3651

52+
First, the output for Figure 1 in the paper is shown. Alice performs several edits to the `pop` method.
3753
![Alice](meta/Alice.png)
54+
55+
Second, the propagation of Alice's changes to Bob's variant is shown. As the synchronisation of code and feature traces across clones is subject to future work, this example simulates how we envision the synchronisation.
3856
![Bob](meta/Bob.png)
57+
58+
Third, our tool reproduces the edit patterns described in the paper (Section 5).
3959
![Patterns](meta/Patterns.png)
4060

4161
[stack]: https://docs.haskellstack.org/en/stable/README/

README.md

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,11 @@ Authors are [Paul Maximilian Bittner][paul], [Alexander Schultheiß][alexander],
1010
The artefact mainly consists of a library written in the Haskell language that implements feature trace recording.
1111
The library is accompanied with a demo application that uses the library to reproduce our motivating example (Alice and Bob using feature trace recording in Section 2 in our paper) as well as examples of the edit patterns we used to evaluate feature trace recording (Section 5).
1212

13-
## How to Run the Project
13+
14+
## How to Run the Demo
1415
Our library is written in Haskell and uses the _Stack_ build system.
15-
Instructions for installing stack can be found [here](https://docs.haskellstack.org/en/stable/README/).
16-
On linux, `sudo apt-get install haskell-stack` (or `sudo pacman -S stack` if you are using pacman) should do the job.
17-
After you installed stack, please open a terminal and navigate to the repository's directory (the directory containing this `README.md`).
18-
Our demo prints coloured text to the terminal, so it might not be compatible with every terminal.
19-
We tested it within the Windows Terminal, Windows Powershell, Windows Subsystem for Linux (WSL) and the default terminal on Manjaro.
20-
(It might not work with Git Bash.)
21-
You can then run the demo as follows:
22-
23-
cd <path/to/this/repository>
24-
stack run
25-
26-
## What Is There to See
27-
Our demo runs several independent examples.
28-
Each example is separated by a red headline and consists of a series of edits applied to a source code fragment.
29-
For each edit, we first show its type and the feature context under which that edit was made:
30-
31-
==== Run ins_tree(11, 4, 0) under context = "SafeStack" giving us ====
32-
33-
where an abstract syntax tree (AST) whose root has ID 11 is inserted below node 4 in the current AST at index 0 under feature context "SafeStack".
34-
(The first edit will always be `identity` under context `null`. This is a technical detail necessary to show the initial state of the example.)
35-
Afterwards, the code that is a result of this edit is shown (similar to Figure 1 in the paper):
36-
37-
```java
38-
void pop() {
39-
if (!empty()) {
40-
}
41-
storage[head--] = null;
42-
}
43-
```
44-
45-
By default, the following examples are executed in this order:
46-
47-
1. Motivating Example
48-
- Alice's part of the motivating example shown in Figure 1 in the paper.
49-
- Bob's part of the motivating example shown in Figure 3 in the paper. As the synchronisation of code and feature traces across clones is subject to future work, this example simulates how we envision the synchronisation.
50-
2. Examples of Edit Patterns from the Evaluation (Section 5): For each pattern we show how to reproduce it in the general case and when an outer scope (eg., a method) is already assigned the target mapping. We omitted AddIfdef* as it is just a repitition of AddIfdef with arbitrary contexts and code fragments. As AddIfdefElse has to be reproduced using two variants, we need two different examples here, one for the if-branch and one for the else-branch.
51-
52-
## If You Cannot Get it Running ...
53-
..., you can find screenshots of the demo's output in the `meta` folder:
54-
55-
- [meta/Alice.png](meta/Alice.png): Shows the output for Figure 1 in the paper. Alice performs several edits to the `pop` method.
56-
- [meta/Bob.png](meta/Bob.png): Shows how synchronising Alice's changes to Bob's variant would look like. As the synchronisation of code and feature traces across clones is subject to future work, this example simulates how we envision the synchronisation.
57-
- [meta/Patterns.png](meta/Patterns.png): Shows how our tool can reproduce the edit patterns described in the paper.
16+
Instructions for installing Stack, building our library and running the demo are given in the [INSTALL.md](INSTALL.md).
17+
5818

5919
## Documentation
6020

meta/pop_v2.png

1.83 KB
Loading

0 commit comments

Comments
 (0)