Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateSetAbstractor.h
Go to the documentation of this file.
1#pragma once
2
3#include <boost/optional.hpp>
4#include <memory>
5#include <set>
6
8
10
13
15
16namespace storm {
17namespace utility {
18namespace solver {
19class SmtSolverFactory;
20}
21} // namespace utility
22
23namespace dd {
24template<storm::dd::DdType DdType>
25class Bdd;
26
27template<storm::dd::DdType DdType, typename ValueType>
28class Add;
29} // namespace dd
30} // namespace storm
31
32namespace storm::gbar {
33namespace abstraction {
34template<storm::dd::DdType DdType>
35class AbstractionInformation;
36
37template<storm::dd::DdType DdType, typename ValueType>
39 public:
40 StateSetAbstractor(StateSetAbstractor const& other) = default;
42
43#ifndef WINDOWS
46#endif
47
56 StateSetAbstractor(AbstractionInformation<DdType>& abstractionInformation, std::vector<storm::expressions::Expression> const& statePredicates,
57 std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory =
58 std::make_shared<storm::utility::solver::MathsatSmtSolverFactory>());
59
65 void refine(std::vector<uint_fast64_t> const& newPredicateIndices);
66
73 void constrain(storm::expressions::Expression const& constraint);
74
80 void constrain(storm::dd::Bdd<DdType> const& newConstraint);
81
88
89 private:
95 void addMissingPredicates(std::set<uint_fast64_t> const& newRelevantPredicateIndices);
96
100 void pushConstraintBdd();
101
105 void popConstraintBdd();
106
110 void recomputeCachedBdd();
111
119
125 AbstractionInformation<DdType>& getAbstractionInformation();
126
132 AbstractionInformation<DdType> const& getAbstractionInformation() const;
133
134 // The SMT solver used for abstracting the set of states.
135 std::unique_ptr<storm::solver::SmtSolver> smtSolver;
136
137 // The abstraction-related information.
138 std::reference_wrapper<AbstractionInformation<DdType>> abstractionInformation;
139
140 // The local expression-related information.
141 LocalExpressionInformation<DdType> localExpressionInformation;
142
143 // The set of relevant predicates and the corresponding decision variables.
144 std::vector<std::pair<storm::expressions::Variable, uint_fast64_t>> relevantPredicatesAndVariables;
145
146 // The set of all variables appearing in the concrete predicates.
147 std::set<storm::expressions::Variable> concretePredicateVariables;
148
149 // The set of all decision variables over which to perform the all-sat enumeration.
150 std::vector<storm::expressions::Variable> decisionVariables;
151
152 // A flag indicating whether the cached BDD needs recomputation.
153 bool forceRecomputation;
154
155 // The cached BDD representing the abstraction. This variable is written to in refinement steps (if work
156 // needed to be done).
157 storm::dd::Bdd<DdType> cachedBdd;
158
159 // This BDD currently constrains the search for solutions.
160 storm::dd::Bdd<DdType> constraint;
161};
162} // namespace abstraction
163} // namespace storm::gbar
void constrain(storm::expressions::Expression const &constraint)
Constrains the abstract states with the given expression.
StateSetAbstractor & operator=(StateSetAbstractor &&other)=default
void refine(std::vector< uint_fast64_t > const &newPredicateIndices)
Refines the abstractor by making the given predicates new abstract predicates.
storm::dd::Bdd< DdType > getAbstractStates()
Retrieves the set of abstract states matching all predicates added to this abstractor.
StateSetAbstractor(StateSetAbstractor &&other)=default
StateSetAbstractor & operator=(StateSetAbstractor const &other)=default
StateSetAbstractor(StateSetAbstractor const &other)=default
The base class for all model references.
Definition SmtSolver.h:31
SFTBDDChecker::Bdd Bdd
LabParser.cpp.
Definition cli.cpp:18