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

Public Types

typedef CallGraphNode NodeType
 
typedef NodeType::iterator ChildIteratorType
 

Public Member Functions

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

Static Public Member Functions

static std::string getGraphName (CallGraph *)
 Return name of the graph.
 
static std::string getNodeLabel (CallGraphNode *node, CallGraph *)
 Return function name;.
 
static std::string getNodeAttributes (CallGraphNode *node, CallGraph *)
 
template<class EdgeIter >
static std::string getEdgeAttributes (CallGraphNode *, EdgeIter EI, CallGraph *)
 
template<class EdgeIter >
static std::string getEdgeSourceLabel (NodeType *, EdgeIter EI)
 
- 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 GraphType >
static bool isNodeHidden (const void *, const GraphType &)
 
template<typename GraphType >
static std::string getNodeIdentifierLabel (const void *, const GraphType &)
 
template<typename GraphType >
static std::string getNodeDescription (const void *, const GraphType &)
 
template<typename GraphType >
static std::string getNodeAttributes (const void *, const GraphType &)
 
template<typename EdgeIter , typename GraphType >
static std::string getEdgeAttributes (const void *, EdgeIter, const GraphType &)
 
template<typename EdgeIter >
static std::string getEdgeSourceLabel (const void *, EdgeIter)
 
template<typename EdgeIter >
static bool edgeTargetsEdgeSource (const void *, EdgeIter)
 
template<typename EdgeIter >
static EdgeIter getEdgeTarget (const void *, EdgeIter I)
 
static bool hasEdgeDestLabels ()
 
static unsigned numEdgeDestLabels (const void *)
 
static std::string getEdgeDestLabel (const void *, 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

Write value flow graph into dot file for debugging

Definition at line 163 of file CallGraph.cpp.

Member Typedef Documentation

◆ ChildIteratorType

Definition at line 167 of file CallGraph.cpp.

◆ NodeType

Definition at line 166 of file CallGraph.cpp.

Constructor & Destructor Documentation

◆ DOTGraphTraits()

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter >
static std::string SVF::DOTGraphTraits< CallGraph * >::getEdgeAttributes ( CallGraphNode ,
EdgeIter  EI,
CallGraph  
)
inlinestatic

Definition at line 196 of file CallGraph.cpp.

198 {
199
200 //TODO: mark indirect call of Fork with different color
201 CallGraphEdge* edge = *(EI.getCurrent());
202 assert(edge && "No edge found!!");
203
204 std::string color = "color=black";
205 return color;
206 }
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ getEdgeSourceLabel()

template<class EdgeIter >
static std::string SVF::DOTGraphTraits< CallGraph * >::getEdgeSourceLabel ( NodeType ,
EdgeIter  EI 
)
inlinestatic

Definition at line 209 of file CallGraph.cpp.

210 {
211 CallGraphEdge* edge = *(EI.getCurrent());
212 assert(edge && "No edge found!!");
213
214 std::string str;
215 std::stringstream rawstr(str);
216 rawstr << edge->getEdgeKindWithoutMask();
217
218 return rawstr.str();
219 }

◆ getGraphName()

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

Return name of the graph.

Definition at line 174 of file CallGraph.cpp.

175 {
176 return "Call Graph";
177 }

◆ getNodeAttributes()

static std::string SVF::DOTGraphTraits< CallGraph * >::getNodeAttributes ( CallGraphNode node,
CallGraph  
)
inlinestatic

Definition at line 184 of file CallGraph.cpp.

185 {
186 const SVFFunction* fun = node->getFunction();
187 if (!SVFUtil::isExtCall(fun))
188 {
189 return "shape=box";
190 }
191 else
192 return "shape=Mrecord";
193 }
const SVFFunction * getFunction() const
Get function of this call node.
Definition CallGraph.h:131
bool isExtCall(const SVFFunction *fun)
Definition SVFUtil.h:278

◆ getNodeLabel()

static std::string SVF::DOTGraphTraits< CallGraph * >::getNodeLabel ( CallGraphNode node,
CallGraph  
)
inlinestatic

Return function name;.

Definition at line 179 of file CallGraph.cpp.

180 {
181 return node->toString();
182 }
virtual const std::string toString() const
Definition CallGraph.cpp:60

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