Static Value-Flow Analysis
|
#include <AbstractState.h>
Public Types | |
typedef Map< u32_t, AbstractValue > | VarToAbsValMap |
typedef VarToAbsValMap | AddrToAbsValMap |
Static Public Member Functions | |
static u32_t | getVirtualMemAddress (u32_t idx) |
The physical address starts with 0x7f...... + idx. | |
static bool | isVirtualMemAddress (u32_t val) |
Check bit value of val start with 0x7F000000, filter by 0xFF000000. | |
static bool | isNullMem (u32_t addr) |
static bool | isInvalidMem (u32_t addr) |
static bool | eqVarToValMap (const VarToAbsValMap &lhs, const VarToAbsValMap &rhs) |
static bool | lessThanVarToValMap (const VarToAbsValMap &lhs, const VarToAbsValMap &rhs) |
static bool | geqVarToValMap (const VarToAbsValMap &lhs, const VarToAbsValMap &rhs) |
Public Attributes | |
Set< NodeID > | _freedAddrs |
Protected Attributes | |
VarToAbsValMap | _varToAbsVal |
Map a variable (symbol) to its abstract value. | |
AddrToAbsValMap | _addrToAbsVal |
Map a memory address to its stored abstract value. | |
Friends | |
class | SVFIR2AbsState |
class | RelationSolver |
Definition at line 58 of file AbstractState.h.
Definition at line 64 of file AbstractState.h.
Definition at line 63 of file AbstractState.h.
|
inline |
|
inline |
Definition at line 74 of file AbstractState.h.
|
inline |
copy constructor
Definition at line 77 of file AbstractState.h.
|
virtualdefault |
|
inline |
|
inline |
Definition at line 294 of file AbstractState.h.
|
inline |
Set all value bottom.
Definition at line 151 of file AbstractState.h.
|
inline |
Definition at line 413 of file AbstractState.h.
bool AbstractState::equals | ( | const AbstractState & | other | ) | const |
Definition at line 37 of file AbstractState.cpp.
|
inlinestatic |
Definition at line 344 of file AbstractState.h.
|
inlinestatic |
Definition at line 375 of file AbstractState.h.
Definition at line 492 of file AbstractState.cpp.
IntervalValue AbstractState::getByteOffset | ( | const GepStmt * | gep | ) |
Definition at line 304 of file AbstractState.cpp.
IntervalValue AbstractState::getElementIndex | ( | const GepStmt * | gep | ) |
Definition at line 231 of file AbstractState.cpp.
AddressValue AbstractState::getGepObjAddrs | ( | u32_t | pointer, |
IntervalValue | offset | ||
) |
Definition at line 162 of file AbstractState.cpp.
Return the internal index if addr is an address otherwise return the value of idx.
Definition at line 115 of file AbstractState.h.
|
inline |
get loc2val map
Definition at line 275 of file AbstractState.h.
if this NodeID in SVFIR is a pointer, get the pointee type e.g arr = (int*) malloc(10*sizeof(int)) getPointeeType(arr) -> return int we can set arr[0]='c', arr[1]='c', arr[2]='\0'
call | callnode of memset like api |
Definition at line 471 of file AbstractState.cpp.
|
inline |
get var2val map
Definition at line 269 of file AbstractState.h.
The physical address starts with 0x7f...... + idx.
Definition at line 103 of file AbstractState.h.
u32_t AbstractState::hash | ( | ) | const |
Definition at line 42 of file AbstractState.cpp.
whether the memory address stores memory addresses
Definition at line 243 of file AbstractState.h.
whether the memory address stores abstract value
Definition at line 256 of file AbstractState.h.
void AbstractState::initObjVar | ( | ObjVar * | objVar | ) |
Definition at line 185 of file AbstractState.cpp.
whether the variable is in varToAddrs table
Definition at line 217 of file AbstractState.h.
whether the variable is in varToVal table
Definition at line 230 of file AbstractState.h.
Definition at line 299 of file AbstractState.h.
Definition at line 190 of file AbstractState.h.
Definition at line 185 of file AbstractState.h.
Check bit value of val start with 0x7F000000, filter by 0xFF000000.
Definition at line 109 of file AbstractState.h.
void AbstractState::joinWith | ( | const AbstractState & | other | ) |
domain join with other, important! other widen this.
Definition at line 102 of file AbstractState.cpp.
|
inlinestatic |
Definition at line 361 of file AbstractState.h.
|
inlinevirtual |
Definition at line 326 of file AbstractState.h.
AbstractValue AbstractState::loadValue | ( | NodeID | varId | ) |
Definition at line 371 of file AbstractState.cpp.
void AbstractState::meetWith | ( | const AbstractState & | other | ) |
domain meet with other, important! other widen this.
Definition at line 134 of file AbstractState.cpp.
AbstractState AbstractState::narrowing | ( | const AbstractState & | other | ) |
domain narrow with other, and return the narrowed domain
Definition at line 80 of file AbstractState.cpp.
|
inline |
Definition at line 397 of file AbstractState.h.
|
inline |
Definition at line 402 of file AbstractState.h.
|
inline |
operator= move constructor
Definition at line 139 of file AbstractState.h.
|
inline |
Definition at line 120 of file AbstractState.h.
|
inline |
Definition at line 391 of file AbstractState.h.
|
inline |
Definition at line 408 of file AbstractState.h.
|
inlinevirtual |
get abstract value of variable
Definition at line 205 of file AbstractState.h.
|
inlinevirtual |
get abstract value of variable
Definition at line 211 of file AbstractState.h.
void AbstractState::printAbstractState | ( | ) | const |
Definition at line 389 of file AbstractState.cpp.
|
inline |
Copy some values and return a new IntervalExeState.
Definition at line 175 of file AbstractState.h.
|
inline |
Definition at line 318 of file AbstractState.h.
void AbstractState::storeValue | ( | NodeID | varId, |
AbstractValue | val | ||
) |
Definition at line 381 of file AbstractState.cpp.
|
inline |
Set all value top.
Definition at line 163 of file AbstractState.h.
|
inline |
Definition at line 336 of file AbstractState.h.
AbstractState AbstractState::widening | ( | const AbstractState & | other | ) |
domain widen with other, and return the widened domain
Definition at line 59 of file AbstractState.cpp.
|
friend |
Definition at line 61 of file AbstractState.h.
Definition at line 60 of file AbstractState.h.
|
protected |
Map a memory address to its stored abstract value.
Definition at line 199 of file AbstractState.h.
Definition at line 65 of file AbstractState.h.
|
protected |
Map a variable (symbol) to its abstract value.
Definition at line 197 of file AbstractState.h.