klee
|
SolverImpl - Abstract base clase for solver implementations. More...
#include <SolverImpl.h>
Public Member Functions | |
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) |
Static Public Member Functions | |
static const char * | getOperationStatusString (SolverRunStatus statusCode) |
Private Member Functions | |
SolverImpl (const SolverImpl &) | |
void | operator= (const SolverImpl &) |
SolverImpl - Abstract base clase for solver implementations.
Definition at line 25 of file SolverImpl.h.
Definition at line 34 of file SolverImpl.h.
|
private |
|
inline |
Definition at line 31 of file SolverImpl.h.
|
virtual |
Definition at line 15 of file SolverImpl.cpp.
|
pure virtual |
Implemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CexCachingSolver, klee::DummySolverImpl, klee::ValidatingSolver, CachingSolver, IndependentSolver, and QueryLoggingSolver.
Referenced by klee::StagedSolverImpl::computeInitialValues(), klee::AssignmentValidatingSolver::computeInitialValues(), klee::ValidatingSolver::computeInitialValues(), CachingSolver::computeInitialValues(), IndependentSolver::computeInitialValues(), QueryLoggingSolver::computeInitialValues(), CexCachingSolver::getAssignment(), and klee::Solver::getInitialValues().
|
pure 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:
Where is some assignment, are the constraints in the query and is the query expression.
[out] | isValid | - On success, true iff the logical formula is true. |
Implemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CachingSolver, CexCachingSolver, klee::DummySolverImpl, IndependentSolver, klee::ValidatingSolver, and QueryLoggingSolver.
Referenced by klee::ValidatingSolver::computeInitialValues(), klee::StagedSolverImpl::computeTruth(), klee::AssignmentValidatingSolver::computeTruth(), CachingSolver::computeTruth(), IndependentSolver::computeTruth(), klee::ValidatingSolver::computeTruth(), QueryLoggingSolver::computeTruth(), klee::StagedSolverImpl::computeValidity(), CachingSolver::computeValidity(), computeValidity(), klee::ValidatingSolver::computeValue(), and klee::Solver::mustBeTrue().
|
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.
[out] | result | - if then Solver::True, else if then Solver::False, else Solver::Unknown |
Reimplemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CachingSolver, CexCachingSolver, klee::DummySolverImpl, IndependentSolver, klee::ValidatingSolver, and QueryLoggingSolver.
Definition at line 17 of file SolverImpl.cpp.
References computeTruth(), klee::Solver::False, klee::Query::negateExpr(), klee::Solver::True, and klee::Solver::Unknown.
Referenced by klee::StagedSolverImpl::computeValidity(), klee::AssignmentValidatingSolver::computeValidity(), CachingSolver::computeValidity(), IndependentSolver::computeValidity(), klee::ValidatingSolver::computeValidity(), QueryLoggingSolver::computeValidity(), and klee::Solver::evaluate().
|
pure virtual |
computeValue - Compute a feasible value for the expression.
The query expression is guaranteed to be non-constant.
Implemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CexCachingSolver, klee::DummySolverImpl, IndependentSolver, klee::ValidatingSolver, CachingSolver, and QueryLoggingSolver.
Referenced by klee::StagedSolverImpl::computeValue(), klee::AssignmentValidatingSolver::computeValue(), IndependentSolver::computeValue(), klee::ValidatingSolver::computeValue(), CachingSolver::computeValue(), QueryLoggingSolver::computeValue(), and klee::Solver::getValue().
|
inlinevirtual |
Reimplemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CachingSolver, IndependentSolver, QueryLoggingSolver, klee::ValidatingSolver, and CexCachingSolver.
Definition at line 104 of file SolverImpl.h.
Referenced by klee::StagedSolverImpl::getConstraintLog(), klee::AssignmentValidatingSolver::getConstraintLog(), CachingSolver::getConstraintLog(), IndependentSolver::getConstraintLog(), QueryLoggingSolver::getConstraintLog(), klee::ValidatingSolver::getConstraintLog(), klee::Solver::getConstraintLog(), and CexCachingSolver::getConstraintLog().
|
pure virtual |
getOperationStatusCode - get the status of the last solver operation
Implemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CachingSolver, CexCachingSolver, klee::DummySolverImpl, IndependentSolver, QueryLoggingSolver, and klee::ValidatingSolver.
Referenced by EvaluateInputAST(), QueryLoggingSolver::finishQuery(), QueryLoggingSolver::flushBuffer(), klee::StagedSolverImpl::getOperationStatusCode(), klee::AssignmentValidatingSolver::getOperationStatusCode(), CachingSolver::getOperationStatusCode(), CexCachingSolver::getOperationStatusCode(), IndependentSolver::getOperationStatusCode(), QueryLoggingSolver::getOperationStatusCode(), and klee::ValidatingSolver::getOperationStatusCode().
|
static |
getOperationStatusString - get string representation of the operation status code
Definition at line 31 of file SolverImpl.cpp.
References SOLVER_RUN_STATUS_FAILURE, SOLVER_RUN_STATUS_FORK_FAILED, SOLVER_RUN_STATUS_INTERRUPTED, SOLVER_RUN_STATUS_SUCCESS_SOLVABLE, SOLVER_RUN_STATUS_SUCCESS_UNSOLVABLE, SOLVER_RUN_STATUS_TIMEOUT, SOLVER_RUN_STATUS_UNEXPECTED_EXIT_CODE, and SOLVER_RUN_STATUS_WAITPID_FAILED.
|
private |
|
inlinevirtual |
Reimplemented in klee::StagedSolverImpl, klee::AssignmentValidatingSolver, CachingSolver, CexCachingSolver, IndependentSolver, QueryLoggingSolver, and klee::ValidatingSolver.
Definition at line 109 of file SolverImpl.h.
Referenced by klee::StagedSolverImpl::setCoreSolverTimeout(), klee::Solver::setCoreSolverTimeout(), klee::AssignmentValidatingSolver::setCoreSolverTimeout(), CachingSolver::setCoreSolverTimeout(), CexCachingSolver::setCoreSolverTimeout(), IndependentSolver::setCoreSolverTimeout(), QueryLoggingSolver::setCoreSolverTimeout(), and klee::ValidatingSolver::setCoreSolverTimeout().