Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SVF::CxtStmtDPItem< LocCond > Class Template Reference

#include <DPItem.h>

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

Public Member Functions

 CxtStmtDPItem (const CxtVar &var, const LocCond *locCond)
 Constructor.
 
 CxtStmtDPItem (const CxtStmtDPItem< LocCond > &dps)
 Copy constructor.
 
virtual ~CxtStmtDPItem ()
 Destructor.
 
CxtVar getCondVar () const
 Get context var.
 
const ContextCondgetCond () const
 Get context.
 
ContextCondgetCond ()
 Get context.
 
bool pushContext (NodeID cxt)
 Push context.
 
bool matchContext (NodeID cxt)
 Match context.
 
bool operator< (const CxtStmtDPItem< LocCond > &rhs) const
 
CxtStmtDPItem< LocCond > & operator= (const CxtStmtDPItem< LocCond > &rhs)
 Overloading operator=.
 
bool operator== (const CxtStmtDPItem< LocCond > &rhs) const
 Overloading operator==.
 
bool operator!= (const CxtStmtDPItem< LocCond > &rhs) const
 Overloading operator==.
 
void dump () const
 
- Public Member Functions inherited from SVF::StmtDPItem< LocCond >
 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
 

Private Attributes

ContextCond context
 

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 ()
 
- Protected Attributes inherited from SVF::StmtDPItem< LocCond >
const LocCondcurloc
 
- Protected Attributes inherited from SVF::DPItem
NodeID cur
 
- Static Protected Attributes inherited from SVF::DPItem
static u64_t maximumBudget = ULONG_MAX - 1
 

Detailed Description

template<class LocCond>
class SVF::CxtStmtDPItem< LocCond >

Definition at line 389 of file DPItem.h.

Constructor & Destructor Documentation

◆ CxtStmtDPItem() [1/2]

template<class LocCond >
SVF::CxtStmtDPItem< LocCond >::CxtStmtDPItem ( const CxtVar var,
const LocCond locCond 
)
inline

Constructor.

Definition at line 395 of file DPItem.h.

395 : StmtDPItem<LocCond>(var.get_id(),locCond), context(var.get_cond())
396 {
397 }
ContextCond context
Definition DPItem.h:392
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ CxtStmtDPItem() [2/2]

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

Copy constructor.

Definition at line 399 of file DPItem.h.

399 :
401 {
402 }

◆ ~CxtStmtDPItem()

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

Destructor.

Definition at line 404 of file DPItem.h.

405 {
406 }

Member Function Documentation

◆ dump()

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

Definition at line 466 of file DPItem.h.

467 {
468 SVFUtil::outs() << "statement " << *(this->curloc) << ", var " << this->cur << " ";
469 SVFUtil::outs() << this->context.toString() <<"\n";
470 }
std::string toString() const
Dump context condition.
Definition DPItem.h:360
NodeID cur
Definition DPItem.h:47
const LocCond * curloc
Definition DPItem.h:136
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:50

◆ getCond() [1/2]

template<class LocCond >
ContextCond & SVF::CxtStmtDPItem< LocCond >::getCond ( )
inline

Get context.

Definition at line 419 of file DPItem.h.

420 {
421 return this->context;
422 }

◆ getCond() [2/2]

template<class LocCond >
const ContextCond & SVF::CxtStmtDPItem< LocCond >::getCond ( ) const
inline

Get context.

Definition at line 414 of file DPItem.h.

415 {
416 return this->context;
417 }

◆ getCondVar()

template<class LocCond >
CxtVar SVF::CxtStmtDPItem< LocCond >::getCondVar ( ) const
inline

Get context var.

Definition at line 408 of file DPItem.h.

409 {
410 CxtVar var(this->context,this->cur);
411 return var;
412 }
CondVar< ContextCond > CxtVar
Definition DPItem.h:385

◆ matchContext()

template<class LocCond >
bool SVF::CxtStmtDPItem< LocCond >::matchContext ( NodeID  cxt)
inline

Match context.

Definition at line 430 of file DPItem.h.

431 {
432 return this->context.matchContext(cxt);
433 }
virtual bool matchContext(NodeID ctx)
Match context.
Definition DPItem.h:303

◆ operator!=()

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

Overloading operator==.

Definition at line 462 of file DPItem.h.

463 {
464 return !(*this==rhs);
465 }

◆ operator<()

template<class LocCond >
bool SVF::CxtStmtDPItem< LocCond >::operator< ( const CxtStmtDPItem< 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 437 of file DPItem.h.

438 {
439 if (this->cur != rhs.cur)
440 return this->cur < rhs.cur;
441 else if(this->curloc != rhs.getLoc())
442 return this->curloc < rhs.getLoc();
443 else
444 return this->context < rhs.context;
445 }
CallStrCxt context
Definition DPItem.h:373

◆ operator=()

Overloading operator=.

Definition at line 447 of file DPItem.h.

448 {
449 if(*this!=rhs)
450 {
452 this->context = rhs.getCond();
453 }
454 return *this;
455 }
StmtDPItem & operator=(const StmtDPItem &rhs)
Overloading operator==.
Definition DPItem.h:178

◆ operator==()

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

Overloading operator==.

Definition at line 457 of file DPItem.h.

458 {
459 return (this->cur == rhs.cur && this->curloc == rhs.getLoc() && this->context == rhs.context);
460 }

◆ pushContext()

template<class LocCond >
bool SVF::CxtStmtDPItem< LocCond >::pushContext ( NodeID  cxt)
inline

Push context.

Definition at line 424 of file DPItem.h.

425 {
426 return this->context.pushContext(cxt);
427 }
virtual bool pushContext(NodeID ctx)
Push context.
Definition DPItem.h:279

Member Data Documentation

◆ context

template<class LocCond >
ContextCond SVF::CxtStmtDPItem< LocCond >::context
private

Definition at line 392 of file DPItem.h.


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