Static Value-Flow Analysis
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SVF::DOTGraphTraits< TCT * > Struct Reference
Inheritance diagram for SVF::DOTGraphTraits< TCT * >:
SVF::DefaultDOTGraphTraits

Public Types

typedef TCTNode 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 (TCT *graph)
 Return name of the graph. More...
 
static std::string getNodeLabel (TCTNode *node, TCT *graph)
 Return function name;. More...
 
static std::string getNodeAttributes (TCTNode *node, TCT *tct)
 
template<class EdgeIter >
static std::string getEdgeAttributes (TCTNode *node, EdgeIter EI, TCT *csThreadTree)
 
- 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 568 of file TCT.cpp.

Member Typedef Documentation

◆ ChildIteratorType

Definition at line 572 of file TCT.cpp.

◆ NodeType

Definition at line 571 of file TCT.cpp.

Constructor & Destructor Documentation

◆ DOTGraphTraits()

SVF::DOTGraphTraits< TCT * >::DOTGraphTraits ( bool  isSimple = false)
inline

Definition at line 573 of file TCT.cpp.

573  :
575  {
576  }
DefaultDOTGraphTraits(bool simple=false)

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter >
static std::string SVF::DOTGraphTraits< TCT * >::getEdgeAttributes ( TCTNode node,
EdgeIter  EI,
TCT csThreadTree 
)
inlinestatic

black edge for direct call while two functions contain indirect calls will be label with red color

Definition at line 604 of file TCT.cpp.

605  {
606 
607  TCTEdge* edge = csThreadTree->getGraphEdge(node, *EI, TCTEdge::ThreadCreateEdge);
608  (void)edge; // Suppress warning of unused variable under release build
609  assert(edge && "No edge found!!");
611  return "color=black";
612  }
@ ThreadCreateEdge
Definition: TCT.h:55
TCTEdge * getGraphEdge(TCTNode *src, TCTNode *dst, TCTEdge::CEDGEK kind)
Get call graph edge via nodes.
Definition: TCT.cpp:551

◆ getGraphName()

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

Return name of the graph.

Definition at line 579 of file TCT.cpp.

580  {
581  return "Thread Create Tree";
582  }

◆ getNodeAttributes()

static std::string SVF::DOTGraphTraits< TCT * >::getNodeAttributes ( TCTNode node,
TCT tct 
)
inlinestatic

Definition at line 589 of file TCT.cpp.

590  {
591  std::string attr;
592  if (node->isInloop())
593  {
594  attr.append(" style=filled fillcolor=red");
595  }
596  else if (node->isIncycle())
597  {
598  attr.append(" style=filled fillcolor=yellow");
599  }
600  return attr;
601  }
const char *const string
Definition: cJSON.h:172
bool isIncycle() const
Definition: TCT.h:112
bool isInloop() const
inloop, incycle attributes
Definition: TCT.h:108

◆ getNodeLabel()

static std::string SVF::DOTGraphTraits< TCT * >::getNodeLabel ( TCTNode node,
TCT graph 
)
inlinestatic

Return function name;.

Definition at line 584 of file TCT.cpp.

585  {
586  return std::to_string(node->getId());
587  }
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260

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