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 49 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)
96 return "style=dashed,color=gray";
97 if (e.underlying != nullptr && SVFUtil::isa<CallCFGEdge>(e.underlying))
98 return "style=solid,color=red";
99 if (e.underlying != nullptr && SVFUtil::isa<RetCFGEdge>(e.underlying))
100 return "style=solid,color=blue";
101 return "style=solid";
102 }
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 55 of file SlicedGraphs.cpp.

56 {
57 return "SlicedICFG";
58 }

◆ getNodeAttributes()

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

Definition at line 71 of file SlicedGraphs.cpp.

72 {
73 std::string str = "shape=record";
74 const ICFGNode* node = n.raw;
75 if (SVFUtil::isa<FunEntryICFGNode>(node))
76 str += ",color=yellow";
77 else if (SVFUtil::isa<FunExitICFGNode>(node))
78 str += ",color=green";
79 else if (SVFUtil::isa<CallICFGNode>(node))
80 str += ",color=red";
81 else if (SVFUtil::isa<RetICFGNode>(node))
82 str += ",color=blue";
83 else if (SVFUtil::isa<GlobalICFGNode>(node))
84 str += ",color=purple";
85 else
86 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 61 of file SlicedGraphs.cpp.

62 {
63 return n.raw;
64 }

◆ getNodeLabel()

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

Definition at line 66 of file SlicedGraphs.cpp.

67 {
68 return n.raw != nullptr ? n.raw->toString() : "";
69 }

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