#pragma once #include #include "storm/models/sparse/Dtmc.h" #include "storm/models/sparse/Mdp.h" #include "storm/models/sparse/Ctmc.h" #include "storm/models/sparse/MarkovAutomaton.h" #include "storm/models/sparse/StandardRewardModel.h" #include "storm/logic/Formula.h" namespace storm { namespace transformer { template > class ContinuousToDiscreteTimeModelTransformer { public: // If this method returns true, the given formula is preserved by the transformation static bool preservesFormula(storm::logic::Formula const& formula); // Checks whether the given formulas are preserved. // Expected time formulas are translated to expected reward formulas. // The returned vector only contains formulas that are preserved by the transformation. static std::vector> checkAndTransformFormulas(std::vector> const& formulas, std::string const& timeRewardName); // Transforms the given CTMC to its underlying (aka embedded) DTMC. // A reward model for time is added if a corresponding reward model name is given static std::shared_ptr> transform(storm::models::sparse::Ctmc const& ctmc, boost::optional const& timeRewardModelName = boost::none); static std::shared_ptr> transform(storm::models::sparse::Ctmc&& ctmc, boost::optional const& timeRewardModelName = boost::none); // Transforms the given MA to its underlying (aka embedded) MDP. // A reward model for time is added if a corresponding reward model name is given static std::shared_ptr> transform(storm::models::sparse::MarkovAutomaton const& ma, boost::optional const& timeRewardModelName = boost::none); static std::shared_ptr> transform(storm::models::sparse::MarkovAutomaton&& ma, boost::optional const& timeRewardModelName = boost::none); }; } }