Static Value-Flow Analysis
|
#include <FlowSensitive.h>
Static Public Member Functions | |
static FlowSensitive * | createFSWPA (SVFIR *_pag) |
Create single instance of flow-sensitive pointer analysis. | |
static void | releaseFSWPA () |
Release flow-sensitive pointer analysis. | |
static bool | classof (const FlowSensitive *) |
Methods for support type inquiry through isa, cast, and dyn_cast. | |
static bool | classof (const PointerAnalysis *pta) |
Static Public Member Functions inherited from SVF::BVDataPTAImpl | |
static bool | classof (const PointerAnalysis *pta) |
Protected Types | |
typedef SVFG::SVFGEdgeSetTy | SVFGEdgeSetTy |
Protected Attributes | |
SVFG * | svfg |
SVFGBuilder | memSSA |
AndersenWaveDiff * | ander |
std::vector< std::pair< hclust_fast_methods, std::vector< NodeID > > > | candidateMappings |
Save candidate mappings for evaluation's sake. | |
u32_t | numOfProcessedAddr |
Statistics. | |
u32_t | numOfProcessedCopy |
Number of processed Addr node. | |
u32_t | numOfProcessedGep |
Number of processed Copy node. | |
u32_t | numOfProcessedPhi |
Number of processed Gep node. | |
u32_t | numOfProcessedLoad |
Number of processed Phi node. | |
u32_t | numOfProcessedStore |
Number of processed Load node. | |
u32_t | numOfProcessedActualParam |
Number of processed Store node. | |
u32_t | numOfProcessedFormalRet |
Number of processed actual param node. | |
u32_t | numOfProcessedMSSANode |
Number of processed formal ret node. | |
u32_t | maxSCCSize |
Number of processed mssa node. | |
u32_t | numOfSCC |
u32_t | numOfNodesInSCC |
double | solveTime |
time of solve. | |
double | sccTime |
time of SCC detection. | |
double | processTime |
time of processNode. | |
double | propagationTime |
time of points-to propagation. | |
double | directPropaTime |
time of points-to propagation of address-taken objects | |
double | indirectPropaTime |
time of points-to propagation of top-level pointers | |
double | updateTime |
time of strong/weak updates. | |
double | addrTime |
time of handling address edges | |
double | copyTime |
time of handling copy edges | |
double | gepTime |
time of handling gep edges | |
double | loadTime |
time of load edges | |
double | storeTime |
time of store edges | |
double | phiTime |
time of phi nodes. | |
double | updateCallGraphTime |
time of updating call graph | |
NodeBS | svfgHasSU |
Protected Attributes inherited from SVF::WPAFSSolver< GraphType > | |
NodeStack | nodeStack |
stack used for processing nodes. | |
Protected Attributes inherited from SVF::WPASolver< GraphType > | |
bool | reanalyze |
Reanalyze if any constraint value changed. | |
u32_t | iterationForPrintStat |
print out statistics for i-th iteration | |
GraphType | _graph |
Graph. | |
std::unique_ptr< SCC > | scc |
SCC. | |
WorkList | worklist |
Worklist for resolution. | |
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 | |
static std::unique_ptr< FlowSensitive > | fspta |
Static Protected Attributes inherited from SVF::PointerAnalysis | |
static SVFIR * | pag = nullptr |
SVFIR. | |
Friends | |
class | FlowSensitiveStat |
Additional Inherited Members | |
Public Attributes inherited from SVF::WPASolver< GraphType > | |
u32_t | numOfIteration |
num of iterations during constraint solving | |
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_" |
Definition at line 49 of file FlowSensitive.h.
Definition at line 57 of file FlowSensitive.h.
Definition at line 56 of file FlowSensitive.h.
Definition at line 58 of file FlowSensitive.h.
Definition at line 53 of file FlowSensitive.h.
|
inlineexplicit |
Constructor.
Definition at line 61 of file FlowSensitive.h.
|
overridedefault |
Destructor.
|
overridevirtual |
Flow sensitive analysis.
Start analysis
Implements SVF::PointerAnalysis.
Definition at line 128 of file FlowSensitive.cpp.
|
inlinestatic |
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 124 of file FlowSensitive.h.
|
inlinestatic |
Definition at line 128 of file FlowSensitive.h.
Definition at line 211 of file FlowSensitive.h.
|
protectedvirtual |
Performs clustering based on ander, setting the global best mapping accordingly.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 825 of file FlowSensitive.cpp.
|
protected |
Connect nodes in SVFG.
Handle parameter passing in SVFG
Definition at line 740 of file FlowSensitive.cpp.
|
protectedvirtual |
Fills may/noAliases for the location/pointer pairs in cmp.
Definition at line 856 of file FlowSensitive.cpp.
|
inlinestatic |
Create single instance of flow-sensitive pointer analysis.
Definition at line 79 of file FlowSensitive.h.
|
overridevirtual |
Finalize analysis.
Finalize analysis
Reimplemented from SVF::BVDataPTAImpl.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 163 of file FlowSensitive.cpp.
|
inlineprotected |
Get points-to set for a node from data flow IN/OUT set at a statement.
Definition at line 248 of file FlowSensitive.h.
|
inlineprotected |
Get IN/OUT data flow map. May only be called when the backing is MUTABLE.
Definition at line 261 of file FlowSensitive.h.
|
inlineprotected |
Definition at line 252 of file FlowSensitive.h.
|
inlineprotected |
Definition at line 265 of file FlowSensitive.h.
|
inline |
|
overridevirtual |
Initialize analysis.
Initialize analysis
Reimplemented from SVF::PointerAnalysis.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 45 of file FlowSensitive.cpp.
Return TRUE if this is a strong update STORE statement.
Return TRUE if this is a strong update STORE statement.
Find the unique element in cpts
Definition at line 660 of file FlowSensitive.cpp.
|
protectedvirtual |
Sets the global best mapping as a plain mapping, i.e. n -> n.
Definition at line 839 of file FlowSensitive.cpp.
|
protectedvirtual |
Process address node
TODO: If this object has been set as field-insensitive, just add the insensitive object node into dst pointer's pts.
Definition at line 450 of file FlowSensitive.cpp.
|
protectedvirtual |
Process copy node
Definition at line 467 of file FlowSensitive.cpp.
|
protectedvirtual |
Process gep node
Definition at line 500 of file FlowSensitive.cpp.
|
protectedvirtual |
Process load node
Foreach node \in src pts(dst) = union pts(node)
If the ptd is a field-insensitive node, we should also get all field nodes' points-to sets and pass them to pagDst.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 552 of file FlowSensitive.cpp.
|
overrideprotectedvirtual |
Handle various constraints.
Process each SVFG node
Reimplemented from SVF::WPASolver< GraphType >.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 221 of file FlowSensitive.cpp.
|
protectedvirtual |
Process mssa phi node
Definition at line 479 of file FlowSensitive.cpp.
|
protectedvirtual |
Process store node
foreach node \in dst pts(node) = union pts(src)
STORE statement can only be processed if the pointer on the LHS points to something. If we handle STORE with an empty points-to set, the OUT set will be updated from IN set. Then if LHS pointer points-to one target and it has been identified as a strong update, we can't remove those points-to information computed before this strong update from the OUT set.
check if this is a strong updates store
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 599 of file FlowSensitive.cpp.
Process each SVFG node
Definition at line 233 of file FlowSensitive.cpp.
|
protectedvirtual |
Propagate points-to information from an actual-param to a formal-param. Not necessary if SVFGOPT is used instead of original SVFG.
Propagate points-to information from actual-param to formal-param. Not necessary if SVFGOPT is used instead of original SVFG.
Definition at line 360 of file FlowSensitive.cpp.
|
protectedvirtual |
Propagate points-to information from a formal-ret to an actual-ret. Not necessary if SVFGOPT is used instead of original SVFG.
Propagate points-to information from formal-ret to actual-ret. Not necessary if SVFGOPT is used instead of original SVFG.
Definition at line 376 of file FlowSensitive.cpp.
|
protectedvirtual |
Propagate points-to information along a DIRECT SVFG edge.
Propagate points-to information along DIRECT SVFG edge.
Definition at line 329 of file FlowSensitive.cpp.
|
protectedvirtual |
Propagate points-to information along an INDIRECT SVFG edge.
Propagate points-to information along INDIRECT SVFG edge.
If this is a field-insensitive obj, propagate all field node's pts
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 391 of file FlowSensitive.cpp.
|
inlineprotectedvirtual |
Definition at line 181 of file FlowSensitive.h.
|
inlineprotectedvirtual |
Definition at line 177 of file FlowSensitive.h.
Propagation.
Propagate points-to information from an edge's src node to its dst node.
Propagate points-to information from source to destination node Union dfOutput of src to dfInput of dst. Only propagate points-to set of node which exists on the SVFG edge.
Definition at line 309 of file FlowSensitive.cpp.
|
protected |
Propagation between newly connected SVFG nodes during updateCallGraph. Can only be used during updateCallGraph.
Propagate points-to information of a certain variable from src to dst.
Definition at line 810 of file FlowSensitive.cpp.
|
protectedvirtual |
Propagate points-to information of a certain variable from src to dst.
Propagate points-to information of a certain variable from src to dst.
Definition at line 431 of file FlowSensitive.cpp.
|
inlineoverridevirtual |
Get PTA name.
Reimplemented from SVF::PointerAnalysis.
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 117 of file FlowSensitive.h.
|
virtual |
Initialization for the Solver
Load the pts from file
finalize the analysis
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 149 of file FlowSensitive.cpp.
|
inlinestatic |
Release flow-sensitive pointer analysis.
Definition at line 90 of file FlowSensitive.h.
|
overrideprotectedvirtual |
SCC detection.
SCC detection
Reimplemented from SVF::WPAFSSolver< GraphType >.
Definition at line 209 of file FlowSensitive.cpp.
|
virtual |
Start analysis
Initialization for the Solver
finalize the analysis
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 112 of file FlowSensitive.cpp.
|
virtual |
Start solving constraints
Definition at line 77 of file FlowSensitive.cpp.
|
inlineprotectedvirtual |
Handle strong updates.
Definition at line 166 of file FlowSensitive.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 202 of file FlowSensitive.h.
|
inlineprotectedvirtual |
Definition at line 206 of file FlowSensitive.h.
|
overrideprotectedvirtual |
Update call graph.
Update call graph.
Update call graph
Reimplemented from SVF::BVDataPTAImpl.
Definition at line 687 of file FlowSensitive.cpp.
|
protectedvirtual |
Update nodes connected during updating call graph.
Push nodes connected during update call graph into worklist so they will be solved during next iteration.
If this is a formal-param or actual-ret node, we need to solve this phi node in next iteration
If this is a formal-in or actual-out node, we need to propagate points-to information from its predecessor node.
If this is a field-insensitive obj, propagate all field node's pts
Reimplemented in SVF::VersionedFlowSensitive.
Definition at line 760 of file FlowSensitive.cpp.
|
inlineprotectedvirtual |
Definition at line 193 of file FlowSensitive.h.
|
inlineprotectedvirtual |
Definition at line 197 of file FlowSensitive.h.
|
inlineprotected |
|
inlineprotectedvirtual |
Handle weak updates.
Definition at line 161 of file FlowSensitive.h.
|
friend |
Definition at line 51 of file FlowSensitive.h.
|
protected |
time of handling address edges
Definition at line 307 of file FlowSensitive.h.
|
protected |
Definition at line 279 of file FlowSensitive.h.
|
protected |
Save candidate mappings for evaluation's sake.
Definition at line 282 of file FlowSensitive.h.
|
protected |
time of handling copy edges
Definition at line 308 of file FlowSensitive.h.
|
protected |
time of points-to propagation of address-taken objects
Definition at line 304 of file FlowSensitive.h.
|
staticprotected |
Definition at line 277 of file FlowSensitive.h.
|
protected |
time of handling gep edges
Definition at line 309 of file FlowSensitive.h.
|
protected |
time of points-to propagation of top-level pointers
Definition at line 305 of file FlowSensitive.h.
|
protected |
time of load edges
Definition at line 310 of file FlowSensitive.h.
|
protected |
Number of processed mssa node.
Definition at line 296 of file FlowSensitive.h.
|
protected |
Definition at line 278 of file FlowSensitive.h.
|
protected |
Definition at line 298 of file FlowSensitive.h.
|
protected |
Number of processed Store node.
Definition at line 292 of file FlowSensitive.h.
|
protected |
Statistics.
Definition at line 286 of file FlowSensitive.h.
|
protected |
Number of processed Addr node.
Definition at line 287 of file FlowSensitive.h.
|
protected |
Number of processed actual param node.
Definition at line 293 of file FlowSensitive.h.
|
protected |
Number of processed Copy node.
Definition at line 288 of file FlowSensitive.h.
|
protected |
Number of processed Phi node.
Definition at line 290 of file FlowSensitive.h.
|
protected |
Number of processed formal ret node.
Definition at line 294 of file FlowSensitive.h.
|
protected |
Number of processed Gep node.
Definition at line 289 of file FlowSensitive.h.
|
protected |
Number of processed Load node.
Definition at line 291 of file FlowSensitive.h.
|
protected |
Definition at line 297 of file FlowSensitive.h.
|
protected |
time of phi nodes.
Definition at line 312 of file FlowSensitive.h.
|
protected |
time of processNode.
Definition at line 302 of file FlowSensitive.h.
|
protected |
time of points-to propagation.
Definition at line 303 of file FlowSensitive.h.
|
protected |
time of SCC detection.
Definition at line 301 of file FlowSensitive.h.
|
protected |
time of solve.
Definition at line 300 of file FlowSensitive.h.
|
protected |
time of store edges
Definition at line 311 of file FlowSensitive.h.
|
protected |
Definition at line 245 of file FlowSensitive.h.
|
protected |
Definition at line 315 of file FlowSensitive.h.
|
protected |
time of updating call graph
Definition at line 313 of file FlowSensitive.h.
|
protected |
time of strong/weak updates.
Definition at line 306 of file FlowSensitive.h.