3#include <boost/container/flat_map.hpp>
6#include "storm-config.h"
10#ifdef STORM_HAVE_MATHSAT
37#ifdef STORM_HAVE_MATHSAT
41 std::unordered_map<storm::expressions::Variable, uint_fast64_t>
const& variableNameToSlotMapping);
46 virtual std::string
toString()
const override;
51 std::unordered_map<storm::expressions::Variable, uint_fast64_t>
const& variableToSlotMapping;
55#ifdef STORM_HAVE_MATHSAT
59 storm::adapters::MathsatExpressionAdapter& expressionAdapter);
64 virtual std::string
toString()
const override;
68 storm::adapters::MathsatExpressionAdapter& expressionAdapter;
76 virtual void push()
override;
78 virtual void pop()
override;
80 virtual void pop(uint_fast64_t n)
override;
82 virtual void reset()
override;
94 virtual std::shared_ptr<SmtSolver::ModelReference>
getModel()
override;
96 virtual std::vector<storm::expressions::SimpleValuation>
allSat(std::vector<storm::expressions::Variable>
const& important)
override;
98 virtual uint_fast64_t
allSat(std::vector<storm::expressions::Variable>
const& important,
101 virtual uint_fast64_t
allSat(std::vector<storm::expressions::Variable>
const& important, std::function<
bool(
ModelReference&)>
const& callback)
override;
109 virtual void setTimeout(uint_fast64_t milliseconds)
override;
116#ifdef STORM_HAVE_MATHSAT
120 void startTimeoutClock();
125 bool isTimeoutExceeded()
const;
136 uint_fast64_t processAllSatResult(
int result, uint_fast64_t numberOfModels,
bool abortedByCallback)
const;
144 static int terminationTest(
void* userData);
151 std::unique_ptr<storm::adapters::MathsatExpressionAdapter> expressionAdapter;
154 std::optional<std::chrono::milliseconds> timeout;
157 std::chrono::steady_clock::time_point deadline;
161 bool lastCheckAssumptions;
167 typedef boost::container::flat_map<uint_fast64_t, int> InterpolationGroupMapType;
168 InterpolationGroupMapType interpolationGroups;
This class is responsible for managing a set of typed variables and all expressions using these varia...
A simple implementation of the valuation interface.
Options(bool enableModelGeneration=true, bool enableUnsatCoreGeneration=false, bool enableInterpolantGeneration=false)
bool enableUnsatCoreGeneration
bool enableModelGeneration
bool enableInterpolantGeneration
virtual std::vector< storm::expressions::Expression > getUnsatAssumptions() override
If the last call to checkWithAssumptions() returned Unsat, this function can be used to retrieve a su...
virtual CheckResult checkWithAssumptions(storm::expressions::ExpressionSet const &assumptions) override
Checks whether the conjunction of assertions that are currently on the solver's stack together with t...
virtual storm::expressions::Expression getInterpolant(std::vector< uint_fast64_t > const &groupsA) override
If the last call to check() returned Unsat, the solver has been instantiated with support for interpo...
virtual std::shared_ptr< SmtSolver::ModelReference > getModel() override
If the last call to check() or checkWithAssumptions() returned Sat, this method retrieves a model tha...
virtual void setTimeout(uint_fast64_t milliseconds) override
Limits each subsequent satisfiability query to the given number of milliseconds.
virtual void add(storm::expressions::Expression const &assertion) override
Adds an assertion to the solver's stack.
virtual uint_fast64_t allSat(std::vector< storm::expressions::Variable > const &important, std::function< bool(ModelReference &)> const &callback) override
Performs AllSat over the (provided) important atoms.
MathsatSmtSolver(storm::expressions::ExpressionManager &manager, Options const &options=Options())
virtual void pop() override
Pops a backtracking point from the solver's stack.
virtual CheckResult check() override
Checks whether the conjunction of assertions that are currently on the solver's stack is satisfiable.
virtual void reset() override
Removes all assertions from the solver's stack.
virtual std::vector< storm::expressions::SimpleValuation > allSat(std::vector< storm::expressions::Variable > const &important) override
Performs AllSat over the (provided) important atoms.
virtual ~MathsatSmtSolver()
virtual void push() override
Pushes a backtracking point on the solver's stack.
virtual void unsetTimeout() override
Unsets a previous timeout such that subsequent queries are no longer limited in time.
virtual storm::expressions::SimpleValuation getModelAsValuation() override
If the last call to check() or checkWithAssumptions() returned Sat, this method retrieves a model tha...
virtual void setInterpolationGroup(uint_fast64_t group) override
Sets the current interpolation group.
The base class for all model references.
SmtSolver(storm::expressions::ExpressionManager &manager)
Constructs a new Smt solver with the given options.
CheckResult
possible check results
std::set< Expression, ExpressionComparator > ExpressionSet
std::string toString(GurobiSolverMethod const &method)
Yields a string representation of the GurobiSolverMethod.
The contract of a DD backend.