public class ReplaceWhileLoop extends CreatingASTVisitor
CreatingASTVisitor.DefaultAction| Modifier and Type | Field and Description | 
|---|---|
private int | 
currentMethodFrame  | 
private int | 
firstLoopPos  | 
private boolean | 
firstWhileFound  | 
protected SVInstantiations | 
instantiations
if run in check mode there are normally schemavaribles, so we need the
 instantiations of them 
 | 
private int | 
lastMethodFrameBeforeLoop  | 
private boolean | 
replaced  | 
protected ProgramElement | 
result
the result of the transformation 
 | 
private KeYJavaType | 
returnType  | 
private LoopStatement | 
theLoop  | 
private StatementBlock | 
toInsert  | 
CHANGED, stackservices| Constructor and Description | 
|---|
ReplaceWhileLoop(ProgramElement root,
                StatementBlock toInsert,
                Services services)
creates the WhileLoopTransformation for the transformation mode 
 | 
ReplaceWhileLoop(ProgramElement root,
                SVInstantiations inst,
                StatementBlock toInsert,
                Services services)
creates the WhileLoopTransformation for the check mode 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Statement | 
getTheLoop()  | 
void | 
performActionOnEnhancedFor(EnhancedFor x)  | 
void | 
performActionOnMethodFrame(MethodFrame x)  | 
void | 
performActionOnWhile(While x)  | 
ProgramElement | 
result()  | 
KeYJavaType | 
returnType()  | 
void | 
start()
starts the walker 
 | 
java.lang.String | 
toString()  | 
protected void | 
walk(ProgramElement node)
walks through the AST. 
 | 
addChild, addChildren, addToTopOfStack, changed, doDefaultAction, getPosition, performActionOnAllFields, performActionOnArrayInitializer, performActionOnArrayLengthReference, performActionOnArrayReference, performActionOnAssert, performActionOnBinaryAnd, performActionOnBinaryAndAssignment, performActionOnBinaryNot, performActionOnBinaryOr, performActionOnBinaryOrAssignment, performActionOnBinaryXOr, performActionOnBinaryXOrAssignment, performActionOnBreak, performActionOnCase, performActionOnCatch, performActionOnClassInitializer, performActionOnConditional, performActionOnContinue, performActionOnCopyAssignment, performActionOnDefault, performActionOnDivide, performActionOnDivideAssignment, performActionOnDLEmbeddedExpression, performActionOnDo, performActionOnElse, performActionOnEmptyStatement, performActionOnEquals, performActionOnExecutionContext, performActionOnFieldReference, performActionOnFinally, performActionOnFor, performActionOnForUpdates, performActionOnGreaterOrEquals, performActionOnGreaterThan, performActionOnGuard, performActionOnIf, performActionOnInstanceof, performActionOnIntersect, performActionOnLabeledStatement, performActionOnLessOrEquals, performActionOnLessThan, performActionOnLocalVariableDeclaration, performActionOnLogicalAnd, performActionOnLogicalNot, performActionOnLogicalOr, performActionOnLoopInit, performActionOnLoopInvariant, performActionOnLoopScopeBlock, performActionOnMergeContract, performActionOnMergePointStatement, performActionOnMetaClassReference, performActionOnMethodBodyStatement, performActionOnMethodReference, performActionOnMinus, performActionOnMinusAssignment, performActionOnModulo, performActionOnModuloAssignment, performActionOnNegative, performActionOnNew, performActionOnNewArray, performActionOnNotEquals, performActionOnPackageReference, performActionOnPackageSpecification, performActionOnParameterDeclaration, performActionOnParenthesizedExpression, performActionOnPassiveExpression, performActionOnPlus, performActionOnPlusAssignment, performActionOnPositive, performActionOnPostDecrement, performActionOnPostIncrement, performActionOnPreDecrement, performActionOnPreIncrement, performActionOnReturn, performActionOnSchematicFieldReference, performActionOnSeqConcat, performActionOnSeqLength, performActionOnSeqReverse, performActionOnSeqSingleton, performActionOnSeqSub, performActionOnSetMinus, performActionOnSetUnion, performActionOnShiftLeft, performActionOnShiftLeftAssignment, performActionOnShiftRight, performActionOnShiftRightAssignment, performActionOnSingleton, performActionOnStatementBlock, performActionOnSuperConstructorReference, performActionOnSuperReference, performActionOnSwitch, performActionOnSynchronizedBlock, performActionOnThen, performActionOnThisConstructorReference, performActionOnThisReference, performActionOnThrow, performActionOnTimes, performActionOnTimesAssignment, performActionOnTry, performActionOnTypeCast, performActionOnTypeReference, performActionOnUnsignedShiftRight, performActionOnUnsignedShiftRightAssignment, performActionOnVariableSpecification, preservesPositionInfodoAction, performActionOnAbstractProgramElement, performActionOnAllObjects, performActionOnArrayDeclaration, performActionOnBlockContract, performActionOnBlockContract, performActionOnBooleanLiteral, performActionOnCatchAllStatement, performActionOnCharLiteral, performActionOnClassDeclaration, performActionOnComment, performActionOnCompilationUnit, performActionOnConstructorDeclaration, performActionOnContextStatementBlock, performActionOnDoubleLiteral, performActionOnEmptyMapLiteral, performActionOnEmptySeqLiteral, performActionOnEmptySetLiteral, performActionOnExactInstanceof, performActionOnExtends, performActionOnFieldDeclaration, performActionOnFieldSpecification, performActionOnFloatLiteral, performActionOnImplements, performActionOnImplicitFieldSpecification, performActionOnImport, performActionOnInterfaceDeclaration, performActionOnIntLiteral, performActionOnIProgramVariable, performActionOnLocationVariable, performActionOnLongLiteral, performActionOnLoopContract, performActionOnLoopContract, performActionOnLoopContract, performActionOnLoopInvariant, performActionOnMergeContract, performActionOnMethod, performActionOnMethodDeclaration, performActionOnModifier, performActionOnNullLiteral, performActionOnProgramConstant, performActionOnProgramElementName, performActionOnProgramMetaConstruct, performActionOnProgramMethod, performActionOnProgramVariable, performActionOnSchemaVariable, performActionOnSeqGet, performActionOnSeqIndexOf, performActionOnStringLiteral, performActionOnSuperArrayDeclaration, performActionOnThrows, performActionOnTransactionStatement, performActionOnVariableDeclaration, performActionOnVariableReferencedepth, rootprivate boolean firstWhileFound
private boolean replaced
private StatementBlock toInsert
private LoopStatement theLoop
private int lastMethodFrameBeforeLoop
private KeYJavaType returnType
private int currentMethodFrame
private int firstLoopPos
protected SVInstantiations instantiations
protected ProgramElement result
public ReplaceWhileLoop(ProgramElement root, StatementBlock toInsert, Services services)
root - the ProgramElement where to beginpublic ReplaceWhileLoop(ProgramElement root, SVInstantiations inst, StatementBlock toInsert, Services services)
root - the ProgramElement where to begininst - the SVInstantiations if availableprotected void walk(ProgramElement node)
JavaASTWalkerwalk in class CreatingASTVisitornode - the JavaProgramElement the walker is atpublic void start()
JavaASTWalkerstart in class JavaASTWalkerpublic ProgramElement result()
public KeYJavaType returnType()
public Statement getTheLoop()
public java.lang.String toString()
toString in class CreatingASTVisitorpublic void performActionOnMethodFrame(MethodFrame x)
performActionOnMethodFrame in interface VisitorperformActionOnMethodFrame in class CreatingASTVisitorpublic void performActionOnWhile(While x)
performActionOnWhile in interface VisitorperformActionOnWhile in class CreatingASTVisitorpublic void performActionOnEnhancedFor(EnhancedFor x)
performActionOnEnhancedFor in interface VisitorperformActionOnEnhancedFor in class CreatingASTVisitor