Storm
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;
124
130 BuilderOptions& setBuildAllRewardModels(bool newValue = true);
136 BuilderOptions& addRewardModel(std::string const& rewardModelName);
142 BuilderOptions& setBuildAllLabels(bool newValue = true);
144 BuilderOptions& addLabel(std::string const& labelName);
146 BuilderOptions& addTerminalLabel(std::string const& label, bool value);
153
159 BuilderOptions& setBuildChoiceLabels(bool newValue = true);
165 BuilderOptions& setBuildStateValuations(bool newValue = true);
166
172 BuilderOptions& setBuildObservationValuations(bool newValue = true);
173
179 BuilderOptions& setBuildChoiceOrigins(bool newValue = true);
185 BuilderOptions& setExplorationChecks(bool newValue = true);
186
188
195
201 BuilderOptions& setAddOutOfBoundsState(bool newValue = true);
202
207 BuilderOptions& setAddOverlappingGuardsLabel(bool newValue = true);
208
213
218
219 private:
222 bool buildAllRewardModels;
223
225 std::set<std::string> rewardModelNames;
226
228 bool buildAllLabels;
229
231 std::set<std::string> labelNames;
232
234 std::vector<std::pair<std::string, storm::expressions::Expression>> expressionLabels;
235
237 std::vector<std::pair<LabelOrExpression, bool>> terminalStates;
238
241 bool applyMaximalProgressAssumption;
242
244 bool buildChoiceLabels;
245
247 bool buildStateValuations;
248
250 bool buildObservationValuations;
251
252 // A flag that indicates whether or not to generate the information from which parts of the model specification
253 // each choice originates.
254 bool buildChoiceOrigins;
255
257 bool scaleAndLiftTransitionRewards;
258
260 bool explorationChecks;
261
263 bool inferObservationsFromActions;
264
266 bool addOverlappingGuardsLabel;
267
269 bool addOutOfBoundsState;
270
272 uint64_t reservedBitsForUnboundedVariables;
273
275 bool showProgress;
276
278 uint64_t showProgressDelay;
279};
280
281} // namespace builder
282} // 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?
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
LabParser.cpp.
Definition cli.cpp:18