LicenseGNU LGPLv3
Maintainerpaul.bittner@uni-ulm.de
Safe HaskellNone

StackPopAlice

Description

Module for reproducing our motivating example where Alice edits the pop method of a class Stack in Java. The example is described in detail in Section 2.1 of the paper and shown in Figure 1.

Synopsis

Documentation

feature_SafeStack :: Feature Source #

Feature SafeStack from the paper.

feature_ImmutableStack :: Feature Source #

Feature ImmutableStack from the paper.

featurecolours :: MonadColorPrinter m => FeatureFormulaColourPalette m Source #

Colours for features and feature formulas used in this example. We chose terminal colours as close the the colours used in the paper as possible.

startTree :: State UUID SSJavaAST Source #

Initial AST of the pop method (version (1)).

condTree :: State UUID SSJavaAST Source #

AST representing the condition checking for an empty stack. if (!empty()) { }

cloneDef :: State UUID SSJavaAST Source #

AST of the first line of code that was inserted in version (5) to implement feature ImmutableStack. StackT c = clone();

cloneStorage :: State UUID SSJavaAST Source #

AST of the second line of code that was inserted in version (5) to implement feature ImmutableStack. c.storage[c.head--] = null;

cloneRetStatement :: State UUID SSJavaAST Source #

AST of the third line of code that was inserted in version (5) to implement feature ImmutableStack. return c;

newReturnType :: String Source #

New return type of the pop method in version (6). StackT

example :: MonadColorPrinter m => State UUID (Example m SimpleJavaGrammar String) Source #