ManagerICFGDep.hpp

Go to the documentation of this file.
00001 
00015 #ifndef ManagerICFGDep_H
00016 #define ManagerICFGDep_H
00017 
00018 //--------------------------------------------------------------------
00019 // OpenAnalysis headers
00020 #include "ICFGDep.hpp"
00021 #include "DepDFSet.hpp"
00022 #include <OpenAnalysis/IRInterface/ActivityIRInterface.hpp>
00023 #include <OpenAnalysis/ExprTree/DifferentiableLocsVisitor.hpp>
00024 #include <OpenAnalysis/ExprTree/EvalToMemRefVisitor.hpp>
00025 #include <OpenAnalysis/DataFlow/ICFGDFProblem.hpp>
00026 #include <OpenAnalysis/DataFlow/ICFGDFSolver.hpp>
00027 #include <OpenAnalysis/DataFlow/ParamBindings.hpp>
00028 #include <OpenAnalysis/DataFlow/LocDFSet.hpp>
00029 #include <OpenAnalysis/IRInterface/IRHandles.hpp>
00030 
00031 
00032 namespace OA {
00033   namespace Activity {
00034 
00044 class ManagerICFGDep : public virtual DataFlow::ICFGDFProblem
00045 {
00046 public:
00047   ManagerICFGDep(OA_ptr<ActivityIRInterface> _ir);
00048   ~ManagerICFGDep () {}
00049 
00050   OA_ptr<ICFGDep> 
00051   performAnalysis(OA_ptr<ICFG::ICFGInterface> icfg,
00052                   OA_ptr<DataFlow::ParamBindings> paramBind,
00053                   OA_ptr<Alias::InterAliasInterface> interAlias,
00054                   DataFlow::DFPImplement algorithm);
00055 private:
00056   //========================================================
00057   // implementation of ICFGDFProblem interface
00058   //========================================================
00059   //--------------------------------------------------------
00060   // initialization callbacks
00061   //--------------------------------------------------------
00062 
00064   OA_ptr<DataFlow::DataFlowSet>  initializeTop();
00065   
00067   OA_ptr<DataFlow::DataFlowSet> 
00068       initializeNodeIN(OA_ptr<ICFG::NodeInterface> n);
00069   OA_ptr<DataFlow::DataFlowSet> 
00070       initializeNodeOUT(OA_ptr<ICFG::NodeInterface> n); 
00071  
00072   //--------------------------------------------------------
00073   // solver callbacks 
00074   //--------------------------------------------------------
00075   
00078   OA_ptr<DataFlow::DataFlowSet> meet(OA_ptr<DataFlow::DataFlowSet> set1, 
00079                                      OA_ptr<DataFlow::DataFlowSet> set2); 
00080 
00083   OA_ptr<DataFlow::DataFlowSet> 
00084       transfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> in, 
00085                OA::StmtHandle stmt);
00086   
00090   OA_ptr<DataFlow::DataFlowSet> 
00091       entryTransfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> in)
00092         { return initializeTop(); }
00093 
00097   OA_ptr<DataFlow::DataFlowSet> 
00098       exitTransfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> out)
00099         { return initializeTop(); }
00100 
00102   OA_ptr<DataFlow::DataFlowSet> callerToCallee(ProcHandle caller,
00103     OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle callee)
00104         { return initializeTop(); }
00105   
00107   OA_ptr<DataFlow::DataFlowSet> calleeToCaller(ProcHandle callee,
00108     OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle caller)
00109         { return initializeTop(); }
00110 
00112  OA_ptr<DataFlow::DataFlowSet> callToReturn(ProcHandle caller,
00113     OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle callee)
00114         { return initializeTop(); }
00115 
00116 private: // member variables
00117 
00118   OA_ptr<ActivityIRInterface> mIR;
00119   OA_ptr<ICFGDep> mDep;
00120   OA_ptr<Alias::InterAliasInterface> mInterAlias;
00121   OA_ptr<DataFlow::ParamBindings> mParamBind;
00122   OA_ptr<DataFlow::ICFGDFSolver> mSolver;
00123   OA_ptr<ICFG::ICFGInterface> mICFG;
00124 
00125 };
00126 
00127   } // end of Activity namespace
00128 } // end of OA namespace
00129 
00130 #endif