Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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 SVFGgetSVFG () 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 SVFGsvfg = 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:52
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ getKeptNodeCount()

size_t SVF::SlicedSVFGView::getKeptNodeCount ( ) const

Definition at line 252 of file SlicedGraphs.cpp.

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

◆ 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
bool test(unsigned Idx) const

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: