Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BuilderOptions.h
Go to the documentation of this file.
1#pragma once
2
3#include <set>
4#include <string>
5#include <vector>
6
7#include <boost/optional.hpp>
8#include <boost/variant.hpp>
9
12
13namespace storm {
14namespace expressions {
15class ExpressionManager;
16}
17
18namespace models {
19namespace sparse {
20class StateLabeling;
21}
22} // namespace models
23
24namespace logic {
25class Formula;
26}
27
28namespace builder {
29
31 public:
33 LabelOrExpression(std::string const& label);
34
35 bool isLabel() const;
36 std::string const& getLabel() const;
37 bool isExpression() const;
39
40 private:
42 boost::variant<std::string, storm::expressions::Expression> labelOrExpression;
43};
44
46 public:
50 BuilderOptions(bool buildAllRewardModels = false, bool buildAllLabels = false);
51
60
67 BuilderOptions(std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas,
69
76 void preserveFormula(storm::logic::Formula const& formula,
78
88
93 std::set<std::string> const& getRewardModelNames() const;
94
99 std::set<std::string> const& getLabelNames() const;
100
105 std::vector<std::pair<std::string, storm::expressions::Expression>> const& getExpressionLabels() const;
106 std::vector<std::pair<LabelOrExpression, bool>> const& getTerminalStates() const;
107 bool hasTerminalStates() const;
108 void clearTerminalStates();
110 bool isBuildChoiceLabelsSet() const;
111 bool isBuildStateValuationsSet() const;
113 bool isBuildChoiceOriginsSet() const;
114 bool isBuildAllRewardModelsSet() const;
115 bool isBuildAllLabelsSet() const;
116 bool isExplorationChecksSet() const;
118 bool isShowProgressSet() const;
120 bool isAddOutOfBoundsStateSet() const;
123 uint64_t getShowProgressDelay() const;
128 storm::RationalNumber const& getStochasticTolerance() const;
129
135 BuilderOptions& setBuildAllRewardModels(bool newValue = true);
141 BuilderOptions& addRewardModel(std::string const& rewardModelName);
147 BuilderOptions& setBuildAllLabels(bool newValue = true);
149 BuilderOptions& addLabel(std::string const& labelName);
151 BuilderOptions& addTerminalLabel(std::string const& label, bool value);
158
164 BuilderOptions& setBuildChoiceLabels(bool newValue = true);
170 BuilderOptions& setBuildStateValuations(bool newValue = true);
171
177 BuilderOptions& setBuildObservationValuations(bool newValue = true);
178
184 BuilderOptions& setBuildChoiceOrigins(bool newValue = true);
190 BuilderOptions& setExplorationChecks(bool newValue = true);
191
198
204 BuilderOptions& setAddOutOfBoundsState(bool newValue = true);
205
210 BuilderOptions& setAddOverlappingGuardsLabel(bool newValue = true);
211
216
221
222 private:
225 bool buildAllRewardModels;
226
228 std::set<std::string> rewardModelNames;
229
231 bool buildAllLabels;
232
234 std::set<std::string> labelNames;
235
237 std::vector<std::pair<std::string, storm::expressions::Expression>> expressionLabels;
238
240 std::vector<std::pair<LabelOrExpression, bool>> terminalStates;
241
244 bool applyMaximalProgressAssumption;
245
247 bool buildChoiceLabels;
248
250 bool buildStateValuations;
251
253 bool buildObservationValuations;
254
255 // A flag that indicates whether or not to generate the information from which parts of the model specification
256 // each choice originates.
257 bool buildChoiceOrigins;
258
260 bool scaleAndLiftTransitionRewards;
261
263 bool explorationChecks;
264
266 bool inferObservationsFromActions;
267
269 bool addOverlappingGuardsLabel;
270
272 bool addOutOfBoundsState;
273
275 uint64_t reservedBitsForUnboundedVariables;
276
278 bool showProgress;
279
281 uint64_t showProgressDelay;
282
284 storm::RationalNumber stochasticTolerance;
285};
286
287} // namespace builder
288} // namespace storm
uint64_t getReservedBitsForUnboundedVariables() const
std::set< std::string > const & getRewardModelNames() const
Which reward models are built.
BuilderOptions & setBuildAllLabels(bool newValue=true)
Should all reward models be built? If not set, only required reward models are build.
BuilderOptions & setExplorationChecks(bool newValue=true)
Should extra checks be performed during exploration.
BuilderOptions & addTerminalExpression(storm::expressions::Expression const &expression, bool value)
BuilderOptions & setAddOutOfBoundsState(bool newValue=true)
Should a state for out of bounds be constructed.
BuilderOptions & setReservedBitsForUnboundedVariables(uint64_t value)
Sets the number of bits that will be reserved for unbounded integer variables.
BuilderOptions & setBuildChoiceLabels(bool newValue=true)
Should the choice labels be built?
storm::RationalNumber const & getStochasticTolerance() const
Some distributions may not sum to one.
BuilderOptions & addRewardModel(std::string const &rewardModelName)
Add an additional reward model to build.
BuilderOptions & setBuildAllRewardModels(bool newValue=true)
Should all reward models be built? If not set, only required reward models are build.
BuilderOptions & setBuildChoiceOrigins(bool newValue=true)
Should the origins the different choices be built?
BuilderOptions & setBuildStateValuations(bool newValue=true)
Should the state valuation mapping be built?
std::vector< std::pair< std::string, storm::expressions::Expression > > const & getExpressionLabels() const
Which expression labels are built.
BuilderOptions & substituteExpressions(std::function< storm::expressions::Expression(storm::expressions::Expression const &)> const &substitutionFunction)
Substitutes all expressions occurring in these options.
std::vector< std::pair< LabelOrExpression, bool > > const & getTerminalStates() const
BuilderOptions & setApplyMaximalProgressAssumption(bool newValue=true)
Should the maximal progress assumption be applied when building a Markov Automaton?
void preserveFormula(storm::logic::Formula const &formula, storm::storage::SymbolicModelDescription const &modelDescription=storm::storage::SymbolicModelDescription())
Changes the options in a way that ensures that the given formula can be checked on the model once it ...
BuilderOptions & addLabel(storm::expressions::Expression const &expression)
BuilderOptions & setBuildObservationValuations(bool newValue=true)
Should a observation valuation mapping be built?
void setTerminalStatesFromFormula(storm::logic::Formula const &formula)
Analyzes the given formula and sets an expression for the states states of the model that can be trea...
BuilderOptions & setAddOverlappingGuardsLabel(bool newValue=true)
Should a state be labelled for overlapping guards.
BuilderOptions & addTerminalLabel(std::string const &label, bool value)
BuilderOptions & setScaleAndLiftTransitionRewards(bool newValue=true)
Should extra checks be performed during exploration.
std::set< std::string > const & getLabelNames() const
Which labels are built.
storm::expressions::Expression const & getExpression() const
std::string const & getLabel() const