Storm 1.14.0.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 {
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 double 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
222 BuilderOptions& setStochasticTolerance(double newValue);
223
229 BuilderOptions& setShowProgress(bool newValue = true);
230
236 BuilderOptions& setShowProgressDelay(uint64_t newValue);
237
242
243 private:
246 bool buildAllRewardModels;
247
249 std::set<std::string> rewardModelNames;
250
252 bool buildAllLabels;
253
255 std::set<std::string> labelNames;
256
258 std::vector<std::pair<std::string, storm::expressions::Expression>> expressionLabels;
259
261 std::vector<std::pair<LabelOrExpression, bool>> terminalStates;
262
265 bool applyMaximalProgressAssumption;
266
268 bool buildChoiceLabels;
269
271 bool buildStateValuations;
272
274 bool buildObservationValuations;
275
276 // A flag that indicates whether or not to generate the information from which parts of the model specification
277 // each choice originates.
278 bool buildChoiceOrigins;
279
281 bool scaleAndLiftTransitionRewards;
282
284 bool explorationChecks;
285
287 bool inferObservationsFromActions;
288
290 bool addOverlappingGuardsLabel;
291
293 bool addOutOfBoundsState;
294
296 uint64_t reservedBitsForUnboundedVariables;
297
299 bool showProgress;
300
302 uint64_t showProgressDelay;
303
305 double stochasticTolerance;
306};
307
308} // namespace builder
309} // 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?
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?
BuilderOptions & addRewardModel(std::string const &rewardModelName)
Add an additional reward model to build.
BuilderOptions & setBuildAllRewardModels(bool newValue=true)
Should all reward models be built?
BuilderOptions & setBuildChoiceOrigins(bool newValue=true)
Should the origins the different choices be built?
double getStochasticTolerance() const
Some distributions may not sum to one.
BuilderOptions & setShowProgressDelay(uint64_t newValue)
Sets the delay (in seconds) between progress reports during state space exploration.
BuilderOptions & setBuildStateValuations(bool newValue=true)
Should the state valuation mapping be built?
BuilderOptions(bool buildAllRewardModels=false, bool buildAllLabels=false)
Creates an object representing the default options.
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?
BuilderOptions & setStochasticTolerance(double newValue)
Sets the tolerance used for checking whether a distribution sums to one.
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.
BuilderOptions & setShowProgress(bool newValue=true)
Sets whether the progress of state space exploration should be printed.
std::set< std::string > const & getLabelNames() const
Which labels are built.
LabelOrExpression(storm::expressions::Expression const &expression)
storm::expressions::Expression const & getExpression() const
std::string const & getLabel() const
This class is responsible for managing a set of typed variables and all expressions using these varia...
This class manages the labeling of the state space with a number of (atomic) labels.