Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
SVF::ConstraintNode Class Reference

#include <ConsGNode.h>

Inheritance diagram for SVF::ConstraintNode:
SVF::GenericNode< ConstraintNode, ConstraintEdge > SVF::SVFBaseNode

Public Types

typedef ConstraintEdge::ConstraintEdgeSetTy::iterator iterator
 
typedef ConstraintEdge::ConstraintEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::GenericNode< ConstraintNode, ConstraintEdge >
typedef ConstraintNode NodeType
 
typedef ConstraintEdge EdgeType
 
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdgeGEdgeSetTy
 Edge kind.
 
typedef GEdgeSetTy::iterator iterator
 
typedef GEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::SVFBaseNode
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , FunValNode ,
  GepValNode , RetNode , VarargNode , GlobalValNode ,
  ConstantDataValNode , BlackHoleNode , ConstantFPValNode , ConstantIntValNode ,
  ConstantNullptrValNode , DummyValNode , ObjNode , GepObjNode ,
  BaseObjNode , FunObjNode , HeapObjNode , StackObjNode ,
  GlobalObjNode , ConstantDataObjNode , ConstantFPObjNode , ConstantIntObjNode ,
  ConstantNullptrObjNode , DummyObjNode , Cmp , BinaryOp ,
  UnaryOp , Branch , DummyVProp , NPtr ,
  FRet , ARet , AParm , FParm ,
  Addr , Copy , Gep , Store ,
  Load , TPhi , TIntraPhi , TInterPhi ,
  FPIN , FPOUT , APIN , APOUT ,
  MPhi , MIntraPhi , MInterPhi , CallNodeKd ,
  CDNodeKd , CFLNodeKd , CHNodeKd , ConstraintNodeKd ,
  TCTNodeKd , DCHNodeKd , OtherKd
}
 

Public Member Functions

 ConstraintNode (NodeID i)
 
bool isPWCNode () const
 Whether a node involves in PWC, if so, all its points-to elements should become field-insensitive.
 
void setPWCNode ()
 
bool isdirectEdge (ConstraintEdge::ConstraintEdgeK kind)
 Direct and Indirect SVFIR edges.
 
bool isIndirectEdge (ConstraintEdge::ConstraintEdgeK kind)
 
const ConstraintEdge::ConstraintEdgeSetTygetDirectInEdges () const
 Return constraint edges.
 
const ConstraintEdge::ConstraintEdgeSetTygetDirectOutEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetCopyInEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetCopyOutEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetGepInEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetGepOutEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetLoadInEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetLoadOutEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetStoreInEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetStoreOutEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetAddrInEdges () const
 
const ConstraintEdge::ConstraintEdgeSetTygetAddrOutEdges () const
 
iterator directOutEdgeBegin ()
 Iterators.
 
iterator directOutEdgeEnd ()
 
iterator directInEdgeBegin ()
 
iterator directInEdgeEnd ()
 
const_iterator directOutEdgeBegin () const
 
const_iterator directOutEdgeEnd () const
 
const_iterator directInEdgeBegin () const
 
const_iterator directInEdgeEnd () const
 
ConstraintEdge::ConstraintEdgeSetTyincomingAddrEdges ()
 
ConstraintEdge::ConstraintEdgeSetTyoutgoingAddrEdges ()
 
const_iterator outgoingAddrsBegin () const
 
const_iterator outgoingAddrsEnd () const
 
const_iterator incomingAddrsBegin () const
 
const_iterator incomingAddrsEnd () const
 
const_iterator outgoingLoadsBegin () const
 
const_iterator outgoingLoadsEnd () const
 
const_iterator incomingLoadsBegin () const
 
const_iterator incomingLoadsEnd () const
 
const_iterator outgoingStoresBegin () const
 
const_iterator outgoingStoresEnd () const
 
const_iterator incomingStoresBegin () const
 
const_iterator incomingStoresEnd () const
 
void addIncomingCopyEdge (CopyCGEdge *inEdge)
 Add constraint graph edges.
 
void addIncomingGepEdge (GepCGEdge *inEdge)
 
void addOutgoingCopyEdge (CopyCGEdge *outEdge)
 
void addOutgoingGepEdge (GepCGEdge *outEdge)
 
void addIncomingAddrEdge (AddrCGEdge *inEdge)
 
void addIncomingLoadEdge (LoadCGEdge *inEdge)
 
void addIncomingStoreEdge (StoreCGEdge *inEdge)
 
bool addIncomingDirectEdge (ConstraintEdge *inEdge)
 
void addOutgoingAddrEdge (AddrCGEdge *outEdge)
 
bool addOutgoingLoadEdge (LoadCGEdge *outEdge)
 
bool addOutgoingStoreEdge (StoreCGEdge *outEdge)
 
bool addOutgoingDirectEdge (ConstraintEdge *outEdge)
 
bool removeOutgoingAddrEdge (AddrCGEdge *outEdge)
 Remove constraint graph edges.
 
bool removeIncomingAddrEdge (AddrCGEdge *inEdge)
 
bool removeOutgoingDirectEdge (ConstraintEdge *outEdge)
 
bool removeIncomingDirectEdge (ConstraintEdge *inEdge)
 
bool removeOutgoingLoadEdge (LoadCGEdge *outEdge)
 
bool removeIncomingLoadEdge (LoadCGEdge *inEdge)
 
bool removeOutgoingStoreEdge (StoreCGEdge *outEdge)
 
bool removeIncomingStoreEdge (StoreCGEdge *inEdge)
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::GenericNode< ConstraintNode, ConstraintEdge >
 GenericNode (NodeID i, GNodeK k)
 Constructor.
 
virtual ~GenericNode ()
 Destructor.
 
bool hasIncomingEdge () const
 Has incoming/outgoing edge set.
 
EdgeTypehasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges.
 
bool hasOutgoingEdge () const
 
EdgeTypehasOutgoingEdge (EdgeType *edge) const
 
iterator OutEdgeBegin ()
 iterators
 
const_iterator OutEdgeBegin () const
 
iterator OutEdgeEnd ()
 
const_iterator OutEdgeEnd () const
 
iterator InEdgeBegin ()
 
const_iterator InEdgeBegin () const
 
iterator InEdgeEnd ()
 
const_iterator InEdgeEnd () const
 
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges.
 
bool addOutgoingEdge (EdgeType *outEdge)
 
const GEdgeSetTygetOutEdges () const
 
const GEdgeSetTygetInEdges () const
 
u32_t removeIncomingEdge (EdgeType *edge)
 
u32_t removeOutgoingEdge (EdgeType *edge)
 
- Public Member Functions inherited from SVF::SVFBaseNode
 SVFBaseNode (NodeID i, GNodeK k, SVFType *ty=nullptr)
 
NodeID getId () const
 Get ID.
 
GNodeK getNodeKind () const
 Get node kind.
 
virtual const SVFTypegetType () const
 
virtual void setSourceLoc (const std::string &sourceCodeInfo)
 
virtual const std::string getSourceLoc () const
 
const std::string valueOnlyToString () const
 

Static Public Member Functions

static bool classof (const ConstraintNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
 
static bool classof (const GenericICFGNodeTy *node)
 
static bool classof (const SVFBaseNode *node)
 
- Static Public Member Functions inherited from SVF::GenericNode< ConstraintNode, ConstraintEdge >
static bool classof (const GenericNode< ConstraintNode, ConstraintEdge > *)
 
static bool classof (const SVFBaseNode *)
 

Public Attributes

bool _isPWCNode
 
NodeBS strides
 For stride-based field representation.
 
NodeBS baseIds
 

Private Attributes

ConstraintEdge::ConstraintEdgeSetTy loadInEdges
 all incoming load edge of this node
 
ConstraintEdge::ConstraintEdgeSetTy loadOutEdges
 all outgoing load edge of this node
 
ConstraintEdge::ConstraintEdgeSetTy storeInEdges
 all incoming store edge of this node
 
ConstraintEdge::ConstraintEdgeSetTy storeOutEdges
 all outgoing store edge of this node
 
ConstraintEdge::ConstraintEdgeSetTy directInEdges
 
ConstraintEdge::ConstraintEdgeSetTy directOutEdges
 
ConstraintEdge::ConstraintEdgeSetTy copyInEdges
 
ConstraintEdge::ConstraintEdgeSetTy copyOutEdges
 
ConstraintEdge::ConstraintEdgeSetTy gepInEdges
 
ConstraintEdge::ConstraintEdgeSetTy gepOutEdges
 
ConstraintEdge::ConstraintEdgeSetTy addressInEdges
 all incoming address edge of this node
 
ConstraintEdge::ConstraintEdgeSetTy addressOutEdges
 all outgoing address edge of this node
 

Friends

OutStreamoperator<< (OutStream &o, const ConstraintNode &node)
 Overloading operator << for dumping node.
 

Additional Inherited Members

- Static Protected Member Functions inherited from SVF::SVFBaseNode
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds.
 
static bool isInterICFGNodeKind (GNodeK n)
 
static bool isSVFVarKind (GNodeK n)
 
static bool isValVarKinds (GNodeK n)
 
static bool isConstantDataValVar (GNodeK n)
 
static bool isObjVarKinds (GNodeK n)
 
static bool isBaseObjVarKinds (GNodeK n)
 
static bool isConstantDataObjVarKinds (GNodeK n)
 
static bool isVFGNodeKinds (GNodeK n)
 
static bool isArgumentVFGNodeKinds (GNodeK n)
 
static bool isStmtVFGNodeKinds (GNodeK n)
 
static bool isPHIVFGNodeKinds (GNodeK n)
 
static bool isMRSVFGNodeKinds (GNodeK n)
 
static bool isMSSAPHISVFGNodeKinds (GNodeK n)
 
- Protected Attributes inherited from SVF::SVFBaseNode
NodeID id
 Node ID.
 
GNodeK nodeKind
 Node kind.
 
const SVFTypetype
 SVF type.
 
std::string sourceLoc
 Source code information of this value.
 

Detailed Description

Definition at line 40 of file ConsGNode.h.

Member Typedef Documentation

◆ const_iterator

typedef ConstraintEdge::ConstraintEdgeSetTy::const_iterator SVF::ConstraintNode::const_iterator

Definition at line 45 of file ConsGNode.h.

◆ iterator

typedef ConstraintEdge::ConstraintEdgeSetTy::iterator SVF::ConstraintNode::iterator

Definition at line 44 of file ConsGNode.h.

Constructor & Destructor Documentation

◆ ConstraintNode()

SVF::ConstraintNode::ConstraintNode ( NodeID  i)
inline

Definition at line 74 of file ConsGNode.h.

75 {
76
77 }
GenericNode< ConstraintNode, ConstraintEdge > GenericConsNodeTy
Definition ConsGNode.h:39
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ addIncomingAddrEdge()

void SVF::ConstraintNode::addIncomingAddrEdge ( AddrCGEdge inEdge)
inline

Definition at line 247 of file ConsGNode.h.

248 {
249 addressInEdges.insert(inEdge);
251 }
ConstraintEdge::ConstraintEdgeSetTy addressInEdges
all incoming address edge of this node
Definition ConsGNode.h:66
bool addIncomingEdge(EdgeType *inEdge)
Add incoming and outgoing edges.

◆ addIncomingCopyEdge()

void SVF::ConstraintNode::addIncomingCopyEdge ( CopyCGEdge inEdge)
inline

Add constraint graph edges.

Definition at line 227 of file ConsGNode.h.

228 {
230 copyInEdges.insert(inEdge);
231 }
bool addIncomingDirectEdge(ConstraintEdge *inEdge)
Definition ConsGNode.h:262
ConstraintEdge::ConstraintEdgeSetTy copyInEdges
Definition ConsGNode.h:60

◆ addIncomingDirectEdge()

bool SVF::ConstraintNode::addIncomingDirectEdge ( ConstraintEdge inEdge)
inline

Definition at line 262 of file ConsGNode.h.

263 {
264 assert(inEdge->getDstID() == this->getId());
265 bool added1 = directInEdges.insert(inEdge).second;
267 bool both_added = added1 & added2;
268 assert(both_added && "edge not added, duplicated adding!!");
269 return both_added;
270 }
ConstraintEdge::ConstraintEdgeSetTy directInEdges
Definition ConsGNode.h:57

◆ addIncomingGepEdge()

void SVF::ConstraintNode::addIncomingGepEdge ( GepCGEdge inEdge)
inline

Definition at line 232 of file ConsGNode.h.

233 {
235 gepInEdges.insert(inEdge);
236 }
ConstraintEdge::ConstraintEdgeSetTy gepInEdges
Definition ConsGNode.h:63

◆ addIncomingLoadEdge()

void SVF::ConstraintNode::addIncomingLoadEdge ( LoadCGEdge inEdge)
inline

Definition at line 252 of file ConsGNode.h.

253 {
254 loadInEdges.insert(inEdge);
256 }
ConstraintEdge::ConstraintEdgeSetTy loadInEdges
all incoming load edge of this node
Definition ConsGNode.h:49

◆ addIncomingStoreEdge()

void SVF::ConstraintNode::addIncomingStoreEdge ( StoreCGEdge inEdge)
inline

Definition at line 257 of file ConsGNode.h.

258 {
259 storeInEdges.insert(inEdge);
261 }
ConstraintEdge::ConstraintEdgeSetTy storeInEdges
all incoming store edge of this node
Definition ConsGNode.h:52

◆ addOutgoingAddrEdge()

void SVF::ConstraintNode::addOutgoingAddrEdge ( AddrCGEdge outEdge)
inline

Definition at line 271 of file ConsGNode.h.

272 {
273 addressOutEdges.insert(outEdge);
275 }
ConstraintEdge::ConstraintEdgeSetTy addressOutEdges
all outgoing address edge of this node
Definition ConsGNode.h:67

◆ addOutgoingCopyEdge()

void SVF::ConstraintNode::addOutgoingCopyEdge ( CopyCGEdge outEdge)
inline

Definition at line 237 of file ConsGNode.h.

238 {
240 copyOutEdges.insert(outEdge);
241 }
ConstraintEdge::ConstraintEdgeSetTy copyOutEdges
Definition ConsGNode.h:61
bool addOutgoingDirectEdge(ConstraintEdge *outEdge)
Definition ConsGNode.h:292

◆ addOutgoingDirectEdge()

bool SVF::ConstraintNode::addOutgoingDirectEdge ( ConstraintEdge outEdge)
inline

Definition at line 292 of file ConsGNode.h.

293 {
294 assert(outEdge->getSrcID() == this->getId());
295 bool added1 = directOutEdges.insert(outEdge).second;
297 bool both_added = added1 & added2;
298 assert(both_added && "edge not added, duplicated adding!!");
299 return both_added;
300 }
ConstraintEdge::ConstraintEdgeSetTy directOutEdges
Definition ConsGNode.h:58

◆ addOutgoingGepEdge()

void SVF::ConstraintNode::addOutgoingGepEdge ( GepCGEdge outEdge)
inline

Definition at line 242 of file ConsGNode.h.

243 {
245 gepOutEdges.insert(outEdge);
246 }
ConstraintEdge::ConstraintEdgeSetTy gepOutEdges
Definition ConsGNode.h:64

◆ addOutgoingLoadEdge()

bool SVF::ConstraintNode::addOutgoingLoadEdge ( LoadCGEdge outEdge)
inline

Definition at line 276 of file ConsGNode.h.

277 {
278 bool added1 = loadOutEdges.insert(outEdge).second;
280 bool both_added = added1 & added2;
281 assert(both_added && "edge not added, duplicated adding!!");
282 return both_added;
283 }
ConstraintEdge::ConstraintEdgeSetTy loadOutEdges
all outgoing load edge of this node
Definition ConsGNode.h:50

◆ addOutgoingStoreEdge()

bool SVF::ConstraintNode::addOutgoingStoreEdge ( StoreCGEdge outEdge)
inline

Definition at line 284 of file ConsGNode.h.

285 {
286 bool added1 = storeOutEdges.insert(outEdge).second;
288 bool both_added = added1 & added2;
289 assert(both_added && "edge not added, duplicated adding!!");
290 return both_added;
291 }
ConstraintEdge::ConstraintEdgeSetTy storeOutEdges
all outgoing store edge of this node
Definition ConsGNode.h:53

◆ classof() [1/3]

static bool SVF::ConstraintNode::classof ( const ConstraintNode )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 399 of file ConsGNode.h.

400 {
401 return true;
402 }

◆ classof() [2/3]

static bool SVF::ConstraintNode::classof ( const GenericICFGNodeTy node)
inlinestatic

Definition at line 404 of file ConsGNode.h.

405 {
406 return node->getNodeKind() == ConstraintNodeKd;
407 }

◆ classof() [3/3]

static bool SVF::ConstraintNode::classof ( const SVFBaseNode node)
inlinestatic

Definition at line 409 of file ConsGNode.h.

410 {
411 return node->getNodeKind() == ConstraintNodeKd;
412 }

◆ directInEdgeBegin() [1/2]

ConstraintNode::iterator ConstraintNode::directInEdgeBegin ( )
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 682 of file ConsG.cpp.

683{
684 if (Options::DetectPWC())
685 return directInEdges.begin();
686 else
687 return copyInEdges.begin();
688}
static Option< bool > DetectPWC
Definition Options.h:216

◆ directInEdgeBegin() [2/2]

ConstraintNode::const_iterator ConstraintNode::directInEdgeBegin ( ) const
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 714 of file ConsG.cpp.

715{
716 if (Options::DetectPWC())
717 return directInEdges.begin();
718 else
719 return copyInEdges.begin();
720}

◆ directInEdgeEnd() [1/2]

ConstraintNode::iterator ConstraintNode::directInEdgeEnd ( )
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 690 of file ConsG.cpp.

691{
692 if (Options::DetectPWC())
693 return directInEdges.end();
694 else
695 return copyInEdges.end();
696}

◆ directInEdgeEnd() [2/2]

ConstraintNode::const_iterator ConstraintNode::directInEdgeEnd ( ) const
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 722 of file ConsG.cpp.

723{
724 if (Options::DetectPWC())
725 return directInEdges.end();
726 else
727 return copyInEdges.end();
728}

◆ directOutEdgeBegin() [1/2]

ConstraintNode::iterator ConstraintNode::directOutEdgeBegin ( )
virtual

Iterators.

Iterators of direct edges for ConsGNode.

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 666 of file ConsG.cpp.

667{
668 if (Options::DetectPWC())
669 return directOutEdges.begin();
670 else
671 return copyOutEdges.begin();
672}

◆ directOutEdgeBegin() [2/2]

ConstraintNode::const_iterator ConstraintNode::directOutEdgeBegin ( ) const
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 698 of file ConsG.cpp.

699{
700 if (Options::DetectPWC())
701 return directOutEdges.begin();
702 else
703 return copyOutEdges.begin();
704}

◆ directOutEdgeEnd() [1/2]

ConstraintNode::iterator ConstraintNode::directOutEdgeEnd ( )
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 674 of file ConsG.cpp.

675{
676 if (Options::DetectPWC())
677 return directOutEdges.end();
678 else
679 return copyOutEdges.end();
680}

◆ directOutEdgeEnd() [2/2]

ConstraintNode::const_iterator ConstraintNode::directOutEdgeEnd ( ) const
virtual

Reimplemented from SVF::GenericNode< ConstraintNode, ConstraintEdge >.

Definition at line 706 of file ConsG.cpp.

707{
708 if (Options::DetectPWC())
709 return directOutEdges.end();
710 else
711 return copyOutEdges.end();
712}

◆ getAddrInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getAddrInEdges ( ) const
inline

Definition at line 143 of file ConsGNode.h.

144 {
145 return addressInEdges;
146 }

◆ getAddrOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getAddrOutEdges ( ) const
inline

Definition at line 147 of file ConsGNode.h.

148 {
149 return addressOutEdges;
150 }

◆ getCopyInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getCopyInEdges ( ) const
inline

Definition at line 111 of file ConsGNode.h.

112 {
113 return copyInEdges;
114 }

◆ getCopyOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getCopyOutEdges ( ) const
inline

Definition at line 115 of file ConsGNode.h.

116 {
117 return copyOutEdges;
118 }

◆ getDirectInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getDirectInEdges ( ) const
inline

Return constraint edges.

Definition at line 103 of file ConsGNode.h.

104 {
105 return directInEdges;
106 }

◆ getDirectOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getDirectOutEdges ( ) const
inline

Definition at line 107 of file ConsGNode.h.

108 {
109 return directOutEdges;
110 }

◆ getGepInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getGepInEdges ( ) const
inline

Definition at line 119 of file ConsGNode.h.

120 {
121 return gepInEdges;
122 }

◆ getGepOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getGepOutEdges ( ) const
inline

Definition at line 123 of file ConsGNode.h.

124 {
125 return gepOutEdges;
126 }

◆ getLoadInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getLoadInEdges ( ) const
inline

Definition at line 127 of file ConsGNode.h.

128 {
129 return loadInEdges;
130 }

◆ getLoadOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getLoadOutEdges ( ) const
inline

Definition at line 131 of file ConsGNode.h.

132 {
133 return loadOutEdges;
134 }

◆ getStoreInEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getStoreInEdges ( ) const
inline

Definition at line 135 of file ConsGNode.h.

136 {
137 return storeInEdges;
138 }

◆ getStoreOutEdges()

const ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::getStoreOutEdges ( ) const
inline

Definition at line 139 of file ConsGNode.h.

140 {
141 return storeOutEdges;
142 }

◆ incomingAddrEdges()

ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::incomingAddrEdges ( )
inline

Definition at line 164 of file ConsGNode.h.

165 {
166 return addressInEdges;
167 }

◆ incomingAddrsBegin()

const_iterator SVF::ConstraintNode::incomingAddrsBegin ( ) const
inline

Definition at line 181 of file ConsGNode.h.

182 {
183 return addressInEdges.begin();
184 }

◆ incomingAddrsEnd()

const_iterator SVF::ConstraintNode::incomingAddrsEnd ( ) const
inline

Definition at line 185 of file ConsGNode.h.

186 {
187 return addressInEdges.end();
188 }

◆ incomingLoadsBegin()

const_iterator SVF::ConstraintNode::incomingLoadsBegin ( ) const
inline

Definition at line 198 of file ConsGNode.h.

199 {
200 return loadInEdges.begin();
201 }

◆ incomingLoadsEnd()

const_iterator SVF::ConstraintNode::incomingLoadsEnd ( ) const
inline

Definition at line 202 of file ConsGNode.h.

203 {
204 return loadInEdges.end();
205 }

◆ incomingStoresBegin()

const_iterator SVF::ConstraintNode::incomingStoresBegin ( ) const
inline

Definition at line 215 of file ConsGNode.h.

216 {
217 return storeInEdges.begin();
218 }

◆ incomingStoresEnd()

const_iterator SVF::ConstraintNode::incomingStoresEnd ( ) const
inline

Definition at line 219 of file ConsGNode.h.

220 {
221 return storeInEdges.end();
222 }

◆ isdirectEdge()

bool SVF::ConstraintNode::isdirectEdge ( ConstraintEdge::ConstraintEdgeK  kind)
inline

Direct and Indirect SVFIR edges.

Definition at line 92 of file ConsGNode.h.

◆ isIndirectEdge()

bool SVF::ConstraintNode::isIndirectEdge ( ConstraintEdge::ConstraintEdgeK  kind)
inline

Definition at line 96 of file ConsGNode.h.

97 {
98 return (kind == ConstraintEdge::Load || kind == ConstraintEdge::Store);
99 }

◆ isPWCNode()

bool SVF::ConstraintNode::isPWCNode ( ) const
inline

Whether a node involves in PWC, if so, all its points-to elements should become field-insensitive.

Definition at line 81 of file ConsGNode.h.

82 {
83 return _isPWCNode;
84 }

◆ outgoingAddrEdges()

ConstraintEdge::ConstraintEdgeSetTy & SVF::ConstraintNode::outgoingAddrEdges ( )
inline

Definition at line 168 of file ConsGNode.h.

169 {
170 return addressOutEdges;
171 }

◆ outgoingAddrsBegin()

const_iterator SVF::ConstraintNode::outgoingAddrsBegin ( ) const
inline

Definition at line 173 of file ConsGNode.h.

174 {
175 return addressOutEdges.begin();
176 }

◆ outgoingAddrsEnd()

const_iterator SVF::ConstraintNode::outgoingAddrsEnd ( ) const
inline

Definition at line 177 of file ConsGNode.h.

178 {
179 return addressOutEdges.end();
180 }

◆ outgoingLoadsBegin()

const_iterator SVF::ConstraintNode::outgoingLoadsBegin ( ) const
inline

Definition at line 190 of file ConsGNode.h.

191 {
192 return loadOutEdges.begin();
193 }

◆ outgoingLoadsEnd()

const_iterator SVF::ConstraintNode::outgoingLoadsEnd ( ) const
inline

Definition at line 194 of file ConsGNode.h.

195 {
196 return loadOutEdges.end();
197 }

◆ outgoingStoresBegin()

const_iterator SVF::ConstraintNode::outgoingStoresBegin ( ) const
inline

Definition at line 207 of file ConsGNode.h.

208 {
209 return storeOutEdges.begin();
210 }

◆ outgoingStoresEnd()

const_iterator SVF::ConstraintNode::outgoingStoresEnd ( ) const
inline

Definition at line 211 of file ConsGNode.h.

212 {
213 return storeOutEdges.end();
214 }

◆ removeIncomingAddrEdge()

bool SVF::ConstraintNode::removeIncomingAddrEdge ( AddrCGEdge inEdge)
inline

Definition at line 314 of file ConsGNode.h.

315 {
318 bool removed = (num1 > 0) & (num2 > 0);
319 assert(removed && "edge not in the set, can not remove!!!");
320 return removed;
321 }
unsigned u32_t
Definition CommandLine.h:18

◆ removeIncomingDirectEdge()

bool SVF::ConstraintNode::removeIncomingDirectEdge ( ConstraintEdge inEdge)
inline

Definition at line 336 of file ConsGNode.h.

337 {
338 if (SVFUtil::isa<GepCGEdge>(inEdge))
339 gepInEdges.erase(inEdge);
340 else
341 copyInEdges.erase(inEdge);
344 bool removed = (num1 > 0) & (num2 > 0);
345 assert(removed && "edge not in the set, can not remove!!!");
346 return removed;
347 }

◆ removeIncomingLoadEdge()

bool SVF::ConstraintNode::removeIncomingLoadEdge ( LoadCGEdge inEdge)
inline

Definition at line 358 of file ConsGNode.h.

359 {
360 u32_t num1 = loadInEdges.erase(inEdge);
362 bool removed = (num1 > 0) & (num2 > 0);
363 assert(removed && "edge not in the set, can not remove!!!");
364 return removed;
365 }

◆ removeIncomingStoreEdge()

bool SVF::ConstraintNode::removeIncomingStoreEdge ( StoreCGEdge inEdge)
inline

Definition at line 376 of file ConsGNode.h.

377 {
378 u32_t num1 = storeInEdges.erase(inEdge);
380 bool removed = (num1 > 0) & (num2 > 0);
381 assert(removed && "edge not in the set, can not remove!!!");
382 return removed;
383 }

◆ removeOutgoingAddrEdge()

bool SVF::ConstraintNode::removeOutgoingAddrEdge ( AddrCGEdge outEdge)
inline

Remove constraint graph edges.

Definition at line 305 of file ConsGNode.h.

306 {
309 bool removed = (num1 > 0) & (num2 > 0);
310 assert(removed && "edge not in the set, can not remove!!!");
311 return removed;
312 }

◆ removeOutgoingDirectEdge()

bool SVF::ConstraintNode::removeOutgoingDirectEdge ( ConstraintEdge outEdge)
inline

Definition at line 323 of file ConsGNode.h.

324 {
325 if (SVFUtil::isa<GepCGEdge>(outEdge))
326 gepOutEdges.erase(outEdge);
327 else
328 copyOutEdges.erase(outEdge);
331 bool removed = (num1 > 0) & (num2 > 0);
332 assert(removed && "edge not in the set, can not remove!!!");
333 return removed;
334 }

◆ removeOutgoingLoadEdge()

bool SVF::ConstraintNode::removeOutgoingLoadEdge ( LoadCGEdge outEdge)
inline

Definition at line 349 of file ConsGNode.h.

350 {
353 bool removed = (num1 > 0) & (num2 > 0);
354 assert(removed && "edge not in the set, can not remove!!!");
355 return removed;
356 }

◆ removeOutgoingStoreEdge()

bool SVF::ConstraintNode::removeOutgoingStoreEdge ( StoreCGEdge outEdge)
inline

Definition at line 367 of file ConsGNode.h.

368 {
371 bool removed = (num1 > 0) & (num2 > 0);
372 assert(removed && "edge not in the set, can not remove!!!");
373 return removed;
374 }

◆ setPWCNode()

void SVF::ConstraintNode::setPWCNode ( )
inline

Definition at line 85 of file ConsGNode.h.

86 {
87 _isPWCNode = true;
88 }

◆ toString()

const std::string ConstraintNode::toString ( ) const
virtual

Definition at line 731 of file ConsG.cpp.

732{
733 return SVFIR::getPAG()->getGNode(getId())->toString();
734}
virtual const std::string toString() const
Definition ConsG.cpp:731
NodeType * getGNode(NodeID id) const
Get a node.
NodeID getId() const
Get ID.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
Definition SVFIR.h:116

Friends And Related Symbol Documentation

◆ operator<<

OutStream & operator<< ( OutStream o,
const ConstraintNode node 
)
friend

Overloading operator << for dumping node.

Definition at line 390 of file ConsGNode.h.

391 {
392 o << node.toString();
393 return o;
394 }

Member Data Documentation

◆ _isPWCNode

bool SVF::ConstraintNode::_isPWCNode

Definition at line 46 of file ConsGNode.h.

◆ addressInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::addressInEdges
private

all incoming address edge of this node

Definition at line 66 of file ConsGNode.h.

◆ addressOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::addressOutEdges
private

all outgoing address edge of this node

Definition at line 67 of file ConsGNode.h.

◆ baseIds

NodeBS SVF::ConstraintNode::baseIds

Definition at line 72 of file ConsGNode.h.

◆ copyInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::copyInEdges
private

Definition at line 60 of file ConsGNode.h.

◆ copyOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::copyOutEdges
private

Definition at line 61 of file ConsGNode.h.

◆ directInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::directInEdges
private

Copy/call/ret/gep incoming edge of this node, To be noted: this set is only used when SCC detection, and node merges

Definition at line 57 of file ConsGNode.h.

◆ directOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::directOutEdges
private

Definition at line 58 of file ConsGNode.h.

◆ gepInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::gepInEdges
private

Definition at line 63 of file ConsGNode.h.

◆ gepOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::gepOutEdges
private

Definition at line 64 of file ConsGNode.h.

◆ loadInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::loadInEdges
private

all incoming load edge of this node

Definition at line 49 of file ConsGNode.h.

◆ loadOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::loadOutEdges
private

all outgoing load edge of this node

Definition at line 50 of file ConsGNode.h.

◆ storeInEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::storeInEdges
private

all incoming store edge of this node

Definition at line 52 of file ConsGNode.h.

◆ storeOutEdges

ConstraintEdge::ConstraintEdgeSetTy SVF::ConstraintNode::storeOutEdges
private

all outgoing store edge of this node

Definition at line 53 of file ConsGNode.h.

◆ strides

NodeBS SVF::ConstraintNode::strides

For stride-based field representation.

Definition at line 71 of file ConsGNode.h.


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