Static Value-Flow Analysis
|
#include <PointerAnalysisImpl.h>
Static Public Member Functions | |
static bool | classof (const PointerAnalysis *pta) |
std::unique_ptr< PTDataTy > | ptD |
Points-to data. | |
PersistentPointsToCache< PointsTo > | ptCache |
const PointsTo & | getPts (NodeID id) override |
const NodeSet & | getRevPts (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 SVFValue *V1, const SVFValue *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. | |
void | dumpCPts () override |
dump and debug, print out conditional pts | |
void | dumpTopLevelPtsTo () override |
void | dumpAllPts () override |
PTDataTy * | getPTDataTy () 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. | |
DiffPTDataTy * | getDiffPTDataTy () const |
DFPTDataTy * | getDFPTDataTy () const |
MutDFPTDataTy * | getMutDFPTDataTy () const |
VersionedPTDataTy * | getVersionedPTDataTy () 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 CallSiteToFunPtrMap & | getIndirectCallsites () 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. | |
SVFModule * | svfMod |
Module. | |
PTATY | ptaTy |
Pointer analysis Type. | |
PTAImplTy | ptaImplTy |
PTA implementation type. | |
PTAStat * | stat |
Statistics. | |
PTACallGraph * | callgraph |
Call graph used for pointer analysis. | |
CallGraphSCC * | callGraphSCC |
SCC for PTACallGraph. | |
ICFG * | icfg |
Interprocedural control-flow graph. | |
CommonCHGraph * | chgraph |
CHGraph. | |
Static Protected Attributes inherited from SVF::PointerAnalysis | |
static SVFIR * | pag = nullptr |
SVFIR. | |
Pointer analysis implementation which uses bit vector based points-to data structure
Definition at line 42 of file PointerAnalysisImpl.h.
Definition at line 48 of file PointerAnalysisImpl.h.
Definition at line 47 of file PointerAnalysisImpl.h.
Definition at line 53 of file PointerAnalysisImpl.h.
Definition at line 52 of file PointerAnalysisImpl.h.
Definition at line 54 of file PointerAnalysisImpl.h.
Definition at line 51 of file PointerAnalysisImpl.h.
typedef MutableVersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar> > SVF::BVDataPTAImpl::MutVersionedPTDataTy |
Definition at line 55 of file PointerAnalysisImpl.h.
Definition at line 59 of file PointerAnalysisImpl.h.
typedef PersistentDiffPTData<NodeID, NodeSet, NodeID, PointsTo> SVF::BVDataPTAImpl::PersDiffPTDataTy |
Definition at line 58 of file PointerAnalysisImpl.h.
typedef PersistentIncDFPTData<NodeID, NodeSet, NodeID, PointsTo> SVF::BVDataPTAImpl::PersIncDFPTDataTy |
Definition at line 60 of file PointerAnalysisImpl.h.
Definition at line 57 of file PointerAnalysisImpl.h.
typedef PersistentVersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar> > SVF::BVDataPTAImpl::PersVersionedPTDataTy |
Definition at line 61 of file PointerAnalysisImpl.h.
Definition at line 46 of file PointerAnalysisImpl.h.
typedef VersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar> > SVF::BVDataPTAImpl::VersionedPTDataTy |
Definition at line 49 of file PointerAnalysisImpl.h.
How the PTData used is implemented.
Enumerator | |
---|---|
Mutable | |
Persistent |
Definition at line 64 of file PointerAnalysisImpl.h.
BVDataPTAImpl::BVDataPTAImpl | ( | SVFIR * | p, |
PointerAnalysis::PTATY | type, | ||
bool | alias_check = true |
||
) |
Constructor.
Constructor
Definition at line 46 of file PointerAnalysisImpl.cpp.
|
overridedefault |
Destructor.
Definition at line 121 of file PointerAnalysisImpl.h.
|
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.
|
overridevirtual |
Interface expose to users of our pointer analysis, given Value infos.
Return alias results based on our points-to/alias analysis
Implements SVF::PointerAnalysis.
Reimplemented in SVF::CFLAlias.
Definition at line 611 of file PointerAnalysisImpl.cpp.
|
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.
|
inlinestatic |
Definition at line 81 of file PointerAnalysisImpl.h.
|
inlinevirtual |
Clear points-to set of id.
Definition at line 105 of file PointerAnalysisImpl.h.
Remove element from the points-to set of id.
Definition at line 99 of file PointerAnalysisImpl.h.
|
overridevirtual |
Dump all points-to including top-level (ValVar) and address-taken (ObjVar) variables
Reimplemented from SVF::PointerAnalysis.
Definition at line 471 of file PointerAnalysisImpl.cpp.
|
inlineoverridevirtual |
dump and debug, print out conditional pts
Reimplemented from SVF::PointerAnalysis.
Definition at line 229 of file PointerAnalysisImpl.h.
|
overridevirtual |
Dump points-to of each pag node
Reimplemented from SVF::PointerAnalysis.
Definition at line 438 of file PointerAnalysisImpl.cpp.
TODO: remove repetition.
Definition at line 145 of file PointerAnalysisImpl.cpp.
Expand FI objects.
Expand all fields of an aggregate in all points-to sets
Definition at line 133 of file PointerAnalysisImpl.cpp.
|
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 93 of file PointerAnalysisImpl.cpp.
|
inlineprotected |
Definition at line 178 of file PointerAnalysisImpl.h.
|
inlineprotected |
Definition at line 171 of file PointerAnalysisImpl.h.
|
inlineprotected |
Definition at line 185 of file PointerAnalysisImpl.h.
|
inline |
Definition at line 76 of file PointerAnalysisImpl.h.
|
inlineprotected |
Get points-to data structure.
Definition at line 155 of file PointerAnalysisImpl.h.
Get points-to and reverse points-to
Implements SVF::PointerAnalysis.
Reimplemented in SVF::Steensgaard.
Definition at line 88 of file PointerAnalysisImpl.h.
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 92 of file PointerAnalysisImpl.h.
|
inlineprotected |
Definition at line 192 of file PointerAnalysisImpl.h.
|
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 552 of file PointerAnalysisImpl.cpp.
|
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 494 of file PointerAnalysisImpl.cpp.
|
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 517 of file PointerAnalysisImpl.cpp.
|
virtual |
Definition at line 379 of file PointerAnalysisImpl.cpp.
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 405 of file PointerAnalysisImpl.cpp.
|
virtual |
Definition at line 343 of file PointerAnalysisImpl.cpp.
|
virtual |
Definition at line 289 of file PointerAnalysisImpl.cpp.
void BVDataPTAImpl::remapPointsToSets | ( | void | ) |
Remap all points-to sets to use the current mapping.
Definition at line 157 of file PointerAnalysisImpl.cpp.
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 113 of file PointerAnalysisImpl.h.
Reimplemented in SVF::Andersen, and SVF::Steensgaard.
Definition at line 117 of file PointerAnalysisImpl.h.
|
inlineprotectedvirtual |
Update callgraph. This should be implemented by its subclass.
Reimplemented in SVF::AndersenBase, SVF::CFLAlias, SVF::AndersenSCD, and SVF::FlowSensitive.
Definition at line 165 of file PointerAnalysisImpl.h.
|
virtual |
Definition at line 224 of file PointerAnalysisImpl.cpp.
|
virtual |
Definition at line 162 of file PointerAnalysisImpl.cpp.
|
virtual |
Definition at line 198 of file PointerAnalysisImpl.cpp.
|
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 246 of file PointerAnalysisImpl.cpp.
|
private |
Definition at line 214 of file PointerAnalysisImpl.h.
|
private |
Points-to data.
Definition at line 212 of file PointerAnalysisImpl.h.