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

Public Types

typedef CFLNode NodeType
 

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 (CFLGraph *)
 Return name of the graph. More...
 
static std::string getNodeLabel (CFLNode *node, CFLGraph *)
 Return function name;. More...
 
static std::string getNodeAttributes (CFLNode *node, CFLGraph *)
 
template<class EdgeIter >
static std::string getEdgeAttributes (CFLNode *, EdgeIter EI, CFLGraph *graph)
 
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 CFL graph into dot file for debugging

Definition at line 89 of file CFLGraph.cpp.

Member Typedef Documentation

◆ NodeType

Definition at line 92 of file CFLGraph.cpp.

Constructor & Destructor Documentation

◆ DOTGraphTraits()

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

Definition at line 94 of file CFLGraph.cpp.

95  {
96  }
DefaultDOTGraphTraits(bool simple=false)

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter >
static std::string SVF::DOTGraphTraits< CFLGraph * >::getEdgeAttributes ( CFLNode ,
EdgeIter  EI,
CFLGraph graph 
)
inlinestatic

Definition at line 118 of file CFLGraph.cpp.

119  {
120  CFLEdge* edge = *(EI.getCurrent());
121  assert(edge && "No edge found!!");
122  std::string str;
123  std::stringstream rawstr(str);
124  if (edge->getEdgeKind() == ConstraintEdge::Addr)
125  {
126  rawstr << "color=green";
127  }
128  else if (edge->getEdgeKind() == ConstraintEdge::Copy)
129  {
130  rawstr << "color=black";
131  }
133  {
134  rawstr << "color=purple,label=" << '"' << "Gep_" << edge->getEdgeAttri() << '"';
135  }
137  {
138  rawstr << "color=purple,label=" << '"' << "VGep" << '"';
139  }
140  else if (edge->getEdgeKind() == ConstraintEdge::Store)
141  {
142  rawstr << "color=blue";
143  }
144  else if (edge->getEdgeKind() == ConstraintEdge::Load)
145  {
146  rawstr << "color=red";
147  }
148  else if (edge->getEdgeKind() == graph->getStartKind())
149  {
150  rawstr << "color=Turquoise";
151  }
152  else
153  {
154  rawstr << "style=invis";
155  }
156  return rawstr.str();
157  }
const char *const string
Definition: cJSON.h:172
GEdgeKind getEdgeKindWithMask() const
Definition: CFLGraph.h:63
GEdgeKind getEdgeKind() const
Definition: CFLGraph.h:58
GEdgeKind getEdgeAttri() const
Definition: CFLGraph.h:68
Kind getStartKind() const
Definition: CFLGraph.cpp:37

◆ getEdgeSourceLabel()

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

Definition at line 160 of file CFLGraph.cpp.

161  {
162  CFLEdge* edge = *(EI.getCurrent());
163  assert(edge && "No edge found!!");
164  std::string str;
165  std::stringstream rawstr(str);
166  rawstr << "Edge label: " << edge->getEdgeKind() << " ";
167  return rawstr.str();
168  }

◆ getGraphName()

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

Return name of the graph.

Definition at line 99 of file CFLGraph.cpp.

100  {
101  return "CFL Reachability Graph";
102  }

◆ getNodeAttributes()

static std::string SVF::DOTGraphTraits< CFLGraph * >::getNodeAttributes ( CFLNode node,
CFLGraph  
)
inlinestatic

Definition at line 112 of file CFLGraph.cpp.

113  {
114  return "shape=box";
115  }

◆ getNodeLabel()

static std::string SVF::DOTGraphTraits< CFLGraph * >::getNodeLabel ( CFLNode node,
CFLGraph  
)
inlinestatic

Return function name;.

Definition at line 104 of file CFLGraph.cpp.

105  {
106  std::string str;
107  std::stringstream rawstr(str);
108  rawstr << "Node ID: " << node->getId() << " ";
109  return rawstr.str();
110  }
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260

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