Skip to content

Commit 8982011

Browse files
authored
Merge pull request #2 from pmbittner/cameraready
Camera-Ready Artefact Submission
2 parents 0e877df + 5a8cac8 commit 8982011

File tree

3 files changed

+83
-11
lines changed

3 files changed

+83
-11
lines changed

README.md

Lines changed: 83 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Feature Trace Recording
22

3+
[<img align="right" src="https://www.acm.org/binaries/content/gallery/acm/publications/artifact-review-v1_1-badges/artifacts_evaluated_reusable_v1_1.png" alt="ACM Artifacts Evaluated Reusable" width="114" height="113" />][paper]
4+
35
[![Language](https://img.shields.io/badge/Language-Haskell-purple)](https://www.haskell.org/)
6+
[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)][preprint]
47
[![Documentation](https://img.shields.io/badge/Documentation-Read-purple)][documentation]
58
[![Build Status](https://travis-ci.com/pmbittner/FeatureTraceRecording.svg?branch=esecfse21)](https://travis-ci.com/pmbittner/FeatureTraceRecording)
6-
[![License](https://img.shields.io/badge/License-GNU%20LGPLv3-blue)](LICENSE.LGPL3)
79
[![Install](https://img.shields.io/badge/Install-Instructions-blue)](INSTALL.md)
8-
[![DOI](https://zenodo.org/badge/286511539.svg)](https://zenodo.org/badge/latestdoi/286511539)
9-
[![Status](https://img.shields.io/badge/ESEC%2FFSE'21-Badge%20Application-blue)](STATUS.md)
10+
[![GitHubPages](https://img.shields.io/badge/GitHub%20Pages-online-blue.svg?style=flat)][website]
11+
[![License](https://img.shields.io/badge/License-GNU%20LGPLv3-blue)](LICENSE.LGPL3)
12+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4900682.svg)](https://doi.org/10.5281/zenodo.4900682)
13+
<!-- [![Status](https://img.shields.io/badge/ESEC%2FFSE'21-Badge%20Application-blue)](STATUS.md) -->
1014

1115
Artifact repository for the paper _Feature Trace Recording_, accepted at _ESEC/FSE 2021_.
1216
Authors are [Paul Maximilian Bittner][paul], [Alexander Schultheiß][alexander], [Thomas Thüm][thomas], [Timo Kehrer][timo], [Jeffrey M. Young][jeffrey], and [Lukas Linsbauer][lukas].
@@ -15,21 +19,54 @@ The artefact mainly consists of a library written in the Haskell language that i
1519
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).
1620

1721

22+
## What is Feature Trace Recording?
23+
24+
Feature trace recording is a semi-automated method for recording feature-to-code mappings during software development.
25+
It unlocks evolution as a new source of information for feature location.
26+
27+
<img src="meta/FeatureTraceRecording.png" alt="Feature Trace Recording Example" image-rendering="pixelated" />
28+
<!-- ![Feature Trace Recording Example](meta/FeatureTraceRecording.png) -->
29+
30+
Consider a developer Alice editing the `pop` method of a `Stack` class in Java as depicted in the image above.
31+
Feature-to-code mappings are indicated by corresponding colours.
32+
By labeling her edits with the feature she edits, we derive feature mappings for edited source code.
33+
We refer to such a label as [_feature context_](https://pmbittner.github.io/FeatureTraceRecording/docs/FeatureTraceRecording.html#t:FeatureContext).
34+
It can be left empty when developers do not know the feature they edit.
35+
In our example, Alice does not know the feature of the moved line in her second edit and omits the feature context (i.e., sets it to null).
36+
37+
From feature contexts we can compute feature mappings for the current code base but also for other variants.
38+
Assume there is a second developer, Bob, working on another variant (e.g., branch or fork) of the software.
39+
Bob’s variant might implement other features than Alice’s.
40+
Assume Bob’s variant implements the blue feature <span style="color:#00BEEB">SafeStack</span> but not the orange feature <span style="color:#D95F02">ImmutableStack</span>.
41+
Although Alice made many edits to <span style="color:#D95F02">ImmutableStack</span>, we can still derive feature mappings for Bob’s code.
42+
When Alice deletes code from <span style="color:#D95F02">ImmutableStack</span>, we can infer that this code does not belong to <span style="color:#D95F02">ImmutableStack</span> anymore.
43+
We thus introduce the new feature mapping <span style="color:#7570B3">¬ImmutableStack</span> for the deleted code that is still present in Bob’s variant (highlighted in purple):
44+
45+
<img src="meta/BobsVariant.png" alt="Bob's Recorded Feature Traces" image-rendering="pixelated" width="250" />
46+
47+
A detailed explanation of this example can be found in our [paper][paper] and [preprint][preprint].
48+
49+
Feature trace recording is the first step towards our vision for bridging the gap between clone-and-own and software product lines in our project [VariantSync][variantsync].
50+
You may read about it in our [ICSE NIER paper](https://tinyurl.com/variantsync) or watch our talk on [YouTube](https://www.youtube.com/watch?v=oJf8W4cE25A) :blush:.
51+
52+
1853
## How to Run the Demo
1954
Our library is written in Haskell and uses the _Stack_ build system (see [REQUIREMENTS.md](REQUIREMENTS.md)).
2055
Instructions for installing Stack, building our library and running the demo are given in the [INSTALL.md](INSTALL.md).
2156

2257

23-
## Documentation
58+
## [Documentation][documentation]
2459

2560
A detailed documentation can be found in `docs/index.html` and can be browsed on the [Github page][documentation].
2661

2762
Some interesting code locations are:
28-
- `showExamples` function in [`app/Main.hs`](app/Main.hs): Here you can choose which examples to run and in which format the source code should be displayed. Choose from:
29-
- `userFormat` (default): The perspective of the developer who is editing source code while traces are recorded in the background. This is the format used in the figures in the paper. The tool will show the presence conditions of the snapshots.
30-
- `userFormatDetailed`: A variation of `userFormat` where traces and presence conditions can be investigated seperately at the same time. Code is coloured in the colour of its feature trace while presence conditions are indicated by coloured lines on the left.
31-
- `astFormat`: Shows the abstract syntax tree of the source code with feature traces as formulas.
32-
- `tikzFormat`: Tikz export of abstract syntax trees with traces. Used for figures in the paper.
63+
- [`main`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:main) function in [`app/Main.hs`](app/Main.hs): Here you can choose in which format source code should be displayed in the terminal. Choose from:
64+
- [`userFormat`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:userFormat) (default): The perspective of the developer who is editing source code while traces are recorded in the background. This is the format used in the figures in the paper. The tool will show the presence conditions of the snapshots.
65+
- [`userFormatDetailed`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:userFormatDetailed): A variation of `userFormat` where traces and presence conditions can be investigated seperately at the same time. Code is coloured in the colour of its feature trace while presence conditions are indicated by coloured lines on the left.
66+
- [`astFormat`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:astFormat): Shows the abstract syntax tree of the source code with feature traces as formulas.
67+
- [`tikzFormat`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:tikzFormat): Tikz export of abstract syntax trees with traces. Used for figures in the paper.
68+
69+
- [`showExamples`](https://pmbittner.github.io/FeatureTraceRecording/docs/Main.html#v:showExamples) function in [`app/Main.hs`](app/Main.hs): Here you can choose which examples to run.
3370

3471
- [`src/feature/recording/FeatureTraceRecording.hs`](src/feature/recording/FeatureTraceRecording.hs): This file includes type definitions and interfaces for feature trace recording to make it configurable (e.g., plug in custom recording functions).
3572

@@ -44,7 +81,38 @@ Some interesting code locations are:
4481
- [`src/propositions/NullPropositions.hs`](src/propositions/NullPropositions.hs): Operators for the ternary logic with `null`.
4582
We provide truthtables for the logic in [meta/Truthtable.md](meta/Truthtable.md).
4683
The implementation is based on our implementation for propositional logic in [`src/propositions/Propositions.hs`](src/propositions/Propositions.hs).
47-
You can inspect the truth tables for the ternary logic by uncommenting the respective line (`showTruthtables`) in the `main` function in [`app/Main.hs`](app/Main.hs) and running the project again.
84+
You can inspect the truth tables for the ternary logic by uncommenting the respective line (`showTruthtables`) in the `main` function in [`app/Main.hs`](app/Main.hs) and running the demo again.
85+
86+
87+
## Please cite as
88+
```tex
89+
@inproceedings{BST+:ESECFSE21,
90+
author = {Paul Maximilian Bittner and Alexander Schulthei\ss{} and Thomas Th{\"{u}}m and Timo Kehrer and Jeffrey M. Young and Lukas Linsbauer},
91+
title = {{Feature Trace Recording}},
92+
booktitle = {Proc.\ Europ.\ Software Engineering Conf./Foundations of Software Engineering (ESEC/FSE)},
93+
location = {Athens, Greece},
94+
publisher = {ACM},
95+
address = {New York, NY, USA},
96+
year = 2021,
97+
month = AUG,
98+
doi = {10.1145/3468264.3468531},
99+
keywords = {feature traceability, feature location, disciplined annotations, clone-and-own, software product lines}
100+
}
101+
```
102+
103+
104+
## Limitations
105+
106+
So far, this library contains no implementation for parsing and diffing source code.
107+
Instead, users of this library have to provide [Abstract Syntax Trees (ASTs)](https://pmbittner.github.io/FeatureTraceRecording/docs/AST.html) and [edits to them](https://pmbittner.github.io/FeatureTraceRecording/docs/Edits.html) as input for feature trace recording (see `runFTR` and `runFTRWithIntermediateSteps` in [FeatureTraceRecording.hs](https://pmbittner.github.io/FeatureTraceRecording/FeatureTraceRecording.html)).
108+
Examples for creating edits and ASTs can be found in the demos for Alice ([docs](https://pmbittner.github.io/FeatureTraceRecording/docs/StackPopAlice.html), [src](app/examples/StackPopAlice.hs)), Bob ([docs](https://pmbittner.github.io/FeatureTraceRecording/docs/StackPopBob.html), [src](app/examples/StackPopBob.hs)), and edit patterns ([docs](https://pmbittner.github.io/FeatureTraceRecording/docs/EditPatterns.html), [src](app/examples/EditPatterns.hs)).
109+
110+
Currently, the library also does not provide (de-)serialisation of feature traces.
111+
112+
113+
## Contact
114+
115+
Don't hesitate to open issues or pull-request, or to contact us directly ([email protected]). We are thankful for any questions, constructive criticism, or interest. :blush:
48116

49117

50118
[paul]: https://www.uni-ulm.de/in/sp/team/paul-maximilian-bittner/
@@ -54,4 +122,8 @@ You can inspect the truth tables for the ternary logic by uncommenting the respe
54122
[jeffrey]: https://www.uni-ulm.de/in/sp/team/former-employees-and-doctorands/jeffrey-young/
55123
[lukas]: https://www.tu-braunschweig.de/isf/team/lukas-linsbauer
56124

57-
[documentation]: https://pmbittner.github.io/FeatureTraceRecording/
125+
[website]: https://pmbittner.github.io/FeatureTraceRecording/
126+
[documentation]: https://pmbittner.github.io/FeatureTraceRecording/docs
127+
[preprint]: https://github.com/SoftVarE-Group/Papers/raw/master/2021/2021-ESECFSE-Bittner.pdf
128+
[paper]: https://doi.org/10.1145/3468264.3468531
129+
[variantsync]: https://www.uni-ulm.de/en/in/sp/research/projects/variantsync/

meta/BobsVariant.png

29.3 KB
Loading

meta/FeatureTraceRecording.png

97.6 KB
Loading

0 commit comments

Comments
 (0)