Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SVF::BVDataPTAImpl Class Reference

#include <PointerAnalysisImpl.h>

Inheritance diagram for SVF::BVDataPTAImpl:
SVF::PointerAnalysis SVF::AndersenBase SVF::CFLBase SVF::FlowDDA SVF::FlowSensitive SVF::Andersen SVF::Steensgaard SVF::TypeAnalysis SVF::CFLAlias SVF::CFLVF SVF::VersionedFlowSensitive SVF::AndersenSCD SVF::AndersenWaveDiff SVF::POCRAlias SVF::POCRHybrid SVF::AndersenSFR

Public Types

typedef PTData< NodeID, NodeSet, NodeID, PointsToPTDataTy
 
typedef DiffPTData< NodeID, NodeSet, NodeID, PointsToDiffPTDataTy
 
typedef DFPTData< NodeID, NodeSet, NodeID, PointsToDFPTDataTy
 
typedef VersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > VersionedPTDataTy
 
typedef MutablePTData< NodeID, NodeSet, NodeID, PointsToMutPTDataTy
 
typedef MutableDiffPTData< NodeID, NodeSet, NodeID, PointsToMutDiffPTDataTy
 
typedef MutableDFPTData< NodeID, NodeSet, NodeID, PointsToMutDFPTDataTy
 
typedef MutableIncDFPTData< NodeID, NodeSet, NodeID, PointsToMutIncDFPTDataTy
 
typedef MutableVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > MutVersionedPTDataTy
 
typedef PersistentPTData< NodeID, NodeSet, NodeID, PointsToPersPTDataTy
 
typedef PersistentDiffPTData< NodeID, NodeSet, NodeID, PointsToPersDiffPTDataTy
 
typedef PersistentDFPTData< NodeID, NodeSet, NodeID, PointsToPersDFPTDataTy
 
typedef PersistentIncDFPTData< NodeID, NodeSet, NodeID, PointsToPersIncDFPTDataTy
 
typedef PersistentVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > PersVersionedPTDataTy
 
- Public Types inherited from SVF::PointerAnalysis
typedef Set< const CallICFGNode * > CallSiteSet
 Indirect call edges type, map a callsite to a set of callees.
 
typedef SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
 
typedef Set< const FunObjVar * > FunctionSet
 
typedef OrderedMap< const CallICFGNode *, FunctionSetCallEdgeMap
 
typedef SCCDetection< CallGraph * > CallGraphSCC
 
typedef Set< const GlobalObjVar * > VTableSet
 
typedef Set< const FunObjVar * > VFunSet
 

Public Member Functions

 BVDataPTAImpl (SVFIR *pag, PTATY type, bool alias_check=true)
 Constructor.
 
 ~BVDataPTAImpl () override=default
 Destructor.
 
PersistentPointsToCache< PointsTo > & getPtCache ()
 
- Public Member Functions inherited from SVF::PointerAnalysis
ICFGgetICFG () const
 Get ICFG.
 
u32_t getNumOfResolvedIndCallEdge () const
 Return number of resolved indirect call edges.
 
CallGraphgetCallGraph () const
 Return call graph.
 
CallGraphSCCgetCallGraphSCC () const
 Return call graph SCC.
 
 PointerAnalysis (SVFIR *pag, PTATY ty=PTATY::Default_PTA, bool alias_check=true)
 Constructor.
 
PTATY getAnalysisTy () const
 Type of pointer analysis.
 
PTAImplTy getImplTy () const
 Return implementation type of the pointer analysis.
 
bool printStat ()
 Whether print statistics.
 
void disablePrintStat ()
 Whether print statistics.
 
CallEdgeMapgetIndCallMap ()
 Get callees from an indirect callsite.
 
bool hasIndCSCallees (const CallICFGNode *cs) const
 
const FunctionSetgetIndCSCallees (const CallICFGNode *cs) const
 
virtual void resolveIndCalls (const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
 Resolve indirect call edges.
 
void callGraphSCCDetection ()
 PTACallGraph SCC related methods.
 
NodeID getCallGraphSCCRepNode (NodeID id) const
 Get SCC rep node of a SVFG node.
 
bool inSameCallGraphSCC (const FunObjVar *fun1, const FunObjVar *fun2)
 Return TRUE if this edge is inside a PTACallGraph SCC, i.e., src node and dst node are in the same SCC on the SVFG.
 
bool isInRecursion (const FunObjVar *fun) const
 
bool isLocalVarInRecursiveFun (NodeID id) const
 Whether a local variable is in function recursions.
 
virtual const std::string PTAName () const
 Return PTA name.
 
CommonCHGraphgetCHGraph () const
 get CHGraph
 
void getVFnsFromCHA (const CallICFGNode *cs, VFunSet &vfns)
 
void getVFnsFromPts (const CallICFGNode *cs, const PointsTo &target, VFunSet &vfns)
 
void connectVCallToVFns (const CallICFGNode *cs, const VFunSet &vfns, CallEdgeMap &newEdges)
 
virtual void resolveCPPIndCalls (const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
 Resolve cpp indirect call edges.
 
SVFIRgetPAG () const
 
PTAStatgetStat () const
 Get PTA stat.
 
OrderedNodeSetgetAllValidPtrs ()
 Get all Valid Pointers for resolution.
 
virtual void initialize ()
 Initialization of a pointer analysis, including building symbol table and SVFIR etc.
 
virtual void analyze ()=0
 Start Analysis here (main part of pointer analysis). It needs to be implemented in child class.
 
virtual void computeDDAPts (NodeID)
 Compute points-to results on-demand, overridden by derived classes.
 
bool mayAlias (const SVFVar *V1, const SVFVar *V2)
 Convenience bool wrappers: return true if the two operands may/must/partial alias.
 
bool mayAlias (NodeID node1, NodeID node2)
 
void printIndCSTargets (const CallICFGNode *cs, const FunctionSet &targets)
 Print targets of a function pointer.
 
virtual void dumpPts (NodeID ptr, const PointsTo &pts)
 
void printIndCSTargets ()
 
void dumpAllTypes ()
 
void dumpStat ()
 Dump the statistics.
 
bool containBlackHoleNode (const PointsTo &pts)
 Determine whether a points-to contains a black hole or constant node.
 
bool containConstantNode (const PointsTo &pts)
 
virtual bool isBlkObjOrConstantObj (NodeID ptd) const
 
bool isHeapMemObj (NodeID id) const
 Whether this object is heap or array.
 
bool isArrayMemObj (NodeID id) const
 
bool isFIObjNode (NodeID id) const
 
NodeID getBaseObjVarID (NodeID id)
 
NodeID getFIObjVar (NodeID id)
 
NodeID getGepObjVar (NodeID id, const APOffset &ap)
 
virtual const NodeBSgetAllFieldsObjVars (NodeID id)
 
void setObjFieldInsensitive (NodeID id)
 
bool isFieldInsensitive (NodeID id) const
 

Static Public Member Functions

static bool classof (const PointerAnalysis *pta)
 
std::unique_ptr< PTDataTyptD
 Points-to data.
 
PersistentPointsToCache< PointsToptCache
 
const PointsTogetPts (NodeID id) override
 
const NodeSetgetRevPts (NodeID nodeId) override
 
virtual void clearPts (NodeID id, NodeID element)
 Remove element from the points-to set of id.
 
virtual void clearFullPts (NodeID id)
 Clear points-to set of id.
 
virtual bool unionPts (NodeID id, const PointsTo &target)
 
virtual bool unionPts (NodeID id, NodeID ptd)
 
virtual bool addPts (NodeID id, NodeID ptd)
 
virtual void clearAllPts ()
 Clear all data.
 
virtual void expandFIObjs (const PointsTo &pts, PointsTo &expandedPts)
 Expand FI objects.
 
virtual void expandFIObjs (const NodeBS &pts, NodeBS &expandedPts)
 TODO: remove repetition.
 
void remapPointsToSets (void)
 Remap all points-to sets to use the current mapping.
 
virtual void writeToFile (const std::string &filename)
 Interface for analysis result storage on filesystem.
 
virtual void writeObjVarToFile (const std::string &filename)
 
virtual void writePtsResultToFile (std::fstream &f)
 
virtual void writeGepObjVarMapToFile (std::fstream &f)
 
virtual bool readFromFile (const std::string &filename)
 
virtual void readPtsResultFromFile (std::ifstream &f)
 
virtual void readGepObjVarMapFromFile (std::ifstream &f)
 
virtual void readAndSetObjFieldSensitivity (std::ifstream &f, const std::string &delimiterStr)
 
AliasResult alias (const SVFVar *V1, const SVFVar *V2) override
 Interface expose to users of our pointer analysis, given Value infos.
 
AliasResult alias (NodeID node1, NodeID node2) override
 Interface expose to users of our pointer analysis, given PAGNodeID.
 
virtual AliasResult alias (const PointsTo &pts1, const PointsTo &pts2)
 Interface expose to users of our pointer analysis, given two pts.
 
bool mayAlias (const PointsTo &pts1, const PointsTo &pts2)
 Convenience bool wrappers: return true if the two operands may/must/partial alias.
 
void dumpCPts () override
 dump and debug, print out conditional pts
 
void dumpTopLevelPtsTo () override
 
void dumpAllPts () override
 
PTDataTygetPTDataTy () const
 Get points-to data structure.
 
void finalize () override
 Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.
 
virtual bool updateCallGraph (const CallSiteToFunPtrMap &)
 Update callgraph. This should be implemented by its subclass.
 
DiffPTDataTygetDiffPTDataTy () const
 
DFPTDataTygetDFPTDataTy () const
 
MutDFPTDataTygetMutDFPTDataTy () const
 
VersionedPTDataTygetVersionedPTDataTy () const
 
virtual void onTheFlyCallGraphSolve (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges)
 On the fly call graph construction.
 
virtual void onTheFlyThreadCallGraphSolve (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newForkEdges)
 On the fly thread call graph construction respecting forksite.
 
virtual void normalizePointsTo ()
 

Additional Inherited Members

- Static Public Attributes inherited from SVF::PointerAnalysis
static const std::string aliasTestMayAlias = "MAYALIAS"
 
static const std::string aliasTestMayAliasMangled = "_Z8MAYALIASPvS_"
 
static const std::string aliasTestNoAlias = "NOALIAS"
 
static const std::string aliasTestNoAliasMangled = "_Z7NOALIASPvS_"
 
static const std::string aliasTestPartialAlias = "PARTIALALIAS"
 
static const std::string aliasTestPartialAliasMangled = "_Z12PARTIALALIASPvS_"
 
static const std::string aliasTestMustAlias = "MUSTALIAS"
 
static const std::string aliasTestMustAliasMangled = "_Z9MUSTALIASPvS_"
 
static const std::string aliasTestFailMayAlias = "EXPECTEDFAIL_MAYALIAS"
 
static const std::string aliasTestFailMayAliasMangled = "_Z21EXPECTEDFAIL_MAYALIASPvS_"
 
static const std::string aliasTestFailNoAlias = "EXPECTEDFAIL_NOALIAS"
 
static const std::string aliasTestFailNoAliasMangled = "_Z20EXPECTEDFAIL_NOALIASPvS_"
 
- Protected Member Functions inherited from SVF::PointerAnalysis
const CallSiteToFunPtrMapgetIndirectCallsites () const
 Return all indirect callsites.
 
NodeID getFunPtr (const CallICFGNode *cs) const
 Return function pointer PAGNode at a callsite cs.
 
virtual void validateTests ()
 Alias check functions to verify correctness of pointer analysis.
 
virtual void validateSuccessTests (std::string fun)
 
virtual void validateExpectedFailureTests (std::string fun)
 
void resetObjFieldSensitive ()
 Reset all object node as field-sensitive.
 
- Protected Attributes inherited from SVF::PointerAnalysis
bool print_stat
 User input flags.
 
bool alias_validation
 Flag for validating points-to/alias results.
 
u32_t OnTheFlyIterBudgetForStat
 Flag for iteration budget for on-the-fly statistics.
 
PTATY ptaTy
 Pointer analysis Type.
 
PTAImplTy ptaImplTy
 PTA implementation type.
 
PTAStatstat
 Statistics.
 
CallGraphcallgraph
 Call graph used for pointer analysis.
 
CallGraphSCCcallGraphSCC
 SCC for PTACallGraph.
 
ICFGicfg
 Interprocedural control-flow graph.
 
CommonCHGraphchgraph
 CHGraph.
 
- Static Protected Attributes inherited from SVF::PointerAnalysis
static SVFIRpag = nullptr
 SVFIR.
 

Detailed Description

Pointer analysis implementation which uses bit vector based points-to data structure

Definition at line 43 of file PointerAnalysisImpl.h.

Member Typedef Documentation

◆ DFPTDataTy

Definition at line 49 of file PointerAnalysisImpl.h.

◆ DiffPTDataTy

Definition at line 48 of file PointerAnalysisImpl.h.

◆ MutDFPTDataTy

Definition at line 54 of file PointerAnalysisImpl.h.

◆ MutDiffPTDataTy

Definition at line 53 of file PointerAnalysisImpl.h.

◆ MutIncDFPTDataTy

Definition at line 55 of file PointerAnalysisImpl.h.

◆ MutPTDataTy

Definition at line 52 of file PointerAnalysisImpl.h.

◆ MutVersionedPTDataTy

Definition at line 56 of file PointerAnalysisImpl.h.

◆ PersDFPTDataTy

Definition at line 60 of file PointerAnalysisImpl.h.

◆ PersDiffPTDataTy

Definition at line 59 of file PointerAnalysisImpl.h.

◆ PersIncDFPTDataTy

Definition at line 61 of file PointerAnalysisImpl.h.

◆ PersPTDataTy

Definition at line 58 of file PointerAnalysisImpl.h.

◆ PersVersionedPTDataTy

Definition at line 62 of file PointerAnalysisImpl.h.

◆ PTDataTy

Definition at line 47 of file PointerAnalysisImpl.h.

◆ VersionedPTDataTy

Definition at line 50 of file PointerAnalysisImpl.h.

Constructor & Destructor Documentation

◆ BVDataPTAImpl()

BVDataPTAImpl::BVDataPTAImpl ( SVFIR p,
PTATY  type,
bool  alias_check = true 
)

Constructor.

Constructor

Definition at line 47 of file PointerAnalysisImpl.cpp.

47 :
49{
53 {
54 // Only maintain reverse points-to when the analysis is field-sensitive, as objects turning
55 // field-insensitive is all it is used for.
57 if (Options::ptDataBacking() == PTBackingType::Mutable) ptD = std::make_unique<MutDiffPTDataTy>(maintainRevPts);
58 else if (Options::ptDataBacking() == PTBackingType::Persistent) ptD = std::make_unique<PersDiffPTDataTy>(getPtCache(), maintainRevPts);
59 else assert(false && "BVDataPTAImpl::BVDataPTAImpl: unexpected points-to backing type!");
60 }
61 else if (type == PTATY::Steensgaard_WPA)
62 {
63 // Steensgaard is only field-insensitive (for now?), so no reverse points-to.
64 if (Options::ptDataBacking() == PTBackingType::Mutable) ptD = std::make_unique<MutDiffPTDataTy>(false);
65 else if (Options::ptDataBacking() == PTBackingType::Persistent) ptD = std::make_unique<PersDiffPTDataTy>(getPtCache(), false);
66 else assert(false && "BVDataPTAImpl::BVDataPTAImpl: unexpected points-to backing type!");
67 }
68 else if (type == PTATY::FSSPARSE_WPA)
69 {
71 {
72 if (Options::ptDataBacking() == PTBackingType::Mutable) ptD = std::make_unique<MutIncDFPTDataTy>(false);
73 else if (Options::ptDataBacking() == PTBackingType::Persistent) ptD = std::make_unique<PersIncDFPTDataTy>(getPtCache(), false);
74 else assert(false && "BVDataPTAImpl::BVDataPTAImpl: unexpected points-to backing type!");
75 }
76 else
77 {
78 if (Options::ptDataBacking() == PTBackingType::Mutable) ptD = std::make_unique<MutDFPTDataTy>(false);
79 else if (Options::ptDataBacking() == PTBackingType::Persistent) ptD = std::make_unique<PersDFPTDataTy>(getPtCache(), false);
80 else assert(false && "BVDataPTAImpl::BVDataPTAImpl: unexpected points-to backing type!");
81 }
82 }
83 else if (type == PTATY::VFS_WPA)
84 {
85 if (Options::ptDataBacking() == PTBackingType::Mutable) ptD = std::make_unique<MutVersionedPTDataTy>(false);
86 else if (Options::ptDataBacking() == PTBackingType::Persistent) ptD = std::make_unique<PersVersionedPTDataTy>(getPtCache(), false);
87 else assert(false && "BVDataPTAImpl::BVDataPTAImpl: unexpected points-to backing type!");
88 }
89 else assert(false && "no points-to data available");
90
92}
cJSON * p
Definition cJSON.cpp:2559
newitem type
Definition cJSON.cpp:2739
PersistentPointsToCache< PointsTo > ptCache
std::unique_ptr< PTDataTy > ptD
Points-to data.
PersistentPointsToCache< PointsTo > & getPtCache()
static const Option< bool > INCDFPTData
Definition Options.h:133
static const OptionMap< PTBackingType > ptDataBacking
PTData type.
Definition Options.h:66
static const Option< u32_t > MaxFieldLimit
Maximum number of field derivations for an object.
Definition Options.h:35
PTAImplTy ptaImplTy
PTA implementation type.
@ BVDataImpl
Represents BVDataPTAImpl.
Definition PTATY.h:42
@ VFS_WPA
Versioned sparse flow-sensitive WPA.
Definition PTATY.h:21
@ Andersen_WPA
Andersen PTA.
Definition PTATY.h:12
@ FSSPARSE_WPA
Sparse flow sensitive WPA.
Definition PTATY.h:20
@ AndersenSFR_WPA
Stride-based field representation.
Definition PTATY.h:14
@ FlowS_DDA
Flow sensitive DDA.
Definition PTATY.h:30
@ AndersenWaveDiff_WPA
Diff wave propagation andersen-style WPA.
Definition PTATY.h:15
@ CFLFICI_WPA
Flow-, context-, insensitive CFL-reachability-based analysis.
Definition PTATY.h:23
@ TypeCPP_WPA
Type-based analysis for C++.
Definition PTATY.h:26
@ Steensgaard_WPA
Steensgaard PTA.
Definition PTATY.h:16
@ CFLFSCS_WPA
Flow-, context-, CFL-reachability-based analysis.
Definition PTATY.h:25
@ Andersen_BASE
Base Andersen PTA.
Definition PTATY.h:11
@ AndersenSCD_WPA
Selective cycle detection andersen-style WPA.
Definition PTATY.h:13
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76
@ Mutable
Definition PTATY.h:49
@ Persistent
Definition PTATY.h:50

◆ ~BVDataPTAImpl()

SVF::BVDataPTAImpl::~BVDataPTAImpl ( )
overridedefault

Destructor.

Member Function Documentation

◆ addPts()

virtual bool SVF::BVDataPTAImpl::addPts ( NodeID  id,
NodeID  ptd 
)
inlinevirtual

Definition at line 115 of file PointerAnalysisImpl.h.

116 {
117 return ptD->addPts(id,ptd);
118 }

◆ alias() [1/3]

AliasResult BVDataPTAImpl::alias ( const PointsTo p1,
const PointsTo p2 
)
virtual

Interface expose to users of our pointer analysis, given two pts.

Return alias results based on our points-to/alias analysis

Definition at line 628 of file PointerAnalysisImpl.cpp.

629{
630
635
638 else
640}
virtual void expandFIObjs(const PointsTo &pts, PointsTo &expandedPts)
Expand FI objects.
bool containBlackHoleNode(const PointsTo &pts)
Determine whether a points-to contains a black hole or constant node.
@ MayAlias
Definition SVFType.h:638
@ NoAlias
Definition SVFType.h:637

◆ alias() [2/3]

AliasResult SVF::BVDataPTAImpl::alias ( const SVFVar V1,
const SVFVar V2 
)
inlineoverridevirtual

Interface expose to users of our pointer analysis, given Value infos.

Implements SVF::PointerAnalysis.

Definition at line 212 of file PointerAnalysisImpl.h.

214 {
215 return alias(V1->getId(), V2->getId());
216 }
AliasResult alias(const SVFVar *V1, const SVFVar *V2) override
Interface expose to users of our pointer analysis, given Value infos.

◆ alias() [3/3]

AliasResult BVDataPTAImpl::alias ( NodeID  node1,
NodeID  node2 
)
overridevirtual

Interface expose to users of our pointer analysis, given PAGNodeID.

Return alias results based on our points-to/alias analysis

Implements SVF::PointerAnalysis.

Reimplemented in SVF::CFLAlias.

Definition at line 620 of file PointerAnalysisImpl.cpp.

621{
622 return alias(getPts(node1),getPts(node2));
623}
const PointsTo & getPts(NodeID id) override

◆ classof()

static bool SVF::BVDataPTAImpl::classof ( const PointerAnalysis pta)
inlinestatic

Definition at line 75 of file PointerAnalysisImpl.h.

76 {
77 return pta->getImplTy() == PTAImplTy::BVDataImpl;
78 }

◆ clearAllPts()

virtual void SVF::BVDataPTAImpl::clearAllPts ( )
inlinevirtual

Clear all data.

Definition at line 122 of file PointerAnalysisImpl.h.

123 {
124 ptD->clear();
125 }

◆ clearFullPts()

virtual void SVF::BVDataPTAImpl::clearFullPts ( NodeID  id)
inlinevirtual

Clear points-to set of id.

Definition at line 99 of file PointerAnalysisImpl.h.

100 {
101 ptD->clearFullPts(id);
102 }

◆ clearPts()

virtual void SVF::BVDataPTAImpl::clearPts ( NodeID  id,
NodeID  element 
)
inlinevirtual

Remove element from the points-to set of id.

Definition at line 93 of file PointerAnalysisImpl.h.

94 {
95 ptD->clearPts(id, element);
96 }

◆ dumpAllPts()

void BVDataPTAImpl::dumpAllPts ( )
overridevirtual

Dump all points-to including top-level (ValVar) and address-taken (ObjVar) variables

Reimplemented from SVF::PointerAnalysis.

Definition at line 478 of file PointerAnalysisImpl.cpp.

479{
481 for(SVFIR::iterator it = pag->begin(), eit = pag->end(); it!=eit; it++)
482 {
483 pagNodes.insert(it->first);
484 }
485
486 for (NodeID n : pagNodes)
487 {
488 outs() << "----------------------------------------------\n";
489 dumpPts(n, this->getPts(n));
490 }
491
492 outs() << "----------------------------------------------\n";
493}
cJSON * n
Definition cJSON.cpp:2558
iterator begin()
Iterators.
IDToNodeMapTy::iterator iterator
Node Iterators.
virtual void dumpPts(NodeID ptr, const PointsTo &pts)
static SVFIR * pag
SVFIR.
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:52
OrderedSet< NodeID > OrderedNodeSet
u32_t NodeID
Definition GeneralType.h:56

◆ dumpCPts()

void SVF::BVDataPTAImpl::dumpCPts ( )
inlineoverridevirtual

dump and debug, print out conditional pts

Reimplemented from SVF::PointerAnalysis.

Definition at line 232 of file PointerAnalysisImpl.h.

233 {
234 ptD->dumpPTData();
235 }

◆ dumpTopLevelPtsTo()

void BVDataPTAImpl::dumpTopLevelPtsTo ( )
overridevirtual

Dump points-to of each pag node

Reimplemented from SVF::PointerAnalysis.

Definition at line 445 of file PointerAnalysisImpl.cpp.

446{
447 for (OrderedNodeSet::iterator nIter = this->getAllValidPtrs().begin();
448 nIter != this->getAllValidPtrs().end(); ++nIter)
449 {
450 const SVFVar* node = getPAG()->getSVFVar(*nIter);
451 if (getPAG()->isValidTopLevelPtr(node))
452 {
453 const PointsTo& pts = this->getPts(node->getId());
454 outs() << "\nNodeID " << node->getId() << " ";
455
456 if (pts.empty())
457 {
458 outs() << "\t\tPointsTo: {empty}\n\n";
459 }
460 else
461 {
462 outs() << "\t\tPointsTo: { ";
463 for (PointsTo::iterator it = pts.begin(), eit = pts.end();
464 it != eit; ++it)
465 outs() << *it << " ";
466 outs() << "}\n\n";
467 }
468 }
469 }
470
471 outs().flush();
472}
SVFIR * getPAG() const
OrderedNodeSet & getAllValidPtrs()
Get all Valid Pointers for resolution.
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
Definition SVFIR.h:133
NodeID getId() const
Get ID.
Definition SVFValue.h:161

◆ expandFIObjs() [1/2]

void BVDataPTAImpl::expandFIObjs ( const NodeBS pts,
NodeBS expandedPts 
)
virtual

TODO: remove repetition.

Definition at line 146 of file PointerAnalysisImpl.cpp.

147{
149 for (const NodeID o : pts)
150 {
152 {
154 }
155 }
156}
bool isFieldInsensitive(NodeID id) const
NodeID getBaseObjVarID(NodeID id) const
Base and Offset methods for Value and Object node.
Definition SVFIR.h:552
NodeBS & getAllFieldsObjVars(const BaseObjVar *obj)
Get all fields of an object.
Definition SVFIR.cpp:573

◆ expandFIObjs() [2/2]

void BVDataPTAImpl::expandFIObjs ( const PointsTo pts,
PointsTo expandedPts 
)
virtual

Expand FI objects.

Expand all fields of an aggregate in all points-to sets

Definition at line 134 of file PointerAnalysisImpl.cpp.

135{
136 expandedPts = pts;;
137 for(PointsTo::iterator pit = pts.begin(), epit = pts.end(); pit!=epit; ++pit)
138 {
140 {
142 }
143 }
144}

◆ finalize()

void BVDataPTAImpl::finalize ( )
overrideprotectedvirtual

Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.

Reimplemented from SVF::PointerAnalysis.

Reimplemented in SVF::CFLAlias, SVF::CFLBase, SVF::CFLVF, SVF::FlowDDA, SVF::FlowSensitive, SVF::TypeAnalysis, and SVF::VersionedFlowSensitive.

Definition at line 94 of file PointerAnalysisImpl.cpp.

95{
98
100 {
101 std::string moduleName(pag->getModuleIdentifier());
102 std::vector<std::string> names = SVFUtil::split(moduleName,'/');
103 if (names.size() > 1)
104 moduleName = names[names.size() - 1];
105
106 std::string subtitle;
107
109 subtitle = "Andersen's analysis bitvector";
111 subtitle = "flow-sensitive analysis bitvector";
113 subtitle = "CFL analysis bitvector";
114 else if(ptaTy == PTATY::TypeCPP_WPA)
115 subtitle = "Type analysis bitvector";
117 subtitle = "DDA bitvector";
118 else
119 subtitle = "bitvector";
120
121 SVFUtil::outs() << "\n****Persistent Points-To Cache Statistics: " << subtitle << "****\n";
122 SVFUtil::outs() << "################ (program : " << moduleName << ")###############\n";
123 SVFUtil::outs().flags(std::ios::left);
124 ptCache.printStats("bitvector");
125 SVFUtil::outs() << "#######################################################" << std::endl;
126 SVFUtil::outs().flush();
127 }
128
129}
virtual void normalizePointsTo()
virtual void finalize()
Finalization of a pointer analysis, including checking alias correctness.
bool print_stat
User input flags.
PTATY ptaTy
Pointer analysis Type.
const std::string & getModuleIdentifier() const
Definition SVFIR.h:259
std::vector< std::string > split(const std::string &s, char separator)
Split into two substrings around the first occurrence of a separator string.
Definition SVFUtil.h:196
@ Cxt_DDA
context sensitive DDA
Definition PTATY.h:32
@ FieldS_DDA
Field sensitive DDA.
Definition PTATY.h:29
@ FSDATAFLOW_WPA
Traditional Dataflow-based flow sensitive WPA.
Definition PTATY.h:19
@ FSCS_WPA
Flow-, context- sensitive WPA.
Definition PTATY.h:22

◆ getDFPTDataTy()

DFPTDataTy * SVF::BVDataPTAImpl::getDFPTDataTy ( ) const
inlineprotected

Definition at line 172 of file PointerAnalysisImpl.h.

173 {
174 DFPTDataTy* df = SVFUtil::dyn_cast<DFPTDataTy>(ptD.get());
175 assert(df && "BVDataPTAImpl::getDFPTDataTy: not a DFPTDataTy!");
176 return df;
177 }
DFPTData< NodeID, NodeSet, NodeID, PointsTo > DFPTDataTy

◆ getDiffPTDataTy()

DiffPTDataTy * SVF::BVDataPTAImpl::getDiffPTDataTy ( ) const
inlineprotected

Definition at line 165 of file PointerAnalysisImpl.h.

166 {
167 DiffPTDataTy* diff = SVFUtil::dyn_cast<DiffPTDataTy>(ptD.get());
168 assert(diff && "BVDataPTAImpl::getDiffPTDataTy: not a DiffPTDataTy!");
169 return diff;
170 }
DiffPTData< NodeID, NodeSet, NodeID, PointsTo > DiffPTDataTy

◆ getMutDFPTDataTy()

MutDFPTDataTy * SVF::BVDataPTAImpl::getMutDFPTDataTy ( ) const
inlineprotected

Definition at line 179 of file PointerAnalysisImpl.h.

180 {
181 MutDFPTDataTy* mdf = SVFUtil::dyn_cast<MutDFPTDataTy>(ptD.get());
182 assert(mdf && "BVDataPTAImpl::getMutDFPTDataTy: not a MutDFPTDataTy!");
183 return mdf;
184 }
MutableDFPTData< NodeID, NodeSet, NodeID, PointsTo > MutDFPTDataTy

◆ getPtCache()

PersistentPointsToCache< PointsTo > & SVF::BVDataPTAImpl::getPtCache ( )
inline

Definition at line 70 of file PointerAnalysisImpl.h.

71 {
72 return ptCache;
73 }

◆ getPTDataTy()

PTDataTy * SVF::BVDataPTAImpl::getPTDataTy ( ) const
inlineprotected

Get points-to data structure.

Definition at line 149 of file PointerAnalysisImpl.h.

150 {
151 return ptD.get();
152 }

◆ getPts()

const PointsTo & SVF::BVDataPTAImpl::getPts ( NodeID  id)
inlineoverridevirtual

Get points-to and reverse points-to

Implements SVF::PointerAnalysis.

Reimplemented in SVF::Steensgaard.

Definition at line 82 of file PointerAnalysisImpl.h.

83 {
84 return ptD->getPts(id);
85 }

◆ getRevPts()

const NodeSet & SVF::BVDataPTAImpl::getRevPts ( NodeID  nodeId)
inlineoverridevirtual

Given an object, get all the nodes having whose pointsto contains the object. Similar to getPts, this also needs to be implemented in child classes.

Implements SVF::PointerAnalysis.

Reimplemented in SVF::CFLAlias.

Definition at line 86 of file PointerAnalysisImpl.h.

87 {
88 return ptD->getRevPts(nodeId);
89 }

◆ getVersionedPTDataTy()

VersionedPTDataTy * SVF::BVDataPTAImpl::getVersionedPTDataTy ( ) const
inlineprotected

Definition at line 186 of file PointerAnalysisImpl.h.

187 {
188 VersionedPTDataTy* v = SVFUtil::dyn_cast<VersionedPTDataTy>(ptD.get());
189 assert(v && "BVDataPTAImpl::getVersionedPTDataTy: not a VersionedPTDataTy!");
190 return v;
191 }
VersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > VersionedPTDataTy

◆ mayAlias()

bool SVF::BVDataPTAImpl::mayAlias ( const PointsTo pts1,
const PointsTo pts2 
)
inline

Convenience bool wrappers: return true if the two operands may/must/partial alias.

Definition at line 225 of file PointerAnalysisImpl.h.

226 {
228 }

◆ normalizePointsTo()

void BVDataPTAImpl::normalizePointsTo ( )
protectedvirtual

Normalize points-to information for field-sensitive analysis, i.e., replace fieldObj with baseObj if it is field-insensitive

Normalize points-to information for field-sensitive analysis

Reimplemented in SVF::AndersenBase.

Definition at line 559 of file PointerAnalysisImpl.cpp.

560{
563
564 // collect each gep node whose base node has been set as field-insensitive
566 for (auto t: memToFieldsMap)
567 {
568 NodeID base = t.first;
569 const BaseObjVar* obj = pag->getBaseObject(base);
570 assert(obj && "Invalid baseObj in memToFieldsMap");
571 assert(obj->isFieldInsensitive() == obj->isFieldInsensitive());
572 if (obj->isFieldInsensitive())
573 {
574 for (NodeID id : t.second)
575 {
576 if (SVFUtil::isa<GepObjVar>(pag->getSVFVar(id)))
577 {
578 dropNodes.set(id);
579 }
580 else
581 assert(id == base && "Not a GepObj Node or a baseObj Node?");
582 }
583 }
584 }
585
586 // remove the collected redundant gep nodes in each pointers's pts
587 for (SVFIR::iterator nIter = pag->begin(); nIter != pag->end(); ++nIter)
588 {
589 NodeID n = nIter->first;
590
591 const PointsTo &tmpPts = getPts(n);
592 for (NodeID obj : tmpPts)
593 {
594 if (!dropNodes.test(obj))
595 continue;
597 clearPts(n, obj);
598 addPts(n, baseObj);
599 }
600 }
601
602 // clear GepObjVarMap and memToFieldsMap for redundant gepnodes
603 // and remove those nodes from pag
604 for (NodeID n: dropNodes)
605 {
606 NodeID base = pag->getBaseObjVarID(n);
607 GepObjVar *gepNode = SVFUtil::dyn_cast<GepObjVar>(pag->getGNode(n));
608 const APOffset apOffset = gepNode->getConstantFieldIdx();
609 GepObjVarMap.erase(std::make_pair(base, apOffset));
610 memToFieldsMap[base].reset(n);
611
613 }
614}
virtual void clearPts(NodeID id, NodeID element)
Remove element from the points-to set of id.
virtual bool addPts(NodeID id, NodeID ptd)
void removeGNode(NodeType *node)
Delete a node.
NodeType * getGNode(NodeID id) const
Get a node.
const BaseObjVar * getBaseObject(NodeID id) const
Definition SVFIR.h:496
OffsetToGepVarMap & getGepObjNodeMap()
Return GepObjVarMap.
Definition SVFIR.h:201
Map< NodeID, NodeBS > MemObjToFieldsMap
Definition SVFIR.h:56
Map< GepOffset, NodeID > OffsetToGepVarMap
Definition SVFIR.h:70
MemObjToFieldsMap & getMemToFieldsMap()
Return memToFieldsMap.
Definition SVFIR.h:196
s64_t APOffset
Definition GeneralType.h:60

◆ onTheFlyCallGraphSolve()

void BVDataPTAImpl::onTheFlyCallGraphSolve ( const CallSiteToFunPtrMap callsites,
CallEdgeMap newEdges 
)
protectedvirtual

On the fly call graph construction.

On the fly call graph construction callsites is candidate indirect callsites need to be analyzed based on points-to results newEdges is the new indirect call edges discovered

Reimplemented in SVF::CFLAlias.

Definition at line 501 of file PointerAnalysisImpl.cpp.

502{
503 for(CallSiteToFunPtrMap::const_iterator iter = callsites.begin(), eiter = callsites.end(); iter!=eiter; ++iter)
504 {
505 const CallICFGNode* cs = iter->first;
506
507 if (cs->isVirtualCall())
508 {
509 const SVFVar* vtbl = cs->getVtablePtr();
510 assert(vtbl != nullptr);
511 NodeID vtblId = vtbl->getId();
513 }
514 else
515 resolveIndCalls(iter->first,getPts(iter->second),newEdges);
516 }
517}
const SVFVar * getVtablePtr() const
Definition ICFGNode.h:519
bool isVirtualCall() const
Definition ICFGNode.h:509
virtual void resolveIndCalls(const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
Resolve indirect call edges.
virtual void resolveCPPIndCalls(const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
Resolve cpp indirect call edges.

◆ onTheFlyThreadCallGraphSolve()

void BVDataPTAImpl::onTheFlyThreadCallGraphSolve ( const CallSiteToFunPtrMap callsites,
CallEdgeMap newForkEdges 
)
protectedvirtual

On the fly thread call graph construction respecting forksite.

On the fly call graph construction respecting forksite callsites is candidate indirect callsites need to be analyzed based on points-to results newEdges is the new indirect call edges discovered

Definition at line 524 of file PointerAnalysisImpl.cpp.

526{
527 // add indirect fork edges
528 if(ThreadCallGraph *tdCallGraph = SVFUtil::dyn_cast<ThreadCallGraph>(callgraph))
529 {
530 for(CallSiteSet::const_iterator it = tdCallGraph->forksitesBegin(),
531 eit = tdCallGraph->forksitesEnd(); it != eit; ++it)
532 {
533 const ValVar* pVar = tdCallGraph->getThreadAPI()->getForkedFun(*it);
534 if(SVFUtil::dyn_cast<FunValVar>(pVar) == nullptr)
535 {
536 SVFIR *pag = this->getPAG();
537 const NodeBS targets = this->getPts(pVar->getId()).toNodeBS();
538 for(NodeBS::iterator ii = targets.begin(), ie = targets.end(); ii != ie; ++ii)
539 {
540 if(const ObjVar *objPN = pag->getObjVar(*ii))
541 {
542 const BaseObjVar* obj = pag->getBaseObject(objPN->getId());
543 if(obj->isFunction())
544 {
545 const FunObjVar *svfForkedFun = SVFUtil::cast<FunObjVar>(obj)->getFunction();
546 if(tdCallGraph->addIndirectForkEdge(*it, svfForkedFun))
547 newForkEdges[*it].insert(svfForkedFun);
548 }
549 }
550 }
551 }
552 }
553 }
554}
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
CallGraph * callgraph
Call graph used for pointer analysis.
NodeBS toNodeBS() const
Returns this points-to set as a NodeBS.
Definition PointsTo.cpp:313
const ObjVar * getObjVar(NodeID id) const
Definition SVFIR.h:147

◆ readAndSetObjFieldSensitivity()

void BVDataPTAImpl::readAndSetObjFieldSensitivity ( std::ifstream &  f,
const std::string &  delimiterStr 
)
virtual

Definition at line 386 of file PointerAnalysisImpl.cpp.

387{
388 string line;
389 // //update ObjVar status
390 while (F.good())
391 {
392 getline(F, line);
393 if (line.empty() || line == delimiterStr)
394 break;
395 // Parse a single line in the form of "baseNodeID insensitive"
397 NodeID base;
398 bool insensitive;
399 ss >> base >> insensitive;
400
401 if (insensitive)
403 }
404
405}
void setObjFieldInsensitive(NodeID id)

◆ readFromFile()

bool BVDataPTAImpl::readFromFile ( const std::string &  filename)
virtual

Load pointer analysis result form a file. It populates BVDataPTAImpl with the points-to data, and updates SVFIR with the SVFIR offset nodes created during Andersen's solving stage.

Definition at line 412 of file PointerAnalysisImpl.cpp.

413{
414
415 outs() << "Loading pointer analysis results from '" << filename << "'...";
416
417 ifstream F(filename.c_str());
418 if (!F.is_open())
419 {
420 outs() << " error opening file for reading!\n";
421 return false;
422 }
423
425
427
429
431
432 // Update callgraph
434
435 F.close();
436 outs() << "\n";
437
438 return true;
439}
virtual void readAndSetObjFieldSensitivity(std::ifstream &f, const std::string &delimiterStr)
virtual bool updateCallGraph(const CallSiteToFunPtrMap &)
Update callgraph. This should be implemented by its subclass.
virtual void readPtsResultFromFile(std::ifstream &f)
virtual void readGepObjVarMapFromFile(std::ifstream &f)
const CallSiteToFunPtrMap & getIndirectCallsites() const
Add/get indirect callsites.
Definition SVFIR.h:451

◆ readGepObjVarMapFromFile()

void BVDataPTAImpl::readGepObjVarMapFromFile ( std::ifstream &  f)
virtual

Definition at line 344 of file PointerAnalysisImpl.cpp.

345{
346 string line;
347 //read GepObjVarMap from file
349 while (F.good())
350 {
351 getline(F, line);
352 if (line == "------") break;
353 // Parse a single line in the form of "ID baseNodeID offset"
355 NodeID base;
356 size_t offset;
357 NodeID id;
358 ss >> base >> offset >>id;
359 SVFIR::OffsetToGepVarMap::const_iterator iter = gepObjVarMap.find(std::make_pair(base, offset));
360 if (iter == gepObjVarMap.end())
361 {
362 const SVFVar* node = pag->getSVFVar(base);
363 const BaseObjVar* obj = nullptr;
364 if (const GepObjVar* gepObjVar = SVFUtil::dyn_cast<GepObjVar>(node))
365 {
366 obj = gepObjVar->getBaseObj();
367 }
368 else if (const BaseObjVar* baseNode = SVFUtil::dyn_cast<BaseObjVar>(node))
369 {
370 obj = baseNode;
371 }
372 else if (const DummyObjVar* baseNode = SVFUtil::dyn_cast<DummyObjVar>(node))
373 {
374 obj = baseNode;
375 }
376 else
377 assert(false && "new gep obj node kind?");
378 pag->addGepObjNode( obj, offset, id);
380 }
381
382
383 }
384}
buffer offset
Definition cJSON.cpp:1113
static NodeIDAllocator * get(void)
Return (singleton) allocator.
NodeID addGepObjNode(GepObjVar *gepObj, NodeID base, const APOffset &apOffset)
Definition SVFIR.cpp:547

◆ readPtsResultFromFile()

void BVDataPTAImpl::readPtsResultFromFile ( std::ifstream &  f)
virtual

Definition at line 290 of file PointerAnalysisImpl.cpp.

291{
292 string line;
293 // Read analysis results from file
295
296 // Read points-to sets
297 string delimiter1 = " -> { ";
298 string delimiter2 = " }";
301
302 while (F.good())
303 {
304 // Parse a single line in the form of "var -> { obj1 obj2 obj3 }"
305 getline(F, line);
306 if (line.at(0) == '[' || line == "---VERSIONED---") continue;
307 if (line == "------") break;
308 size_t pos = line.find(delimiter1);
309 if (pos == string::npos) break;
310 if (line.back() != '}') break;
311
312 // var
313 NodeID var = atoi(line.substr(0, pos).c_str());
314
315 // objs
316 pos = pos + delimiter1.length();
317 size_t len = line.length() - pos - delimiter2.length();
318 string objs = line.substr(pos, len);
320
321 if (!objs.empty())
322 {
323 // map the variable ID to its unique string pointer set
325 if (strPtsMap.count(objs)) continue;
326
328 NodeID obj;
329 while (ss.good())
330 {
331 ss >> obj;
332 dstPts.set(obj);
333 }
334 // map the string pointer set to the parsed PointsTo set
336 }
337 }
338
339 // map the variable ID to its pointer set
340 for (auto t: nodePtsMap)
342}
PTData< NodeID, NodeSet, NodeID, PointsTo > PTDataTy
virtual bool unionPts(NodeID id, const PointsTo &target)
PTDataTy * getPTDataTy() const
Get points-to data structure.

◆ remapPointsToSets()

void BVDataPTAImpl::remapPointsToSets ( void  )

Remap all points-to sets to use the current mapping.

Definition at line 158 of file PointerAnalysisImpl.cpp.

159{
160 getPTDataTy()->remapAllPts();
161}

◆ unionPts() [1/2]

virtual bool SVF::BVDataPTAImpl::unionPts ( NodeID  id,
const PointsTo target 
)
inlinevirtual

Union/add points-to. Add the reverse points-to for node collapse purpose To be noted that adding reverse pts might incur 10% total overhead during solving

Reimplemented in SVF::Andersen, and SVF::Steensgaard.

Definition at line 107 of file PointerAnalysisImpl.h.

108 {
109 return ptD->unionPts(id, target);
110 }

◆ unionPts() [2/2]

virtual bool SVF::BVDataPTAImpl::unionPts ( NodeID  id,
NodeID  ptd 
)
inlinevirtual

Reimplemented in SVF::Andersen, and SVF::Steensgaard.

Definition at line 111 of file PointerAnalysisImpl.h.

112 {
113 return ptD->unionPts(id,ptd);
114 }

◆ updateCallGraph()

virtual bool SVF::BVDataPTAImpl::updateCallGraph ( const CallSiteToFunPtrMap )
inlineprotectedvirtual

Update callgraph. This should be implemented by its subclass.

Reimplemented in SVF::AndersenBase, SVF::CFLAlias, SVF::AndersenSCD, and SVF::FlowSensitive.

Definition at line 159 of file PointerAnalysisImpl.h.

160 {
161 assert(false && "Virtual function not implemented!");
162 return false;
163 }

◆ writeGepObjVarMapToFile()

void BVDataPTAImpl::writeGepObjVarMapToFile ( std::fstream &  f)
virtual

Definition at line 225 of file PointerAnalysisImpl.cpp.

226{
227 //write gepObjVarMap to file(in form of: baseID offset gepObjNodeId)
229 for(SVFIR::OffsetToGepVarMap::const_iterator it = gepObjVarMap.begin(), eit = gepObjVarMap.end(); it != eit; it++)
230 {
232 //write the base id to file
233 f << offsetPair.first << " ";
234 //write the offset to file
235 f << offsetPair.second << " ";
236 //write the gepObjNodeId to file
237 f << it->second << "\n";
238 }
239
240}
std::pair< NodeID, APOffset > GepOffset
Definition SVFIR.h:68

◆ writeObjVarToFile()

void BVDataPTAImpl::writeObjVarToFile ( const std::string &  filename)
virtual

Definition at line 163 of file PointerAnalysisImpl.cpp.

164{
165 outs() << "Storing ObjVar to '" << filename << "'...";
167 std::fstream f(filename.c_str(), std::ios_base::out);
168 if (!f.good())
169 {
170 outs() << " error opening file for writing!\n";
171 return;
172 }
173
174 // Write BaseNodes insensitivity to file
176 for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it)
177 {
178 PAGNode* pagNode = it->second;
179 if (!isa<ObjVar>(pagNode)) continue;
180 NodeID n = pag->getBaseObjVarID(it->first);
181 if (NodeIDs.test(n)) continue;
182 f << n << " ";
183 f << isFieldInsensitive(n) << "\n";
184 NodeIDs.set(n);
185 }
186
187 f << "------\n";
188
189 f.close();
190 if (f.good())
191 {
192 outs() << "\n";
193 return;
194 }
195
196
197}

◆ writePtsResultToFile()

void BVDataPTAImpl::writePtsResultToFile ( std::fstream &  f)
virtual

Definition at line 199 of file PointerAnalysisImpl.cpp.

200{
201 // Write analysis results to file
202 for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it)
203 {
204 NodeID var = it->first;
205 const PointsTo &pts = getPts(var);
206
208 f << var << " -> { ";
209 if (pts.empty())
210 {
211 f << " ";
212 }
213 else
214 {
215 for (NodeID n: pts)
216 {
217 f << n << " ";
218 }
219 }
220 f << "}\n";
221 }
222
223}

◆ writeToFile()

void BVDataPTAImpl::writeToFile ( const std::string &  filename)
virtual

Interface for analysis result storage on filesystem.

Store pointer analysis result into a file. It includes the points-to relations, and all SVFIR nodes including those created when solving Andersen's constraints.

Definition at line 247 of file PointerAnalysisImpl.cpp.

248{
249
250 outs() << "Storing pointer analysis results to '" << filename << "'...";
251
253 std::fstream f(filename.c_str(), std::ios_base::app);
254 if (!f.good())
255 {
256 outs() << " error opening file for writing!\n";
257 return;
258 }
259
261
262 f << "------\n";
263
265
266 f << "------\n";
267
268 // Write BaseNodes insensitivity to file
270 for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it)
271 {
272 PAGNode* pagNode = it->second;
273 if (!isa<ObjVar>(pagNode)) continue;
274 NodeID n = pag->getBaseObjVarID(it->first);
275 if (NodeIDs.test(n)) continue;
276 f << n << " ";
277 f << isFieldInsensitive(n) << "\n";
278 NodeIDs.set(n);
279 }
280
281 // Job finish and close file
282 f.close();
283 if (f.good())
284 {
285 outs() << "\n";
286 return;
287 }
288}
virtual void writeGepObjVarMapToFile(std::fstream &f)
virtual void writePtsResultToFile(std::fstream &f)

Member Data Documentation

◆ ptCache

PersistentPointsToCache<PointsTo> SVF::BVDataPTAImpl::ptCache
private

Definition at line 208 of file PointerAnalysisImpl.h.

◆ ptD

std::unique_ptr<PTDataTy> SVF::BVDataPTAImpl::ptD
private

Points-to data.

Definition at line 206 of file PointerAnalysisImpl.h.


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