|
Static Value-Flow Analysis
|
#include <RelExeState.h>
Public Types | |
| typedef Map< u32_t, Z3Expr > | VarToValMap |
| typedef VarToValMap | AddrToValMap |
Static Public Member Functions | |
| static z3::context & | getContext () |
| 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 u32_t | getInternalID (u32_t idx) |
| Return the internal index if idx is an address otherwise return the value of idx. | |
| static s32_t | z3Expr2NumValue (const Z3Expr &e) |
| Return int value from an expression if it is a numeral, otherwise return an approximate value. | |
Protected Member Functions | |
| void | store (u32_t objId, const Z3Expr &z3Expr) |
| Z3Expr & | load (u32_t objId) |
Protected Attributes | |
| VarToValMap | _varToVal |
| AddrToValMap | _addrToVal |
Private Member Functions | |
| bool | eqVarToValMap (const VarToValMap &lhs, const VarToValMap &rhs) const |
| bool | lessThanVarToValMap (const VarToValMap &lhs, const VarToValMap &rhs) const |
Friends | |
| class | SVFIR2AbsState |
Definition at line 40 of file RelExeState.h.
Definition at line 46 of file RelExeState.h.
Definition at line 45 of file RelExeState.h.
|
default |
|
inline |
Definition at line 55 of file RelExeState.h.
|
inline |
Definition at line 57 of file RelExeState.h.
|
virtualdefault |
|
inlinenoexcept |
Definition at line 66 of file RelExeState.h.
| Z3Expr RelExeState::buildRelZ3Expr | ( | u32_t | cmp, |
| s32_t | succ, | ||
| Set< u32_t > & | vars, | ||
| Set< u32_t > & | initVars | ||
| ) |
Build relational Z3Expr.
Build relational Z3Expr
| cmp | |
| succ | |
| vars | return all the relational vars of a given variable |
| initVars | the vars on the right hand side of cmp statement, e.g., {a} for "cmp = a > 1" |
Definition at line 90 of file RelExeState.cpp.
|
private |
Definition at line 136 of file RelExeState.cpp.
Return true if map has varId.
Definition at line 138 of file RelExeState.h.
Extract all related SVFVar IDs based on compare expr.
Extract all related SVFVar IDs based on compare expr
| expr | |
| res |
Definition at line 66 of file RelExeState.cpp.
Extract sub SVFVar IDs of a Z3Expr.
Extract sub SVFVar IDs of a Z3Expr
e.g., Given an expr "a+b", return {a.id, b.id}
| expr | |
| res |
Definition at line 45 of file RelExeState.cpp.
|
inlinestatic |
Definition at line 95 of file RelExeState.h.
Return the internal index if idx is an address otherwise return the value of idx.
Definition at line 185 of file RelExeState.h.
|
inline |
Definition at line 105 of file RelExeState.h.
|
inline |
Definition at line 100 of file RelExeState.h.
The physical address starts with 0x7f...... + idx.
Definition at line 171 of file RelExeState.h.
Return Z3 expression eagerly based on SVFVar ID.
Definition at line 144 of file RelExeState.h.
|
inline |
Definition at line 115 of file RelExeState.h.
Check bit value of val start with 0x7F000000, filter by 0xFF000000.
Definition at line 177 of file RelExeState.h.
|
private |
Definition at line 149 of file RelExeState.cpp.
Load value at location.
Load value at location
| loc | location, e.g., int_val(0x7f..01) |
Definition at line 183 of file RelExeState.cpp.
Definition at line 211 of file RelExeState.h.
|
inline |
Overloading Operator!=.
Definition at line 86 of file RelExeState.h.
| bool RelExeState::operator< | ( | const RelExeState & | rhs | ) | const |
Overloading Operator==.
Overloading Operator<
| rhs |
Definition at line 130 of file RelExeState.cpp.
| RelExeState & RelExeState::operator= | ( | const RelExeState & | rhs | ) |
Definition at line 104 of file RelExeState.cpp.
|
inlinenoexcept |
Definition at line 72 of file RelExeState.h.
| bool RelExeState::operator== | ( | const RelExeState & | rhs | ) | const |
Overloading Operator==.
Overloading Operator==
| rhs |
Definition at line 119 of file RelExeState.cpp.
Definition at line 110 of file RelExeState.h.
| void RelExeState::printExprValues | ( | ) |
Print values of all expressions.
Print values of all expressions
Definition at line 196 of file RelExeState.cpp.
Store value to location.
Store value to location
| loc | location, e.g., int_val(0x7f..01) |
| value |
Definition at line 170 of file RelExeState.cpp.
Definition at line 206 of file RelExeState.h.
Return Z3 expression lazily based on SVFVar ID.
Definition at line 150 of file RelExeState.h.
Return int value from an expression if it is a numeral, otherwise return an approximate value.
Definition at line 191 of file RelExeState.h.
Definition at line 42 of file RelExeState.h.
|
protected |
Definition at line 50 of file RelExeState.h.
|
protected |
Definition at line 49 of file RelExeState.h.