public class WhileInvariantTransformation extends WhileLoopTransformation
| Modifier and Type | Field and Description |
|---|---|
private LinkedList<BreakToBeReplaced> |
breakList |
private ProgramVariable |
brk |
private ProgramVariable |
cont |
private boolean |
continueOccurred |
private ProgramVariable |
exc |
private ProgramVariable |
excParam |
private JavaInfo |
javaInfo |
private ProgramVariable |
returnExpr |
private boolean |
returnOccurred |
private ProgramVariable |
rtrn |
private ProgramVariable |
thrownExc |
breakInnerLabel, breakOuterLabel, CHANGED, CHECK, instantiations, labelList, labelStack, methodStack, needInnerLabel, needOuterLabel, newLabels, replaceBreakWithNoLabel, replacement, result, runMode, stack, TRANSFORMATIONservices| Constructor and Description |
|---|
WhileInvariantTransformation(ProgramElement root,
ProgramElementName outerLabel,
ProgramElementName innerLabel,
ProgramVariable cont,
ProgramVariable exc,
ProgramVariable excParam,
ProgramVariable thrownException,
ProgramVariable brk,
ProgramVariable rtrn,
ProgramVariable returnExpr,
LinkedList<BreakToBeReplaced> breakList,
Services services)
creates the WhileLoopTransformation for the transformation mode
|
WhileInvariantTransformation(ProgramElement root,
SVInstantiations inst,
Services services)
creates the WhileLoopTransformation for the check mode
|
| Modifier and Type | Method and Description |
|---|---|
LinkedList<BreakToBeReplaced> |
breakList()
returns a list of breaks that lead to abrupt termination of the loop and
have to be replaced
|
boolean |
continueOccurred()
returns true iff the loop to be transformed contains a continue referring
to this loop
|
void |
performActionOnBreak(Break x) |
void |
performActionOnContinue(Continue x) |
void |
performActionOnEnhancedFor(EnhancedFor x)
Transform the body of an enhanced for loop for usage with
invariant-theorems.
|
void |
performActionOnReturn(Return x) |
void |
performActionOnWhile(While x) |
boolean |
returnOccurred()
return true iff the loop to be transformed contains a return statement
leading to abrupt termination of the loop body
|
addChild, changed, doAction, doDefaultAction, innerLabelNeeded, outerLabelNeeded, performActionOnCase, performActionOnCatch, performActionOnCopyAssignment, performActionOnDefault, performActionOnDo, performActionOnElse, performActionOnFinally, performActionOnFor, performActionOnIf, performActionOnLabeledStatement, performActionOnLocalVariableDeclaration, performActionOnMethodFrame, performActionOnSchemaVariable, performActionOnStatementBlock, performActionOnSwitch, performActionOnSynchronizedBlock, performActionOnThen, performActionOnTry, replaceJumpStatement, result, start, toString, walkperformActionOnAbstractProgramElement, performActionOnAllFields, performActionOnAllObjects, performActionOnArrayDeclaration, performActionOnArrayInitializer, performActionOnArrayLengthReference, performActionOnArrayReference, performActionOnAssert, performActionOnBinaryAnd, performActionOnBinaryAndAssignment, performActionOnBinaryNot, performActionOnBinaryOr, performActionOnBinaryOrAssignment, performActionOnBinaryXOr, performActionOnBinaryXOrAssignment, performActionOnBlockContract, performActionOnBooleanLiteral, performActionOnCatchAllStatement, performActionOnCharLiteral, performActionOnClassDeclaration, performActionOnClassInitializer, performActionOnComment, performActionOnCompilationUnit, performActionOnConditional, performActionOnConstructorDeclaration, performActionOnContextStatementBlock, performActionOnDivide, performActionOnDivideAssignment, performActionOnDLEmbeddedExpression, performActionOnDoubleLiteral, performActionOnEmptyMapLiteral, performActionOnEmptySeqLiteral, performActionOnEmptySetLiteral, performActionOnEmptyStatement, performActionOnEquals, performActionOnExactInstanceof, performActionOnExecutionContext, performActionOnExtends, performActionOnFieldDeclaration, performActionOnFieldReference, performActionOnFieldSpecification, performActionOnFloatLiteral, performActionOnForUpdates, performActionOnGreaterOrEquals, performActionOnGreaterThan, performActionOnGuard, performActionOnImplements, performActionOnImplicitFieldSpecification, performActionOnImport, performActionOnInstanceof, performActionOnInterfaceDeclaration, performActionOnIntersect, performActionOnIntLiteral, performActionOnIProgramVariable, performActionOnLessOrEquals, performActionOnLessThan, performActionOnLocationVariable, performActionOnLogicalAnd, performActionOnLogicalNot, performActionOnLogicalOr, performActionOnLongLiteral, performActionOnLoopInit, performActionOnLoopInvariant, performActionOnMetaClassReference, performActionOnMethod, performActionOnMethodBodyStatement, performActionOnMethodDeclaration, performActionOnMethodReference, performActionOnMinus, performActionOnMinusAssignment, performActionOnModifier, performActionOnModulo, performActionOnModuloAssignment, performActionOnNegative, performActionOnNew, performActionOnNewArray, performActionOnNotEquals, performActionOnNullLiteral, performActionOnPackageReference, performActionOnPackageSpecification, performActionOnParameterDeclaration, performActionOnParenthesizedExpression, performActionOnPassiveExpression, performActionOnPlus, performActionOnPlusAssignment, performActionOnPositive, performActionOnPostDecrement, performActionOnPostIncrement, performActionOnPreDecrement, performActionOnPreIncrement, performActionOnProgramConstant, performActionOnProgramElementName, performActionOnProgramMetaConstruct, performActionOnProgramMethod, performActionOnProgramVariable, performActionOnSchematicFieldReference, performActionOnSeqConcat, performActionOnSeqGet, performActionOnSeqIndexOf, performActionOnSeqLength, performActionOnSeqReverse, performActionOnSeqSingleton, performActionOnSeqSub, performActionOnSetMinus, performActionOnSetUnion, performActionOnShiftLeft, performActionOnShiftLeftAssignment, performActionOnShiftRight, performActionOnShiftRightAssignment, performActionOnSingleton, performActionOnStringLiteral, performActionOnSuperArrayDeclaration, performActionOnSuperConstructorReference, performActionOnSuperReference, performActionOnThisConstructorReference, performActionOnThisReference, performActionOnThrow, performActionOnThrows, performActionOnTimes, performActionOnTimesAssignment, performActionOnTransactionStatement, performActionOnTypeCast, performActionOnTypeReference, performActionOnUnsignedShiftRight, performActionOnUnsignedShiftRightAssignment, performActionOnVariableDeclaration, performActionOnVariableReference, performActionOnVariableSpecificationdepth, rootprivate JavaInfo javaInfo
private ProgramVariable cont
private ProgramVariable exc
private ProgramVariable rtrn
private ProgramVariable brk
private ProgramVariable thrownExc
private ProgramVariable excParam
private ProgramVariable returnExpr
private boolean continueOccurred
private boolean returnOccurred
private LinkedList<BreakToBeReplaced> breakList
public WhileInvariantTransformation(ProgramElement root, ProgramElementName outerLabel, ProgramElementName innerLabel, ProgramVariable cont, ProgramVariable exc, ProgramVariable excParam, ProgramVariable thrownException, ProgramVariable brk, ProgramVariable rtrn, ProgramVariable returnExpr, LinkedList<BreakToBeReplaced> breakList, Services services)
root - the ProgramElement where to beginouterLabel - the ProgramElementName of the outer labelinnerLabel - the ProgramElementName of the inner labelpublic WhileInvariantTransformation(ProgramElement root, SVInstantiations inst, Services services)
root - the ProgramElement where to begininst - the SVInstantiations if availablepublic boolean continueOccurred()
public boolean returnOccurred()
public LinkedList<BreakToBeReplaced> breakList()
public void performActionOnReturn(Return x)
performActionOnReturn in interface VisitorperformActionOnReturn in class JavaASTVisitorpublic void performActionOnContinue(Continue x)
performActionOnContinue in interface VisitorperformActionOnContinue in class WhileLoopTransformationpublic void performActionOnBreak(Break x)
performActionOnBreak in interface VisitorperformActionOnBreak in class WhileLoopTransformationpublic void performActionOnWhile(While x)
performActionOnWhile in interface VisitorperformActionOnWhile in class WhileLoopTransformationpublic void performActionOnEnhancedFor(EnhancedFor x)
performActionOnEnhancedFor in interface VisitorperformActionOnEnhancedFor in class WhileLoopTransformation