AST
node type ForStmt

General Info

Production
ForStmt : BranchTargetStmt ::= InitStmt:Stmt* [Condition:Expr] UpdateStmt:Stmt* Stmt;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Stmt
              extended by AST.BranchTargetStmt
                  extended by AST.ForStmt
All Implemented Interfaces:
BranchPropagation, VariableScope, java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in Java1.4Frontend/java.ast at line 210

Member Filters

API level:

Aspect:

Constructors

public ForStmt()
 
public ForStmt(List<Stmt> p0,
               Opt<Expr> p1,
               List<Stmt> p2,
               Stmt p3)
 

Attributes

syn boolean targetOf(ContinueStmt stmt)
Specified by:targetOf in interface BranchPropagationSpecified by:targetOf in class BranchTargetStmt
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 71
Aspect
BranchTarget
syn boolean targetOf(BreakStmt stmt)
Specified by:targetOf in interface BranchPropagationSpecified by:targetOf in class BranchTargetStmt
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 79
Aspect
BranchTarget
syn boolean isDAafter(Variable v)
Overrides:isDAafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 612
Aspect
DA
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 625
Aspect
DA
syn boolean isDUafter(Variable v)
Overrides:isDUafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1096
Aspect
DU
syn boolean isDUafterInit(Variable v)
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1116
Aspect
DU
syn boolean isDUbeforeCondition(Variable v)
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1118
Aspect
DU
syn boolean isDUafterUpdate(Variable v)
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1129
Aspect
DU
syn SimpleSet localLookup(java.lang.String name)
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 91
Aspect
VariableScope
syn VariableDeclaration localVariableDeclaration(java.lang.String name)
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 123
Aspect
VariableScope
syn boolean continueLabel()
Overrides:continueLabel in class Stmt
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 401
Aspect
NameCheck
syn boolean canCompleteNormally()
Overrides:canCompleteNormally in class Stmt
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 102
Aspect
UnreachableStatements
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 45
Aspect
CodeGeneration
syn boolean definesLabel()
Overrides:definesLabel in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 946
Aspect
CreateBCode
syn int cond_label()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1372
Aspect
CreateBCode
syn int begin_label()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1373
Aspect
CreateBCode
syn int update_label()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1374
Aspect
CreateBCode
syn int end_label()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1375
Aspect
CreateBCode
syn int break_label()
Overrides:break_label in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1398
Aspect
CreateBCode
syn int continue_label()
Overrides:continue_label in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1417
Aspect
CreateBCode
syn boolean modifiedInScope(Variable var)
Specified by:modifiedInScope in class Stmt
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 55
Aspect
PreciseRethrow
inh SimpleSet lookupVariable(java.lang.String name)
Specified by:lookupVariable in interface VariableScopeOverrides:lookupVariable in class Stmt
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 18
Aspect
VariableScope

Methods

public void flushCache()
Overrides:flushCache in class BranchTargetStmt
public ForStmt clone()
              throws java.lang.CloneNotSupportedException
Overrides:clone in class BranchTargetStmt
Throws:
java.lang.CloneNotSupportedException
public ForStmt copy()
Overrides:copy in class ASTNode<ASTNode>
public ForStmt fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 604
Aspect
PrettyPrint
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeCheck.jrag at line 334
Aspect
TypeCheck
public void createBCode(CodeGeneration gen)
Overrides:createBCode in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1377
Aspect
CreateBCode
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class BranchTargetStmt
protected int numChildren()
Overrides:numChildren in class BranchTargetStmt
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class BranchTargetStmt
public void setInitStmtList(List<Stmt> list)
Replaces the InitStmt list.
Parameters:
list - The new list node to be used as the InitStmt list.
public int getNumInitStmt()
Retrieves the number of children in the InitStmt list.
Returns:
Number of children in the InitStmt list.
Retrieves the number of children in the InitStmt list. Calling this method will not trigger rewrites..
Returns:
Number of children in the InitStmt list.
public Stmt getInitStmt(int i)
Retrieves the element at index i in the InitStmt list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the InitStmt list.
public void addInitStmt(Stmt node)
Append an element to the InitStmt list.
Parameters:
node - The element to append to the InitStmt list.
public void addInitStmtNoTransform(Stmt node)
public void setInitStmt(Stmt node,
                        int i)
Replaces the InitStmt list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the InitStmt list.
Returns:
The node representing the InitStmt list.
Retrieves the InitStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the InitStmt list.
Retrieves the InitStmt list.
Returns:
The node representing the InitStmt list.
Retrieves the InitStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the InitStmt list.
public void setConditionOpt(Opt<Expr> opt)
Replaces the optional node for the Condition child. This is the Opt node containing the child Condition, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the Condition child.
public boolean hasCondition()
Check whether the optional Condition child exists.
Returns:
true if the optional Condition child exists, false if it does not.
Retrieves the (optional) Condition child.
Returns:
The Condition child, if it exists. Returns null otherwise.
public void setCondition(Expr node)
Replaces the (optional) Condition child.
Parameters:
node - The new node to be used as the Condition child.
Retrieves the optional node for child Condition. This is the Opt node containing the child Condition, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Condition.
public void setUpdateStmtList(List<Stmt> list)
Replaces the UpdateStmt list.
Parameters:
list - The new list node to be used as the UpdateStmt list.
public int getNumUpdateStmt()
Retrieves the number of children in the UpdateStmt list.
Returns:
Number of children in the UpdateStmt list.
Retrieves the number of children in the UpdateStmt list. Calling this method will not trigger rewrites..
Returns:
Number of children in the UpdateStmt list.
public Stmt getUpdateStmt(int i)
Retrieves the element at index i in the UpdateStmt list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the UpdateStmt list.
public void addUpdateStmt(Stmt node)
Append an element to the UpdateStmt list.
Parameters:
node - The element to append to the UpdateStmt list.
public void addUpdateStmtNoTransform(Stmt node)
public void setUpdateStmt(Stmt node,
                          int i)
Replaces the UpdateStmt list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the UpdateStmt list.
Returns:
The node representing the UpdateStmt list.
Retrieves the UpdateStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the UpdateStmt list.
Retrieves the UpdateStmt list.
Returns:
The node representing the UpdateStmt list.
Retrieves the UpdateStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the UpdateStmt list.
public void setStmt(Stmt node)
Replaces the Stmt child.
Parameters:
node - The new node to replace the Stmt child.
public Stmt getStmt()
Retrieves the Stmt child.
Returns:
The current node used as the Stmt child.
Retrieves the Stmt child.

This method does not invoke AST transformations.

Returns:
The current node used as the Stmt child.
public boolean Define_boolean_isDAbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDAbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 636
public boolean Define_boolean_isDUbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDUbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1145
public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller,
                                                 ASTNode child,
                                                 java.lang.String name)
Overrides:Define_SimpleSet_lookupVariable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 90
Overrides:Define_VariableScope_outerScope in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 299
public boolean Define_boolean_insideLoop(ASTNode caller,
                                         ASTNode child)
Overrides:Define_boolean_insideLoop in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 370
public boolean Define_boolean_reachable(ASTNode caller,
                                        ASTNode child)
Overrides:Define_boolean_reachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 103
public boolean Define_boolean_reportUnreachable(ASTNode caller,
                                                ASTNode child)
Overrides:Define_boolean_reportUnreachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 151
Overrides:Define_int_variableScopeEndLabel in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 46
Overrides:Define_int_condition_false_label in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 969
public int Define_int_condition_true_label(ASTNode caller,
                                           ASTNode child)
Overrides:Define_int_condition_true_label in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 970
public int Define_int_localNum(ASTNode caller,
                               ASTNode child)
Overrides:Define_int_localNum in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/LocalNum.jrag at line 102
Overrides:rewriteTo in class BranchTargetStmt

Fields

protected java.util.Map targetOf_ContinueStmt_values
protected java.util.Map targetOf_BreakStmt_values
protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUafter_Variable_values
protected java.util.Map isDUbeforeCondition_Variable_values
protected java.util.Map localLookup_String_values
protected boolean canCompleteNormally_value
protected boolean cond_label_computed
protected int cond_label_value
protected boolean begin_label_computed
protected int begin_label_value
protected boolean update_label_computed
protected int update_label_value
protected boolean end_label_computed
protected int end_label_value
protected java.util.Map lookupVariable_String_values

Inherited Members

Attributes inherited from AST.BranchTargetStmt

Attributes inherited from AST.Stmt

Attributes inherited from AST.ASTNode

Methods inherited from class AST.BranchTargetStmt

Methods inherited from class AST.Stmt

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Methods inherited from interface AST.VariableScope

Fields inherited from AST.BranchTargetStmt

Fields inherited from AST.Stmt

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value