Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::DOTGraphTraits< CFLGraph * > Struct Reference
Inheritance diagram for SVF::DOTGraphTraits< CFLGraph * >:
SVF::DefaultDOTGraphTraits 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 NodeT, typename GraphType>
std::string getNodeLabel (NodeT, const GraphType &)

Static Public Member Functions

static std::string getGraphName (CFLGraph *)
 Return name of the graph.
static std::string getNodeLabel (CFLNode *node, CFLGraph *)
 Return function name;.
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 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

Write CFL graph into dot file for debugging

Definition at line 89 of file CFLGraph.cpp.

Member Typedef Documentation

◆ NodeType

typedef CFLNode SVF::DOTGraphTraits< CFLGraph * >::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.

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter>
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!!");
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 }
132 else if (edge->getEdgeKindWithMask() == ConstraintEdge::NormalGep)
133 {
134 rawstr << "color=\"purple:purple\",label=" << '"' << "Gep_" << edge->getEdgeAttri() << '"';
135 }
136 else if (edge->getEdgeKindWithMask() == ConstraintEdge::VariantGep)
137 {
138 rawstr << "color=\"purple: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 }

◆ getEdgeSourceLabel()

template<class EdgeIter>
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!!");
166 rawstr << "Edge label: " << edge->getEdgeKind() << " ";
167 return rawstr.str();
168 }

◆ getGraphName()

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()

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()

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

Return function name;.

Definition at line 104 of file CFLGraph.cpp.

105 {
108 rawstr << "Node ID: " << node->getId() << " ";
109 return rawstr.str();
110 }

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