coins.ir.hir
クラス SubsPtrTransformation

java.lang.Object
  |
  +--coins.ir.hir.SubsPtrTransformation

public class SubsPtrTransformation
extends java.lang.Object

SubsPtrTransformation Array subscript (Subs) expression to pointer expression transformation and vice versa.


フィールドの概要
protected  int fDbgLevel
           
(パッケージプライベート)  HirRoot hirRoot
           
(パッケージプライベート)  IoRoot ioRoot
           
(パッケージプライベート)  SymRoot symRoot
           
 
コンストラクタの概要
SubsPtrTransformation(HirRoot pHirRoot)
          Constructor to prepare for transformation
 
メソッドの概要
 java.util.ArrayList listUpPtrNodes(HIR pHir)
          listUpPtrNodes Make an array-list of pointer expressions taking the form (contents (add (decay ) (exp ) ) ) in pHir in the order of pre-visiting depth-first order.
 java.util.ArrayList listUpSubsNodes(HIR pHir)
          listUpSubsNodes Make an array-list of Subs nodes in pHir in the order of pre-visiting depth-first order.
 boolean ptrToSubsTransformation(HIR pHir, java.util.Map pPtrSubsCorrespondence)
          ptrToSubsTrasnsformation Transform pointer expression in pHir to subscript expression if the pointer expression is recorded in pPtrSubsCorrespondence or it is an expression representing simple subscripted expression.
 boolean subsToPtrTrasnsformation(HIR pHir, java.util.Map pPtrSubsCorrespondence)
          subsToPtrTrasnsformation Transform subscripted expression in pHir to pointer expression and record its correspondence to pPtrSubsCorrespondence.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

ioRoot

IoRoot ioRoot

hirRoot

HirRoot hirRoot

symRoot

SymRoot symRoot

fDbgLevel

protected final int fDbgLevel
コンストラクタの詳細

SubsPtrTransformation

public SubsPtrTransformation(HirRoot pHirRoot)
Constructor to prepare for transformation

パラメータ:
pHirRoot - HirRoot instance to be recorded.
メソッドの詳細

listUpSubsNodes

public java.util.ArrayList listUpSubsNodes(HIR pHir)
listUpSubsNodes Make an array-list of Subs nodes in pHir in the order of pre-visiting depth-first order.

パラメータ:
pHir - the subtree to be searched (usually HIR-body of subprogram).
戻り値:
the array-list of Subs nodes.

subsToPtrTrasnsformation

public boolean subsToPtrTrasnsformation(HIR pHir,
                                        java.util.Map pPtrSubsCorrespondence)
subsToPtrTrasnsformation Transform subscripted expression in pHir to pointer expression and record its correspondence to pPtrSubsCorrespondence.

パラメータ:
pHir - HIR subtree to be transformed.
pPtrSubsCorrespondence - record the Subs-Ptr correspondence.
戻り値:
true if some expression is transformed, false if no expression is transformed.

ptrToSubsTransformation

public boolean ptrToSubsTransformation(HIR pHir,
                                       java.util.Map pPtrSubsCorrespondence)
ptrToSubsTrasnsformation Transform pointer expression in pHir to subscript expression if the pointer expression is recorded in pPtrSubsCorrespondence or it is an expression representing simple subscripted expression.

パラメータ:
pHir - HIR subtree to be transformed.
pPtrSubsCorrespondence - show the Subs-Ptr correspondence.
戻り値:
true if some expression is transformed, false if no expression is transformed.

listUpPtrNodes

public java.util.ArrayList listUpPtrNodes(HIR pHir)
listUpPtrNodes
 Make an array-list of  pointer expressions taking the form
   (contents
    (add
     (decay
      )
     (exp ) ) )
  in pHir in the order of
 pre-visiting depth-first order.

パラメータ:
pHir - the subtree to be searched (usually HIR-body of subprogram).
戻り値:
the array-list of contents-nodes.