klee
KleeHandler Class Reference
Inheritance diagram for KleeHandler:
Collaboration diagram for KleeHandler:

Public Member Functions

 KleeHandler (int argc, char **argv)
 
 ~KleeHandler ()
 
llvm::raw_ostream & getInfoStream () const
 
unsigned getNumTestCases ()
 Returns the number of test cases successfully generated so far. More...
 
unsigned getNumPathsCompleted ()
 
unsigned getNumPathsExplored ()
 
void incPathsCompleted ()
 
void incPathsExplored (std::uint32_t num=1)
 
void setInterpreter (Interpreter *i)
 
void processTestCase (const ExecutionState &state, const char *errorMessage, const char *errorSuffix)
 
std::string getOutputFilename (const std::string &filename)
 
std::unique_ptr< llvm::raw_fd_ostream > openOutputFile (const std::string &filename)
 
std::string getTestFilename (const std::string &suffix, unsigned id)
 
std::unique_ptr< llvm::raw_fd_ostream > openTestFile (const std::string &suffix, unsigned id)
 
- Public Member Functions inherited from klee::InterpreterHandler
 InterpreterHandler ()
 
virtual ~InterpreterHandler ()
 
virtual llvm::raw_ostream & getInfoStream () const =0
 
virtual std::string getOutputFilename (const std::string &filename)=0
 
virtual std::unique_ptr< llvm::raw_fd_ostream > openOutputFile (const std::string &filename)=0
 
virtual void incPathsCompleted ()=0
 
virtual void incPathsExplored (std::uint32_t num=1)=0
 
virtual void processTestCase (const ExecutionState &state, const char *err, const char *suffix)=0
 

Static Public Member Functions

static void loadPathFile (std::string name, std::vector< bool > &buffer)
 
static void getKTestFilesInDir (std::string directoryPath, std::vector< std::string > &results)
 
static std::string getRunTimeLibraryPath (const char *argv0)
 

Private Attributes

Interpreterm_interpreter
 
TreeStreamWriterm_pathWriter
 
TreeStreamWriterm_symPathWriter
 
std::unique_ptr< llvm::raw_ostream > m_infoFile
 
SmallString< 128 > m_outputDirectory
 
unsigned m_numTotalTests
 
unsigned m_numGeneratedTests
 
unsigned m_pathsCompleted
 
unsigned m_pathsExplored
 
int m_argc
 
char ** m_argv
 

Detailed Description

Definition at line 298 of file main.cpp.

Constructor & Destructor Documentation

◆ KleeHandler()

KleeHandler::KleeHandler ( int  argc,
char **  argv 
)

◆ ~KleeHandler()

KleeHandler::~KleeHandler ( )

Member Function Documentation

◆ getInfoStream()

llvm::raw_ostream & KleeHandler::getInfoStream ( ) const
inlinevirtual

Implements klee::InterpreterHandler.

Definition at line 319 of file main.cpp.

References m_infoFile.

Referenced by main().

Here is the caller graph for this function:

◆ getKTestFilesInDir()

void KleeHandler::getKTestFilesInDir ( std::string  directoryPath,
std::vector< std::string > &  results 
)
static

Definition at line 621 of file main.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ getNumPathsCompleted()

unsigned KleeHandler::getNumPathsCompleted ( )
inline

Definition at line 322 of file main.cpp.

References m_pathsCompleted.

Referenced by main().

Here is the caller graph for this function:

◆ getNumPathsExplored()

unsigned KleeHandler::getNumPathsExplored ( )
inline

Definition at line 323 of file main.cpp.

References m_pathsExplored.

Referenced by main().

Here is the caller graph for this function:

◆ getNumTestCases()

unsigned KleeHandler::getNumTestCases ( )
inline

Returns the number of test cases successfully generated so far.

Definition at line 321 of file main.cpp.

References m_numGeneratedTests.

Referenced by main().

Here is the caller graph for this function:

◆ getOutputFilename()

std::string KleeHandler::getOutputFilename ( const std::string &  filename)
virtual

Implements klee::InterpreterHandler.

Definition at line 442 of file main.cpp.

References m_outputDirectory.

Referenced by KleeHandler(), openOutputFile(), processTestCase(), and setInterpreter().

Here is the caller graph for this function:

◆ getRunTimeLibraryPath()

std::string KleeHandler::getRunTimeLibraryPath ( const char *  argv0)
static

Definition at line 639 of file main.cpp.

References getRunTimeLibraryPath().

Referenced by getRunTimeLibraryPath(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTestFilename()

std::string KleeHandler::getTestFilename ( const std::string &  suffix,
unsigned  id 
)

Definition at line 463 of file main.cpp.

References suffix.

Referenced by openTestFile(), and processTestCase().

Here is the caller graph for this function:

◆ incPathsCompleted()

void KleeHandler::incPathsCompleted ( )
inlinevirtual

Implements klee::InterpreterHandler.

Definition at line 324 of file main.cpp.

References m_pathsCompleted.

◆ incPathsExplored()

void KleeHandler::incPathsExplored ( std::uint32_t  num = 1)
inlinevirtual

Implements klee::InterpreterHandler.

Definition at line 325 of file main.cpp.

References m_pathsExplored.

◆ loadPathFile()

void KleeHandler::loadPathFile ( std::string  name,
std::vector< bool > &  buffer 
)
static

Definition at line 606 of file main.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ openOutputFile()

std::unique_ptr< llvm::raw_fd_ostream > KleeHandler::openOutputFile ( const std::string &  filename)
virtual

Implements klee::InterpreterHandler.

Definition at line 449 of file main.cpp.

References getOutputFilename(), klee::klee_open_output_file(), and klee_warning().

Referenced by KleeHandler(), and openTestFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openTestFile()

std::unique_ptr< llvm::raw_fd_ostream > KleeHandler::openTestFile ( const std::string &  suffix,
unsigned  id 
)

Definition at line 470 of file main.cpp.

References getTestFilename(), openOutputFile(), and suffix.

Referenced by processTestCase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processTestCase()

◆ setInterpreter()

void KleeHandler::setInterpreter ( Interpreter i)

Definition at line 426 of file main.cpp.

References getOutputFilename(), klee::TreeStreamWriter::good(), m_interpreter, m_pathWriter, m_symPathWriter, klee::Interpreter::setPathWriter(), and klee::Interpreter::setSymbolicPathWriter().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_argc

int KleeHandler::m_argc
private

Definition at line 312 of file main.cpp.

Referenced by processTestCase().

◆ m_argv

char** KleeHandler::m_argv
private

Definition at line 313 of file main.cpp.

Referenced by processTestCase().

◆ m_infoFile

std::unique_ptr<llvm::raw_ostream> KleeHandler::m_infoFile
private

Definition at line 302 of file main.cpp.

Referenced by getInfoStream(), and KleeHandler().

◆ m_interpreter

Interpreter* KleeHandler::m_interpreter
private

Definition at line 300 of file main.cpp.

Referenced by processTestCase(), and setInterpreter().

◆ m_numGeneratedTests

unsigned KleeHandler::m_numGeneratedTests
private

Definition at line 307 of file main.cpp.

Referenced by getNumTestCases(), and processTestCase().

◆ m_numTotalTests

unsigned KleeHandler::m_numTotalTests
private

Definition at line 306 of file main.cpp.

Referenced by processTestCase().

◆ m_outputDirectory

SmallString<128> KleeHandler::m_outputDirectory
private

Definition at line 304 of file main.cpp.

Referenced by getOutputFilename(), and KleeHandler().

◆ m_pathsCompleted

unsigned KleeHandler::m_pathsCompleted
private

Definition at line 308 of file main.cpp.

Referenced by getNumPathsCompleted(), and incPathsCompleted().

◆ m_pathsExplored

unsigned KleeHandler::m_pathsExplored
private

Definition at line 309 of file main.cpp.

Referenced by getNumPathsExplored(), and incPathsExplored().

◆ m_pathWriter

TreeStreamWriter* KleeHandler::m_pathWriter
private

Definition at line 301 of file main.cpp.

Referenced by processTestCase(), setInterpreter(), and ~KleeHandler().

◆ m_symPathWriter

TreeStreamWriter * KleeHandler::m_symPathWriter
private

Definition at line 301 of file main.cpp.

Referenced by processTestCase(), setInterpreter(), and ~KleeHandler().


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