coins.flow
クラス HirSubpFlowImpl

java.lang.Object
  |
  +--coins.flow.SubpFlowImpl
        |
        +--coins.flow.HirSubpFlowImpl
すべての実装インタフェース:
HirSubpFlow, SubpFlow
直系の既知のサブクラス:
MySubpFlow

public class HirSubpFlowImpl
extends SubpFlowImpl
implements HirSubpFlow

HirSubpFlowImpl class HIR subprogram flow analysis class.


フィールドの概要
static int EXP_ID_HASH_SIZE
           
 int fStmtExpCount
           
 HIR[] fStmtExpSeq
           
 int[] fStmtExpSeqIndexForBBlock
           
 
クラス coins.flow.SubpFlowImpl から継承したフィールド
fAflowSubpFlow, failed, fAlias, fArrayOfSetRefReprList, fAssignCount, fBBlockCount, fBBlockList, fBBlockOfIR, fBBlockOfLabel, fBBlockTable, fBBlockVectorBitCount, fBBlockVectorWordCount, fCallCount, fComplexity, fComputedFlag, fDbgLevel, fDefCount, fDefIndex, fDefinedSyms, fDefNodeListOfSym, fDefPoint, fDefRefCount, fDefRefIndex, fDefRefPoint, fDefUseExhaustiveList, fDefUseList, fDefVectorBitCount, fDefVectorWordCount, fDfoList, fDom, fDomList, fEntryBBlock, fExitBBlock, fExpIdList, fExpIdNumber, fExpIdTable, fExpVectorBitCount, fExpVectorWordCount, fFlowAdapter, fFlowAnalSymTable, fFlowIrLink, fFlowIrLinkSize, fGlobalSymsUsed, fHirAnalExtended, fInverseDfoList, fIrIndexMax, fIrIndexMin, fIteratorInitiated, fListOfBBlocksFromEntry, fListOfBBlocksFromExit, flow, flowRoot, fMaximalCompoundVars, fMaxIndexOfCopiedNode, fMultipleSetRef, fNodeCount, fNodeCountLim1, fNodeCountLim2, fPointVectorBitCount, fPointVectorWordCount, fPostDom, fPostDomList, fPrevBBlockInSearch, fRecordAlias, fSetOfAddressTakenVariables, fSetOfGlobalVariables, fSetRefReprTable, fSubpDefinition, fSubtreesContainingCall, fSubtreesCopied, fSymCountLim1, fSymCountLim2, fSymExpCount, fSymIndexTable, fTempExpCorrespondence, fUseDefExhaustiveList, fUseDefList, fUsedGlobalSymCount, fUsedSymCount, fUsedSymSet, fUseNodeListOfSym, hasCall, hasCallInSubp, hasPointerAssign, hasStructUnion, hasUsePointer, hirRoot, ioRoot, symRoot
 
インタフェース coins.flow.SubpFlow から継承したフィールド
CF_BBLOCK, CF_CFG, CF_DOMINATOR, CF_INDEXED, CF_POSTDOMINATOR, DF_AVAILIN, DF_AVAILOUT, DF_DEF, DF_DEFIN, DF_DEFINED, DF_DEFOUT, DF_DEFUSE, DF_DEFUSEEXHAUST, DF_DEFUSELIST, DF_EGEN, DF_EKILL, DF_EXPID, DF_EXPOSED, DF_KILL, DF_LIVEIN, DF_LIVEOUT, DF_MAX, DF_MIN, DF_REACH, DF_SETREFREPR, DF_TRSNSPARENT, DF_USED, DF_USEDEFEXHAUST, DF_USEDEFLIST, FLAG_EXPID_LHS
 
コンストラクタの概要
HirSubpFlowImpl(FlowRoot pFlowRoot, SubpDefinition pSubpDefinition)
           
 
メソッドの概要
 void allocateExpIdForSubp()
          Allocate ExpId for each data handling node.
 ExpInf allocateExpIdToNode(HIR pSubtree)
          Allocate ExpId to pSubtree and its descendents.
 void computeBBlockSetRefReprs()
           
(パッケージプライベート)  int computeHashCodeOfNode(HIR pNode)
          computeHashCodeOfNode Compute hash code of node pNode taking into account the hash codes of its children so that any two subtrees have the same hash code if they have the same shape.
 boolean divideHirIntoBasicBlocks()
          Divide HIR into basic blocks assuming that nodes of this SubpDefinition are all numbered.
 void divideLirIntoBasicBlocks()
           
 IR[] getFlowIrLink()
           
 int getHashCodeOfIndexedNode(int pNodeIndex)
           
 boolean hasCall()
           
protected  boolean isSameTree(HIR pTree1, HIR pTree2)
          isSameTree
 void recordSetRefReprs()
          Records the SetRefReprs each BBlock contains.
 void recordSetRefReprs(BBlockHirImpl pBBlock)
          recordSetRefReprs Compute and record the SetRefReprs for each subtree (statement) in the given BBlock.
 void recordSetRefReprsForNode(HIR pSubtree, java.util.List pSetRefReprList, BBlock pBBlock)
          Make instance of SetRefReprHirEImpl if pSubtree is AssignStmt, ExpStmt (FunctionExp, conditional exp) or Retrun statement and record it to pSetRefReprList.
(パッケージプライベート)  ExpId selectExpId(HIR pSubtree, ExpInf pExpInf)
          selectExpId Select ExpId for pSubtree and assign it to pSubtree.
 void setHashCodeOfIndexedNode(int pNodeIndex, int pHashCode)
           
 
クラス coins.flow.SubpFlowImpl から継承したメソッド
addDefNode, addUseNode, allocateBBlockOfIR, bblock, bblock, bblockNodeIterator, bblockStmtIterator, bblockSubtreeIterator, bblockVector, cfgFromExitIterator, cfgIterator, changeListOfFlowBBlocksToListOfAflowBBlocks, clearControlFlow, clearDataFlow, computeSetOfAddressTakenVariables, computeSetOfAddressTakenVariables, computeSetOfGlobalVariables, copyFlowAnalData, correlateBBlockAndIR, defVector, defVectorIterator, expVector, expVectorIterator, flowAnalSymVector, generateExpIdName, getAflowSubpFlow, getAssignCount, getBBlock, getBBlock, getBBlock0, getBBlockForLabel, getBBlockFromNodeIndex, getBBlockList, getBBlockOfIR, getBBlockTable, getBBlockVectorBitCount, getBBlockVectorWordCount, getCallCount, getComplexityLevel, getDefCount, getDefIndex, getDefinedSyms, getDefNodeList, getDefPoint, getDefUseExhaustiveList, getDefUseList, getDefVectorBitCount, getDefVectorWordCount, getDominatorList, getDominators, getEntryBBlock, getExitBBlock, getExpId, getExpId, getExpIdList, getExpOfTemp, getExpVectorBitCount, getExpVectorWordCount, getFlowAdapter, getFlowAnalStateLevel, getFlowAnalSymTable, getFlowRoot, getIndexedNode, getIndexedSym, getIrIndexMax, getIrIndexMin, getLinkedSubtreeOfExpId, getListOfBBlocksFromEntry, getListOfBBlocksFromExit, getListOfDefUseExhaustiveList, getListOfDefUseList, getListOfUseDefExhaustiveList, getListOfUseDefList, getMaximalCompoundVars, getNumberOfBBlocks, getNumberOfDefUsedGlobalSymbols, getNumberOfNodes, getPointVectorBitCount, getPointVectorWordCount, getPostDominatorList, getPostDominators, getPrevBBlockInSearch, getReachableBBlocks, getRecordAlias, getRefPoint, getRestructureFlag, getSetRefReprList, getSetRefReprOfIR, getSubpDefinition, getSubpSym, getSymExpCount, getUseDefExhaustiveList, getUseDefList, getUsedSymCount, getUsedSyms, geUseNodeList, hasCallUnder, initiateControlFlowAnal, initiateDataFlowAnal, isComputed, isComputedOrUnderComputation, isFailed, pointVector, pointVectorIterator, printComputedFlag, printExpIdAndIrCorrespondence, recordBBlock, recordDefPoint, recordDefRefPoint, recordSym, resetComputedFlag, resetControlAndDataFlowInformation, resetExpId, resetFlowSymLink, resetFlowSymLinkForRecordedSym, resetFlowSymLinkForTable, resetGlobalFlowSymLink, setBBlock, setBBlock, setBBlockOfIR, setBBlockVectorBitCount, setComputedFlag, setDefVectorBitCount, setEntryBBlock, setExitBBlock, setExpId, setExpOfTemp, setExpVectorBitCount, setFlowAnalStateLevel, setNumberOfNodes, setOfAddressTakenVariables, setOfGlobalVariables, setPointVectorBitCount, setPrevBBlockInSearch, setRecordAlias, setRestructureFlag, setSetRefReprList, setSetRefReprOfIR, setUnderComputation, sortExpIdCollection, subtreesContainingCall, summarize
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース coins.flow.SubpFlow から継承したメソッド
bblock, bblock, bblockNodeIterator, bblockStmtIterator, bblockSubtreeIterator, cfgFromExitIterator, cfgIterator, changeListOfFlowBBlocksToListOfAflowBBlocks, clearControlFlow, clearDataFlow, computeSetOfAddressTakenVariables, computeSetOfGlobalVariables, copyFlowAnalData, defVector, defVectorIterator, expVector, expVectorIterator, flowAnalSymVector, generateExpIdName, getAssignCount, getBBlock, getBBlock, getBBlock0, getBBlockForLabel, getBBlockFromNodeIndex, getBBlockList, getBBlockOfIR, getBBlockTable, getBBlockVectorBitCount, getBBlockVectorWordCount, getCallCount, getComplexityLevel, getDefCount, getDefIndex, getDefinedSyms, getDefNodeList, getDefPoint, getDefUseExhaustiveList, getDefUseList, getDefVectorBitCount, getDefVectorWordCount, getDominatorList, getDominators, getEntryBBlock, getExitBBlock, getExpId, getExpId, getExpIdList, getExpOfTemp, getExpVectorBitCount, getExpVectorWordCount, getFlowAdapter, getFlowAnalStateLevel, getFlowAnalSymTable, getFlowRoot, getIndexedNode, getIndexedSym, getIrIndexMax, getIrIndexMin, getLinkedSubtreeOfExpId, getListOfBBlocksFromEntry, getListOfBBlocksFromExit, getMaximalCompoundVars, getNumberOfBBlocks, getNumberOfDefUsedGlobalSymbols, getNumberOfNodes, getPointVectorBitCount, getPointVectorWordCount, getPostDominatorList, getPostDominators, getPrevBBlockInSearch, getReachableBBlocks, getRecordAlias, getRefPoint, getRestructureFlag, getSetRefReprList, getSetRefReprOfIR, getSubpDefinition, getSubpSym, getSymExpCount, getUseDefExhaustiveList, getUseDefList, getUsedSymCount, getUsedSyms, geUseNodeList, hasCallUnder, initiateControlFlowAnal, initiateDataFlowAnal, isComputed, isComputedOrUnderComputation, isFailed, pointVector, pointVectorIterator, printExpIdAndIrCorrespondence, recordBBlock, recordDefPoint, recordDefRefPoint, resetComputedFlag, resetControlAndDataFlowInformation, resetFlowSymLink, resetFlowSymLinkForRecordedSym, resetGlobalFlowSymLink, setBBlock, setBBlock, setBBlockVectorBitCount, setComputedFlag, setDefVectorBitCount, setEntryBBlock, setExitBBlock, setExpId, setExpOfTemp, setExpVectorBitCount, setFlowAnalStateLevel, setNumberOfNodes, setOfAddressTakenVariables, setOfGlobalVariables, setPointVectorBitCount, setPrevBBlockInSearch, setRecordAlias, setRestructureFlag, setSetRefReprList, setSetRefReprOfIR, setUnderComputation, sortExpIdCollection, subtreesContainingCall, summarize
 

フィールドの詳細

EXP_ID_HASH_SIZE

public static final int EXP_ID_HASH_SIZE
関連項目:
定数フィールド値

fStmtExpSeq

public HIR[] fStmtExpSeq

fStmtExpSeqIndexForBBlock

public int[] fStmtExpSeqIndexForBBlock

fStmtExpCount

public int fStmtExpCount
コンストラクタの詳細

HirSubpFlowImpl

public HirSubpFlowImpl(FlowRoot pFlowRoot,
                       SubpDefinition pSubpDefinition)
メソッドの詳細

divideHirIntoBasicBlocks

public boolean divideHirIntoBasicBlocks()
Divide HIR into basic blocks assuming that nodes of this SubpDefinition are all numbered. Make fFlowIrLink, fBBlockOfIR fUsedSymSet fSetOfGlobalVariables fHirNodeArray and set index to FlowAnalSyms apperaed in SubpDefinition.

定義:
インタフェース HirSubpFlow 内の divideHirIntoBasicBlocks
戻り値:
false if failed (by bad node index), otherwise return true. //##78

divideLirIntoBasicBlocks

public void divideLirIntoBasicBlocks()
定義:
インタフェース HirSubpFlow 内の divideLirIntoBasicBlocks

allocateExpIdForSubp

public void allocateExpIdForSubp()
Allocate ExpId for each data handling node. ExpId allocation is required for SetRefRepr computation and data flow analysis. The method allocateExpIdForSubp computes also fExpIdTable fExpIdList fSymIndexTable fDefRefIndex fDefIndex fDefRefPoint fDefPoint fDefinedSyms fFlowAnalSymTable

定義:
インタフェース HirSubpFlow 内の allocateExpIdForSubp

allocateExpIdToNode

public ExpInf allocateExpIdToNode(HIR pSubtree)
Allocate ExpId to pSubtree and its descendents. If pSubtree is allocated an ExpId, then it is returned. If pSubtree is not allocated ExpId, then (representative) ExpId of its descendents is returned.

パラメータ:
pSubtree - to which ExpId is to be assigned.
戻り値:
ExpId of pSubtree or its descendent.

selectExpId

ExpId selectExpId(HIR pSubtree,
                  ExpInf pExpInf)
selectExpId Select ExpId for pSubtree and assign it to pSubtree.


getHashCodeOfIndexedNode

public int getHashCodeOfIndexedNode(int pNodeIndex)

setHashCodeOfIndexedNode

public void setHashCodeOfIndexedNode(int pNodeIndex,
                                     int pHashCode)

computeHashCodeOfNode

int computeHashCodeOfNode(HIR pNode)
computeHashCodeOfNode Compute hash code of node pNode taking into account the hash codes of its children so that any two subtrees have the same hash code if they have the same shape.


isSameTree

protected boolean isSameTree(HIR pTree1,
                             HIR pTree2)
isSameTree

戻り値:
true if pTree1 and pTree2 have the same shape, false otherwise.

computeBBlockSetRefReprs

public void computeBBlockSetRefReprs()
定義:
インタフェース SubpFlow 内の computeBBlockSetRefReprs
オーバーライド:
クラス SubpFlowImpl 内の computeBBlockSetRefReprs

hasCall

public boolean hasCall()
定義:
インタフェース SubpFlow 内の hasCall

getFlowIrLink

public IR[] getFlowIrLink()

recordSetRefReprs

public void recordSetRefReprs()
Records the SetRefReprs each BBlock contains.


recordSetRefReprs

public void recordSetRefReprs(BBlockHirImpl pBBlock)
recordSetRefReprs Compute and record the SetRefReprs for each subtree (statement) in the given BBlock. Only supports HIR so far.

パラメータ:
pBBlock - BBlock whose SetRefReprs will be recorded.

recordSetRefReprsForNode

public void recordSetRefReprsForNode(HIR pSubtree,
                                     java.util.List pSetRefReprList,
                                     BBlock pBBlock)
Make instance of SetRefReprHirEImpl if pSubtree is AssignStmt, ExpStmt (FunctionExp, conditional exp) or Retrun statement and record it to pSetRefReprList.

パラメータ:
pSubtree -
pSetRefReprList -
pBBlock -