Skip to content
Yulei Sui edited this page Apr 12, 2022 · 27 revisions

We describe APIs of Z3Mgr and its subclasses Z3ExampleMgr (used in Assignment-3) and Z3SSEMgr (used in Assignment-4).

Members Meanings
SVF:: Z3Mgr::storeValue(const z3::expr loc, const z3::expr value) store value to the location loc of loc2ValMap, which is an Z3's array type for handling memory operations
SVF:: Z3Mgr::loadValue(const z3::expr loc) retrieve the value from location loc of loc2ValMap
SVF:: Z3Mgr::getZ3Expr(u32_t idx) return the Z3 expression based on the ID of an SVFVar
SVF:: Z3Mgr::updateZ3Expr(u32_t idx, z3::expr target) update expression for an SVFVar given its ID
SVF:: Z3Mgr::getEvalExpr(z3::expr e) return evaluated value of an expression if the expression has a solution (model), otherwise assertion unsat
SVF:: Z3Mgr::getSolver return the Z3's solver
SVF:: Z3Mgr::getCtx return the Z3's context
SVF:: Z3Mgr::resetZ3ExprMap reset added expressions and clean all declared values
Members Meanings
Members Meanings
SVF:: Z3SSEMgr:: createExprForValVar(const ValVar* val) declare the expr type for each top-level pointers
SVF:: Z3SSEMgr:: createExprForObjVar(const ObjVar* obj) initialize the expr value for each objects (address-taken variables and constants)
SVF:: Z3SSEMgr::getMemObjAddress(u32_t idx) return the address expr of a ObjVar
SVF:: Z3SSEMgr::getGepObjAddress(z3::expr pointer, u32_t offset) return the field address given a pointer points to a struct object and an offset
SVF:: Z3SSEMgr::getGepOffset(const GepStmt* gep) return the offset (u32_t) given a GepStmt
SVF:: Z3SSEMgr:: printExprValues dump the values of all added expressions in the solver
Clone this wiki locally