Storm
A Modern Probabilistic Model Checker
|
#include <ModelBase.h>
Public Member Functions | |
ModelBase (ModelType const &modelType) | |
Constructs a model of the given type. | |
virtual | ~ModelBase () |
template<typename ModelType > | |
std::shared_ptr< ModelType > | as () |
Casts the model into the model type given by the template parameter. | |
template<typename ModelType > | |
std::shared_ptr< ModelType const > | as () const |
Casts the model into the model type given by the template parameter. | |
virtual ModelType | getType () const |
Return the actual type of the model. | |
virtual uint_fast64_t | getNumberOfStates () const =0 |
Returns the number of states of the model. | |
virtual uint_fast64_t | getNumberOfTransitions () const =0 |
Returns the number of (non-zero) transitions of the model. | |
virtual uint_fast64_t | getNumberOfChoices () const =0 |
Returns the number of choices ine the model. | |
virtual void | printModelInformationToStream (std::ostream &out) const =0 |
Prints information about the model to the specified stream. | |
virtual bool | isSparseModel () const |
Checks whether the model is a sparse model. | |
virtual bool | isSymbolicModel () const |
Checks whether the model is a symbolic model. | |
bool | isOfType (storm::models::ModelType const &modelType) const |
Checks whether the model is of the given type. | |
bool | isNondeterministicModel () const |
Returns true if the model is a nondeterministic model. | |
bool | isDiscreteTimeModel () const |
Returns true if the model is a descrete-time model. | |
virtual bool | supportsParameters () const |
Checks whether the model supports parameters. | |
virtual bool | hasParameters () const |
Checks whether the model has parameters. | |
virtual bool | isExact () const |
Checks whether the model is exact. | |
virtual bool | isPartiallyObservable () const |
virtual void | reduceToStateBasedRewards ()=0 |
Converts the transition rewards of all reward models to state-based rewards. | |
virtual bool | hasRewardModel (std::string const &rewardModelName) const =0 |
Retrieves whether the model has a reward model with the given name. | |
virtual bool | hasUniqueRewardModel () const =0 |
virtual std::string const & | getUniqueRewardModelName () const =0 |
Definition at line 11 of file ModelBase.h.
|
inline |
Constructs a model of the given type.
modelType | The type of the model. |
Definition at line 18 of file ModelBase.h.
|
inlinevirtual |
Definition at line 25 of file ModelBase.h.
Casts the model into the model type given by the template parameter.
Definition at line 36 of file ModelBase.h.
|
inline |
Casts the model into the model type given by the template parameter.
Definition at line 47 of file ModelBase.h.
|
pure virtual |
Returns the number of choices ine the model.
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, storm::models::symbolic::Model< Type, ValueType >, storm::models::symbolic::NondeterministicModel< Type, ValueType >, storm::models::symbolic::NondeterministicModel< DdType, ValueType >, storm::models::symbolic::NondeterministicModel< Type, double >, and storm::models::symbolic::NondeterministicModel< Type, ValueType >.
|
pure virtual |
Returns the number of states of the model.
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
|
pure virtual |
Returns the number of (non-zero) transitions of the model.
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
|
virtual |
Return the actual type of the model.
Each model must implement this method.
Definition at line 7 of file ModelBase.cpp.
|
pure virtual |
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
|
virtual |
Checks whether the model has parameters.
Reimplemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
Definition at line 50 of file ModelBase.cpp.
|
pure virtual |
Retrieves whether the model has a reward model with the given name.
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
|
pure virtual |
Implemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
bool storm::models::ModelBase::isDiscreteTimeModel | ( | ) | const |
Returns true if the model is a descrete-time model.
Definition at line 33 of file ModelBase.cpp.
|
virtual |
Checks whether the model is exact.
Reimplemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, and storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >.
Definition at line 54 of file ModelBase.cpp.
bool storm::models::ModelBase::isNondeterministicModel | ( | ) | const |
Returns true if the model is a nondeterministic model.
Definition at line 23 of file ModelBase.cpp.
bool storm::models::ModelBase::isOfType | ( | storm::models::ModelType const & | modelType | ) | const |
Checks whether the model is of the given type.
modelType | The model type to check for. |
Definition at line 19 of file ModelBase.cpp.
|
virtual |
Reimplemented in storm::models::sparse::Pomdp< ValueType, RewardModelType >.
Definition at line 42 of file ModelBase.cpp.
|
virtual |
Checks whether the model is a sparse model.
Reimplemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, and storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >.
Definition at line 11 of file ModelBase.cpp.
|
virtual |
Checks whether the model is a symbolic model.
Reimplemented in storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
Definition at line 15 of file ModelBase.cpp.
|
pure virtual |
Prints information about the model to the specified stream.
out | The stream the information is to be printed to. |
Implemented in storm::models::sparse::MarkovAutomaton< ValueType, RewardModelType >, storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::sparse::NondeterministicModel< ValueType, RewardModelType >, storm::models::sparse::NondeterministicModel< double, RM >, storm::models::sparse::NondeterministicModel< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::NondeterministicModel< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::NondeterministicModel< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::sparse::Pomdp< ValueType, RewardModelType >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, storm::models::symbolic::Model< Type, ValueType >, storm::models::symbolic::NondeterministicModel< Type, ValueType >, storm::models::symbolic::NondeterministicModel< DdType, ValueType >, storm::models::symbolic::NondeterministicModel< Type, double >, and storm::models::symbolic::NondeterministicModel< Type, ValueType >.
|
pure virtual |
Converts the transition rewards of all reward models to state-based rewards.
For deterministic models, this reduces the rewards to state rewards only. For nondeterminstic models, the reward models will contain state rewards and state-action rewards. Note that this transformation does not preserve all properties, but it preserves expected rewards.
Implemented in storm::models::sparse::Ctmc< ValueType, RewardModelType >, storm::models::sparse::Dtmc< ValueType, RewardModelType >, storm::models::sparse::Dtmc< FunctionType >, storm::models::sparse::NondeterministicModel< ValueType, RewardModelType >, storm::models::sparse::NondeterministicModel< double, RM >, storm::models::sparse::NondeterministicModel< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::NondeterministicModel< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::NondeterministicModel< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Ctmc< Type, ValueType >, storm::models::symbolic::Dtmc< Type, ValueType >, storm::models::symbolic::NondeterministicModel< Type, ValueType >, storm::models::symbolic::NondeterministicModel< DdType, ValueType >, storm::models::symbolic::NondeterministicModel< Type, double >, and storm::models::symbolic::NondeterministicModel< Type, ValueType >.
|
virtual |
Checks whether the model supports parameters.
Reimplemented in storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.
Definition at line 46 of file ModelBase.cpp.