ROSE  0.9.11.155
Classes | Public Types | Public Member Functions | List of all members
Rose::BinaryAnalysis::Concolic::ConcreteExecutor Class Referenceabstract

Description

Base class for executing test cases concretely.

The user is expected to subclass this object in order to define the specifics of how to execute a test case concretely, measure some properties of the execution, and return those properties. A basic LinuxExecutor subclass is already provided to give an example of how to run a program and measure its exit status. Other more complex executors might do things like measure code coverage.

ConcreteExecutor objects are expected to be used in single-threaded applications. Supporting multi-threaded concrete executors would be difficult since calling fork[2] from multi-threaded C++ programs is fraught with danger. Therefore, none of the methods in this API are thread-safe.

Definition at line 339 of file BinaryConcolic.h.

#include <BinaryConcolic.h>

Inheritance diagram for Rose::BinaryAnalysis::Concolic::ConcreteExecutor:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Concolic::ConcreteExecutor:
Collaboration graph
[legend]

Classes

class  Result
 Base class for user-defined concrete execution results. More...
 

Public Types

typedef Sawyer::SharedPointer< ConcreteExecutorPtr
 Reference counting pointer to a ConcreteExecutor. More...
 

Public Member Functions

virtual Resultexecute (const TestCase::Ptr &)=0
 Execute one test case synchronously. More...
 
void executionMonitor (const boost::filesystem::path &executorName)
 Sets an execution monitor for a test run. More...
 
boost::filesystem::path executionMonitor () const
 Sets an execution monitor for a test run. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Member Typedef Documentation

Reference counting pointer to a ConcreteExecutor.

Definition at line 342 of file BinaryConcolic.h.

Member Function Documentation

virtual Result* Rose::BinaryAnalysis::Concolic::ConcreteExecutor::execute ( const TestCase::Ptr )
pure virtual

Execute one test case synchronously.

Returns the results from running the test concretely. Results are user-defined. The return value is never a null pointer.

Implemented in Rose::BinaryAnalysis::Concolic::LinuxExecutor.

void Rose::BinaryAnalysis::Concolic::ConcreteExecutor::executionMonitor ( const boost::filesystem::path &  executorName)
inline

Sets an execution monitor for a test run.

The execution monitor observes a test and computes a quality score that can be used to rank different executions (higher indicates better quality).

The execution monitor (e.g., execmon) needs to understand the following command line arguments: execmon -o outfile – specimen test-arguments.. -o outfile a file containing two lines: or –output=outfile (1) a human-readable integer value, the exit code of the child process; (2) a human-readable floating point value, the quality score of the execution. – separator between arguments to execmon and test specification. specimen the tested specimen test-arguments.. an arbitrary long argument list passed to specimen.

Definition at line 413 of file BinaryConcolic.h.

boost::filesystem::path Rose::BinaryAnalysis::Concolic::ConcreteExecutor::executionMonitor ( ) const
inline

Sets an execution monitor for a test run.

The execution monitor observes a test and computes a quality score that can be used to rank different executions (higher indicates better quality).

The execution monitor (e.g., execmon) needs to understand the following command line arguments: execmon -o outfile – specimen test-arguments.. -o outfile a file containing two lines: or –output=outfile (1) a human-readable integer value, the exit code of the child process; (2) a human-readable floating point value, the quality score of the execution. – separator between arguments to execmon and test specification. specimen the tested specimen test-arguments.. an arbitrary long argument list passed to specimen.

Definition at line 418 of file BinaryConcolic.h.


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