CFGDFProblem.hpp

Go to the documentation of this file.
00001 
00023 #ifndef CFGDFProblem_h
00024 #define CFGDFProblem_h
00025 
00026 
00027 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00028 #include <OpenAnalysis/DataFlow/DataFlowSet.hpp>
00029 
00030 
00031 //#include <OpenAnalysis/DataFlow/DGraphIterativeDFP.hpp>
00032 #include <OpenAnalysis/DataFlow/DGraphSolverDFP.hpp>
00033 #include <OpenAnalysis/CFG/CFGInterface.hpp>
00034 #include <OpenAnalysis/IRInterface/CFGIRInterface.hpp>
00035 #include <map>
00036 
00037 namespace OA {
00038   namespace DataFlow {
00039 
00040   
00041 //*********************************************************************
00042 // class CFGDFProblem
00043 //*********************************************************************
00044 class CFGDFProblem 
00045 {
00046 
00047 public:
00048   //--------------------------------------------------------
00049   // constructor/destructor
00050   //--------------------------------------------------------
00051   CFGDFProblem() { }
00052   virtual ~CFGDFProblem() {}
00053 
00054   //--------------------------------------------------------
00055   // initialization callbacks
00056   //--------------------------------------------------------
00057 
00059   virtual OA_ptr<DataFlowSet>  initializeTop() = 0;
00060 
00062   virtual OA_ptr<DataFlowSet>  initializeBottom() = 0;
00063 
00066   //virtual void initializeNode(OA_ptr<CFG::Interface::Node> n)  = 0;
00067   //virtual void initializeEdge(DGraph::Interface::Edge *e)  = 0;
00068 
00069   
00071    virtual OA_ptr<DataFlowSet>
00072          initializeNodeIN(OA_ptr<CFG::NodeInterface> n)  = 0;
00073    virtual OA_ptr<DataFlowSet>
00074          initializeNodeOUT(OA_ptr<CFG::NodeInterface> n)  = 0;
00075 
00076   
00077   //--------------------------------------------------------
00078   // solver callbacks 
00079   //--------------------------------------------------------
00080   
00083   virtual OA_ptr<DataFlowSet> meet(OA_ptr<DataFlowSet> set1, 
00084                                    OA_ptr<DataFlowSet> set2) = 0; 
00085 
00088   virtual OA_ptr<DataFlowSet> transfer(OA_ptr<DataFlowSet> in, 
00089                                        OA::StmtHandle stmt) = 0;
00090 
00091 };
00092 
00093   } // end of DataFlow namespace
00094 }  // end of OA namespace
00095 
00096 #endif

Generated on Sat Oct 31 05:21:20 2009 for OpenAnalysis by  doxygen 1.6.1