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

#include <CxtStmt.h>

Inheritance diagram for SVF::CxtThreadProc:
SVF::CxtProc

Public Member Functions

 CxtThreadProc (NodeID t, const CallStrCxt &c, const SVFFunction *f)
 Constructor. More...
 
 CxtThreadProc (const CxtThreadProc &ctm)
 Copy constructor. More...
 
virtual ~CxtThreadProc ()
 Destructor. More...
 
NodeID getTid () const
 Return current thread id. More...
 
bool operator< (const CxtThreadProc &rhs) const
 
CxtThreadProcoperator= (const CxtThreadProc &rhs)
 Overloading operator=. More...
 
bool operator== (const CxtThreadProc &rhs) const
 Overloading operator==. More...
 
bool operator!= (const CxtThreadProc &rhs) const
 Overloading operator==. More...
 
void dump () const
 Dump CxtThreadProc. More...
 
- Public Member Functions inherited from SVF::CxtProc
 CxtProc (const CallStrCxt &c, const SVFFunction *f)
 Constructor. More...
 
 CxtProc (const CxtProc &ctm)
 Copy constructor. More...
 
virtual ~CxtProc ()
 Destructor. More...
 
const SVFFunctiongetProc () const
 Return current procedure. More...
 
const CallStrCxtgetContext () const
 Return current context. More...
 
bool operator< (const CxtProc &rhs) const
 
CxtProcoperator= (const CxtProc &rhs)
 Overloading operator=. More...
 
bool operator== (const CxtProc &rhs) const
 Overloading operator==. More...
 
bool operator!= (const CxtProc &rhs) const
 Overloading operator==. More...
 
std::string cxtToStr () const
 Return context in string format. More...
 
void dump () const
 Dump CxtProc. More...
 

Private Attributes

NodeID tid
 

Additional Inherited Members

- Protected Attributes inherited from SVF::CxtProc
CallStrCxt cxt
 
const SVFFunctionfun
 

Detailed Description

Context-sensitive procedure <t,c,m> t represent current thread during traversing c represent current context m represent current procedure

Definition at line 396 of file CxtStmt.h.

Constructor & Destructor Documentation

◆ CxtThreadProc() [1/2]

SVF::CxtThreadProc::CxtThreadProc ( NodeID  t,
const CallStrCxt c,
const SVFFunction f 
)
inline

Constructor.

Definition at line 400 of file CxtStmt.h.

400  :CxtProc(c,f),tid(t)
401  {
402  }
CxtProc(const CallStrCxt &c, const SVFFunction *f)
Constructor.
Definition: CxtStmt.h:313

◆ CxtThreadProc() [2/2]

SVF::CxtThreadProc::CxtThreadProc ( const CxtThreadProc ctm)
inline

Copy constructor.

Definition at line 404 of file CxtStmt.h.

404  : CxtProc(ctm.getContext(),ctm.getProc()), tid(ctm.getTid())
405  {
406  }

◆ ~CxtThreadProc()

virtual SVF::CxtThreadProc::~CxtThreadProc ( )
inlinevirtual

Destructor.

Definition at line 408 of file CxtStmt.h.

409  {
410  }

Member Function Documentation

◆ dump()

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

Dump CxtThreadProc.

Definition at line 449 of file CxtStmt.h.

450  {
451  SVFUtil::outs() << "[ Current Thread id: " << tid << " Proc: " << fun->getName() << "\t Contexts: " << cxtToStr() << " ]\n";
452  }
const SVFFunction * fun
Definition: CxtStmt.h:386
std::string cxtToStr() const
Return context in string format.
Definition: CxtStmt.h:366
const std::string & getName() const
Definition: SVFValue.h:243
std::ostream & outs()
Overwrite llvm::outs()
Definition: SVFUtil.h:50

◆ getTid()

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

Return current thread id.

Definition at line 412 of file CxtStmt.h.

413  {
414  return tid;
415  }

◆ operator!=()

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

Overloading operator==.

Definition at line 444 of file CxtStmt.h.

445  {
446  return !(*this==rhs);
447  }

◆ operator<()

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

419  {
420  if (tid != rhs.getTid())
421  return tid < rhs.getTid();
422  else if(fun!=rhs.getProc())
423  return fun < rhs.getProc();
424  else
425  return cxt < rhs.getContext();
426  }
CallStrCxt cxt
Definition: CxtStmt.h:385

◆ operator=()

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

Overloading operator=.

Definition at line 428 of file CxtStmt.h.

429  {
430  if(*this!=rhs)
431  {
432  tid = rhs.getTid();
433  fun = rhs.getProc();
434  cxt = rhs.getContext();
435  }
436  return *this;
437  }

◆ operator==()

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

Overloading operator==.

Definition at line 439 of file CxtStmt.h.

440  {
441  return (tid == rhs.getTid() && fun == rhs.getProc() && cxt == rhs.getContext());
442  }

Member Data Documentation

◆ tid

NodeID SVF::CxtThreadProc::tid
private

Definition at line 455 of file CxtStmt.h.


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