klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
klee::SpecialFunctionHandler Class Reference

#include <SpecialFunctionHandler.h>

Collaboration diagram for klee::SpecialFunctionHandler:

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 ()
 
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 (handleExit)
 
 HANDLER (handleAliasFunction)
 
 HANDLER (handleFree)
 
 HANDLER (handleGetErrno)
 
 HANDLER (handleGetObjSize)
 
 HANDLER (handleGetValue)
 
 HANDLER (handleIsSymbolic)
 
 HANDLER (handleMakeSymbolic)
 
 HANDLER (handleMalloc)
 
 HANDLER (handleMarkGlobal)
 
 HANDLER (handleMerge)
 
 HANDLER (handleNew)
 
 HANDLER (handleNewArray)
 
 HANDLER (handlePreferCex)
 
 HANDLER (handlePrintExpr)
 
 HANDLER (handlePrintRange)
 
 HANDLER (handleRange)
 
 HANDLER (handleRealloc)
 
 HANDLER (handleReportError)
 
 HANDLER (handleRevirtObjects)
 
 HANDLER (handleSetForking)
 
 HANDLER (handleSilentExit)
 
 HANDLER (handleStackTrace)
 
 HANDLER (handleUnderConstrained)
 
 HANDLER (handleWarning)
 
 HANDLER (handleWarningOnce)
 

Static Public Member Functions

static const_iterator begin ()
 
static const_iterator end ()
 
static int size ()
 

Public Attributes

handlers_ty handlers
 
class Executorexecutor
 

Detailed Description

Definition at line 29 of file SpecialFunctionHandler.h.

Member Typedef Documentation

typedef void(SpecialFunctionHandler::* klee::SpecialFunctionHandler::Handler)(ExecutionState &state, KInstruction *target, std::vector< ref< Expr > > &arguments)

Definition at line 31 of file SpecialFunctionHandler.h.

typedef std::map<const llvm::Function*, std::pair<Handler,bool> > klee::SpecialFunctionHandler::handlers_ty

Definition at line 36 of file SpecialFunctionHandler.h.

Constructor & Destructor Documentation

SpecialFunctionHandler::SpecialFunctionHandler ( Executor _executor)

Definition at line 140 of file SpecialFunctionHandler.cpp.

Member Function Documentation

SpecialFunctionHandler::const_iterator SpecialFunctionHandler::begin ( )
static

Definition at line 115 of file SpecialFunctionHandler.cpp.

References handlerInfo.

SpecialFunctionHandler::const_iterator SpecialFunctionHandler::end ( )
static

Definition at line 119 of file SpecialFunctionHandler.cpp.

bool SpecialFunctionHandler::handle ( ExecutionState state,
llvm::Function *  f,
KInstruction target,
std::vector< ref< Expr > > &  arguments 
)

Definition at line 187 of file SpecialFunctionHandler.cpp.

References executor, handlers, klee::KInstruction::inst, and klee::Executor::terminateStateOnExecError().

Referenced by klee::Executor::callExternalFunction().

Here is the call graph for this function:

Here is the caller graph for this function:

klee::SpecialFunctionHandler::HANDLER ( handleAbort  )
klee::SpecialFunctionHandler::HANDLER ( handleAssert  )
klee::SpecialFunctionHandler::HANDLER ( handleAssertFail  )
klee::SpecialFunctionHandler::HANDLER ( handleAssume  )
klee::SpecialFunctionHandler::HANDLER ( handleCalloc  )
klee::SpecialFunctionHandler::HANDLER ( handleCheckMemoryAccess  )
klee::SpecialFunctionHandler::HANDLER ( handleDefineFixedObject  )
klee::SpecialFunctionHandler::HANDLER ( handleDelete  )
klee::SpecialFunctionHandler::HANDLER ( handleDeleteArray  )
klee::SpecialFunctionHandler::HANDLER ( handleExit  )
klee::SpecialFunctionHandler::HANDLER ( handleAliasFunction  )
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 ( handleMerge  )
klee::SpecialFunctionHandler::HANDLER ( handleNew  )
klee::SpecialFunctionHandler::HANDLER ( handleNewArray  )
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 ( handleUnderConstrained  )
klee::SpecialFunctionHandler::HANDLER ( handleWarning  )
klee::SpecialFunctionHandler::HANDLER ( handleWarningOnce  )
void SpecialFunctionHandler::prepare ( )

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.

Definition at line 144 of file SpecialFunctionHandler.cpp.

References klee::SpecialFunctionHandler::HandlerInfo::doesNotReturn, klee::SpecialFunctionHandler::HandlerInfo::doNotOverride, executor, handlerInfo, klee::Executor::kmodule, klee::KModule::module, klee::SpecialFunctionHandler::HandlerInfo::name, and size().

Here is the call graph for this function:

std::string SpecialFunctionHandler::readStringAtAddress ( ExecutionState state,
ref< Expr address 
)
int SpecialFunctionHandler::size ( )
static

Definition at line 136 of file SpecialFunctionHandler.cpp.

References handlerInfo.

Referenced by prepare().

Here is the caller graph for this function:

Member Data Documentation

class Executor& klee::SpecialFunctionHandler::executor

Definition at line 39 of file SpecialFunctionHandler.h.

Referenced by bind(), handle(), prepare(), and readStringAtAddress().

handlers_ty klee::SpecialFunctionHandler::handlers

Definition at line 38 of file SpecialFunctionHandler.h.

Referenced by bind(), and handle().


The documentation for this class was generated from the following files: