SVF
CommonCHG.h
Go to the documentation of this file.
1 //===----- CommonCHG.h -- Base class of CHG implementations ------------------//
2 // A common base to CHGraph and DCHGraph.
3 
4 /*
5  * CommonCHG.h
6  *
7  * Created on: Aug 24, 2019
8  * Author: Mohamad Barbar
9  */
10 
11 #ifndef COMMONCHG_H_
12 #define COMMONCHG_H_
13 
14 namespace SVF
15 {
16 
19 
22 {
23 public:
24  virtual ~CommonCHGraph() { };
25  enum CHGKind
26  {
29  };
30 
31  virtual bool csHasVFnsBasedonCHA(CallSite cs) = 0;
32  virtual const VFunSet &getCSVFsBasedonCHA(CallSite cs) = 0;
33  virtual bool csHasVtblsBasedonCHA(CallSite cs) = 0;
34  virtual const VTableSet &getCSVtblsBasedonCHA(CallSite cs) = 0;
35  virtual void getVFnsFromVtbls(CallSite cs, const VTableSet &vtbls, VFunSet &virtualFunctions) = 0;
36 
37  CHGKind getKind(void) const
38  {
39  return kind;
40  }
41 
42 protected:
44 };
45 
46 } // End namespace SVF
47 
48 #endif /* COMMONCHG_H_ */
49 
virtual const VTableSet & getCSVtblsBasedonCHA(CallSite cs)=0
virtual const VFunSet & getCSVFsBasedonCHA(CallSite cs)=0
virtual void getVFnsFromVtbls(CallSite cs, const VTableSet &vtbls, VFunSet &virtualFunctions)=0
virtual ~CommonCHGraph()
Definition: CommonCHG.h:24
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
Definition: SVFBasicTypes.h:93
virtual bool csHasVtblsBasedonCHA(CallSite cs)=0
Set< const SVFFunction * > VFunSet
Definition: CommonCHG.h:18
Set< const GlobalValue * > VTableSet
Definition: CommonCHG.h:17
for isBitcode
Definition: ContextDDA.h:15
virtual bool csHasVFnsBasedonCHA(CallSite cs)=0
Common base for class hierarchy graph. Only implements what PointerAnalysis needs.
Definition: CommonCHG.h:21
CHGKind getKind(void) const
Definition: CommonCHG.h:37