You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Artifact repository for the paper _Feature Trace Recording_, accepted at _ESEC/FSE 2021_.
4
8
Authors are [Paul Maximilian Bittner][paul], [Alexander Schultheiß][alexander], [Thomas Thüm][thomas], [Timo Kehrer][timo], [Jeffrey M. Young][jeffrey], and [Lukas Linsbauer][lukas].
5
9
@@ -30,11 +34,13 @@ where an abstract syntax tree (AST) whose root has ID 11 is inserted below node
30
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.)
31
35
Afterwards, the code that is a result of this edit is shown (similar to Figure 1 in the paper):
32
36
33
-
void pop() {
34
-
if (!empty()) {
35
-
}
36
-
storage[head--] = null;
37
+
```java
38
+
void pop() {
39
+
if (!empty()) {
37
40
}
41
+
storage[head--] =null;
42
+
}
43
+
```
38
44
39
45
By default, the following examples are executed in this order:
40
46
@@ -50,8 +56,11 @@ By default, the following examples are executed in this order:
50
56
-[docs/Bob.png](docs/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.
51
57
-[docs/Patterns.png](docs/Patterns.png): Shows how our tool can reproduce the edit patterns described in the paper.
52
58
53
-
## Interesting Code Locations
59
+
## Documentation
60
+
61
+
A detailed documentation can be found in [docs/html/index.html](docs/html/index.html).
54
62
63
+
Some interesting code locations are:
55
64
-`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:
56
65
-`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.
57
66
-`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.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type" content="text/html; charset=UTF-8" /><metaname="viewport" content="width=device-width, initial-scale=1" /><title>ASTPrettyPrinter</title><linkhref="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><linkrel="stylesheet" type="text/css" href="quick-jump.css" /><linkrel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><scriptsrc="haddock-bundle.min.js" async="async" type="text/javascript"></script><scripttype="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {processClass: "mathjax",ignoreClass: ".*"}});</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><divid="package-header"><spanclass="caption empty"> </span><ulclass="links" id="page-menu"><li><ahref="src/ASTPrettyPrinter.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>Safe</td></tr></table><pclass="caption">ASTPrettyPrinter</p></div><divid="description"><pclass="caption">Description</p><divclass="doc"><p>Module for pretty printing of ASTs.</p></div></div><divid="synopsis"><detailsid="syn"><summary>Synopsis</summary><ulclass="details-toggle" data-details-id="syn"><liclass="src short"><spanclass="keyword">class</span> Show g => <ahref="#t:ASTPrettyPrinter">ASTPrettyPrinter</a> g <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:prettyPrint">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b</li></ul></li><liclass="src short"><ahref="#v:showCode">showCode</a> :: (Show a, <ahref="Grammar.html#t:Grammar" title="Grammar">Grammar</a> g, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => <ahref="AST.html#t:AST" title="AST">AST</a> g a -> String</li><liclass="src short"><ahref="#v:showCodeAs">showCodeAs</a> :: (Monoid b, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b</li></ul></details></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><spanclass="keyword">class</span> Show g => <aid="t:ASTPrettyPrinter" class="def">ASTPrettyPrinter</a> g <spanclass="keyword">where</span><ahref="src/ASTPrettyPrinter.html#ASTPrettyPrinter" class="link">Source</a><ahref="#t:ASTPrettyPrinter" class="selflink">#</a></p><divclass="doc"><p>An ASTPrettyPrinter can pretty print ASTs of a certain grammar.</p></div><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><aid="v:prettyPrint" class="def">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b <ahref="src/ASTPrettyPrinter.html#prettyPrint" class="link">Source</a><ahref="#v:prettyPrint" class="selflink">#</a></p><divclass="doc"><p>Pretty prints the given AST (last argument) to another type b (e.g., <code>String</code>).
1
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type" content="text/html; charset=UTF-8" /><metaname="viewport" content="width=device-width, initial-scale=1" /><title>ASTPrettyPrinter</title><linkhref="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><linkrel="stylesheet" type="text/css" href="quick-jump.css" /><linkrel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><scriptsrc="haddock-bundle.min.js" async="async" type="text/javascript"></script><scripttype="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {processClass: "mathjax",ignoreClass: ".*"}});</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><divid="package-header"><spanclass="caption empty"> </span><ulclass="links" id="page-menu"><li><ahref="src/ASTPrettyPrinter.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>License</th><td>GNU LGPLv3</td></tr><tr><th>Maintainer</th><td>paul.bittner@uni-ulm.de</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr></table><pclass="caption">ASTPrettyPrinter</p></div><divid="description"><pclass="caption">Description</p><divclass="doc"><p>Type class for pretty printing <code><ahref="AST.html#t:AST" title="AST">AST</a></code>s.</p></div></div><divid="synopsis"><detailsid="syn"><summary>Synopsis</summary><ulclass="details-toggle" data-details-id="syn"><liclass="src short"><spanclass="keyword">class</span> Show g => <ahref="#t:ASTPrettyPrinter">ASTPrettyPrinter</a> g <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:prettyPrint">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b</li></ul></li><liclass="src short"><ahref="#v:showCode">showCode</a> :: (Show a, <ahref="Grammar.html#t:Grammar" title="Grammar">Grammar</a> g, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => <ahref="AST.html#t:AST" title="AST">AST</a> g a -> String</li><liclass="src short"><ahref="#v:showCodeAs">showCodeAs</a> :: (Monoid b, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b</li></ul></details></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><spanclass="keyword">class</span> Show g => <aid="t:ASTPrettyPrinter" class="def">ASTPrettyPrinter</a> g <spanclass="keyword">where</span><ahref="src/ASTPrettyPrinter.html#ASTPrettyPrinter" class="link">Source</a><ahref="#t:ASTPrettyPrinter" class="selflink">#</a></p><divclass="doc"><p>An ASTPrettyPrinter can pretty print ASTs of a certain grammar.</p></div><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><aid="v:prettyPrint" class="def">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b <ahref="src/ASTPrettyPrinter.html#prettyPrint" class="link">Source</a><ahref="#v:prettyPrint" class="selflink">#</a></p><divclass="doc"><p>Pretty prints the given AST (last argument) to another type b (e.g., <code>String</code>).
2
2
Parameters are:
3
3
* the start indent (e.g., <code>""</code>),
4
4
* an indent generator that can generate an indent of a certain width within the context of printing a certain node (e.g., <code>(_ i -> genIndent i)</code>),
5
5
* a function to lift strings to the output type b within the context of printing a certain node,
6
6
* a function print nodes, and
7
-
* the AST to print.</p></div></div><divclass="subs instances"><h4class="instances details-toggle-control details-toggle" data-details-id="i:ASTPrettyPrinter">Instances</h4><detailsid="i:ASTPrettyPrinter" open="open"><summaryclass="hide-when-js-enabled">Instances details</summary><table><tr><tdclass="src clearfix"><spanclass="inst-left"><spanclass="instance details-toggle-control details-toggle" data-details-id="i:ic:ASTPrettyPrinter:ASTPrettyPrinter:1"></span><ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a></span><ahref="src/SimpleJava.html#line-159" class="link">Source</a><ahref="#t:ASTPrettyPrinter" class="selflink">#</a></td><tdclass="doc empty"> </td></tr><tr><tdcolspan="2"><detailsid="i:ic:ASTPrettyPrinter:ASTPrettyPrinter:1"><summaryclass="hide-when-js-enabled">Instance details</summary><p>Defined in <ahref="SimpleJava.html">SimpleJava</a></p><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><ahref="#v:prettyPrint">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> b <ahref="src/ASTPrettyPrinter.html#prettyPrint" class="link">Source</a><ahref="#v:prettyPrint" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><divclass="top"><pclass="src"><aid="v:showCode" class="def">showCode</a> :: (Show a, <ahref="Grammar.html#t:Grammar" title="Grammar">Grammar</a> g, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => <ahref="AST.html#t:AST" title="AST">AST</a> g a -> String <ahref="src/ASTPrettyPrinter.html#showCode" class="link">Source</a><ahref="#v:showCode" class="selflink">#</a></p><divclass="doc"><p>Default implementation for pretty printing an AST to a <code>String</code>.</p></div></div><divclass="top"><pclass="src"><aid="v:showCodeAs" class="def">showCodeAs</a> :: (Monoid b, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b <ahref="src/ASTPrettyPrinter.html#showCodeAs" class="link">Source</a><ahref="#v:showCodeAs" class="selflink">#</a></p><divclass="doc"><p>Alias for <code><ahref="ASTPrettyPrinter.html#v:prettyPrint" title="ASTPrettyPrinter">prettyPrint</a></code>.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.23.0</p></div></body></html>
7
+
* the AST to print.</p></div></div><divclass="subs instances"><h4class="instances details-toggle-control details-toggle" data-details-id="i:ASTPrettyPrinter">Instances</h4><detailsid="i:ASTPrettyPrinter" open="open"><summaryclass="hide-when-js-enabled">Instances details</summary><table><tr><tdclass="src clearfix"><spanclass="inst-left"><spanclass="instance details-toggle-control details-toggle" data-details-id="i:ic:ASTPrettyPrinter:ASTPrettyPrinter:1"></span><ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a></span><ahref="src/SimpleJava.html#line-165" class="link">Source</a><ahref="#t:ASTPrettyPrinter" class="selflink">#</a></td><tdclass="doc empty"> </td></tr><tr><tdcolspan="2"><detailsid="i:ic:ASTPrettyPrinter:ASTPrettyPrinter:1"><summaryclass="hide-when-js-enabled">Instance details</summary><p>Defined in <ahref="SimpleJava.html">SimpleJava</a></p><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><ahref="#v:prettyPrint">prettyPrint</a> :: Monoid b => b -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a><ahref="SimpleJava.html#t:SimpleJavaGrammar" title="SimpleJava">SimpleJavaGrammar</a> a -> b <ahref="src/ASTPrettyPrinter.html#prettyPrint" class="link">Source</a><ahref="#v:prettyPrint" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><divclass="top"><pclass="src"><aid="v:showCode" class="def">showCode</a> :: (Show a, <ahref="Grammar.html#t:Grammar" title="Grammar">Grammar</a> g, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => <ahref="AST.html#t:AST" title="AST">AST</a> g a -> String <ahref="src/ASTPrettyPrinter.html#showCode" class="link">Source</a><ahref="#v:showCode" class="selflink">#</a></p><divclass="doc"><p>Default implementation for pretty printing an AST to a <code>String</code>.</p></div></div><divclass="top"><pclass="src"><aid="v:showCodeAs" class="def">showCodeAs</a> :: (Monoid b, <ahref="ASTPrettyPrinter.html#t:ASTPrettyPrinter" title="ASTPrettyPrinter">ASTPrettyPrinter</a> g) => b -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> Int -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> String -> b) -> (<ahref="AST.html#t:Node" title="AST">Node</a> g a -> b) -> <ahref="AST.html#t:AST" title="AST">AST</a> g a -> b <ahref="src/ASTPrettyPrinter.html#showCodeAs" class="link">Source</a><ahref="#v:showCodeAs" class="selflink">#</a></p><divclass="doc"><p>Alias for <code><ahref="ASTPrettyPrinter.html#v:prettyPrint" title="ASTPrettyPrinter">prettyPrint</a></code>.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.23.0</p></div></body></html>
0 commit comments