klee
|
#include <SpecialFunctionHandler.h>
Classes | |
class | const_iterator |
struct | HandlerInfo |
Public Types | |
typedef void(SpecialFunctionHandler::* | Handler) (ExecutionState &state, KInstruction *target, std::vector< ref< Expr > > &arguments) |
typedef std::map< const llvm::Function *, std::pair< Handler, bool > > | handlers_ty |
Public Member Functions | |
SpecialFunctionHandler (Executor &_executor) | |
void | prepare (std::vector< const char * > &preservedFunctions) |
void | bind () |
bool | handle (ExecutionState &state, llvm::Function *f, KInstruction *target, std::vector< ref< Expr > > &arguments) |
std::string | readStringAtAddress (ExecutionState &state, ref< Expr > address) |
HANDLER (handleAbort) | |
HANDLER (handleAssert) | |
HANDLER (handleAssertFail) | |
HANDLER (handleAssume) | |
HANDLER (handleCalloc) | |
HANDLER (handleCheckMemoryAccess) | |
HANDLER (handleDefineFixedObject) | |
HANDLER (handleDelete) | |
HANDLER (handleDeleteArray) | |
HANDLER (handleErrnoLocation) | |
HANDLER (handleExit) | |
HANDLER (handleFree) | |
HANDLER (handleGetErrno) | |
HANDLER (handleGetObjSize) | |
HANDLER (handleGetValue) | |
HANDLER (handleIsSymbolic) | |
HANDLER (handleMakeSymbolic) | |
HANDLER (handleMalloc) | |
HANDLER (handleMemalign) | |
HANDLER (handleMarkGlobal) | |
HANDLER (handleOpenMerge) | |
HANDLER (handleCloseMerge) | |
HANDLER (handleNew) | |
HANDLER (handleNewArray) | |
HANDLER (handlePreferCex) | |
HANDLER (handlePosixPreferCex) | |
HANDLER (handlePrintExpr) | |
HANDLER (handlePrintRange) | |
HANDLER (handleRange) | |
HANDLER (handleRealloc) | |
HANDLER (handleReportError) | |
HANDLER (handleRevirtObjects) | |
HANDLER (handleSetForking) | |
HANDLER (handleSilentExit) | |
HANDLER (handleStackTrace) | |
HANDLER (handleUnderConstrained) | |
HANDLER (handleWarning) | |
HANDLER (handleWarningOnce) | |
HANDLER (handleAddOverflow) | |
HANDLER (handleMulOverflow) | |
HANDLER (handleSubOverflow) | |
HANDLER (handleDivRemOverflow) | |
Static Public Member Functions | |
static const_iterator | begin () |
static const_iterator | end () |
static int | size () |
Public Attributes | |
handlers_ty | handlers |
class Executor & | executor |
Definition at line 31 of file SpecialFunctionHandler.h.
typedef void(SpecialFunctionHandler::* klee::SpecialFunctionHandler::Handler) (ExecutionState &state, KInstruction *target, std::vector< ref< Expr > > &arguments) |
Definition at line 33 of file SpecialFunctionHandler.h.
typedef std::map<const llvm::Function*, std::pair<Handler,bool> > klee::SpecialFunctionHandler::handlers_ty |
Definition at line 38 of file SpecialFunctionHandler.h.
SpecialFunctionHandler::SpecialFunctionHandler | ( | Executor & | _executor | ) |
Definition at line 178 of file SpecialFunctionHandler.cpp.
|
static |
Definition at line 153 of file SpecialFunctionHandler.cpp.
References handlerInfo.
void SpecialFunctionHandler::bind | ( | ) |
Initialize the internal handler map after the module has been prepared for execution.
Definition at line 206 of file SpecialFunctionHandler.cpp.
References klee::SpecialFunctionHandler::HandlerInfo::doNotOverride, executor, klee::SpecialFunctionHandler::HandlerInfo::handler, handlerInfo, handlers, klee::SpecialFunctionHandler::HandlerInfo::hasReturnValue, klee::Executor::kmodule, and klee::SpecialFunctionHandler::HandlerInfo::name.
Referenced by klee::Executor::setModule().
|
static |
Definition at line 157 of file SpecialFunctionHandler.cpp.
bool SpecialFunctionHandler::handle | ( | ExecutionState & | state, |
llvm::Function * | f, | ||
KInstruction * | target, | ||
std::vector< ref< Expr > > & | arguments | ||
) |
Definition at line 219 of file SpecialFunctionHandler.cpp.
References executor, handlers, klee::KInstruction::inst, and klee::Executor::terminateStateOnExecError().
Referenced by klee::Executor::callExternalFunction().
klee::SpecialFunctionHandler::HANDLER | ( | handleAbort | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleAddOverflow | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleAssert | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleAssertFail | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleAssume | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleCalloc | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleCheckMemoryAccess | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleCloseMerge | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleDefineFixedObject | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleDelete | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleDeleteArray | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleDivRemOverflow | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleErrnoLocation | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleExit | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleFree | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleGetErrno | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleGetObjSize | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleGetValue | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleIsSymbolic | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleMakeSymbolic | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleMalloc | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleMarkGlobal | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleMemalign | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleMulOverflow | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleNew | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleNewArray | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleOpenMerge | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handlePosixPreferCex | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handlePreferCex | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handlePrintExpr | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handlePrintRange | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleRange | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleRealloc | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleReportError | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleRevirtObjects | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleSetForking | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleSilentExit | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleStackTrace | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleSubOverflow | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleUnderConstrained | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleWarning | ) |
klee::SpecialFunctionHandler::HANDLER | ( | handleWarningOnce | ) |
void SpecialFunctionHandler::prepare | ( | std::vector< const char * > & | preservedFunctions | ) |
Perform any modifications on the LLVM module before it is prepared for execution. At the moment this involves deleting unused function bodies and marking intrinsics with appropriate flags for use in optimizations.
preservedFunctions | contains all the function names which should be preserved during optimization |
Definition at line 181 of file SpecialFunctionHandler.cpp.
References klee::SpecialFunctionHandler::HandlerInfo::doesNotReturn, klee::SpecialFunctionHandler::HandlerInfo::doNotOverride, executor, handlerInfo, klee::Executor::kmodule, klee::SpecialFunctionHandler::HandlerInfo::name, and size().
Referenced by klee::Executor::setModule().
std::string SpecialFunctionHandler::readStringAtAddress | ( | ExecutionState & | state, |
ref< Expr > | address | ||
) |
Definition at line 244 of file SpecialFunctionHandler.cpp.
References klee::ExecutionState::addressSpace, executor, klee::MemoryObject::getOffsetExpr(), klee::klee_warning_once(), klee::ObjectState::read8(), klee::AddressSpace::resolveOne(), klee::MemoryObject::size, klee::Executor::terminateStateOnUserError(), and klee::Executor::toUnique().
|
static |
Definition at line 174 of file SpecialFunctionHandler.cpp.
References handlerInfo.
Referenced by klee::SpecialFunctionHandler::const_iterator::operator++(), and prepare().
class Executor& klee::SpecialFunctionHandler::executor |
Definition at line 41 of file SpecialFunctionHandler.h.
Referenced by bind(), handle(), prepare(), and readStringAtAddress().
handlers_ty klee::SpecialFunctionHandler::handlers |
Definition at line 40 of file SpecialFunctionHandler.h.