ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFAnalysis.h
Go to the documentation of this file.
1 /******************************************
2  * Category: DFA
3  * Dataflow Analysis declaration
4  * created by tps in Feb 2007
5  *****************************************/
6 
7 #ifndef __DFA_HXX_LOADED__
8 #define __DFA_HXX_LOADED__
9 #include <string>
10 
12 {
13  public:
14  DFAnalysis() {};
15  virtual ~DFAnalysis() {};
16 
18  virtual int run() = 0;
19  virtual int run(bool debug) = 0;
20  // request information from the DFA
21 
23  virtual std::vector < std::pair <SgInitializedName* , SgNode*> > getDefMultiMapFor(SgNode* node)=0;
24 
26  virtual std::vector < std::pair <SgInitializedName* , SgNode*> > getUseMultiMapFor(SgNode* node)=0;
27 
29  virtual std::vector < SgNode* > getDefFor(SgNode* node, SgInitializedName* initName)=0;
30 
32  virtual std::vector < SgNode* > getUseFor(SgNode* node, SgInitializedName* initName)=0;
33 
35  virtual bool isNodeGlobalVariable(SgInitializedName* node)=0;
36 
37  // used for testing and visualization
38  virtual void printDefMap() = 0;
39  virtual void printUseMap() = 0;
40  virtual int getDefSize()=0;
41  virtual int getUseSize()=0;
42  virtual int getIntForSgNode(SgNode* node)=0;
43  virtual void dfaToDOT()=0;
44 
45  virtual std::map< SgNode* , std::vector < std::pair <SgInitializedName* , SgNode*> > > getDefMap()=0;
46  virtual std::map< SgNode* , std::vector < std::pair <SgInitializedName* , SgNode*> > > getUseMap()=0;
47  virtual void setMaps(std::map< SgNode* , std::vector < std::pair <SgInitializedName* , SgNode*> > > def,
48  std::map< SgNode* , std::vector < std::pair <SgInitializedName* , SgNode*> > > use)=0;
49 
50 };
51 
52 #endif