Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::SparseObjEdge Class Reference

#include <SparseObjGraph.h>

Inheritance diagram for SVF::SparseObjEdge:
SVF::GenericEdge< SparseObjNode >

Public Member Functions

 SparseObjEdge (SparseObjNode *source, SparseObjNode *target, const NodeBS *bases)
const NodeBS & getBases () const
 Base Obj IDs routed over this edge; each base carries all its fields.
std::string toString () const
Public Member Functions inherited from SVF::GenericEdge< SparseObjNode >
 GenericEdge (SparseObjNode *s, SparseObjNode *d, GEdgeFlag k)
 Constructor.
virtual ~GenericEdge ()
 Destructor.
NodeID getSrcID () const
 get methods of the components
NodeID getDstID () const
GEdgeKind getEdgeKind () const
GEdgeKind getEdgeKindWithoutMask () const
NodeType * getSrcNode () const
NodeType * getDstNode () const
virtual bool operator== (const GenericEdge< NodeType > *rhs) const

Private Attributes

const NodeBS * bases

Friends

class SparseObjGraph

Additional Inherited Members

Public Types inherited from SVF::GenericEdge< SparseObjNode >
typedef SparseObjNode NodeType
 Node type.
typedef u64_t GEdgeFlag
typedef s64_t GEdgeKind
typedef struct SVF::GenericEdge::equalGEdge equalGEdge
 Add the hash function for std::set (we also can overload operator< to implement this).
Static Protected Attributes inherited from SVF::GenericEdge< SparseObjNode >
static constexpr unsigned char EdgeKindMaskBits
 We use the lower 8 bits to denote edge kind.
static constexpr u64_t EdgeKindMask

Detailed Description

An edge carries a set of packed base Objs from the source ICFG location to the target ICFG location. The set (label) is interned: edges routing the same bases share one NodeBS.

Definition at line 25 of file SparseObjGraph.h.

Constructor & Destructor Documentation

◆ SparseObjEdge()

SVF::SparseObjEdge::SparseObjEdge ( SparseObjNode * source,
SparseObjNode * target,
const NodeBS * bases )
inline

Definition at line 28 of file SparseObjGraph.h.

30 : GenericSparseObjEdgeTy(source, target, 0), bases(bases) {}
const NodeBS * bases
GenericEdge< SparseObjNode > GenericSparseObjEdgeTy

Member Function Documentation

◆ getBases()

const NodeBS & SVF::SparseObjEdge::getBases ( ) const
inline

Base Obj IDs routed over this edge; each base carries all its fields.

Definition at line 33 of file SparseObjGraph.h.

34 {
35 return *bases;
36 }

◆ toString()

std::string SparseObjEdge::toString ( ) const

Definition at line 31 of file SparseObjGraph.cpp.

32{
33 std::ostringstream out;
34 out << "edge " << getSrcID() << " -> " << getDstID() << " bases {";
35 bool first = true;
36 for (NodeID base : *bases)
37 {
38 out << (first ? "" : ",") << base;
39 first = false;
40 }
41 out << "}";
42 return out.str();
43}
u32_t NodeID
Definition GeneralType.h:76

◆ SparseObjGraph

friend class SparseObjGraph
friend

Definition at line 40 of file SparseObjGraph.h.

Member Data Documentation

◆ bases

const NodeBS* SVF::SparseObjEdge::bases
private

Definition at line 41 of file SparseObjGraph.h.


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