Walks through a java AST in depth-left-fist-order.
This walker is used to transform a loop (not only
while loops) according to the rules of the dynamic logic.
needInnerLabel Indicates if an unlabled continue has been found or if a labelled
continue with a label outside of the loop currently transformed has
been found.
there are two modes the visitor can be run. The check and transformation
mode. In the check mode it is only looked if there are unlabeled break
and continues that needs to be replaced, the transformation mode performs
the unwinding of the loop with all necessary replacements
Indicates if an unlabled continue has been found or if a labelled
continue with a label outside of the loop currently transformed has
been found. Then an inner label is needed.
if there is a loop inside the loop the breaks of these inner loops have
not to be replaced. The replaceBreakWithNoLabel counts the depth of the
loop cascades. Replacements are only performed if the value of the
variable is zero
creates the WhileLoopTransformation for the transformation mode
Parameters: root - the ProgramElement where to begin Parameters: outerLabel - the ProgramElementName of the outer label Parameters: innerLabel - the ProgramElementName of the inner label
creates the WhileLoopTransformation for the check mode
Parameters: root - the ProgramElement where to begin Parameters: inst - the SVInstantiations if available