Go to the documentation of this file.00001
00016 #ifndef ManagerICFGUseful_H
00017 #define ManagerICFGUseful_H
00018
00019
00020 #include <cassert>
00021
00022
00023 #include <OpenAnalysis/Alias/InterAliasInterface.hpp>
00024 #include <OpenAnalysis/SideEffect/InterSideEffectInterface.hpp>
00025 #include <OpenAnalysis/IRInterface/ActivityIRInterface.hpp>
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include <OpenAnalysis/DataFlow/ICFGDFProblem.hpp>
00036 #include <OpenAnalysis/DataFlow/ICFGDFSolver.hpp>
00037 #include <OpenAnalysis/DataFlow/ParamBindings.hpp>
00038 #include <OpenAnalysis/DataFlow/LocDFSet.hpp>
00039 #include <OpenAnalysis/Activity/InterUseful.hpp>
00040 #include <OpenAnalysis/Activity/ICFGDep.hpp>
00041
00042 #include "ManagerUsefulStandard.hpp"
00043
00044 namespace OA {
00045 namespace Activity {
00046
00051 class ManagerICFGUseful : public virtual DataFlow::ICFGDFProblem
00052 {
00053 public:
00054 ManagerICFGUseful(OA_ptr<ActivityIRInterface> _ir);
00055 ~ManagerICFGUseful () {}
00056
00057 OA_ptr<InterUseful>
00058 performAnalysis(OA_ptr<ICFG::ICFGInterface> icfg,
00059 OA_ptr<DataFlow::ParamBindings> paramBind,
00060 OA_ptr<Alias::InterAliasInterface> interAlias,
00061 OA_ptr<SideEffect::InterSideEffectInterface> interSE,
00062 OA_ptr<ICFGDep> icfgDep,
00063 DataFlow::DFPImplement algorithm);
00064
00065 private:
00066
00067
00068
00069
00070
00071
00072
00074 OA_ptr<DataFlow::DataFlowSet> initializeTop();
00075
00077 OA_ptr<DataFlow::DataFlowSet>
00078 initializeNodeIN(OA_ptr<ICFG::NodeInterface> n);
00079 OA_ptr<DataFlow::DataFlowSet>
00080 initializeNodeOUT(OA_ptr<ICFG::NodeInterface> n);
00081
00082
00083
00084
00085
00088 OA_ptr<DataFlow::DataFlowSet> meet(OA_ptr<DataFlow::DataFlowSet> set1,
00089 OA_ptr<DataFlow::DataFlowSet> set2);
00090
00093 OA_ptr<DataFlow::DataFlowSet>
00094 transfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> in,
00095 OA::StmtHandle stmt);
00096
00100 OA_ptr<DataFlow::DataFlowSet>
00101 entryTransfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> in);
00102
00106 OA_ptr<DataFlow::DataFlowSet>
00107 exitTransfer(ProcHandle proc, OA_ptr<DataFlow::DataFlowSet> out);
00108
00110 OA_ptr<DataFlow::DataFlowSet> callerToCallee(ProcHandle caller,
00111 OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle callee);
00112
00114 OA_ptr<DataFlow::DataFlowSet> calleeToCaller(ProcHandle callee,
00115 OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle caller);
00116
00118 OA_ptr<DataFlow::DataFlowSet> callToReturn(ProcHandle caller,
00119 OA_ptr<DataFlow::DataFlowSet> dfset, CallHandle call, ProcHandle callee);
00120
00121 private:
00122 OA_ptr<InterUseful> mInterUseful;
00123 OA_ptr<ActivityIRInterface> mIR;
00124 OA_ptr<DataFlow::ParamBindings> mParamBind;
00125 OA_ptr<ICFGDep> mICFGDep;
00126 OA_ptr<Alias::InterAliasInterface> mInterAlias;
00127 OA_ptr<DataFlow::ICFGDFSolver> mSolver;
00128 OA_ptr<ICFG::ICFGInterface> mICFG;
00129
00130
00131
00132
00133 OA_ptr<SideEffect::InterSideEffectInterface> mInterSE;
00134
00135 std::map<ProcHandle,OA_ptr<UsefulStandard> > mUsefulMap;
00136
00137 };
00138
00139 }
00140 }
00141
00142 #endif