coins.aflow
Interface DefUseCell

All Known Implementing Classes:
DefUseCellImpl

public interface DefUseCell

DefUseCell interface Def-use list cell representaing a definition and list of its use points. This interface does not take aliases into consideration.


Nested Class Summary
static class DefUseCell.DefNode
           
 
Field Summary
static IR PARAM
          Indicates the (imaginary?) node that initializes the formal parameter.
static IR UNINITIALIZED
          Indicates that the variable may not have been set LOCALLY, i.e., within the subprogram, before used.
 
Method Summary
 void addUseNode(IR pUseNode)
          Adds pUseNode to the list of use nodes (returned by getUseList()).
 IR getDefNode()
          Returns the node (def node of this DefUseCell) that sets the value for the symbol this DefUseCell is associated with.
 java.util.List getUseList()
          Returns the list of nodes that may use the value set at the def node (returned by getDefNode()).
 

Field Detail

UNINITIALIZED

public static final IR UNINITIALIZED

Indicates that the variable may not have been set LOCALLY, i.e., within the subprogram, before used. This may be returned by getDefNode. The name "UNINITIALIZED" may be misleading, since external variables may have already been initialized outside of the scope of this analysis (SubpFlow).

Please note that this is not a full-featured "IR node", and call to most of the methods in IR interface will fail (UnsupportedOperationException thrown).


PARAM

public static final IR PARAM

Indicates the (imaginary?) node that initializes the formal parameter. This may be returned by getDefNode().

Please note that this is not a full-featured "IR node", and call to most of the methods in IR interface will fail (UnsupportedOperationException thrown).

Method Detail

getDefNode

public IR getDefNode()
Returns the node (def node of this DefUseCell) that sets the value for the symbol this DefUseCell is associated with. The node returned is an HIR AssignStmt node or LIR SET node or formal parameter node (PARAM) or node that signifies the symbol is uninitialed (UNINITIALIZED).


getUseList

public java.util.List getUseList()
Returns the list of nodes that may use the value set at the def node (returned by getDefNode()).


addUseNode

public void addUseNode(IR pUseNode)
Adds pUseNode to the list of use nodes (returned by getUseList()).