Static Value-Flow Analysis
Loading...
Searching...
No Matches
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 FunObjVar *f)
 Constructor.
 
 CxtThreadProc (const CxtThreadProc &ctm)
 Copy constructor.
 
virtual ~CxtThreadProc ()
 Destructor.
 
NodeID getTid () const
 Return current thread id.
 
bool operator< (const CxtThreadProc &rhs) const
 
CxtThreadProcoperator= (const CxtThreadProc &rhs)
 Overloading operator=.
 
bool operator== (const CxtThreadProc &rhs) const
 Overloading operator==.
 
bool operator!= (const CxtThreadProc &rhs) const
 Overloading operator==.
 
void dump () const
 Dump CxtThreadProc.
 
- Public Member Functions inherited from SVF::CxtProc
 CxtProc (const CallStrCxt &c, const FunObjVar *f)
 Constructor.
 
 CxtProc (const CxtProc &ctm)
 Copy constructor.
 
virtual ~CxtProc ()
 Destructor.
 
const FunObjVargetProc () const
 Return current procedure.
 
const CallStrCxtgetContext () const
 Return current context.
 
bool operator< (const CxtProc &rhs) const
 
CxtProcoperator= (const CxtProc &rhs)
 Overloading operator=.
 
bool operator== (const CxtProc &rhs) const
 Overloading operator==.
 
bool operator!= (const CxtProc &rhs) const
 Overloading operator==.
 
std::string cxtToStr () const
 Return context in string format.
 
void dump () const
 Dump CxtProc.
 

Private Attributes

NodeID tid
 

Additional Inherited Members

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

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 394 of file CxtStmt.h.

Constructor & Destructor Documentation

◆ CxtThreadProc() [1/2]

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

Constructor.

Definition at line 398 of file CxtStmt.h.

398 :CxtProc(c,f),tid(t)
399 {
400 }
CxtProc(const CallStrCxt &c, const FunObjVar *f)
Constructor.
Definition CxtStmt.h:311
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ CxtThreadProc() [2/2]

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

Copy constructor.

Definition at line 402 of file CxtStmt.h.

402 : CxtProc(ctm.getContext(),ctm.getProc()), tid(ctm.getTid())
403 {
404 }

◆ ~CxtThreadProc()

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

Destructor.

Definition at line 406 of file CxtStmt.h.

407 {
408 }

Member Function Documentation

◆ dump()

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

Dump CxtThreadProc.

Definition at line 447 of file CxtStmt.h.

448 {
449 SVFUtil::outs() << "[ Current Thread id: " << tid << " Proc: " << fun->getName() << "\t Contexts: " << cxtToStr() << " ]\n";
450 }
const FunObjVar * fun
Definition CxtStmt.h:384
std::string cxtToStr() const
Return context in string format.
Definition CxtStmt.h:364
virtual const std::string & getName() const
Definition SVFValue.h:186
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:52

◆ getTid()

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

Return current thread id.

Definition at line 410 of file CxtStmt.h.

411 {
412 return tid;
413 }

◆ operator!=()

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

Overloading operator==.

Definition at line 442 of file CxtStmt.h.

443 {
444 return !(*this==rhs);
445 }

◆ 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 416 of file CxtStmt.h.

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

◆ operator=()

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

Overloading operator=.

Definition at line 426 of file CxtStmt.h.

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

◆ operator==()

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

Overloading operator==.

Definition at line 437 of file CxtStmt.h.

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

Member Data Documentation

◆ tid

NodeID SVF::CxtThreadProc::tid
private

Definition at line 453 of file CxtStmt.h.


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