Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::DOTGraphTraits< ICFG * > Struct Reference
Inheritance diagram for SVF::DOTGraphTraits< ICFG * >:
SVF::DefaultDOTGraphTraits SVF::DOTGraphTraits< SVFIR * > SVF::DefaultDOTGraphTraits

Public Types

typedef ICFGNode NodeType

Public Member Functions

 DOTGraphTraits (bool isSimple=false)
std::string getNodeLabel (NodeType *node, ICFG *graph)
Public Member Functions inherited from SVF::DefaultDOTGraphTraits
 DefaultDOTGraphTraits (bool simple=false)
template<typename NodeT, typename GraphType>
std::string getNodeLabel (NodeT, const GraphType &)
Public Member Functions inherited from SVF::DOTGraphTraits< SVFIR * >
 DOTGraphTraits (bool simple=false)

Static Public Member Functions

static std::string getGraphName (ICFG *)
 Return name of the graph.
static std::string getSimpleNodeLabel (NodeType *node, ICFG *)
 Return the label of an ICFG node.
static bool isNodeHidden (ICFGNode *node, ICFG *)
static std::string getNodeAttributes (NodeType *node, ICFG *)
template<class EdgeIter>
static std::string getEdgeAttributes (NodeType *, EdgeIter EI, ICFG *)
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

Definition at line 481 of file ICFG.cpp.

Member Typedef Documentation

◆ NodeType

typedef ICFGNode SVF::DOTGraphTraits< ICFG * >::NodeType

Definition at line 484 of file ICFG.cpp.

Constructor & Destructor Documentation

◆ DOTGraphTraits()

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

Definition at line 485 of file ICFG.cpp.

Member Function Documentation

◆ getEdgeAttributes()

template<class EdgeIter>
std::string SVF::DOTGraphTraits< ICFG * >::getEdgeAttributes ( NodeType * ,
EdgeIter EI,
ICFG *  )
inlinestatic

Definition at line 553 of file ICFG.cpp.

554 {
555 ICFGEdge* edge = *(EI.getCurrent());
556 assert(edge && "No edge found!!");
558 return "style=solid,color=red";
560 return "style=solid,color=blue";
561 else
562 return "style=solid";
563 return "";
564 }

◆ getEdgeSourceLabel()

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

Definition at line 567 of file ICFG.cpp.

568 {
569 ICFGEdge* edge = *(EI.getCurrent());
570 assert(edge && "No edge found!!");
571
575 rawstr << dirCall->getSrcNode();
577 {
579 rawstr << ret->getCallICFGNode();
580 }
581
582 return rawstr.str();
583 }

◆ getGraphName()

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

Return name of the graph.

Definition at line 491 of file ICFG.cpp.

492 {
493 return "ICFG";
494 }

◆ getNodeAttributes()

std::string SVF::DOTGraphTraits< ICFG * >::getNodeAttributes ( NodeType * node,
ICFG *  )
inlinestatic

Definition at line 515 of file ICFG.cpp.

516 {
519
520 rawstr << "shape=record";
521
523 {
524 rawstr << ",color=black";
525 }
527 {
528 rawstr << ",color=yellow";
529 }
531 {
532 rawstr << ",color=green";
533 }
535 {
536 rawstr << ",color=red";
537 }
539 {
540 rawstr << ",color=blue";
541 }
543 {
544 rawstr << ",color=purple";
545 }
546 else
547 assert(false && "no such kind of node!!");
548
549 return rawstr.str();
550 }

◆ getNodeLabel()

std::string SVF::DOTGraphTraits< ICFG * >::getNodeLabel ( NodeType * node,
ICFG * graph )
inline

Definition at line 496 of file ICFG.cpp.

497 {
499 }
static std::string getSimpleNodeLabel(NodeType *node, ICFG *)
Return the label of an ICFG node.
Definition ICFG.cpp:502

◆ getSimpleNodeLabel()

std::string SVF::DOTGraphTraits< ICFG * >::getSimpleNodeLabel ( NodeType * node,
ICFG *  )
inlinestatic

Return the label of an ICFG node.

Definition at line 502 of file ICFG.cpp.

503 {
504 return node->toString();
505 }

◆ isNodeHidden()

bool SVF::DOTGraphTraits< ICFG * >::isNodeHidden ( ICFGNode * node,
ICFG *  )
inlinestatic

Definition at line 507 of file ICFG.cpp.

508 {
510 return false;
511 else
512 return node->getInEdges().empty() && node->getOutEdges().empty();
513 }

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