Static Value-Flow Analysis
Public Member Functions | Private Attributes | List of all members
SVF::CxtThreadStmt Class Reference

#include <CxtStmt.h>

Inheritance diagram for SVF::CxtThreadStmt:
SVF::CxtStmt

Public Member Functions

 CxtThreadStmt (NodeID t, const CallStrCxt &c, const ICFGNode *f)
 Constructor. More...
 
 CxtThreadStmt (const CxtThreadStmt &ctm)
 Copy constructor. More...
 
virtual ~CxtThreadStmt ()
 Destructor. More...
 
NodeID getTid () const
 Return current context. More...
 
bool operator< (const CxtThreadStmt &rhs) const
 
CxtThreadStmtoperator= (const CxtThreadStmt &rhs)
 Overloading operator=. More...
 
bool operator== (const CxtThreadStmt &rhs) const
 Overloading operator==. More...
 
bool operator!= (const CxtThreadStmt &rhs) const
 Overloading operator==. More...
 
void dump () const
 Dump CxtThreadStmt. More...
 
- Public Member Functions inherited from SVF::CxtStmt
 CxtStmt (const CallStrCxt &c, const ICFGNode *f)
 Constructor. More...
 
 CxtStmt (const CxtStmt &ctm)
 Copy constructor. More...
 
virtual ~CxtStmt ()
 Destructor. More...
 
const CallStrCxtgetContext () const
 Return current context. More...
 
const ICFGNodegetStmt () const
 Return current statement. More...
 
bool operator< (const CxtStmt &rhs) const
 
CxtStmtoperator= (const CxtStmt &rhs)
 Overloading operator=. More...
 
bool operator== (const CxtStmt &rhs) const
 Overloading operator==. More...
 
bool operator!= (const CxtStmt &rhs) const
 Overloading operator==. More...
 
std::string cxtToStr () const
 Return context in string format. More...
 
void dump () const
 Dump CxtStmt. More...
 

Private Attributes

NodeID tid
 

Additional Inherited Members

- Protected Attributes inherited from SVF::CxtStmt
CallStrCxt cxt
 
const ICFGNodeinst
 

Detailed Description

Context-sensitive thread statement <t,c,s>

Definition at line 124 of file CxtStmt.h.

Constructor & Destructor Documentation

◆ CxtThreadStmt() [1/2]

SVF::CxtThreadStmt::CxtThreadStmt ( NodeID  t,
const CallStrCxt c,
const ICFGNode f 
)
inline

Constructor.

Definition at line 128 of file CxtStmt.h.

128  :CxtStmt(c,f), tid(t)
129  {
130  }
CxtStmt(const CallStrCxt &c, const ICFGNode *f)
Constructor.
Definition: CxtStmt.h:46

◆ CxtThreadStmt() [2/2]

SVF::CxtThreadStmt::CxtThreadStmt ( const CxtThreadStmt ctm)
inline

Copy constructor.

Definition at line 132 of file CxtStmt.h.

132  :CxtStmt(ctm), tid(ctm.getTid())
133  {
134  }

◆ ~CxtThreadStmt()

virtual SVF::CxtThreadStmt::~CxtThreadStmt ( )
inlinevirtual

Destructor.

Definition at line 136 of file CxtStmt.h.

137  {
138  }

Member Function Documentation

◆ dump()

void SVF::CxtThreadStmt::dump ( ) const
inline

Dump CxtThreadStmt.

Definition at line 176 of file CxtStmt.h.

177  {
178  SVFUtil::outs() << "[ Current Thread id: " << tid << " Stmt: " << inst->toString() << "\t Contexts: " << cxtToStr() << " ]\n";
179  }
std::string cxtToStr() const
Return context in string format.
Definition: CxtStmt.h:97
const ICFGNode * inst
Definition: CxtStmt.h:117
virtual const std::string toString() const
Definition: ICFG.cpp:61
std::ostream & outs()
Overwrite llvm::outs()
Definition: SVFUtil.h:50

◆ getTid()

NodeID SVF::CxtThreadStmt::getTid ( ) const
inline

Return current context.

Definition at line 140 of file CxtStmt.h.

141  {
142  return tid;
143  }

◆ operator!=()

bool SVF::CxtThreadStmt::operator!= ( const CxtThreadStmt rhs) const
inline

Overloading operator==.

Definition at line 171 of file CxtStmt.h.

172  {
173  return !(*this==rhs);
174  }

◆ operator<()

bool SVF::CxtThreadStmt::operator< ( const CxtThreadStmt 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 146 of file CxtStmt.h.

147  {
148  if (tid != rhs.getTid())
149  return tid < rhs.getTid();
150  else if(inst!=rhs.getStmt())
151  return inst < rhs.getStmt();
152  else
153  return cxt < rhs.getContext();
154  }
CallStrCxt cxt
Definition: CxtStmt.h:116

◆ operator=()

CxtThreadStmt& SVF::CxtThreadStmt::operator= ( const CxtThreadStmt rhs)
inline

Overloading operator=.

Definition at line 156 of file CxtStmt.h.

157  {
158  if(*this!=rhs)
159  {
160  CxtStmt::operator=(rhs);
161  tid = rhs.getTid();
162  }
163  return *this;
164  }
CxtStmt & operator=(const CxtStmt &rhs)
Overloading operator=.
Definition: CxtStmt.h:77

◆ operator==()

bool SVF::CxtThreadStmt::operator== ( const CxtThreadStmt rhs) const
inline

Overloading operator==.

Definition at line 166 of file CxtStmt.h.

167  {
168  return (tid == rhs.getTid() && inst == rhs.getStmt() && cxt == rhs.getContext());
169  }

Member Data Documentation

◆ tid

NodeID SVF::CxtThreadStmt::tid
private

Definition at line 182 of file CxtStmt.h.


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