Static Value-Flow Analysis
Public Member Functions | Protected Attributes | List of all members
SVF::StmtDPItem< LocCond > Class Template Reference

#include <DPItem.h>

Inheritance diagram for SVF::StmtDPItem< LocCond >:
SVF::DPItem SVF::CxtStmtDPItem< LocCond >

Public Member Functions

 StmtDPItem (NodeID c, const LocCond *locCond)
 Constructor. More...
 
 StmtDPItem (const StmtDPItem &dps)
 Copy constructor. More...
 
virtual ~StmtDPItem ()
 Destructor. More...
 
const LocCond * getLoc () const
 Get context. More...
 
void setLoc (const LocCond *l)
 Set location. More...
 
void setLocVar (const LocCond *l, NodeID v)
 Set location and pointer id. More...
 
bool operator< (const StmtDPItem &rhs) const
 
StmtDPItemoperator= (const StmtDPItem &rhs)
 Overloading operator==. More...
 
bool operator== (const StmtDPItem &rhs) const
 Overloading operator==. More...
 
bool operator!= (const StmtDPItem &rhs) const
 Overloading operator!=. More...
 
void dump () const
 
- Public Member Functions inherited from SVF::DPItem
 DPItem (NodeID c)
 Constructor. More...
 
 DPItem (const DPItem &dps)
 Copy constructor. More...
 
 DPItem (DPItem &&dps) noexcept
 Move constructor. More...
 
DPItemoperator= (DPItem &&rhs) noexcept
 Move operator=. More...
 
virtual ~DPItem ()
 Destructor. More...
 
NodeID getCurNodeID () const
 
void setCurNodeID (NodeID c)
 
bool operator< (const DPItem &rhs) const
 
DPItemoperator= (const DPItem &rhs)
 Overloading Operator=. More...
 
bool operator== (const DPItem &rhs) const
 Overloading Operator==. More...
 
bool operator!= (const DPItem &rhs) const
 Overloading Operator!=. More...
 
void dump () const
 

Protected Attributes

const LocCond * curloc
 
- Protected Attributes inherited from SVF::DPItem
NodeID cur
 

Additional Inherited Members

- Static Public Member Functions inherited from SVF::DPItem
static void setMaxBudget (u32_t max)
 set max step budge per query More...
 
static u32_t getMaxBudget ()
 
- Static Protected Attributes inherited from SVF::DPItem
static u64_t maximumBudget = ULONG_MAX - 1
 

Detailed Description

template<class LocCond>
class SVF::StmtDPItem< LocCond >

FlowSensitive DPItem

Definition at line 131 of file DPItem.h.

Constructor & Destructor Documentation

◆ StmtDPItem() [1/2]

template<class LocCond >
SVF::StmtDPItem< LocCond >::StmtDPItem ( NodeID  c,
const LocCond *  locCond 
)
inline

Constructor.

Definition at line 140 of file DPItem.h.

140  : DPItem(c), curloc(locCond)
141  {
142  }
DPItem(NodeID c)
Constructor.
Definition: DPItem.h:52
const LocCond * curloc
Definition: DPItem.h:136

◆ StmtDPItem() [2/2]

template<class LocCond >
SVF::StmtDPItem< LocCond >::StmtDPItem ( const StmtDPItem< LocCond > &  dps)
inline

Copy constructor.

Definition at line 144 of file DPItem.h.

144  :
145  DPItem(dps), curloc(dps.curloc)
146  {
147  }

◆ ~StmtDPItem()

template<class LocCond >
virtual SVF::StmtDPItem< LocCond >::~StmtDPItem ( )
inlinevirtual

Destructor.

Definition at line 149 of file DPItem.h.

150  {
151  }

Member Function Documentation

◆ dump()

template<class LocCond >
void SVF::StmtDPItem< LocCond >::dump ( ) const
inline

Definition at line 197 of file DPItem.h.

198  {
199  SVFUtil::outs() << "statement " << *(this->curloc) << ", var " << this->cur << "\n";
200  }
NodeID cur
Definition: DPItem.h:47
std::ostream & outs()
Overwrite llvm::outs()
Definition: SVFUtil.h:50

◆ getLoc()

template<class LocCond >
const LocCond* SVF::StmtDPItem< LocCond >::getLoc ( ) const
inline

Get context.

Definition at line 153 of file DPItem.h.

154  {
155  return this->curloc;
156  }

◆ operator!=()

template<class LocCond >
bool SVF::StmtDPItem< LocCond >::operator!= ( const StmtDPItem< LocCond > &  rhs) const
inline

Overloading operator!=.

Definition at line 193 of file DPItem.h.

194  {
195  return !(*this==rhs);
196  }

◆ operator<()

template<class LocCond >
bool SVF::StmtDPItem< LocCond >::operator< ( const StmtDPItem< LocCond > &  rhs) const
inline

Enable compare operator to avoid duplicated item insertion in map or set to be noted that two vectors can also overload operator()

Definition at line 170 of file DPItem.h.

171  {
172  if (this->cur != rhs.cur)
173  return this->cur < rhs.cur;
174  else
175  return this->curloc < rhs.curloc;
176  }

◆ operator=()

template<class LocCond >
StmtDPItem& SVF::StmtDPItem< LocCond >::operator= ( const StmtDPItem< LocCond > &  rhs)
inline

Overloading operator==.

Definition at line 178 of file DPItem.h.

179  {
180  if(*this!=rhs)
181  {
182  DPItem::operator=(rhs);
183  this->curloc = rhs.getLoc();
184  }
185  return *this;
186  }
DPItem & operator=(DPItem &&rhs) noexcept
Move operator=.
Definition: DPItem.h:65

◆ operator==()

template<class LocCond >
bool SVF::StmtDPItem< LocCond >::operator== ( const StmtDPItem< LocCond > &  rhs) const
inline

Overloading operator==.

Definition at line 188 of file DPItem.h.

189  {
190  return (this->cur == rhs.cur && this->curloc == rhs.getLoc());
191  }

◆ setLoc()

template<class LocCond >
void SVF::StmtDPItem< LocCond >::setLoc ( const LocCond *  l)
inline

Set location.

Definition at line 158 of file DPItem.h.

159  {
160  this->curloc = l;
161  }

◆ setLocVar()

template<class LocCond >
void SVF::StmtDPItem< LocCond >::setLocVar ( const LocCond *  l,
NodeID  v 
)
inline

Set location and pointer id.

Definition at line 163 of file DPItem.h.

164  {
165  this->curloc = l;
166  this->cur = v;
167  }

Member Data Documentation

◆ curloc

template<class LocCond >
const LocCond* SVF::StmtDPItem< LocCond >::curloc
protected

Definition at line 136 of file DPItem.h.


The documentation for this class was generated from the following file: