|
1 | | -## Installing Stack |
2 | | - |
3 | | -As explained in the [REQUIREMENTS.md](REQUIREMENTS.md), the [_Stack_][stack] build system is our only installation requirement. |
4 | | -Detailed installation instruction are given on the respective [installation webpage][stackinstall]. |
5 | | - |
6 | | -- Linux: You can install stack via `sudo apt-get install haskell-stack` (or `sudo pacman -S stack` if you are using pacman). |
7 | | -Further instructions for installing stack including specific linux distributions are given [here][stackinstall]. |
8 | | -- Windows 64-bit: Go to the [stack installation page][stackinstall]. Download and run the _Windows 64-bit Installer_. |
9 | | -- MacOS: Please follow the instructions on the [installation webpage][stackinstall]. |
10 | | - |
11 | | -## Running the Demo |
12 | | - |
13 | | -After you installed stack, please open a terminal and navigate to the repository's directory (the directory containing this `INSTALL.md`). |
14 | | -```shell |
15 | | -cd <path/to/this/repository> |
16 | | -``` |
17 | | -Our demo prints coloured text to the terminal, so it might not be compatible with every terminal. |
18 | | -We tested it within the Windows Terminal, Windows Powershell, Windows Subsystem for Linux (WSL), and the default terminal on Manjaro. |
19 | | -(It might not work with Git Bash.) |
20 | | -You can then build the library and run the demo as follows: |
21 | | - |
22 | | -```shell |
23 | | -stack run |
24 | | -``` |
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 | | - |
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. |
47 | | - |
48 | | -If you see the following output after `stack run`, the build process and execution of the demo were successful. |
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. |
51 | | - |
52 | | -First, the output for Figure 1 in the paper is shown. Alice performs several edits to the `pop` method. |
53 | | - |
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. |
56 | | - |
57 | | - |
58 | | -Third, our tool reproduces the edit patterns described in the paper (Section 5). |
59 | | - |
60 | | - |
61 | | -[stack]: https://docs.haskellstack.org/en/stable/README/ |
62 | | -[stackinstall]: https://docs.haskellstack.org/en/stable/install_and_upgrade/ |
| 1 | +## Installing Stack |
| 2 | + |
| 3 | +As explained in the [REQUIREMENTS.md](REQUIREMENTS.md), the [_Stack_][stack] build system is our only installation requirement. |
| 4 | +Detailed installation instruction are given on the respective [installation webpage][stackinstall]. |
| 5 | + |
| 6 | +- Linux: You can install stack via `sudo apt-get install haskell-stack` (or `sudo pacman -S stack` if you are using pacman). |
| 7 | +Further instructions for installing stack including specific linux distributions are given [here][stackinstall]. |
| 8 | +- Windows 64-bit: Go to the [stack installation page][stackinstall]. Download and run the _Windows 64-bit Installer_. |
| 9 | +- MacOS: Please follow the instructions on the [installation webpage][stackinstall]. |
| 10 | + |
| 11 | +## Running the Demo |
| 12 | + |
| 13 | +After you installed stack, please open a terminal and navigate to the repository's directory (the directory containing this `INSTALL.md`). |
| 14 | +```shell |
| 15 | +cd <path/to/this/repository> |
| 16 | +``` |
| 17 | +Our demo prints coloured text to the terminal, so it might not be compatible with every terminal. |
| 18 | +We tested it within the Windows Terminal, Windows Powershell, Windows Subsystem for Linux (WSL), and the default terminal on Manjaro. |
| 19 | +(It might not work with Git Bash.) |
| 20 | +You can then build the library and run the demo as follows: |
| 21 | + |
| 22 | +```shell |
| 23 | +stack run |
| 24 | +``` |
| 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 | + |
| 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. |
| 47 | + |
| 48 | +If you see the following output after `stack run`, the build process and execution of the demo were successful. |
| 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. |
| 51 | + |
| 52 | +First, the output for Figure 1 in the paper is shown. Alice performs several edits to the `pop` method. |
| 53 | + |
| 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. |
| 56 | + |
| 57 | + |
| 58 | +Third, our tool reproduces the edit patterns described in the paper (Section 5). |
| 59 | + |
| 60 | + |
| 61 | +[stack]: https://docs.haskellstack.org/en/stable/README/ |
| 62 | +[stackinstall]: https://docs.haskellstack.org/en/stable/install_and_upgrade/ |
0 commit comments