License | GNU LGPLv3 |
---|---|
Maintainer | paul.bittner@uni-ulm.de |
Safe Haskell | None |
This module provides Example
s to reproduce each edit pattern we inspected in the evaluation
of feature trace recording (Section 5 in our paper).
As each pattern describes a possible type of edit and not an edit itself, each example shows
one possible instance for a pattern (not the pattern itself as this is not possible).
For some patterns, we thus have to show multiple examples as described in the paper.
Most notably, distinguishing between the case when no feature traces are present (in general case)
and the case when an optional outer scope of the edit code fragment is already mapped to the target feature mapping.
Synopsis
- feature_m :: Feature
- feature_FOO :: Feature
- rootName :: String
- buildPCName :: String -> FeatureFormula -> String
- featurecolours :: MonadColorPrinter m => FeatureFormulaColourPalette m
- emptyfile :: State UUID SSJavaAST
- code_then :: State UUID SSJavaAST
- code_else :: State UUID SSJavaAST
- somefunction :: State UUID SSJavaAST
- createPatternExample :: MonadColorPrinter m => String -> SSJavaAST -> History SimpleJavaGrammar String -> Example m SimpleJavaGrammar String
- createPatternExampleWithStartTrace :: MonadColorPrinter m => FeatureTrace SimpleJavaGrammar String -> String -> SSJavaAST -> History SimpleJavaGrammar String -> Example m SimpleJavaGrammar String
- addIfdef :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefElse_IfBranch :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefElse_IfBranchWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefElse_ElseBranch :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefElse_ElseBranchWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefWrapElse :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addIfdefWrapThen :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addNormalCode_nonvariational :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- addNormalCode_outerpc :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- remNormalCode_null :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- remNormalCode_notnull :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
- remIfdef :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String)
Documentation
A dummy feature that is edited in each example.
We name it m
(mapping) here according to the variable used in the paper.
feature_FOO :: Feature Source #
Another dummy feature that can be edited.
buildPCName :: String -> FeatureFormula -> String Source #
Describe the feature mapping of a node with the given name as text.
featurecolours :: MonadColorPrinter m => FeatureFormulaColourPalette m Source #
Colours for features and feature formulas used in the pattern examples.
code_then :: State UUID SSJavaAST Source #
AST
representing the source code in the then branch of a preprocessor annotation.
code_else :: State UUID SSJavaAST Source #
AST
representing the source code in the else branch of a preprocessor annotation.
createPatternExample :: MonadColorPrinter m => String -> SSJavaAST -> History SimpleJavaGrammar String -> Example m SimpleJavaGrammar String Source #
Create an Example
for a specific pattern.
Calls createPatternExampleWithStartTrace
and defaults its first argument to an empty feature trace that assigns null to every node (emptyTrace
).
createPatternExampleWithStartTrace :: MonadColorPrinter m => FeatureTrace SimpleJavaGrammar String -> String -> SSJavaAST -> History SimpleJavaGrammar String -> Example m SimpleJavaGrammar String Source #
addIfdef :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdef pattern in general case.
addIfdefWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdef pattern when an outer optional scope is already mapped to the target feature mapping.
addIfdefElse_IfBranch :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
addIfdefElse_IfBranchWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdefElse pattern when an outer optional scope is already mapped to the target feature mapping.
As AddIfdefElse has to be reproduced using two variants, we need two different examples here, one for the then-branch and one for the else-branch.
This is the Example
of the then branch.
addIfdefElse_ElseBranch :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
addIfdefElse_ElseBranchWithPC :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdefElse pattern when an outer optional scope is already mapped to the target feature mapping.
As AddIfdefElse has to be reproduced using two variants, we need two different examples here, one for the then-branch and one for the else-branch.
This is the Example
of the else branch.
addIfdefWrapElse :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdefWrapElse pattern.
addIfdefWrapThen :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddIfdefWrapThen pattern.
addNormalCode_nonvariational :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddNormalCode pattern where non-variational code is added (code mapped to true).
addNormalCode_outerpc :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the AddNormalCode pattern when an outer optional scope is already mapped to the target feature mapping.
remNormalCode_null :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the RemNormalCode pattern when no feature traces are present initially.
remNormalCode_notnull :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the RemNormalCode pattern when feature traces are present initally.
remIfdef :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #
Example
instance of the RemIfdef pattern.
This behaves the same as remNormalCode_notnull
.