Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::SlicedSVFGView Class Reference

#include <SlicedGraphs.h>

Public Member Functions

 SlicedSVFGView (const SVFG *svfg, const NodeBS &retainedNodeIds)
bool isKeptNode (const SVFGNode *n) const
 Whether the node is retained (see the class comment for the rule).
bool isKeptEdge (const SVFGEdge *e) const
 Whether the edge is retained: both endpoints kept (no bridges).
const SVFG * getSVFG () const
size_t getKeptNodeCount () const
void dump (const std::string &filename) const
 Dump the sliced SVFG (retained nodes/edges only) via GraphWriter.

Private Attributes

const SVFG * svfg = nullptr
NodeBS retainedNodeIds

Detailed Description

Definition at line 267 of file SlicedGraphs.h.

Constructor & Destructor Documentation

◆ SlicedSVFGView()

SVF::SlicedSVFGView::SlicedSVFGView ( const SVFG * svfg,
const NodeBS & retainedNodeIds )
inline

Definition at line 270 of file SlicedGraphs.h.

Member Function Documentation

◆ dump()

void SVF::SlicedSVFGView::dump ( const std::string & filename) const

Dump the sliced SVFG (retained nodes/edges only) via GraphWriter.

Definition at line 257 of file SlicedGraphs.cpp.

258{
259 assert(svfg != nullptr && "SlicedSVFGView: bind the SVFG before dumping");
261}
static void WriteGraphToFile(SVF::OutStream &O, const std::string &GraphName, const GraphType &GT, bool simple=false)
std::ostream & outs()
Overwrite llvm::outs().
Definition SVFUtil.h:58

◆ getKeptNodeCount()

size_t SVF::SlicedSVFGView::getKeptNodeCount ( ) const

Definition at line 252 of file SlicedGraphs.cpp.

253{
254 return retainedNodeIds.count();
255}

◆ getSVFG()

const SVFG * SVF::SlicedSVFGView::getSVFG ( ) const
inline

Definition at line 282 of file SlicedGraphs.h.

283 {
284 return svfg;
285 }

◆ isKeptEdge()

bool SVF::SlicedSVFGView::isKeptEdge ( const SVFGEdge * e) const
inline

Whether the edge is retained: both endpoints kept (no bridges).

Definition at line 277 of file SlicedGraphs.h.

278 {
279 return isKeptNode(e->getSrcNode()) && isKeptNode(e->getDstNode());
280 }
bool isKeptNode(const SVFGNode *n) const
Whether the node is retained (see the class comment for the rule).

◆ isKeptNode()

bool SVF::SlicedSVFGView::isKeptNode ( const SVFGNode * n) const

Whether the node is retained (see the class comment for the rule).

Definition at line 245 of file SlicedGraphs.cpp.

246{
247 if (n == nullptr)
248 return false;
249 return retainedNodeIds.test(n->getId());
250}
cJSON * n
Definition cJSON.cpp:2558

Member Data Documentation

◆ retainedNodeIds

NodeBS SVF::SlicedSVFGView::retainedNodeIds
private

Definition at line 293 of file SlicedGraphs.h.

◆ svfg

const SVFG* SVF::SlicedSVFGView::svfg = nullptr
private

Definition at line 292 of file SlicedGraphs.h.


The documentation for this class was generated from the following files: