|
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 | isBlackHoleObjAddr (u32_t addr) |
Protected Attributes | |
| VarToAbsValMap | _varToAbsVal |
| Map a variable (symbol) to its abstract value. | |
| AddrToAbsValMap | _addrToAbsVal |
| Map a memory address to its stored abstract value. | |
| Set< NodeID > | _freedAddrs |
Friends | |
| class | SVFIR2AbsState |
| class | RelationSolver |
Definition at line 55 of file AbstractState.h.
Definition at line 61 of file AbstractState.h.
Definition at line 60 of file AbstractState.h.
|
inline |
|
inline |
Definition at line 67 of file AbstractState.h.
|
inline |
copy constructor
Definition at line 70 of file AbstractState.h.
|
virtualdefault |
|
inline |
|
inline |
Definition at line 281 of file AbstractState.h.
|
inline |
Set all value bottom.
Definition at line 122 of file AbstractState.h.
|
inline |
Definition at line 359 of file AbstractState.h.
| bool AbstractState::equals | ( | const AbstractState & | other | ) | const |
Definition at line 37 of file AbstractState.cpp.
| bool AbstractState::eqVarToValMap | ( | const VarToAbsValMap & | lhs, |
| const VarToAbsValMap & | rhs | ||
| ) | const |
Definition at line 552 of file AbstractState.cpp.
| bool AbstractState::geqVarToValMap | ( | const VarToAbsValMap & | lhs, |
| const VarToAbsValMap & | rhs | ||
| ) | const |
Definition at line 566 of file AbstractState.cpp.
Definition at line 519 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 108 of file AbstractState.h.
|
inline |
get loc2val map
Definition at line 264 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 498 of file AbstractState.cpp.
|
inline |
get var2val map
Definition at line 258 of file AbstractState.h.
The physical address starts with 0x7f...... + idx.
Definition at line 96 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 232 of file AbstractState.h.
whether the memory address stores abstract value
Definition at line 245 of file AbstractState.h.
Definition at line 185 of file AbstractState.cpp.
whether the variable is in varToAddrs table
Definition at line 210 of file AbstractState.h.
whether the variable is in varToVal table
Definition at line 221 of file AbstractState.h.
Definition at line 159 of file AbstractState.h.
Definition at line 286 of file AbstractState.h.
Definition at line 154 of file AbstractState.h.
Check bit value of val start with 0x7F000000, filter by 0xFF000000.
Definition at line 102 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.
|
inlinevirtual |
Definition at line 187 of file AbstractState.h.
|
inlinevirtual |
Definition at line 194 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 344 of file AbstractState.h.
|
inline |
Definition at line 349 of file AbstractState.h.
|
inline |
operator= move constructor
Definition at line 327 of file AbstractState.h.
|
inline |
Assignment operator.
Definition at line 315 of file AbstractState.h.
|
inline |
Definition at line 338 of file AbstractState.h.
|
inline |
Definition at line 354 of file AbstractState.h.
|
inlinevirtual |
|
inlinevirtual |
| void AbstractState::printAbstractState | ( | ) | const |
Definition at line 389 of file AbstractState.cpp.
|
inline |
Copy some values and return a new IntervalExeState.
Definition at line 146 of file AbstractState.h.
|
inline |
Definition at line 201 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 134 of file AbstractState.h.
| std::string AbstractState::toString | ( | ) | const |
Definition at line 471 of file AbstractState.cpp.
| 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 58 of file AbstractState.h.
Definition at line 57 of file AbstractState.h.
|
protected |
Map a memory address to its stored abstract value.
Definition at line 167 of file AbstractState.h.
Definition at line 168 of file AbstractState.h.
|
protected |
Map a variable (symbol) to its abstract value.
Definition at line 166 of file AbstractState.h.