Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SVF::DPItem Class Reference

#include <DPItem.h>

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

Public Member Functions

 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
 

Static Public Member Functions

static void setMaxBudget (u32_t max)
 set max step budge per query
 
static u32_t getMaxBudget ()
 

Protected Attributes

NodeID cur
 

Static Protected Attributes

static u64_t maximumBudget = ULONG_MAX - 1
 

Detailed Description

Dynamic programming item for CFL reachability search This serves as a base class for CFL-reachability formulation by matching parentheses. Extend this class for further sophisticated CFL-reachability items (e.g. field, flow, path)

Definition at line 44 of file DPItem.h.

Constructor & Destructor Documentation

◆ DPItem() [1/3]

SVF::DPItem::DPItem ( NodeID  c)
inline

Constructor.

Definition at line 52 of file DPItem.h.

52 : cur(c)
53 {
54 }
NodeID cur
Definition DPItem.h:47
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ DPItem() [2/3]

SVF::DPItem::DPItem ( const DPItem dps)
inline

Copy constructor.

Definition at line 56 of file DPItem.h.

56 : cur(dps.cur)
57 {
58 }

◆ DPItem() [3/3]

SVF::DPItem::DPItem ( DPItem &&  dps)
inlinenoexcept

Move constructor.

Definition at line 60 of file DPItem.h.

60 : cur(dps.cur)
61 {
62
63 }

◆ ~DPItem()

virtual SVF::DPItem::~DPItem ( )
inlinevirtual

Destructor.

Definition at line 74 of file DPItem.h.

75 {
76 }

Member Function Documentation

◆ dump()

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

Definition at line 120 of file DPItem.h.

121 {
122 SVFUtil::outs() << "var " << cur << "\n";
123 }
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:50

◆ getCurNodeID()

NodeID SVF::DPItem::getCurNodeID ( ) const
inline

Definition at line 77 of file DPItem.h.

78 {
79 return cur;
80 }

◆ getMaxBudget()

static u32_t SVF::DPItem::getMaxBudget ( )
inlinestatic

Definition at line 90 of file DPItem.h.

91 {
92 return maximumBudget;
93 }
static u64_t maximumBudget
Definition DPItem.h:48

◆ operator!=()

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

Overloading Operator!=.

Definition at line 115 of file DPItem.h.

116 {
117 return !(*this == rhs);
118 }

◆ operator<()

bool SVF::DPItem::operator< ( const DPItem 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 96 of file DPItem.h.

97 {
98 return cur < rhs.cur;
99 }

◆ operator=() [1/2]

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

Overloading Operator=.

Definition at line 101 of file DPItem.h.

102 {
103 if(*this!=rhs)
104 {
105 cur = rhs.cur;
106 }
107 return *this;
108 }

◆ operator=() [2/2]

DPItem & SVF::DPItem::operator= ( DPItem &&  rhs)
inlinenoexcept

Move operator=.

Definition at line 65 of file DPItem.h.

66 {
67 if (this != &rhs)
68 {
69 cur = rhs.cur;
70 }
71 return *this;
72 }

◆ operator==()

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

Overloading Operator==.

Definition at line 110 of file DPItem.h.

111 {
112 return (cur == rhs.cur);
113 }

◆ setCurNodeID()

void SVF::DPItem::setCurNodeID ( NodeID  c)
inline

Definition at line 81 of file DPItem.h.

82 {
83 cur = c;
84 }

◆ setMaxBudget()

static void SVF::DPItem::setMaxBudget ( u32_t  max)
inlinestatic

set max step budge per query

Definition at line 86 of file DPItem.h.

87 {
88 maximumBudget = max;
89 }

Member Data Documentation

◆ cur

NodeID SVF::DPItem::cur
protected

Definition at line 47 of file DPItem.h.

◆ maximumBudget

u64_t DPItem::maximumBudget = ULONG_MAX - 1
staticprotected

Definition at line 48 of file DPItem.h.


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