coins.alias
クラス TagTreeBuilder

java.lang.Object
  |
  +--coins.ir.hir.HirVisitorModel2
        |
        +--coins.alias.TagTreeBuilder
すべての実装インタフェース:
HirVisitor

class TagTreeBuilder
extends HirVisitorModel2

Builds tag tree and assigns tags to HIR nodes.


フィールドの概要
(パッケージプライベート)  java.util.Map fHIRTomallocTag
          Map from malloc invocation HIR nodes to corresponding Tags.
(パッケージプライベート)  java.util.List fParentlessTags
          Tags corresponding to each named variable and allocated area and unknown external area.
(パッケージプライベート)  int fTagBitCount
          Total number of Tags that have a bit position assigned in the TagVector.
 
クラス coins.ir.hir.HirVisitorModel2 から継承したフィールド
fDbgLevel, hirRoot, ioRoot, symRoot
 
コンストラクタの概要
(パッケージプライベート) TagTreeBuilder(SubpDefinition pSubpDef, MyExpId[] pMyExpIds, boolean pIsOptimistic, HirRoot pHirRoot)
          Creates a new instance of TagTreeBuilder
 
メソッドの概要
 void atExp(Exp pExp)
          Visits the children of the specified argument, creates a Tag for the MyExpId attached to the specified argument if it is lvalue and not yet done, and registers the node-Tag correspondence into a global map.
 void atFunctionExp(FunctionExp pExp)
          Visits the children of the specified argument, and, if the specified argument is the C malloc library function call node, creates a Tag for the area allocated by the call and registers the node-Tag correspondence into a global map.
 void atPointedExp(PointedExp pExp)
          Visits the children of the specified argument, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.
 void atQualifiedExp(QualifiedExp pExp)
          Visits the children of the specified argument, and if the specified argument is lvalue, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.
 void atSubscriptedExp(SubscriptedExp pExp)
          Visits the children of the specified argument, and if the specified argument is not lvalue, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.
 void atVarNode(VarNode pVarNode)
          Creates a Tag for the Var attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.
(パッケージプライベート)  java.util.Map process()
          Builds the Tag tree.
 
クラス coins.ir.hir.HirVisitorModel2 から継承したメソッド
atAsmStmt, atAssignStmt, atBlockStmt, atConstNode, atElemNode, atExpStmt, atForStmt, atHirList, atHirSeq, atIfStmt, atIndexedLoopStmt, atInfNode, atInfStmt, atIrList, atJumpStmt, atLabelDef, atLabeledStmt, atLabelNode, atLoopStmt, atNullNode, atPhiExp, atProgram, atRepeatStmt, atReturnStmt, atSubpDefinition, atSubpNode, atSwitchStmt, atSymNode, atTypeNode, atUntilStmt, atWhileStmt, visit, visitChildren
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

fTagBitCount

int fTagBitCount
Total number of Tags that have a bit position assigned in the TagVector.


fHIRTomallocTag

java.util.Map fHIRTomallocTag
Map from malloc invocation HIR nodes to corresponding Tags.


fParentlessTags

java.util.List fParentlessTags
Tags corresponding to each named variable and allocated area and unknown external area. The whole area in memory that can be referred to by the subprogram under consideraion is covered by the tags that are in this List.

コンストラクタの詳細

TagTreeBuilder

TagTreeBuilder(SubpDefinition pSubpDef,
               MyExpId[] pMyExpIds,
               boolean pIsOptimistic,
               HirRoot pHirRoot)
Creates a new instance of TagTreeBuilder

パラメータ:
pSubpDef - the SubpDefinition object this module is responsible for.
pMyExpIds - the array of MyExpId objects, with HIR node's index as its index. This serves as the map from HIR nodes to MyExpId objects.
pHirRoot - the HirRoot object shared by every module in the program.
メソッドの詳細

process

java.util.Map process()
Builds the Tag tree. It creates a Tag for each MyExpId that is lvalue, builds tree relation between those Tags, and makes a Map from HIR nodes to such Tags.

戻り値:
the Map from HIR nodes to Tags.

atVarNode

public void atVarNode(VarNode pVarNode)
Creates a Tag for the Var attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atVarNode
オーバーライド:
クラス HirVisitorModel2 内の atVarNode
パラメータ:
pVarNode - the VarNode the Var attached to which is going to be assigned a Tag.

atSubscriptedExp

public void atSubscriptedExp(SubscriptedExp pExp)
Visits the children of the specified argument, and if the specified argument is not lvalue, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atSubscriptedExp
オーバーライド:
クラス HirVisitorModel2 内の atSubscriptedExp
パラメータ:
pExp - the SubscriptedExp the MyExpId attached to which is going to be assigned a Tag.

atQualifiedExp

public void atQualifiedExp(QualifiedExp pExp)
Visits the children of the specified argument, and if the specified argument is lvalue, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atQualifiedExp
オーバーライド:
クラス HirVisitorModel2 内の atQualifiedExp
パラメータ:
pExp - the QualifiedExp the MyExpId attached to which is going to be assigned a Tag.

atPointedExp

public void atPointedExp(PointedExp pExp)
Visits the children of the specified argument, creates a Tag for the MyExpId attached to the specified argument if it is not yet done, and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atPointedExp
オーバーライド:
クラス HirVisitorModel2 内の atPointedExp
パラメータ:
pExp - the PointedExp the MyExpId attached to which is going to be assigned a Tag.

atExp

public void atExp(Exp pExp)
Visits the children of the specified argument, creates a Tag for the MyExpId attached to the specified argument if it is lvalue and not yet done, and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atExp
オーバーライド:
クラス HirVisitorModel2 内の atExp
パラメータ:
pExp - the Exp the MyExpId attached to which is going to be assigned a Tag.

atFunctionExp

public void atFunctionExp(FunctionExp pExp)
Visits the children of the specified argument, and, if the specified argument is the C malloc library function call node, creates a Tag for the area allocated by the call and registers the node-Tag correspondence into a global map.

定義:
インタフェース HirVisitor 内の atFunctionExp
オーバーライド:
クラス HirVisitorModel2 内の atFunctionExp
パラメータ:
pExp - the FunctionExp the area allocated by which is going to be assigned a Tag.