coins.sym
Interface ExpId

All Superinterfaces:
FlowAnalSym, Sym, Sym0
All Known Implementing Classes:
ExpIdImpl

public interface ExpId
extends FlowAnalSym

class ExpId ExpId (expression identifier) is used to identify expressions. Expressions having the same form and type have the same ExpId.


Field Summary
 
Fields inherited from interface coins.sym.Sym
KIND_NAME, VISIBILITY
 
Fields inherited from interface coins.sym.Sym0
FLAG_ADDRESS_TAKEN, FLAG_CASTLESS_SUBP, FLAG_COMMON, FLAG_COMPLEX_STRUCT, FLAG_DERIVED_SYM, FLAG_GENERATED_SYM, FLAG_INCOMPLETE_TYPE, FLAG_POINTER_OPERATION, FLAG_REGION_ELEM, FLAG_RESERVED_NAME, FLAG_SIZEOF_TAKEN, FLAG_UNFIXED_SIZE, FLAG_UNIFORM_SIZE, FLAG_VALUE_IS_ASSIGNED, KIND_AREG, KIND_BOOL_CONST, KIND_CHAR_CONST, KIND_CONST_FIRST, KIND_CONST_LAST, KIND_ELEM, KIND_EXP_ID, KIND_FLOAT_CONST, KIND_INT_CONST, KIND_LABEL, KIND_MREG, KIND_NAMED_CONST, KIND_OTHER, KIND_PARAM, KIND_REMOVED, KIND_STRING_CONST, KIND_SUBP, KIND_TAG, KIND_TYPE, KIND_VAR, SYM_COMPILE_UNIT, SYM_EXTERN, SYM_PRIVATE, SYM_PROTECTED, SYM_PUBLIC
 
Method Summary
 HIR getCopiedExp()
          getCopiedExp Get the expression for which this ExpId is first created.
 ExpInf getExpInf()
           
 FlowExpId getFlowExpId()
          getFlowExpId Get the FlowExpId that is used in aflow.
 IR getLinkedNode()
          getLinkedNode Get the IR node for which this ExpId is first created.
 Sym getLinkedSym()
          getLinkedSym If the linked node of this ExpId has symbol connected to it, then return it, else return null.
 ExpId getNextId()
          getNextId Get the next ExpId in the hash chain.
 int getNumberOfOperations()
          Returns the number of operations this FlowExpId involves.
 java.util.Set getOperandSet()
          Returns the set of FlowAnalSyms that are operands of this FlowExpId.
 java.util.Set getOperandSet0()
          Returns the set of FlowAnalSyms that are operands of this FlowExpId, and that hold the value that may contribute to the result of the computation of this FlowExpId.
 SetRefRepr getSetRefRepr()
           Get SetRefRepr information that is used in data flow analysis for the expression corresponding to this ExpId.
 boolean isLHS()
           
 void setExpInf(ExpInf pExpInf)
           
 void setFlowExpId(FlowExpId pFlowExpId)
          setFlowExpId Set the FlowExpId that is used in aflow.
 void setNextId(ExpId pNextId)
          setNextId Set the next ExpId in the hash chain.
 void setSetRefRepr(SetRefRepr pSetRefRepr)
           Set SetRefRepr information that is used in data flow analysis for the expression corresponding to this ExpId.
 
Methods inherited from interface coins.sym.FlowAnalSym
getIndex, resetFlowAnalInf, setIndex
 
Methods inherited from interface coins.sym.Sym
baseType, boolConst, charConst, defineVar, derivedSym, floatConst, getDefinedColumn, getDefinedInName, getDefinedLine, getInf, getNameOrNull, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getSymKindName, getWork, intConst, intObject, isRemoved, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, pointerType, pointerType, pointerType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setRecordedIn, setSymKind, setSymType, setUniqueNameSym, setWork, stringConstFromQuotedString, symbol, toStringDetail, toStringShort, vectorType, vectorType, vectorType, vectorTypeUnfixed
 
Methods inherited from interface coins.sym.Sym0
charConst, definedType, defineElem, defineLabel, defineParam, defineSubp, defineVar, enumType, floatConst, getDefinedFile, getDefinedIn, getFlag, getName, getNextSym, getRecordedIn, getSymKind, getSymType, getUniqueName, intConst, isGlobal, namedConst, pointerType, setFlag, stringConst, structType, subpType, unionType, vectorType, vectorTypeUnfixed
 

Method Detail

getLinkedNode

public IR getLinkedNode()
getLinkedNode Get the IR node for which this ExpId is first created. It may be affected by some optimization after the ExpId assignment. There may be other IR nodes with the same subtree structure as the it.

Returns:
the IR node corresponding to this ExpId.

getCopiedExp

public HIR getCopiedExp()
getCopiedExp Get the expression for which this ExpId is first created. It is not affected by optimization after the ExpId assignment.

Returns:
the IR node corresponding to this ExpId.

getLinkedSym

public Sym getLinkedSym()
getLinkedSym If the linked node of this ExpId has symbol connected to it, then return it, else return null.

Returns:
the corresponding symbol or return null.

getNextId

public ExpId getNextId()
getNextId Get the next ExpId in the hash chain.

Returns:
the next ExpId in the hash chain.

setNextId

public void setNextId(ExpId pNextId)
setNextId Set the next ExpId in the hash chain.

Parameters:
pNextId - the next ExpId in the hash chain.

getFlowExpId

public FlowExpId getFlowExpId()
getFlowExpId Get the FlowExpId that is used in aflow.

Returns:
FlowExpId.

setFlowExpId

public void setFlowExpId(FlowExpId pFlowExpId)
setFlowExpId Set the FlowExpId that is used in aflow.

Parameters:
pFlowExpId - corresponding FlowExpId instance.

getExpInf

public ExpInf getExpInf()

setExpInf

public void setExpInf(ExpInf pExpInf)

getOperandSet

public java.util.Set getOperandSet()
Returns the set of FlowAnalSyms that are operands of this FlowExpId. An operand of a FlowExpId is simply a FlowAnalSym that is attached to one of the nodes that comprise the tree represented by the FlowExpId.

Specified by:
getOperandSet in interface FlowAnalSym
Returns:
the set of operands.

getOperandSet0

public java.util.Set getOperandSet0()
Returns the set of FlowAnalSyms that are operands of this FlowExpId, and that hold the value that may contribute to the result of the computation of this FlowExpId. For example, in HIR, if a symbol node is operated by the addressOf operator, and there is no contentsOf operator operating at all afterwards, the symbol attached to the symbol node is not included in the set returned by this method.


getNumberOfOperations

public int getNumberOfOperations()
Returns the number of operations this FlowExpId involves. This is not more than but roughly equal to the number of this FlowExpId's linked node's descendant nodes.


isLHS

public boolean isLHS()

setSetRefRepr

public void setSetRefRepr(SetRefRepr pSetRefRepr)
 Set SetRefRepr information that is used in
 data flow analysis for the expression corresponding
 to this ExpId.
 The SetRefRepr represents such information as
   set of symbols refered by the expression/statement
   set of symbols modified by the expression/statement
   ...

Parameters:
pSetRefRepr - information to be set.

getSetRefRepr

public SetRefRepr getSetRefRepr()
 Get SetRefRepr information that is used in
 data flow analysis for the expression corresponding
 to this ExpId.
 The SetRefRepr represents such information as
   set of symbols refered by the expression/statement
   set of symbols modified by the expression/statement
   ...
 

Returns:
the corresponding SetRefRepr instance.