public abstract class KeYJavaASTFactory
extends java.lang.Object
| Constructor and Description | 
|---|
KeYJavaASTFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
static ArrayReference | 
arrayFieldAccess(ReferencePrefix array,
                Expression index)
Create an array field access with a single index. 
 | 
static ArrayInitializer | 
arrayInitializer(Expression[] expressions,
                KeYJavaType type)
Create an array initializer. 
 | 
static FieldReference | 
arrayLength(JavaInfo model,
           ReferencePrefix array)
Create an array length access. 
 | 
static CopyAssignment | 
assign(Expression lhs,
      Expression rhs)
creates an assignment  
 lhs:=rhs  | 
static CopyAssignment | 
assign(Expression lhs,
      Expression rhs,
      PositionInfo posInfo)
creates an assignment  
 lhs:=rhs  | 
static CopyAssignment | 
assign(ExtList parameters)
Create an assignment. 
 | 
static CopyAssignment | 
assignArrayField(ProgramVariable variable,
                ReferencePrefix array,
                Expression index)
Create a statement that assigns an array element to a variable. 
 | 
static Expression | 
attribute(ReferencePrefix prefix,
         ProgramVariable field)
creates an attribute access  
prefix.field  | 
static StatementBlock | 
block(ExtList statements)
Create a block from an arbitrary number of statements. 
 | 
static StatementBlock | 
block(java.util.List<Statement> statements)
Create a block from an arbitrary number of statements. 
 | 
static StatementBlock | 
block(Statement... statements)
Create a block from an arbitrary number of statements. 
 | 
static Break | 
breakStatement(Label l)
Create a break statement. 
 | 
static Statement | 
breakStatement(Label label,
              PositionInfo positionInfo)  | 
static Case | 
caseBlock(Expression expression,
         Statement statement)
Create a case block. 
 | 
static Case | 
caseBlock(Expression expression,
         Statement[] statements)
Create a case block. 
 | 
static Case | 
caseBlock(ExtList parameters,
         Expression expression,
         PositionInfo position)
Create a case block. 
 | 
static TypeCast | 
cast(Expression expression,
    KeYJavaType targetType)  | 
static Catch | 
catchClause(ExtList parameters)
Create a catch clause. 
 | 
static Catch | 
catchClause(JavaInfo javaInfo,
           java.lang.String param,
           KeYJavaType kjt,
           StatementBlock body)
Create a catch clause. 
 | 
static Catch | 
catchClause(JavaInfo javaInfo,
           java.lang.String param,
           java.lang.String type,
           StatementBlock body)
Create a catch clause. 
 | 
static Catch | 
catchClause(ParameterDeclaration parameter,
           Statement[] statements)
Create a catch clause. 
 | 
static Catch | 
catchClause(ParameterDeclaration param,
           StatementBlock body)
create a catch clause 
 | 
static Continue | 
continueStatement(Label label)  | 
static LocalVariableDeclaration | 
declare(ExtList parameters)
Create a local variable declaration without initialization. 
 | 
static LocalVariableDeclaration | 
declare(ImmutableArray<Modifier> modifiers,
       IProgramVariable variable,
       Expression init,
       KeYJavaType type)
Create a local variable declaration with an arbitrary number of
 modifiers. 
 | 
static ProgramElement | 
declare(ImmutableArray<Modifier> modifiers,
       IProgramVariable variable,
       Expression init,
       ProgramElementName typeName,
       int dimensions,
       ReferencePrefix typePrefix,
       KeYJavaType baseType)
Create a local array variable declaration with an arbitrary number of
 modifiers. 
 | 
static LocalVariableDeclaration | 
declare(ImmutableArray<Modifier> modifiers,
       IProgramVariable variable,
       Expression init,
       TypeReference typeRef)
Create a local variable declaration with an arbitrary number of
 modifiers. 
 | 
static LocalVariableDeclaration | 
declare(ImmutableArray<Modifier> modifiers,
       TypeReference typeRef,
       VariableSpecification specification)
Create a local variable declaration. 
 | 
static LocalVariableDeclaration | 
declare(ImmutableArray<Modifier> modifiers,
       TypeReference typeRef,
       VariableSpecification[] specifications)
Create local variable declarations. 
 | 
static LocalVariableDeclaration | 
declare(IProgramVariable variable)
Create a local variable declaration without initialization. 
 | 
static LocalVariableDeclaration | 
declare(IProgramVariable variable,
       Expression init)
Create a local variable declaration. 
 | 
static LocalVariableDeclaration | 
declare(IProgramVariable var,
       Expression init,
       KeYJavaType type)
Create a local variable declaration. 
 | 
static LocalVariableDeclaration | 
declare(IProgramVariable var,
       KeYJavaType type)
Create a local variable declaration without initialization. 
 | 
static LocalVariableDeclaration | 
declare(Modifier[] modifiers,
       IProgramVariable variable,
       Expression init,
       KeYJavaType type)
Create a local variable declaration with an arbitrary number of
 modifiers. 
 | 
static LocalVariableDeclaration | 
declare(Modifier modifier,
       IProgramVariable variable,
       Expression init,
       KeYJavaType type)
Create a local variable declaration with a single modifier. 
 | 
static LocalVariableDeclaration | 
declare(ProgramElementName name,
       Expression init,
       KeYJavaType type)
create a local variable declaration  
type name = init;  | 
static LocalVariableDeclaration | 
declare(ProgramElementName name,
       KeYJavaType type)
Create a local variable declaration without initialization. 
 | 
static LocalVariableDeclaration | 
declare(ProgramElementName name,
       TypeReference typeRef)
creates a local variable declaration  
 typeRef name;  | 
static LocalVariableDeclaration | 
declare(Services services,
       java.lang.String name,
       Expression initializer,
       KeYJavaType type)
Create a local variable declaration with a unique name. 
 | 
static LocalVariableDeclaration | 
declare(java.lang.String name,
       KeYJavaType type)
create a local variable declaration 
 | 
static LocalVariableDeclaration | 
declareMethodCall(IProgramVariable variable,
                 ReferencePrefix reference,
                 java.lang.String method)
Create a local variable declaration that assigns a method's return value
 initially. 
 | 
static LocalVariableDeclaration | 
declareMethodCall(KeYJavaType type,
                 IProgramVariable variable,
                 ReferencePrefix reference,
                 java.lang.String method)
Create a local variable declaration that assigns a method's return value
 initially. 
 | 
static LocalVariableDeclaration | 
declareZero(KeYJavaType type,
           IProgramVariable variable)
Create a local variable declaration that assigns zero initially. 
 | 
static Default | 
defaultBlock(ExtList parameters)
Create a default block. 
 | 
static Default | 
defaultBlock(Statement statement)
Create a default block. 
 | 
static Default | 
defaultBlock(Statement[] statements)
Create a default block. 
 | 
static Do | 
doLoop(Expression condition,
      Statement statement,
      PositionInfo positionInfo)
Create a do loop. 
 | 
static Else | 
elseBlock(ExtList parameters)
Create an else block. 
 | 
static Else | 
elseBlock(Statement statement)
Create an else block. 
 | 
static Else | 
elseBlock(Statement[] statements)
Create an else block. 
 | 
static EmptyStatement | 
emptyStatement()
Create an empty statement. 
 | 
static EnhancedFor | 
enhancedForLoop(ExtList parameters)
Create an enhanced for loop. 
 | 
static Equals | 
equalsNullOperator(Expression expression)
Create an equality comparison with  
null. | 
static Equals | 
equalsOperator(Expression left,
              Expression right)
Create an equals operator. 
 | 
static Equals | 
equalsOperator(ExtList operands)
Create an equals operator. 
 | 
static ExecutionContext | 
executionContext(KeYJavaType classType,
                IProgramMethod method,
                ReferencePrefix reference)
Create an execution context. 
 | 
static BooleanLiteral | 
falseLiteral()
Create a literal for the truth value  
false. | 
static FieldReference | 
fieldReference(ReferencePrefix prefix,
              ProgramVariable field)
Create a field access. 
 | 
static FieldReference | 
fieldReference(Services services,
              java.lang.String name,
              Expression expression,
              ExecutionContext context)
Create a field access. 
 | 
static Finally | 
finallyBlock(ExtList parameters)
Create a finally block. 
 | 
static Finally | 
finallyBlock(Statement statement)
Create a finally block. 
 | 
static Finally | 
finallyBlock(Statement[] statements)
Create a finally block. 
 | 
static Finally | 
finallyBlock(StatementBlock body)
Create a finally block. 
 | 
static For | 
forLoop(ExtList parameters)
Create a for loop. 
 | 
static For | 
forLoop(IGuard guard,
       IForUpdates updates,
       Statement body)
Create a for loop with no initializer. 
 | 
static For | 
forLoop(IGuard guard,
       IForUpdates updates,
       Statement[] body)
Create a for loop with no initializer. 
 | 
static For | 
forLoop(ILoopInit init,
       IGuard guard,
       IForUpdates updates,
       Statement... statements)
Create a for loop from the loop definition and an arbitrary number of
 body statements. 
 | 
static IForUpdates | 
forUpdates(Expression update)
Create a list of loop updates that consists of a single expression. 
 | 
static Statement | 
ifElse(Expression guard,
      Statement thenStatement,
      Statement elseStatement)
Create an if clause. 
 | 
static If | 
ifElse(Expression guard,
      Then then,
      Else els)
Create an if statement including an else branch. 
 | 
static If | 
ifStatement(ExtList parameters)
Create an if statement. 
 | 
static If | 
ifThen(Expression guard,
      Statement... statements)
Create an if statement with no else branch. 
 | 
static If | 
ifThen(Expression guard,
      Statement then)
Create an if statement with no else branch. 
 | 
static If | 
ifThen(Expression guard,
      Then then)
Create an if statement with no else branch. 
 | 
static StatementBlock | 
insertStatementInBlock(Statement[] stmnt,
                      StatementBlock b)
inserts the given statements at the begin of the block 
 | 
static StatementBlock | 
insertStatementInBlock(StatementBlock block,
                      Statement[] statements)
Create a block where the given statements come after the given block. 
 | 
static StatementBlock | 
insertStatementInBlock(StatementBlock stmnt,
                      StatementBlock b)
inserts the given statements at the begin of the block 
 | 
static StatementBlock | 
insertStatementInBlock(Statement statement,
                      StatementBlock block)
Insert a statement in a block of statements. 
 | 
static Instanceof | 
instanceOf(Expression expression,
          KeYJavaType type)
Create an instance of operator. 
 | 
static IntLiteral | 
intLiteral(java.lang.Integer value)
Create an integer literal. 
 | 
static LabeledStatement | 
labeledStatement(ExtList parameters,
                Label label,
                PositionInfo position)
Create a labeled statement. 
 | 
static Statement | 
labeledStatement(Label label,
                Statement[] statements,
                PositionInfo pos)
Create a labeled block of statements. 
 | 
static LabeledStatement | 
labeledStatement(Label label,
                Statement statement,
                PositionInfo pos)
Create a labeled statement. 
 | 
static IGuard | 
lessThanArrayLengthGuard(JavaInfo model,
                        ProgramVariable variable,
                        ReferencePrefix array)
Create a condition that compares a variable and an array length using the
 less than operator. 
 | 
static IGuard | 
lessThanGuard(Expression left,
             Expression right)
Create a condition that compares two expressions using the less than
 operator. 
 | 
static LessThan | 
lessThanOperator(Expression left,
                Expression right)
Create a less than operator. 
 | 
static LessThan | 
lessThanZeroOperator(Expression expression)
Create a less than zero operator. 
 | 
static ProgramVariable | 
localVariable(ProgramElementName name,
             KeYJavaType kjt)
create a local variable 
 | 
static ProgramVariable | 
localVariable(Services services,
             java.lang.String name,
             KeYJavaType type)
Create a local variable with a unique name. 
 | 
static ProgramVariable | 
localVariable(java.lang.String name,
             KeYJavaType kjt)
create a local variable 
 | 
static LogicalAnd | 
logicalAndOperator(Expression left,
                  Expression right)
Create a logical and operator. 
 | 
static LogicalOr | 
logicalOrOperator(Expression left,
                 Expression right)
Create a logical or operator. 
 | 
static ILoopInit | 
loopInit(LoopInitializer init)
Create a loop initialization that consists of a single statement. 
 | 
static ILoopInit | 
loopInitZero(KeYJavaType type,
            IProgramVariable variable)
Create a loop initialization that declares and assigns zero to a local
 variable. 
 | 
static MethodBodyStatement | 
methodBody(JavaInfo model,
          ProgramVariable result,
          ReferencePrefix reference,
          KeYJavaType classType,
          java.lang.String methodName,
          ProgramVariable[] arguments)
Create a method body shortcut. 
 | 
static MethodBodyStatement | 
methodBody(ProgramVariable result,
          ReferencePrefix reference,
          IProgramMethod method,
          Expression[] arguments)
Create a method body shortcut. 
 | 
static MethodBodyStatement | 
methodBody(ProgramVariable result,
          ReferencePrefix reference,
          IProgramMethod method,
          ImmutableArray<Expression> arguments)
Create a method body shortcut. 
 | 
static MethodReference | 
methodCall(KeYJavaType type,
          java.lang.String name)
Create a method call on a type with no arguments. 
 | 
static MethodReference | 
methodCall(KeYJavaType type,
          java.lang.String name,
          Expression... args)
Create a method call on a type. 
 | 
static MethodReference | 
methodCall(KeYJavaType type,
          java.lang.String name,
          ImmutableArray<? extends Expression> args)
Create a method call on a type. 
 | 
static MethodReference | 
methodCall(ReferencePrefix reference,
          MethodName name,
          Expression... args)
Create a method call. 
 | 
static MethodReference | 
methodCall(ReferencePrefix reference,
          MethodName name,
          ImmutableArray<? extends Expression> args)
Create a method call. 
 | 
static MethodReference | 
methodCall(ReferencePrefix reference,
          java.lang.String name)
Create a method call with no arguments. 
 | 
static MethodReference | 
methodCall(ReferencePrefix reference,
          java.lang.String name,
          Expression... args)
Create a method call. 
 | 
static MethodReference | 
methodCall(ReferencePrefix reference,
          java.lang.String name,
          ImmutableArray<? extends Expression> args)
Create a method call. 
 | 
static MethodFrame | 
methodFrame(IExecutionContext executionContext,
           StatementBlock block)
Create a method call substitution. 
 | 
static MethodFrame | 
methodFrame(IExecutionContext executionContext,
           StatementBlock block,
           PositionInfo position)
Create a method call substitution at a specific source position. 
 | 
static MethodFrame | 
methodFrame(IProgramVariable result,
           IExecutionContext executionContext,
           StatementBlock block)
Create a method call substitution with a return value assignment. 
 | 
static MethodFrame | 
methodFrame(IProgramVariable result,
           IExecutionContext executionContext,
           StatementBlock block,
           PositionInfo position)
Create a method call substitution with a return value assignment at a
 specific source position. 
 | 
static NewArray | 
newArray(TypeReference typeRef,
        int dimensions,
        ArrayInitializer initializer,
        KeYJavaType keyJavaType)
Create an array instantiation. 
 | 
static NewArray | 
newArray(TypeReference typeRef,
        int dimensions,
        Expression[] sizes,
        ArrayInitializer initializer,
        KeYJavaType keyJavaType)
Create an array instantiation. 
 | 
static NewArray | 
newArray(TypeReference typeRef,
        int dimensions,
        Expression[] sizes,
        KeYJavaType keyJavaType)
Create an array instantiation. 
 | 
static NewArray | 
newArray(TypeReference typeRef,
        int dimensions,
        Expression size,
        KeYJavaType keyJavaType)
Create an array instantiation. 
 | 
static New | 
newOperator(KeYJavaType type)
Create an object allocation without arguments. 
 | 
static New | 
newOperator(ReferencePrefix referencePrefix,
           KeYJavaType type)
Create an object allocation without arguments. 
 | 
static New | 
newOperator(ReferencePrefix referencePrefix,
           KeYJavaType type,
           Expression[] args)
Create an object allocation. 
 | 
static New | 
newOperator(ReferencePrefix referencePrefix,
           TypeReference typeReference,
           Expression[] args)
Create an object allocation. 
 | 
static NotEquals | 
notEqualsOperator(ExtList operands)
Create an unequal operator. 
 | 
static ParameterDeclaration | 
parameterDeclaration(JavaInfo javaInfo,
                    KeYJavaType kjt,
                    IProgramVariable var)
Create a parameter declaration. 
 | 
static ParameterDeclaration | 
parameterDeclaration(JavaInfo javaInfo,
                    KeYJavaType kjt,
                    java.lang.String name)
create a parameter declaration 
 | 
static ParameterDeclaration | 
parameterDeclaration(JavaInfo javaInfo,
                    java.lang.String type,
                    java.lang.String name)  | 
static ParenthesizedExpression | 
parenthesizedExpression(Expression expression)
Create a parenthesized expression. 
 | 
static PassiveExpression | 
passiveExpression(Expression expression)
Create an inactive expression. 
 | 
static IForUpdates | 
postIncrementForUpdates(ProgramVariable variable)
Create a loop update expression that post increments a given variable. 
 | 
static Return | 
returnClause(Expression e)
Create a return clause. 
 | 
static SuperConstructorReference | 
superConstructor(ReferencePrefix referencePrefix,
                Expression[] args)
Create a call to the super constructor. 
 | 
static SuperReference | 
superReference()
Create a reference to  
super. | 
static Switch | 
switchBlock(Expression expression,
           Branch[] branches)
Create a switch block. 
 | 
static Switch | 
switchBlock(ExtList parameters)
Create a switch block. 
 | 
static SynchronizedBlock | 
synchronizedBlock(ExtList parameters)
Create a synchronized block. 
 | 
static Then | 
thenBlock(ExtList parameters)
Create a then block. 
 | 
static Then | 
thenBlock(Statement statement)
Create a then block. 
 | 
static Then | 
thenBlock(Statement[] statements)
Create a then block. 
 | 
static ThisConstructorReference | 
thisConstructor(Expression[] args)
Create a call to a constructor of the current class. 
 | 
static ThisReference | 
thisReference()
Create a reference to  
this. | 
static Throw | 
throwClause(Expression e)
Create a throw clause. 
 | 
static TransactionStatement | 
transactionStatement(int type)
Create a transaction statement. 
 | 
static Guard | 
trueGuard()
Create a  
true condition. | 
static BooleanLiteral | 
trueLiteral()
Create a literal for the truth value  
true. | 
static Try | 
tryBlock(ExtList parameters)
Create a try block. 
 | 
static Try | 
tryBlock(StatementBlock body,
        Branch[] branches)
Create a try block. 
 | 
static Try | 
tryBlock(Statement statement,
        Branch branch)
Create a try block. 
 | 
static Try | 
tryBlock(Statement statement,
        Branch[] branches)
Create a try block. 
 | 
static TypeRef | 
typeRef(KeYJavaType type)
Create a type reference. 
 | 
static TypeRef | 
typeRef(KeYJavaType type,
       int dimensions)
Create a type reference. 
 | 
static VariableSpecification | 
variableSpecification(IProgramVariable variable,
                     Expression initializer,
                     KeYJavaType keyJavaType)
Create a variable specification. 
 | 
static VariableSpecification | 
variableSpecification(IProgramVariable variable,
                     int dimensions,
                     Expression initializer,
                     Type type)
Create a variable specification. 
 | 
static Statement | 
whileLoop(Expression condition,
         Statement body)
Create a while loop. 
 | 
static While | 
whileLoop(Expression condition,
         Statement body,
         PositionInfo position)
Create a while loop at a specific source position. 
 | 
static IntLiteral | 
zeroLiteral()
Create a literal for the integer zero. 
 | 
public static CopyAssignment assign(Expression lhs, Expression rhs)
 lhs:=rhs public static CopyAssignment assign(Expression lhs, Expression rhs, PositionInfo posInfo)
 lhs:=rhs public static CopyAssignment assign(ExtList parameters)
parameters - the assignment parameters (variable, expression) as
            ExtListCopyAssignment as defined by
         parameterspublic static Expression attribute(ReferencePrefix prefix, ProgramVariable field)
prefix.field public static LocalVariableDeclaration declare(ProgramElementName name, TypeReference typeRef)
 typeRef name; public static LocalVariableDeclaration declare(ProgramElementName name, KeYJavaType type)
type name;
name - the ProgramElementName of the variable to be declaredtype - the static KeYJavaType of the variable to be declaredLocalVariableDeclaration of a variable with static
         type type and name namepublic static LocalVariableDeclaration declare(ProgramElementName name, Expression init, KeYJavaType type)
type name = init; public static LocalVariableDeclaration declare(IProgramVariable var, Expression init, KeYJavaType type)
type var = init;
var - the named and typed IProgramVariable to be declaredinit - the Expression var is initialized withtype - the static KeYJavaType of varLocalVariableDeclaration of var with
         static type type and initial value initpublic static LocalVariableDeclaration declare(Services services, java.lang.String name, Expression initializer, KeYJavaType type)
 type name{unique} = initializer;
 services - the Services whose VariableNamer is used to
            determine a unique variable namename - the String on which the variable's unique name is
            basedinitializer - the Expression the declared variable is initialized
            withtype - the static KeYJavaType of the to be declared variableLocalVariableDeclaration of variable named uniquely
         after name with static type type and
         initial value initializerpublic static LocalVariableDeclaration declare(IProgramVariable var, KeYJavaType type)
type var;
var - the named and typed IProgramVariable to be declaredtype - the static KeYJavaType of varLocalVariableDeclaration of var with
         static type typepublic static LocalVariableDeclaration declare(java.lang.String name, KeYJavaType type)
public static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, KeYJavaType kjt, java.lang.String name)
public static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, KeYJavaType kjt, IProgramVariable var)
kjt var
javaInfo - the Java model containing kjtkjt - the static KeYJavaType of varvar - the named and typed IProgramVariable to be declared as
            parameterParameterDeclaration of var with static
         type kjtpublic static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, java.lang.String type, java.lang.String name)
public static ParenthesizedExpression parenthesizedExpression(Expression expression)
(expression)
expression - the Expression to be parenthesizedParenthesizedExpression of expressionpublic static PassiveExpression passiveExpression(Expression expression)
expression - the Expression to be marked inactivePassiveExpression version of
         expressionpublic static ProgramVariable localVariable(java.lang.String name, KeYJavaType kjt)
public static ProgramVariable localVariable(ProgramElementName name, KeYJavaType kjt)
public static ProgramVariable localVariable(Services services, java.lang.String name, KeYJavaType type)
services - the Services whose VariableNamer is usedname - the String on which the variable's unique name is
            basedtype - the variable's static KeYJavaTypeProgramVariable of static type type
         and with a unique name based on namepublic static LogicalAnd logicalAndOperator(Expression left, Expression right)
left & right
left - the left operand Expressionright - the right operand ExpressionLogicalAnd of left and
         rightpublic static LogicalOr logicalOrOperator(Expression left, Expression right)
left | right
left - the left operand Expressionright - the right operand ExpressionLogicalOr of left and
         rightpublic static Catch catchClause(ParameterDeclaration param, StatementBlock body)
public static Catch catchClause(ParameterDeclaration parameter, Statement[] statements)
 catch (parameter) {
     statements
 }
 parameter - the to be caught ParameterDeclarationstatements - the body StatementsCatch clause for execution of
         statements in case of parameterpublic static Catch catchClause(JavaInfo javaInfo, java.lang.String param, KeYJavaType kjt, StatementBlock body)
 catch (kjt param)
    body
 javaInfo - the JavaInfo containing kjtparam - the String name of the exception object variablekjt - the KeYJavaType of the exception object variablebody - the StatementBlock catch clause bodyCatch with parameter param of static
         type kjt and body bodypublic static Catch catchClause(JavaInfo javaInfo, java.lang.String param, java.lang.String type, StatementBlock body)
 catch (type param)
    body
 javaInfo - the JavaInfo containing a KeYJavaType named
            typeparam - the String name of the exception object variabletype - the String name of the exception object
            variable's KeYJavaTypebody - the StatementBlock catch clause bodyCatch with parameter param of static
         type type and body bodypublic static Throw throwClause(Expression e)
throw e
e - the throw ExpressionThrow statement with expression epublic static TransactionStatement transactionStatement(int type)
type - the transaction statement typeTransactionStatement of type typepublic static Guard trueGuard()
true condition.Guard with expression truepublic static Statement whileLoop(Expression condition, Statement body)
 while (condition)
     body
 condition - the loop condition Expressionbody - the loop body StatementWhile loop defined by condition and
         bodypublic static While whileLoop(Expression condition, Statement body, PositionInfo position)
 while (condition)
     body
 condition - the loop condition Expressionbody - the loop body Statementposition - the new source element's PositionInfoWhile loop defined by condition and
         body, and positioned at positionpublic static Return returnClause(Expression e)
return e
e - the return ExpressionReturn statement with expression epublic static If ifThen(Expression guard, Statement then)
 if (guard)
    then
 guard - the if statement condition Expressionthen - the if statement then branch StatementIf with expression guard and then branch
         thenpublic static If ifThen(Expression guard, Statement... statements)
 if (guard) {
    statements
 }
 guard - the if statement condition Expressionstatements - the if statement then branch StatementsIf with condition guard and then branch
         statementspublic static If ifThen(Expression guard, Then then)
 if (guard)
    then
 guard - the if statement condition Expressionthen - the if statement then branch ThenIf with expression guard and then branch
         thenpublic static If ifElse(Expression guard, Then then, Else els)
 if (guard)
    then
 else
    els
 guard - the if statement condition Expressionthen - the if statement then branch Statementels - the if statement else branch StatementIf with expression guard, then branch
         then and else branch elspublic static Statement ifElse(Expression guard, Statement thenStatement, Statement elseStatement)
 if (guard)
    thenStatement
 else
    elseStatement
 guard - the if clause condition ExpressionthenStatement - the if clause then branch StatementelseStatement - the if clause else branch StatementIf with condition guard, then branch
         thenStatement and else branch
         elseStatementpublic static Statement breakStatement(Label label, PositionInfo positionInfo)
public static Case caseBlock(ExtList parameters, Expression expression, PositionInfo position)
parameters - the case block parameters (body) as ExtListexpression - the case block Expressionposition - the new source element's PositionInfoCase as defined by parameters and
         expressionpublic static Case caseBlock(Expression expression, Statement statement)
 case (expression)
     statement
 expression - the case Expressionstatement - the to be executed StatementCase for execution of statement in
         case of expressionpublic static Case caseBlock(Expression expression, Statement[] statements)
 case (expression) {
     statements
 }
 expression - the case Expressionstatements - the to be executed StatementsCase for execution of statements in
         case of expressionpublic static EmptyStatement emptyStatement()
EmptyStatementpublic static EnhancedFor enhancedForLoop(ExtList parameters)
public static Equals equalsNullOperator(Expression expression)
null.
 
 expression == null
expression - the Expression to be compared against
            nullEquals that compares expression
         against nullpublic static Equals equalsOperator(Expression left, Expression right)
left == right
left - the left operand Expressionright - the right operand ExpressionEquals of left and rightpublic static Equals equalsOperator(ExtList operands)
 operand{1} == operand{2}
 public static ExecutionContext executionContext(KeYJavaType classType, IProgramMethod method, ReferencePrefix reference)
classType - the enclosing class KeYJavaTypemethod - the enclosing IProgramMethod defined in
            classTypereference - the ReferencePrefix method is called onExecutionContext for calls on
         reference to method from
         classTypepublic static StatementBlock insertStatementInBlock(Statement statement, StatementBlock block)
statement - the Statement to be inserted into blockblock - the StatementBlock statement is inserted
            intoStatementBlock that contains both the
         Statements from block and
         statementpublic static StatementBlock insertStatementInBlock(Statement[] stmnt, StatementBlock b)
stmnt - array of Statement those have to be insertedb - the Statementblock where to insertpublic static StatementBlock insertStatementInBlock(StatementBlock stmnt, StatementBlock b)
stmnt - array of Statement those have to be insertedb - the Statementblock where to insertpublic static StatementBlock insertStatementInBlock(StatementBlock block, Statement[] statements)
block statements
block - the original StatementBlockstatements - the inserted StatementsStatementBlock that contains
         block first and statements secondpublic static Instanceof instanceOf(Expression expression, KeYJavaType type)
expression instance of type
expression - the Expression operand, whose runtime type is to be
            checkedtype - the KeYJavaType operand expression's type
            is checked againstInstanceof for checking expression's
         type against typepublic static LocalVariableDeclaration declareZero(KeYJavaType type, IProgramVariable variable)
type variable = 0;
type - the static KeYJavaType of variablevariable - the named and typed IProgramVariable to be declaredLocalVariableDeclaration of variable
         with static type type and initial value zeropublic static LocalVariableDeclaration declareMethodCall(KeYJavaType type, IProgramVariable variable, ReferencePrefix reference, java.lang.String method)
type variable = reference.method();
type - the static KeYJavaType of variablevariable - the named and typed IProgramVariable to be declaredreference - the ReferencePrefix the method is called onmethod - the method's name StringLocalVariableDeclaration of variable
         with static type type and initial value
         reference.method()public static LocalVariableDeclaration declareMethodCall(IProgramVariable variable, ReferencePrefix reference, java.lang.String method)
type variable = reference.method();where
type is variable's KeYJavaType as it is
 returned by IProgramVariable.getKeYJavaType().variable - the named and typed IProgramVariable to be declaredreference - the ReferencePrefix the method is called onmethod - the method's name StringLocalVariableDeclaration of variable
         with static type type and initial value
         reference.method()public static Default defaultBlock(Statement statement)
 default
     statement
 public static Default defaultBlock(Statement[] statements)
 default {
     statements
 }
 public static Do doLoop(Expression condition, Statement statement, PositionInfo positionInfo)
 do
     statement
 while (condition);
 condition - the do-loop condition Expressionstatement - the do-loop body StatementpositionInfo - the new source element's PositionInfoDo that executes statement while
         condition holdspublic static Else elseBlock(Statement[] statements)
 else {
     statements
 }
 public static ILoopInit loopInit(LoopInitializer init)
init
init - the single LoopInitializerILoopInit that consists of init onlypublic static ILoopInit loopInitZero(KeYJavaType type, IProgramVariable variable)
type variable = 0
type - the static KeYJavaType of variablevariable - the named and typed IProgramVariable to be declaredILoopInit that declares variable
         variable with static type type and
         initial value zeropublic static ArrayInitializer arrayInitializer(Expression[] expressions, KeYJavaType type)
expressions - the initial value Expressionstype - the array type KeYJavaTypeArrayInitializer which contains
         expressions and is of type typepublic static FieldReference arrayLength(JavaInfo model, ReferencePrefix array)
array.length
model - the JavaInfo to retrieve the array super class type,
            which holds the length attribute, fromarray - the ReferencePrefix whose length attribute is accessedFieldReference for array's length
         attributepublic static IGuard lessThanGuard(Expression left, Expression right)
left < right
left - the Expression to be compared less than
            rightright - the Expression to be compared greater than
            leftGuard that compares left less than
         rightpublic static LessThan lessThanOperator(Expression left, Expression right)
left < right
left - the left operand Expressionright - the right operand ExpressionLessThan that compares left less than
         rightpublic static LessThan lessThanZeroOperator(Expression expression)
expression < 0
expression - the left operand ExpressionLessThan that compares expression less
         than 0public static IGuard lessThanArrayLengthGuard(JavaInfo model, ProgramVariable variable, ReferencePrefix array)
variable < array.length
model - the JavaInfo to retrieve the array super class type,
            which holds the length attribute, fromvariable - the ProgramVariable to be compared less than
            array's lengtharray - the ReferencePrefix whose length attribute is accessedGuard that compares variable less than
         array's lengthpublic static IForUpdates forUpdates(Expression update)
update
update - the single update ExpressionForUpdates that consists of update
         onlypublic static IForUpdates postIncrementForUpdates(ProgramVariable variable)
variable++
variable - the ProgramVariable to be post incremented during the
            loop updatesForUpdates that consists of the post increment of
         variablepublic static ArrayReference arrayFieldAccess(ReferencePrefix array, Expression index)
array[index]
array - the ReferencePrefix to be accessedindex - the array access index ExpressionArrayReference for access of array at
         indexpublic static StatementBlock block(ExtList statements)
statements - the block statements as ExtListStatementBlock consisting of
         statementspublic static StatementBlock block(Statement... statements)
 {
   statements;
 }
 statements - the Statements to appear in the blockStatementBlock that consists of the given
         statements in the very same orderpublic static StatementBlock block(java.util.List<Statement> statements)
 {
   statements;
 }
 statements - the Statements to appear in the blockStatementBlock that consists of the given
         statements in the very same orderpublic static For forLoop(ILoopInit init, IGuard guard, IForUpdates updates, Statement... statements)
 for (init; guard; updates) {
    statements;
 }
 init - the ILoopInit loop initializationsguard - the IGuard loop conditionupdates - the IForUpdates loop updatesstatements - the body StatementsFor with initializers init, condition
         guard, updates updates and body
         statementspublic static For forLoop(IGuard guard, IForUpdates updates, Statement body)
 for (; guard; updates)
     body
 guard - the IGuard loop conditionupdates - the IForUpdates loop updatesbody - the body StatementFor with condition guard, updates
         updates and body bodypublic static For forLoop(IGuard guard, IForUpdates updates, Statement[] body)
 for (; guard; updates)
     body
 guard - the IGuard loop conditionupdates - the IForUpdates loop updatesbody - the body StatementsFor with condition guard, updates
         updates and body bodypublic static CopyAssignment assignArrayField(ProgramVariable variable, ReferencePrefix array, Expression index)
variable = array[index];
variable - the ProgramVariable to be assigned toarray - the array ReferencePrefix to be accessedindex - the array access index ExpressionCopyAssignment of array element at
         index to variablepublic static LocalVariableDeclaration declare(ExtList parameters)
parameters - the declaration parameters (modifiers, type reference,
            variable specifications) as ExtListLocalVariableDeclaration as defined by
         parameterspublic static LocalVariableDeclaration declare(IProgramVariable variable)
type variable;where
type is variable's KeYJavaType as
 it is returned by IProgramVariable.getKeYJavaType().variable - the named and typed IProgramVariable to be declaredLocalVariableDeclaration of variablepublic static LocalVariableDeclaration declare(IProgramVariable variable, Expression init)
type variable = init;where
type is variable's KeYJavaType as
 it is returned by IProgramVariable.getKeYJavaType().variable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withLocalVariableDeclaration of variablepublic static LocalVariableDeclaration declare(Modifier modifier, IProgramVariable variable, Expression init, KeYJavaType type)
modifier type variable = init;
modifier - the Modifiervariable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withtype - the static KeYJavaType of variableLocalVariableDeclaration of variable
         with static type type and initial value
         initpublic static LocalVariableDeclaration declare(Modifier[] modifiers, IProgramVariable variable, Expression init, KeYJavaType type)
modifiers type variable = init;
modifiers - the Modifiersvariable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withtype - the static KeYJavaType of variableLocalVariableDeclaration of variable
         with static type type and initial value
         initpublic static LocalVariableDeclaration declare(ImmutableArray<Modifier> modifiers, IProgramVariable variable, Expression init, KeYJavaType type)
modifiers type variable = init;
modifiers - the Modifiersvariable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withtype - the static KeYJavaType of variableLocalVariableDeclaration of variable
         with static type type and initial value
         initpublic static LocalVariableDeclaration declare(ImmutableArray<Modifier> modifiers, IProgramVariable variable, Expression init, TypeReference typeRef)
modifiers typeRef variable = init;
modifiers - the Modifiersvariable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withtypeRef - the static TypeRef of variableLocalVariableDeclaration of variable
         with static type typeRef and initial value
         initpublic static LocalVariableDeclaration declare(ImmutableArray<Modifier> modifiers, TypeReference typeRef, VariableSpecification specification)
modifiers typeRef specification
modifiers - the ModifierstypeRef - the static TypeRef of the variable to be declaredspecification - the VariableSpecification of the variable to be
            declaredLocalVariableDeclaration of the variable specified
         by specification with static type
         typeRefpublic static LocalVariableDeclaration declare(ImmutableArray<Modifier> modifiers, TypeReference typeRef, VariableSpecification[] specifications)
 modifiers typeRef specification{1}, ...
 modifiers - the ModifierstypeRef - the static TypeRef of the variable to be declaredspecifications - the VariableSpecifications of the variables to be
            declaredLocalVariableDeclaration of the variables specified
         by specifications with static type
         typeRefpublic static MethodReference methodCall(ReferencePrefix reference, java.lang.String name, ImmutableArray<? extends Expression> args)
reference.name(args);
reference - the ReferencePrefix the method is called onname - the method's name Stringargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on reference with arguments
         argspublic static MethodReference methodCall(KeYJavaType type, java.lang.String name, ImmutableArray<? extends Expression> args)
type.name(args);
type - the KeYJavaType the method is called onname - the method's name Stringargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on type with arguments
         argspublic static MethodReference methodCall(KeYJavaType type, java.lang.String name, Expression... args)
type.name(args);
type - the KeYJavaType the method is called onname - the method's name Stringargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on type with arguments
         argspublic static MethodReference methodCall(KeYJavaType type, java.lang.String name)
type.name();
type - the KeYJavaType the method is called onname - the method's name StringMethodReference for call of method
         name on type with arguments
         argspublic static MethodReference methodCall(ReferencePrefix reference, java.lang.String name)
reference.name();
reference - the ReferencePrefix the method is called onname - the method's name StringMethodReference for call of method
         name on reference with no argumentspublic static MethodReference methodCall(ReferencePrefix reference, java.lang.String name, Expression... args)
reference.name(args);
reference - the ReferencePrefix the method is called onname - the method's name Stringargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on reference with arguments
         argspublic static MethodReference methodCall(ReferencePrefix reference, MethodName name, Expression... args)
reference.name(args);
reference - the ReferencePrefix the method is called onname - the MethodNameargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on reference with arguments
         argspublic static MethodReference methodCall(ReferencePrefix reference, MethodName name, ImmutableArray<? extends Expression> args)
reference.name(args);
reference - the ReferencePrefix the method is called onname - the MethodNameargs - the argument Expressions to be passed to the methodMethodReference for call of method
         name on reference with arguments
         argspublic static FieldReference fieldReference(Services services, java.lang.String name, Expression expression, ExecutionContext context)
(expression).name
services - the Services to determine both expression
            's KeYJavaType and the ProgramVariable
            corresponding to the field namename - the to be accessed field's name Stringexpression - the Expression on which the field is accessedcontext - the ExecutionContext, which is needed to determine
            expression's KeYJavaTypeFieldReference of field name on
         expressionpublic static FieldReference fieldReference(ReferencePrefix prefix, ProgramVariable field)
prefix.field
prefix - the ReferencePrefix on which field is
            accessedfield - the ProgramVariable to be accessedFieldReference of field on
         prefixpublic static Finally finallyBlock(Statement statement)
 finally
     statement
 public static Finally finallyBlock(Statement[] statements)
 finally {
     statements
 }
 public static Finally finallyBlock(StatementBlock body)
 finally
     body
 body - the StatementBlock to be executedFinally block consisting of body
         solelypublic static ProgramElement declare(ImmutableArray<Modifier> modifiers, IProgramVariable variable, Expression init, ProgramElementName typeName, int dimensions, ReferencePrefix typePrefix, KeYJavaType baseType)
modifiers typePrefix.baseType[] variable = init;
modifiers - the Modifiersvariable - the named and typed IProgramVariable to be declaredinit - the Expression variable is initialized
            withtypeName - the type's ProgramElementNamedimensions - the type's dimensionstypePrefix - the type's ReferencePrefixbaseType - the base KeYJavaTypeLocalVariableDeclaration of variable
         with static type baseType[dimensions] and initial
         value initpublic static MethodBodyStatement methodBody(JavaInfo model, ProgramVariable result, ReferencePrefix reference, KeYJavaType classType, java.lang.String methodName, ProgramVariable[] arguments)
classType is also used as visibility context when
 looking for methodName in its definition.model - the JavaInfo that contains
            classType.methodNameresult - the ProgramVariable the return value is assigned to or
            nullreference - the ReferencePrefix invocation targetclassType - the KeYJavaType in which the method is declaredmethodName - the method's String namearguments - the ProgramVariable and their static types the
            method is called withMethodBodyStatement for
         classType.methodName when called with
         arguments or null when the former is
         not definedpublic static MethodBodyStatement methodBody(ProgramVariable result, ReferencePrefix reference, IProgramMethod method, Expression[] arguments)
result - the ProgramVariable the return value is assigned to or
            nullreference - the ReferencePrefix invocation targetmethod - the IProgramMethod referencearguments - the Expressions and their static types the method
            is called withMethodBodyStatement for method when
         called with argumentspublic static MethodBodyStatement methodBody(ProgramVariable result, ReferencePrefix reference, IProgramMethod method, ImmutableArray<Expression> arguments)
result - the ProgramVariable the return value is assigned to or
            nullreference - the ReferencePrefix invocation targetmethod - the IProgramMethod referencearguments - the Expressions and their static types the method
            is called withMethodBodyStatement for method when
         called with argumentspublic static MethodFrame methodFrame(IExecutionContext executionContext, StatementBlock block)
executionContext - the block's IExecutionContextblock - the StatementBlock to be put in executionContextMethodFrame that associates block with
         executionContextpublic static MethodFrame methodFrame(IExecutionContext executionContext, StatementBlock block, PositionInfo position)
executionContext - the block's IExecutionContextblock - the StatementBlock to be put in
            executionContextposition - the new source element's PositionInfoMethodFrame that associates block with
         executionContext and positions it at
         positionpublic static MethodFrame methodFrame(IProgramVariable result, IExecutionContext executionContext, StatementBlock block)
result - the IProgramVariable block's return value
            is assigned toexecutionContext - the block's IExecutionContextblock - the StatementBlock to be put in
            executionContextMethodFrame that associates block with
         executionContextpublic static MethodFrame methodFrame(IProgramVariable result, IExecutionContext executionContext, StatementBlock block, PositionInfo position)
result - the IProgramVariable block's return value
            is assigned toexecutionContext - the block's IExecutionContextblock - the StatementBlock to be put in
            executionContextposition - the new source element's PositionInfoMethodFrame that associates block with
         executionContext and positions it at
         positionpublic static IntLiteral intLiteral(java.lang.Integer value)
value - the Integer to be turned into an literalIntLiteral representing valuepublic static LabeledStatement labeledStatement(ExtList parameters, Label label, PositionInfo position)
parameters - the parameters (statement) as ExtListlabel - the Labelposition - the new source element's PositionInfoLabeledStatement as defined by
         parameters and labelpublic static LabeledStatement labeledStatement(Label label, Statement statement, PositionInfo pos)
label: statement
label - the Labelstatement - the Statement to be labeledLabeledStatement that adds label to
         statementpublic static Statement labeledStatement(Label label, Statement[] statements, PositionInfo pos)
 label: {
     statements
 }
 label - the Labelstatements - the Statements to be labeledLabeledStatement that adds label to
         statementspublic static NewArray newArray(TypeReference typeRef, int dimensions, Expression[] sizes, ArrayInitializer initializer, KeYJavaType keyJavaType)
 new typeRef[sizes{1}]...[sizes{dimensions}] initializer
 sizes - the size Expressions for each dimensiontypeRef - the static array base typekeyJavaType - the array element typeinitializer - the ArrayInitializerdimensions - the number of dimensionsNewArray for the instantiation of an array of base
         type typeRef with dimensions dimensionspublic static NewArray newArray(TypeReference typeRef, int dimensions, Expression[] sizes, KeYJavaType keyJavaType)
 new typeRef[sizes{1}]...[sizes{dimensions}]
 typeRef - the static array base typedimensions - the number of dimensionssizes - the size Expressions for each dimensionkeyJavaType - the array element typeNewArray for the instantiation of an array of base
         type typeRef with dimensions dimensionspublic static NewArray newArray(TypeReference typeRef, int dimensions, Expression size, KeYJavaType keyJavaType)
new typeRef[size]
typeRef - the static array base typedimensions - the number of dimensionssize - the size Expression for the first dimensionkeyJavaType - the array element typeNewArray for the instantiation of an array of base
         type typeRef with dimensions dimensionspublic static NewArray newArray(TypeReference typeRef, int dimensions, ArrayInitializer initializer, KeYJavaType keyJavaType)
new typeRef[]...[] initializer
typeRef - the static array base typekeyJavaType - the array element typeinitializer - the ArrayInitializerdimensions - the number of dimensionsNewArray for the instantiation of an array of base
         type typeRef with dimensions dimensionspublic static New newOperator(ReferencePrefix referencePrefix, TypeReference typeReference, Expression[] args)
new referencePrefix.typeReference(args)
referencePrefix - the typeReference's ReferencePrefixtypeReference - a TypeReference to the class type that is instantiatedargs - the Expression arguments to be passed to the
            constructorNew operator that allocates a new instance of
         typeReference parameterized with argspublic static New newOperator(ReferencePrefix referencePrefix, KeYJavaType type, Expression[] args)
new referencePrefix.type(args)
referencePrefix - the type's ReferencePrefixtype - the KeYJavaType to be instantiatedargs - the Expression arguments to be passed to the
            constructorNew operator that allocates a new instance of
         type parameterized with argspublic static New newOperator(ReferencePrefix referencePrefix, KeYJavaType type)
new referencePrefix.type()
referencePrefix - the type's ReferencePrefixtype - the KeYJavaType to be instantiatedNew operator that allocates a new instance of
         typepublic static New newOperator(KeYJavaType type)
new type()
type - the KeYJavaType to be instantiatedNew operator that allocates a new instance of
         typepublic static NotEquals notEqualsOperator(ExtList operands)
 operands{1} != operands{2}
 public static SuperConstructorReference superConstructor(ReferencePrefix referencePrefix, Expression[] args)
super(args)
referencePrefix - the enclosing class typeargs - the Expression arguments to be passed to constructorSuperConstructorReference parameterized with
         argspublic static SuperReference superReference()
super.SuperReferencepublic static Switch switchBlock(Expression expression, Branch[] branches)
 switch (expression) {
     branches
 }
 expression - the to be evaluated Expressionbranches - the switch-case BranchesSwitch block that executes branches
         depending on the value of expressionpublic static SynchronizedBlock synchronizedBlock(ExtList parameters)
parameters - the synchronized block parameters (monitor, body) as
            ExtListSynchronizedBlock as defined by
         parameterspublic static Then thenBlock(Statement[] statements)
 then {
     statements
 }
 public static ThisConstructorReference thisConstructor(Expression[] args)
this(args)
args - the Expression arguments to be passed to constructorThisConstructorReference parameterized with
         argspublic static ThisReference thisReference()
this.ThisReferencepublic static BooleanLiteral trueLiteral()
true.BooleanLiteral that represents the value
         truepublic static Try tryBlock(StatementBlock body, Branch[] branches)
 try
     body
 branches
 body - the StatementBlock to be executedbranches - the try-catch BranchesTry block for the execution of
         branches depending on the events during the
         execution of bodypublic static Try tryBlock(Statement statement, Branch[] branches)
 try
     statement
 branches
 public static Try tryBlock(Statement statement, Branch branch)
 try
     statement
 branch
 public static TypeRef typeRef(KeYJavaType type)
type
type - the KeYJavaType to be referencedTypeRef that references typepublic static TypeRef typeRef(KeYJavaType type, int dimensions)
type[]...[]
type - the base KeYJavaTypedimensions - the number of dimensionsTypeRef for dimensions dimensions of
         typepublic static BooleanLiteral falseLiteral()
false.BooleanLiteral that represents the value
         truepublic static VariableSpecification variableSpecification(IProgramVariable variable, int dimensions, Expression initializer, Type type)
variable - the IProgramVariable to be specifieddimensions - the number of dimensionsinitializer - the initializer Expressiontype - the TypeVariableSpecification for variable of
         type type[dimensions], initialized to
         initializerpublic static VariableSpecification variableSpecification(IProgramVariable variable, Expression initializer, KeYJavaType keyJavaType)
variable - the IProgramVariable to be specifiedinitializer - the initializer ExpressionkeyJavaType - the KeYJavaTypeVariableSpecification for variable of
         type type, initialized to initializerpublic static IntLiteral zeroLiteral()
0
IntLiteral that represents the integer value
         0public static TypeCast cast(Expression expression, KeYJavaType targetType)