Static Value-Flow Analysis
Loading...
Searching...
No Matches
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.
 
 StmtDPItem (const StmtDPItem &dps)
 Copy constructor.
 
virtual ~StmtDPItem ()
 Destructor.
 
const LocCondgetLoc () const
 Get context.
 
void setLoc (const LocCond *l)
 Set location.
 
void setLocVar (const LocCond *l, NodeID v)
 Set location and pointer id.
 
bool operator< (const StmtDPItem &rhs) const
 
StmtDPItemoperator= (const StmtDPItem &rhs)
 Overloading operator==.
 
bool operator== (const StmtDPItem &rhs) const
 Overloading operator==.
 
bool operator!= (const StmtDPItem &rhs) const
 Overloading operator!=.
 
void dump () const
 
- Public Member Functions inherited from SVF::DPItem
 DPItem (NodeID c)
 Constructor.
 
 DPItem (const DPItem &dps)
 Copy constructor.
 
 DPItem (DPItem &&dps) noexcept
 Move constructor.
 
DPItemoperator= (DPItem &&rhs) noexcept
 Move operator=.
 
virtual ~DPItem ()
 Destructor.
 
NodeID getCurNodeID () const
 
void setCurNodeID (NodeID c)
 
bool operator< (const DPItem &rhs) const
 
DPItemoperator= (const DPItem &rhs)
 Overloading Operator=.
 
bool operator== (const DPItem &rhs) const
 Overloading Operator==.
 
bool operator!= (const DPItem &rhs) const
 Overloading Operator!=.
 
void dump () const
 

Protected Attributes

const LocCondcurloc
 
- 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
 
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 132 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 141 of file DPItem.h.

142 {
143 }
DPItem(NodeID c)
Constructor.
Definition DPItem.h:53
const LocCond * curloc
Definition DPItem.h:137
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ StmtDPItem() [2/2]

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

Copy constructor.

Definition at line 145 of file DPItem.h.

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

◆ ~StmtDPItem()

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

Destructor.

Definition at line 150 of file DPItem.h.

151 {
152 }

Member Function Documentation

◆ dump()

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

Definition at line 198 of file DPItem.h.

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

◆ getLoc()

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

Get context.

Definition at line 154 of file DPItem.h.

155 {
156 return this->curloc;
157 }

◆ operator!=()

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

Overloading operator!=.

Definition at line 194 of file DPItem.h.

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

◆ 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 171 of file DPItem.h.

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

◆ operator=()

Overloading operator==.

Definition at line 179 of file DPItem.h.

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

◆ operator==()

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

Overloading operator==.

Definition at line 189 of file DPItem.h.

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

◆ setLoc()

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

Set location.

Definition at line 159 of file DPItem.h.

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

◆ setLocVar()

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

Set location and pointer id.

Definition at line 164 of file DPItem.h.

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

Member Data Documentation

◆ curloc

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

Definition at line 137 of file DPItem.h.


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