Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SVF::DOTGraphTraits< const SlicedICFGView * > Struct Reference
Inheritance diagram for SVF::DOTGraphTraits< const SlicedICFGView * >:
SVF::DefaultDOTGraphTraits

Public Member Functions

 DOTGraphTraits (bool isSimple=false)
 
std::string getNodeLabel (SlicedICFGNodeRef n, const SlicedICFGView *)
 
- Public Member Functions inherited from SVF::DefaultDOTGraphTraits
 DefaultDOTGraphTraits (bool simple=false)
 
template<typename NodeT , typename GraphType >
std::string getNodeLabel (NodeT, const GraphType &)
 

Static Public Member Functions

static std::string getGraphName (const SlicedICFGView *)
 
static const void * getNodeIdentifier (SlicedICFGNodeRef n)
 
static std::string getNodeAttributes (SlicedICFGNodeRef n, const SlicedICFGView *)
 
template<class EdgeIter >
static std::string getEdgeAttributes (SlicedICFGNodeRef, EdgeIter EI, const SlicedICFGView *)
 
- Static Public Member Functions inherited from SVF::DefaultDOTGraphTraits
template<typename GraphType >
static std::string getGraphName (const GraphType &)
 
template<typename GraphType >
static std::string getGraphProperties (const GraphType &)
 
static bool renderGraphFromBottomUp ()
 
template<typename NodeT >
static const void * getNodeIdentifier (NodeT N)
 
template<typename NodeT , typename GraphType >
static bool isNodeHidden (NodeT, const GraphType &)
 
template<typename NodeT , typename GraphType >
static std::string getNodeIdentifierLabel (NodeT, const GraphType &)
 
template<typename NodeT , typename GraphType >
static std::string getNodeDescription (NodeT, const GraphType &)
 
template<typename NodeT , typename GraphType >
static std::string getNodeAttributes (NodeT, const GraphType &)
 
template<typename NodeT , typename EdgeIter , typename GraphType >
static std::string getEdgeAttributes (NodeT, EdgeIter, const GraphType &)
 
template<typename NodeT , typename EdgeIter >
static std::string getEdgeSourceLabel (NodeT, EdgeIter)
 
template<typename NodeT , typename EdgeIter >
static bool edgeTargetsEdgeSource (NodeT, EdgeIter)
 
template<typename NodeT , typename EdgeIter >
static EdgeIter getEdgeTarget (NodeT, EdgeIter I)
 
static bool hasEdgeDestLabels ()
 
template<typename NodeT >
static unsigned numEdgeDestLabels (NodeT)
 
template<typename NodeT >
static std::string getEdgeDestLabel (NodeT, unsigned)
 
template<typename GraphType , typename GraphWriter >
static void addCustomGraphFeatures (const GraphType &, GraphWriter &)
 

Additional Inherited Members

- Protected Member Functions inherited from SVF::DefaultDOTGraphTraits
bool isSimple ()
 

Detailed Description

Definition at line 57 of file SlicedGraphs.cpp.

Constructor & Destructor Documentation

◆ DOTGraphTraits()

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter >
static std::string SVF::DOTGraphTraits< const SlicedICFGView * >::getEdgeAttributes ( SlicedICFGNodeRef  ,
EdgeIter  EI,
const SlicedICFGView  
)
inlinestatic

Definition at line 92 of file SlicedGraphs.cpp.

93 {
94 const SlicedICFGEdgeRef& e = EI.currentEdge();
95 if (e.bridged) return "style=dashed,color=gray";
96 if (e.underlying != nullptr && SVFUtil::isa<CallCFGEdge>(e.underlying))
97 return "style=solid,color=red";
98 if (e.underlying != nullptr && SVFUtil::isa<RetCFGEdge>(e.underlying))
99 return "style=solid,color=blue";
100 return "style=solid";
101 }
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76
const ICFGEdge * underlying

◆ getGraphName()

static std::string SVF::DOTGraphTraits< const SlicedICFGView * >::getGraphName ( const SlicedICFGView )
inlinestatic

Definition at line 61 of file SlicedGraphs.cpp.

62 {
63 return "SlicedICFG";
64 }

◆ getNodeAttributes()

static std::string SVF::DOTGraphTraits< const SlicedICFGView * >::getNodeAttributes ( SlicedICFGNodeRef  n,
const SlicedICFGView  
)
inlinestatic

Definition at line 77 of file SlicedGraphs.cpp.

78 {
79 std::string str = "shape=record";
80 const ICFGNode* node = n.raw;
81 if (SVFUtil::isa<FunEntryICFGNode>(node)) str += ",color=yellow";
82 else if (SVFUtil::isa<FunExitICFGNode>(node)) str += ",color=green";
83 else if (SVFUtil::isa<CallICFGNode>(node)) str += ",color=red";
84 else if (SVFUtil::isa<RetICFGNode>(node)) str += ",color=blue";
85 else if (SVFUtil::isa<GlobalICFGNode>(node)) str += ",color=purple";
86 else str += ",color=black";
87 return str;
88 }
cJSON * n
Definition cJSON.cpp:2558

◆ getNodeIdentifier()

static const void * SVF::DOTGraphTraits< const SlicedICFGView * >::getNodeIdentifier ( SlicedICFGNodeRef  n)
inlinestatic

Definition at line 67 of file SlicedGraphs.cpp.

68 {
69 return n.raw;
70 }

◆ getNodeLabel()

std::string SVF::DOTGraphTraits< const SlicedICFGView * >::getNodeLabel ( SlicedICFGNodeRef  n,
const SlicedICFGView  
)
inline

Definition at line 72 of file SlicedGraphs.cpp.

73 {
74 return n.raw != nullptr ? n.raw->toString() : "";
75 }

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