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

Public Member Functions

 AssignmentValidatingSolver (Solver *_solver)
 
 ~AssignmentValidatingSolver ()
 
bool computeValidity (const Query &, Solver::Validity &result)
 
bool computeTruth (const Query &, bool &isValid)
 
bool computeValue (const Query &, ref< Expr > &result)
 
bool computeInitialValues (const Query &, const std::vector< const Array * > &objects, std::vector< std::vector< unsigned char > > &values, bool &hasSolution)
 
SolverRunStatus getOperationStatusCode ()
 getOperationStatusCode - get the status of the last solver operation More...
 
char * getConstraintLog (const Query &)
 
void setCoreSolverTimeout (time::Span timeout)
 
- Public Member Functions inherited from klee::SolverImpl
 SolverImpl ()
 
virtual ~SolverImpl ()
 
virtual bool computeValidity (const Query &query, Solver::Validity &result)
 
virtual bool computeTruth (const Query &query, bool &isValid)=0
 
virtual bool computeValue (const Query &query, ref< Expr > &result)=0
 
virtual bool computeInitialValues (const Query &query, const std::vector< const Array * > &objects, std::vector< std::vector< unsigned char > > &values, bool &hasSolution)=0
 
virtual SolverRunStatus getOperationStatusCode ()=0
 getOperationStatusCode - get the status of the last solver operation More...
 
virtual char * getConstraintLog (const Query &query)
 
virtual void setCoreSolverTimeout (time::Span timeout)
 

Private Member Functions

void dumpAssignmentQuery (const Query &query, const Assignment &assignment)
 

Private Attributes

Solversolver
 

Additional Inherited Members

- Public Types inherited from klee::SolverImpl
enum  SolverRunStatus {
  SOLVER_RUN_STATUS_SUCCESS_SOLVABLE , SOLVER_RUN_STATUS_SUCCESS_UNSOLVABLE , SOLVER_RUN_STATUS_FAILURE , SOLVER_RUN_STATUS_TIMEOUT ,
  SOLVER_RUN_STATUS_FORK_FAILED , SOLVER_RUN_STATUS_INTERRUPTED , SOLVER_RUN_STATUS_UNEXPECTED_EXIT_CODE , SOLVER_RUN_STATUS_WAITPID_FAILED
}
 
- Static Public Member Functions inherited from klee::SolverImpl
static const char * getOperationStatusString (SolverRunStatus statusCode)
 

Detailed Description

Definition at line 19 of file AssignmentValidatingSolver.cpp.

Constructor & Destructor Documentation

◆ AssignmentValidatingSolver()

klee::AssignmentValidatingSolver::AssignmentValidatingSolver ( Solver _solver)
inline

Definition at line 25 of file AssignmentValidatingSolver.cpp.

◆ ~AssignmentValidatingSolver()

klee::AssignmentValidatingSolver::~AssignmentValidatingSolver ( )
inline

Definition at line 26 of file AssignmentValidatingSolver.cpp.

References solver.

Member Function Documentation

◆ computeInitialValues()

bool klee::AssignmentValidatingSolver::computeInitialValues ( const Query query,
const std::vector< const Array * > &  objects,
std::vector< std::vector< unsigned char > > &  values,
bool &  hasSolution 
)
virtual

◆ computeTruth()

bool klee::AssignmentValidatingSolver::computeTruth ( const Query query,
bool &  isValid 
)
virtual

computeTruth - Determine whether the given query expression is provably true given the constraints.

The query expression is guaranteed to be non-constant and have bool type.

This method should evaluate the logical formula:

\[ \forall X constraints(X) \to query(X) \]

Where $X$ is some assignment, $constraints(X)$ are the constraints in the query and $query(X)$ is the query expression.

Parameters
[out]isValid- On success, true iff the logical formula is true.
Returns
True on success

Implements klee::SolverImpl.

Definition at line 45 of file AssignmentValidatingSolver.cpp.

References klee::SolverImpl::computeTruth(), klee::Solver::impl, and solver.

Here is the call graph for this function:

◆ computeValidity()

bool klee::AssignmentValidatingSolver::computeValidity ( const Query query,
Solver::Validity result 
)
virtual

computeValidity - Compute a full validity result for the query.

The query expression is guaranteed to be non-constant and have bool type.

SolverImpl provides a default implementation which uses computeTruth. Clients should override this if a more efficient implementation is available.

Parameters
[out]result- if

\[ \forall X constraints(X) \to query(X) \]

then Solver::True, else if

\[ \forall X constraints(X) \to \lnot query(X) \]

then Solver::False, else Solver::Unknown
Returns
True on success

Reimplemented from klee::SolverImpl.

Definition at line 41 of file AssignmentValidatingSolver.cpp.

References klee::SolverImpl::computeValidity(), klee::Solver::impl, and solver.

Here is the call graph for this function:

◆ computeValue()

bool klee::AssignmentValidatingSolver::computeValue ( const Query query,
ref< Expr > &  result 
)
virtual

computeValue - Compute a feasible value for the expression.

The query expression is guaranteed to be non-constant.

Returns
True on success

Implements klee::SolverImpl.

Definition at line 49 of file AssignmentValidatingSolver.cpp.

References klee::SolverImpl::computeValue(), klee::Solver::impl, and solver.

Here is the call graph for this function:

◆ dumpAssignmentQuery()

void klee::AssignmentValidatingSolver::dumpAssignmentQuery ( const Query query,
const Assignment assignment 
)
private

Definition at line 120 of file AssignmentValidatingSolver.cpp.

References klee::Query::constraints, klee::Assignment::createConstraintsFromAssignment(), klee::Query::expr, klee::Solver::getConstraintLog(), klee::ConstraintSet::push_back(), and solver.

Referenced by computeInitialValues().

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

◆ getConstraintLog()

char * klee::AssignmentValidatingSolver::getConstraintLog ( const Query query)
virtual

Reimplemented from klee::SolverImpl.

Definition at line 143 of file AssignmentValidatingSolver.cpp.

References klee::SolverImpl::getConstraintLog(), klee::Solver::impl, and solver.

Here is the call graph for this function:

◆ getOperationStatusCode()

SolverImpl::SolverRunStatus klee::AssignmentValidatingSolver::getOperationStatusCode ( )
virtual

getOperationStatusCode - get the status of the last solver operation

Implements klee::SolverImpl.

Definition at line 139 of file AssignmentValidatingSolver.cpp.

References klee::SolverImpl::getOperationStatusCode(), klee::Solver::impl, and solver.

Here is the call graph for this function:

◆ setCoreSolverTimeout()

void klee::AssignmentValidatingSolver::setCoreSolverTimeout ( time::Span  timeout)
virtual

Reimplemented from klee::SolverImpl.

Definition at line 147 of file AssignmentValidatingSolver.cpp.

References klee::Solver::impl, klee::SolverImpl::setCoreSolverTimeout(), and solver.

Here is the call graph for this function:

Member Data Documentation

◆ solver


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