|
@ -32,6 +32,12 @@ namespace storm { |
|
|
}; |
|
|
}; |
|
|
//! possible check results |
|
|
//! possible check results |
|
|
enum class CheckResult { SAT, UNSAT, UNKNOWN }; |
|
|
enum class CheckResult { SAT, UNSAT, UNKNOWN }; |
|
|
|
|
|
|
|
|
|
|
|
class ModelReference { |
|
|
|
|
|
public: |
|
|
|
|
|
virtual bool getBooleanValue(std::string const& name) const =0; |
|
|
|
|
|
virtual int_fast64_t getIntegerValue(std::string const& name) const =0; |
|
|
|
|
|
}; |
|
|
public: |
|
|
public: |
|
|
/*! |
|
|
/*! |
|
|
* Constructs a new smt solver with the given options. |
|
|
* Constructs a new smt solver with the given options. |
|
@ -158,6 +164,23 @@ namespace storm { |
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support model generation."); |
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support model generation."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
|
|
* Performs all AllSat over the important atoms. Once a valuation of the important atoms such that the currently asserted formulas are satisfiable |
|
|
|
|
|
* is found the callback is called with a reference to the model. The lifetime of that model is controlled by the solver implementation. It will most |
|
|
|
|
|
* certainly be invalid after the callback returned. |
|
|
|
|
|
* |
|
|
|
|
|
* @param important A set of expressions over which to perform all sat. |
|
|
|
|
|
* @param callback A function to call for each found valuation. |
|
|
|
|
|
* |
|
|
|
|
|
* @returns the number of valuations of the important atoms, such that the currently asserted formulas are satisfiable that where found |
|
|
|
|
|
* |
|
|
|
|
|
* @throws IllegalFunctionCallException if model generation is not configured for this solver |
|
|
|
|
|
* @throws NotImplementedException if model generation is not implemented with this solver class |
|
|
|
|
|
*/ |
|
|
|
|
|
virtual uint_fast64_t allSat(std::function<bool(ModelReference&)> callback, std::vector<storm::expressions::Expression> const& important) { |
|
|
|
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support model generation."); |
|
|
|
|
|
} //hack: switching the parameters is the only way to have overloading work with lambdas |
|
|
|
|
|
|
|
|
/*! |
|
|
/*! |
|
|
* Retrieves the unsat core of the last call to check() |
|
|
* Retrieves the unsat core of the last call to check() |
|
|
* |
|
|
* |
|
@ -183,6 +206,36 @@ namespace storm { |
|
|
virtual std::vector<storm::expressions::Expression> getUnsatAssumptions() { |
|
|
virtual std::vector<storm::expressions::Expression> getUnsatAssumptions() { |
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support unsat core generation."); |
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support unsat core generation."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
|
|
* Sets the current interpolation group. All terms added to the assertion stack after this call will belong to |
|
|
|
|
|
* the set group until the next call to this function. |
|
|
|
|
|
* |
|
|
|
|
|
* @param group the interpolation group all expressions asserted after this call are assigned |
|
|
|
|
|
* |
|
|
|
|
|
* @throws IllegalFunctionCallException if interpolation is not configured for this solver |
|
|
|
|
|
* @throws NotImplementedException if interpolation is not implemented with this solver class |
|
|
|
|
|
*/ |
|
|
|
|
|
virtual void setInterpolationGroup(uint_fast64_t group) { |
|
|
|
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support interpolation."); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
|
|
* Retrieves an interpolant for a pair (A, B) of formulas. The formula A is the conjunction of all |
|
|
|
|
|
* formulas in the groups listet in the parameter groupsA, the formula B ist the conjunction of all |
|
|
|
|
|
* other asserted formulas. The solver has to be in an UNSAT state. |
|
|
|
|
|
* |
|
|
|
|
|
* @param groupsA the interpolation groups whose conjunctions make up the formula A |
|
|
|
|
|
* |
|
|
|
|
|
* @returns the interpolant for (A, B), i.e. an expression I that is implied by A but the conjunction of I and B is inconsistent. |
|
|
|
|
|
* |
|
|
|
|
|
* @throws InvalidStateException if no unsat assumptions is available, i.e. the asserted formulas are consistent |
|
|
|
|
|
* @throws IllegalFunctionCallException if unsat assumptions generation is not configured for this solver |
|
|
|
|
|
* @throws NotImplementedException if unsat assumptions generation is not implemented with this solver class |
|
|
|
|
|
*/ |
|
|
|
|
|
virtual storm::expressions::Expression getInterpolant(std::vector<uint_fast64_t> groupsA) { |
|
|
|
|
|
throw storm::exceptions::NotImplementedException("This subclass of SmtSolver does not support interpolation."); |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|