Static Value-Flow Analysis
|
AbstractInterpretation is same as Abstract Execution. More...
#include <AbstractInterpretation.h>
Public Types | |
typedef SCCDetection< PTACallGraph * > | CallGraphSCC |
Public Member Functions | |
AbstractInterpretation () | |
Constructor. | |
virtual void | runOnModule (ICFG *icfg) |
virtual | ~AbstractInterpretation () |
Destructor. | |
void | analyse () |
Program entry. | |
void | addDetector (std::unique_ptr< AEDetector > detector) |
Static Public Member Functions | |
static AbstractInterpretation & | getAEInstance () |
Public Attributes | |
Set< const CallICFGNode * > | checkpoints |
Private Attributes | |
SVFIR * | svfir |
protected data members, also used in subclasses | |
AEAPI * | api {nullptr} |
Execution State, used to store the Interval Value of every SVF variable. | |
ICFG * | icfg |
AEStat * | stat |
std::vector< const CallICFGNode * > | callSiteStack |
Map< const CallGraphNode *, ICFGWTO * > | funcToWTO |
Set< const CallGraphNode * > | recursiveFuns |
Map< std::string, std::function< void(const CallICFGNode *)> > | func_map |
Map< const ICFGNode *, AbstractState > | abstractTrace |
std::string | moduleName |
std::vector< std::unique_ptr< AEDetector > > | detectors |
AbsExtAPI * | utils |
Map< s32_t, s32_t > | _reverse_predicate |
Map< s32_t, s32_t > | _switch_lhsrhs_predicate |
Friends | |
class | AEStat |
class | AEAPI |
class | BufOverflowDetector |
AbstractInterpretation is same as Abstract Execution.
Definition at line 102 of file AbstractInterpretation.h.
Definition at line 109 of file AbstractInterpretation.h.
AbstractInterpretation::AbstractInterpretation | ( | ) |
|
virtual |
Destructor.
Definition at line 66 of file AbstractInterpretation.cpp.
|
inline |
Definition at line 127 of file AbstractInterpretation.h.
void AbstractInterpretation::analyse | ( | ) |
Program entry.
Definition at line 103 of file AbstractInterpretation.cpp.
|
private |
Definition at line 951 of file AbstractInterpretation.cpp.
|
private |
Definition at line 920 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 618 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 571 of file AbstractInterpretation.cpp.
|
inlineprivate |
Definition at line 258 of file AbstractInterpretation.h.
|
inlinestatic |
Definition at line 121 of file AbstractInterpretation.h.
|
inlineprivate |
Definition at line 277 of file AbstractInterpretation.h.
handle call node in ICFGNode
node | ICFGNode which has a single CallICFGNode |
Definition at line 535 of file AbstractInterpretation.cpp.
|
privatevirtual |
handle wto cycle (loop)
handle wto cycle (loop)
cycle | WTOCycle which has weak topo order of basic blocks and nested cycles |
Definition at line 672 of file AbstractInterpretation.cpp.
|
privatevirtual |
Global ICFGNode is handled at the entry of the program,.
handle global node
Definition at line 118 of file AbstractInterpretation.cpp.
|
privatevirtual |
handle instructions in svf basic blocks
handle instructions in ICFGSingletonWTO
block | basic block that has one instruction or a series of instructions |
Definition at line 476 of file AbstractInterpretation.cpp.
handle SVF Statement like CmpStmt, CallStmt, GepStmt, LoadStmt, StoreStmt, etc.
stmt | SVFStatement which is a value flow of instruction |
Definition at line 718 of file AbstractInterpretation.cpp.
|
private |
Definition at line 515 of file AbstractInterpretation.cpp.
|
private |
Hanlde two types of WTO components (singleton and cycle)
Definition at line 507 of file AbstractInterpretation.cpp.
Definition at line 271 of file AbstractInterpretation.h.
|
privatevirtual |
Definition at line 642 of file AbstractInterpretation.cpp.
|
private |
Mark recursive functions in the call graph.
This function identifies and marks recursive functions in the call graph. It does this by detecting cycles in the call graph's strongly connected components (SCC). Any function found to be part of a cycle is marked as recursive.
Definition at line 81 of file AbstractInterpretation.cpp.
|
private |
Check if execution state exist at the branch edge
intraEdge | the edge from CmpStmt to the next node |
Definition at line 448 of file AbstractInterpretation.cpp.
|
private |
Check if this cmpStmt and succ are satisfiable to the execution state.
cmpStmt | CmpStmt is a conditional branch statement |
succ | the value of cmpStmt (True or False) |
Definition at line 183 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 610 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 566 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 636 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 582 of file AbstractInterpretation.cpp.
|
private |
Check if this SwitchInst and succ are satisfiable to the execution state.
var | var in switch inst |
succ | the case value of switch inst |
Definition at line 404 of file AbstractInterpretation.cpp.
Check if execution state exist by merging states of predecessor nodes
icfgNode | The icfg node to analyse |
get execution state by merging states of predecessor blocks Scenario 1: preblock --—(intraEdge)-—> block, join the preES of inEdges Scenario 2: preblock --—(callEdge)-—> block
Definition at line 133 of file AbstractInterpretation.cpp.
|
privatevirtual |
Definition at line 591 of file AbstractInterpretation.cpp.
|
virtual |
collect checkpoint
Definition at line 41 of file AbstractInterpretation.cpp.
|
privatevirtual |
Check if this callnode is recursive call and skip it.
callnode | CallICFGNode which calls a recursive function |
Definition at line 777 of file AbstractInterpretation.cpp.
Definition at line 1057 of file AbstractInterpretation.cpp.
|
private |
Find the comparison predicates in "class BinaryOPStmt:OpCode" under SVF/svf/include/SVFIR/SVFStatements.h You are only required to handle integer predicates, including Add, FAdd, Sub, FSub, Mul, FMul, SDiv, FDiv, UDiv, SRem, FRem, URem, Xor, And, Or, AShr, Shl, LShr
Definition at line 1067 of file AbstractInterpretation.cpp.
Definition at line 1129 of file AbstractInterpretation.cpp.
Definition at line 1357 of file AbstractInterpretation.cpp.
Definition at line 967 of file AbstractInterpretation.cpp.
Definition at line 1341 of file AbstractInterpretation.cpp.
Definition at line 1001 of file AbstractInterpretation.cpp.
Definition at line 1048 of file AbstractInterpretation.cpp.
|
private |
Definition at line 983 of file AbstractInterpretation.cpp.
Definition at line 1349 of file AbstractInterpretation.cpp.
Definition at line 105 of file AbstractInterpretation.h.
Definition at line 104 of file AbstractInterpretation.h.
|
friend |
Definition at line 106 of file AbstractInterpretation.h.
|
private |
Definition at line 295 of file AbstractInterpretation.h.
Execution State, used to store the Interval Value of every SVF variable.
Definition at line 248 of file AbstractInterpretation.h.
|
private |
Definition at line 253 of file AbstractInterpretation.h.
Set<const CallICFGNode*> SVF::AbstractInterpretation::checkpoints |
Definition at line 132 of file AbstractInterpretation.h.
|
private |
Definition at line 298 of file AbstractInterpretation.h.
|
private |
Definition at line 293 of file AbstractInterpretation.h.
|
private |
Definition at line 254 of file AbstractInterpretation.h.
|
private |
Definition at line 250 of file AbstractInterpretation.h.
|
private |
Definition at line 296 of file AbstractInterpretation.h.
|
private |
Definition at line 255 of file AbstractInterpretation.h.
|
private |
Definition at line 251 of file AbstractInterpretation.h.
|
private |
protected data members, also used in subclasses
Definition at line 246 of file AbstractInterpretation.h.
|
private |
Definition at line 299 of file AbstractInterpretation.h.