Storm
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
8
10#include "storm/logic/Formula.h"
11
12namespace storm {
13namespace models {
14namespace symbolic {
15template<storm::dd::DdType Type, typename ValueType>
16class Model;
17}
18} // namespace models
19namespace jani {
20class Model;
21class ModelFeatures;
22} // namespace jani
23
24namespace builder {
25
26template<storm::dd::DdType Type, typename ValueType = double>
28 public:
33
39 static bool canHandle(storm::jani::Model const& model, boost::optional<std::vector<storm::jani::Property>> const& properties = boost::none);
40
41 struct Options {
45 Options(bool buildAllLabels = false, bool buildAllRewardModels = false, bool applyMaximumProgressAssumption = true);
46
52 Options(storm::logic::Formula const& formula);
53
59 Options(std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas);
60
67 void preserveFormula(storm::logic::Formula const& formula);
68
78
82 std::set<std::string> const& getRewardModelNames() const;
83
87 void addLabel(std::string const& labelName);
88
92 bool isBuildAllLabelsSet() const;
93
96
100 bool isBuildAllRewardModelsSet() const;
101
102 // A flag that indicates whether or not all reward models are to be build.
104
107
109 std::set<std::string> labelNames;
110
111 // A list of reward models to be build in case not all reward models are to be build.
112 std::set<std::string> rewardModelsToBuild;
113
114 // An optional mapping that, if given, contains defining expressions for undefined constants.
115 boost::optional<std::map<storm::expressions::Variable, storm::expressions::Expression>> constantDefinitions;
116
117 // An optional set of expression or labels that characterizes (a subset of) the terminal states of the model.
118 // If this is set, the outgoing transitions of these states are replaced with a self-loop.
120 };
121
129 std::shared_ptr<storm::models::symbolic::Model<Type, ValueType>> build(storm::jani::Model const& model, Options const& options = Options());
130};
131
132} // namespace builder
133} // namespace storm
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, boost::optional< std::vector< storm::jani::Property > > const &properties=boost::none)
A quick check to detect whether the given model is not supported.
LabParser.cpp.
Definition cli.cpp:18
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...
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.