35template<storm::dd::DdType LibraryType,
typename ValueType>
38 bool buildFullModel =
false,
bool applyMaximumProgress =
true) {
51 STORM_LOG_THROW(model.
isJaniModel(), storm::exceptions::NotSupportedException,
"Building symbolic model from this model description is unsupported.");
69inline std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD, storm::RationalNumber>>
buildSymbolicModel(
71 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"CUDD does not support rational numbers.");
75inline std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD, storm::RationalFunction>>
buildSymbolicModel(
77 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"CUDD does not support rational functions.");
88template<
typename ValueType>
92 std::shared_ptr<storm::generator::NextStateGenerator<ValueType, uint32_t>> generator;
94 generator = std::make_shared<storm::generator::PrismNextStateGenerator<ValueType, uint32_t>>(model.
asPrismProgram(), options, actionMask);
96 STORM_LOG_THROW(actionMask ==
nullptr, storm::exceptions::NotSupportedException,
"Action masks for JANI are not yet supported");
97 generator = std::make_shared<storm::generator::JaniNextStateGenerator<ValueType, uint32_t>>(model.
asJaniModel(), options);
99 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Cannot build sparse model from this symbolic model description.");
104template<
typename ValueType>
108 return builder.
build();
111template<
typename ValueType>
113 std::vector<std::shared_ptr<storm::logic::Formula const>>
const& formulas) {
115 return buildSparseModel<ValueType>(model, options);
118template<
typename ValueType,
typename RewardModelType = storm::models::sparse::StandardRewardModel<ValueType>>
123 return std::make_shared<storm::models::sparse::Dtmc<ValueType, RewardModelType>>(std::move(components));
125 return std::make_shared<storm::models::sparse::Ctmc<ValueType, RewardModelType>>(std::move(components));
127 return std::make_shared<storm::models::sparse::Mdp<ValueType, RewardModelType>>(std::move(components));
129 return std::make_shared<storm::models::sparse::MarkovAutomaton<ValueType, RewardModelType>>(std::move(components));
131 return std::make_shared<storm::models::sparse::Pomdp<ValueType, RewardModelType>>(std::move(components));
133 return std::make_shared<storm::models::sparse::StochasticTwoPlayerGame<ValueType, RewardModelType>>(std::move(components));
135 return std::make_shared<storm::models::sparse::Smg<ValueType, RewardModelType>>(std::move(components));
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.
std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > build(storm::prism::Program const &program, Options const &options=Options())
Translates the given program into a symbolic model (i.e.
std::shared_ptr< storm::models::sparse::Model< ValueType, RewardModelType > > build()
Convert the program given at construction time to an abstract model.
Action masks are arguments you can give to the state generator that limit which states are generated.
storm::prism::Program const & asPrismProgram() const
ModelType getModelType() const
bool isPrismProgram() const
storm::jani::Model const & asJaniModel() const
#define STORM_LOG_THROW(cond, exception, message)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildSparseModel(storm::storage::SymbolicModelDescription const &model, storm::builder::BuilderOptions const &options)
std::shared_ptr< storm::models::symbolic::Model< LibraryType, ValueType > > buildSymbolicModel(storm::storage::SymbolicModelDescription const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas, bool buildFullModel=false, bool applyMaximumProgress=true)
storm::builder::ExplicitModelBuilder< ValueType > makeExplicitModelBuilder(storm::storage::SymbolicModelDescription const &model, storm::builder::BuilderOptions const &options, std::shared_ptr< storm::generator::ActionMask< ValueType > > actionMask=nullptr)
Initializes an explict model builder; an object/algorithm that is used to build sparse models.
storm::jani::ModelFeatures getSupportedJaniFeatures(storm::builder::BuilderType const &builderType)
storm::jani::ModelFeatures getSupportedJaniFeatures(BuilderType const &builderType)
bool buildAllLabels
A flag that indicates whether all labels are to be built. In this case, the label names are to be ign...
storm::builder::TerminalStates terminalStates
bool buildAllRewardModels
bool applyMaximumProgressAssumption
A flag that indicates whether the maximum progress assumption should be applied.
bool buildAllRewardModels
storm::builder::TerminalStates terminalStates
void clear()
Clears all terminal states.