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
193
200
206 BuilderOptions& setAddOutOfBoundsState(bool newValue = true);
207
212 BuilderOptions& setAddOverlappingGuardsLabel(bool newValue = true);
213
218
223
224 private:
227 bool buildAllRewardModels;
228
230 std::set<std::string> rewardModelNames;
231
233 bool buildAllLabels;
234
236 std::set<std::string> labelNames;
237
239 std::vector<std::pair<std::string, storm::expressions::Expression>> expressionLabels;
240
242 std::vector<std::pair<LabelOrExpression, bool>> terminalStates;
243
246 bool applyMaximalProgressAssumption;
247
249 bool buildChoiceLabels;
250
252 bool buildStateValuations;
253
255 bool buildObservationValuations;
256
257 // A flag that indicates whether or not to generate the information from which parts of the model specification
258 // each choice originates.
259 bool buildChoiceOrigins;
260
262 bool scaleAndLiftTransitionRewards;
263
265 bool explorationChecks;
266
268 bool inferObservationsFromActions;
269
271 bool addOverlappingGuardsLabel;
272
274 bool addOutOfBoundsState;
275
277 uint64_t reservedBitsForUnboundedVariables;
278
280 bool showProgress;
281
283 uint64_t showProgressDelay;
284
286 storm::RationalNumber stochasticTolerance;
287};
288
289} // namespace builder
290} // 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 & setInferObservationsFromActions(bool newValue=true)
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