Skip to the content.

Feature Trace Recording

ACM Artifacts Evaluated Reusable

Language Preprint Documentation Talk Install GitHubPages License DOI

Artifact repository for the paper Feature Trace Recording, accepted at ESEC/FSE 2021. Authors are Paul Maximilian Bittner, Alexander Schultheiß, Thomas Thüm, Timo Kehrer, Jeffrey M. Young, and Lukas Linsbauer.

The artefact mainly consists of a library written in the Haskell language that implements feature trace recording. 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).

What is Feature Trace Recording?

Feature trace recording is a semi-automated method for recording feature-to-code mappings during software development. It unlocks evolution as a new source of information for feature location.

Feature Trace Recording Example

Consider a developer Alice editing the pop method of a Stack class in Java as depicted in the image above. Feature-to-code mappings are indicated by corresponding colours. By labeling her edits with the feature she edits, we derive feature mappings for edited source code. We refer to such a label as feature context. It can be left empty when developers do not know the feature they edit. 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).

From feature contexts we can compute feature mappings for the current code base but also for other variants. Assume there is a second developer, Bob, working on another variant (e.g., branch or fork) of the software. Bob’s variant might implement other features than Alice’s. Assume Bob’s variant implements the blue feature SafeStack but not the orange feature ImmutableStack. Although Alice made many edits to ImmutableStack, we can still derive feature mappings for Bob’s code. When Alice deletes code from ImmutableStack, we can infer that this code does not belong to ImmutableStack anymore. We thus introduce the new feature mapping ¬ImmutableStack for the deleted code that is still present in Bob’s variant (highlighted in purple):

Bob's Recorded Feature Traces

A detailed explanation of this example can be found in our paper and preprint.

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. You may read about it in our ICSE NIER paper or watch our talk on YouTube :blush:.

How to Run the Demo

Our library is written in Haskell and uses the Stack build system (see REQUIREMENTS.md). Instructions for installing Stack, building our library and running the demo are given in the INSTALL.md.

Documentation

A detailed documentation can be found in docs/index.html and can be browsed on the Github page.

Some interesting code locations are:

Please cite as

@inproceedings{BST+:ESECFSE21,
	author = {Paul Maximilian Bittner and Alexander Schulthei\ss{} and Thomas Th{\"{u}}m and Timo Kehrer and Jeffrey M. Young and Lukas Linsbauer},
	title = ,
	booktitle = {Proc.\ Europ.\ Software Engineering Conf./Foundations of Software Engineering (ESEC/FSE)},
	location = {Athens, Greece},
	publisher = {ACM},
	address = {New York, NY, USA},
	year = 2021,
	month = AUG,
	pages = {1007--1020},
	numpages = {14},
	isbn = {9781450385626},
	doi = {10.1145/3468264.3468531},
	url = {https://doi.org/10.1145/3468264.3468531},
	keywords = {feature traceability, disciplined annotations, clone-and-own, feature location, software product lines}
}

Limitations

So far, this library contains no implementation for parsing and diffing source code. Instead, users of this library have to provide Abstract Syntax Trees (ASTs) and edits to them as input for feature trace recording (see runFTR and runFTRWithIntermediateSteps in FeatureTraceRecording.hs). Examples for creating edits and ASTs can be found in the demos for Alice (docs, src), Bob (docs, src), and edit patterns (docs, src).

Currently, the library also does not provide (de-)serialisation of feature traces.

Contact

Don’t hesitate to open issues or pull-request, or to contact us directly (paul.bittner@uni-ulm.de). We are thankful for any questions, constructive criticism, or interest. :blush: