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 390 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 396 of file DPItem.h.

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

◆ CxtStmtDPItem() [2/2]

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

Copy constructor.

Definition at line 400 of file DPItem.h.

400 :
402 {
403 }

◆ ~CxtStmtDPItem()

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

Destructor.

Definition at line 405 of file DPItem.h.

406 {
407 }

Member Function Documentation

◆ dump()

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

Definition at line 467 of file DPItem.h.

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

◆ getCond() [1/2]

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

Get context.

Definition at line 420 of file DPItem.h.

421 {
422 return this->context;
423 }

◆ getCond() [2/2]

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

Get context.

Definition at line 415 of file DPItem.h.

416 {
417 return this->context;
418 }

◆ getCondVar()

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

Get context var.

Definition at line 409 of file DPItem.h.

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

◆ matchContext()

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

Match context.

Definition at line 431 of file DPItem.h.

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

◆ operator!=()

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

Overloading operator==.

Definition at line 463 of file DPItem.h.

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

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

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

◆ operator=()

Overloading operator=.

Definition at line 448 of file DPItem.h.

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

◆ operator==()

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

Overloading operator==.

Definition at line 458 of file DPItem.h.

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

◆ pushContext()

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

Push context.

Definition at line 425 of file DPItem.h.

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

Member Data Documentation

◆ context

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

Definition at line 393 of file DPItem.h.


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