Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DdJaniModelBuilder.h
Go to the documentation of this file.
1#pragma once
2
3#include <boost/optional.hpp>
4
9
11#include "storm/logic/Formula.h"
12
13namespace storm {
14namespace models {
15namespace symbolic {
16template<storm::dd::DdType Type, typename ValueType>
17class Model;
18}
19} // namespace models
20namespace jani {
21class Model;
22class ModelFeatures;
23} // namespace jani
24
25namespace builder {
26
27template<storm::dd::DdType Type, typename ValueType = double>
29 public:
34
40 static bool canHandle(storm::jani::Model const& model, storm::OptionalRef<std::vector<storm::jani::Property> const> properties = storm::NullRef);
41
42 struct Options {
46 Options(bool buildAllLabels = false, bool buildAllRewardModels = false, bool applyMaximumProgressAssumption = true);
47
53 Options(storm::logic::Formula const& formula);
54
60 Options(std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas);
61
68 void preserveFormula(storm::logic::Formula const& formula);
69
79
83 std::set<std::string> const& getRewardModelNames() const;
84
88 void addLabel(std::string const& labelName);
89
93 bool isBuildAllLabelsSet() const;
94
97
101 bool isBuildAllRewardModelsSet() const;
102
103 // A flag that indicates whether or not all reward models are to be build.
105
108
110 std::set<std::string> labelNames;
111
112 // A list of reward models to be build in case not all reward models are to be build.
113 std::set<std::string> rewardModelsToBuild;
114
115 // An optional mapping that, if given, contains defining expressions for undefined constants.
116 boost::optional<std::map<storm::expressions::Variable, storm::expressions::Expression>> constantDefinitions;
117
118 // An optional set of expression or labels that characterizes (a subset of) the terminal states of the model.
119 // If this is set, the outgoing transitions of these states are replaced with a self-loop.
121 };
122
130 std::shared_ptr<storm::models::symbolic::Model<Type, ValueType>> build(storm::jani::Model const& model, Options const& options = Options());
131};
132
133} // namespace builder
134} // namespace storm
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > build(storm::jani::Model const &model, Options const &options=Options())
Translates the given program into a symbolic model (i.e.
static storm::jani::ModelFeatures getSupportedJaniFeatures()
Returns the jani features with which this builder can deal natively.
static bool canHandle(storm::jani::Model const &model, storm::OptionalRef< std::vector< storm::jani::Property > const > properties=storm::NullRef)
A quick check to detect whether the given model is not supported.
Base class for all symbolic models.
Definition Model.h:42
constexpr NullRefType NullRef
Definition OptionalRef.h:31
bool buildAllLabels
A flag that indicates whether all labels are to be built. In this case, the label names are to be ign...
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...
Options(bool buildAllLabels=false, bool buildAllRewardModels=false, bool applyMaximumProgressAssumption=true)
Creates an object representing the default building options.
storm::builder::TerminalStates terminalStates
bool isBuildAllRewardModelsSet() const
Retrieves whether the flag to build all reward models is set.
bool applyMaximumProgressAssumption
A flag that indicates whether the maximum progress assumption should be applied.
void preserveFormula(storm::logic::Formula const &formula)
Changes the options in a way that ensures that the given formula can be checked on the model once it ...
void addLabel(std::string const &labelName)
Adds the given label to the ones that are supposed to be built.
std::set< std::string > const & getRewardModelNames() const
Retrieves the names of the reward models to build.
boost::optional< std::map< storm::expressions::Variable, storm::expressions::Expression > > constantDefinitions
std::set< std::string > labelNames
A set of labels to build.
bool isBuildAllLabelsSet() const
Retrieves whether the flag to build all labels is set.