/* * NonDeterministicModelParser.h * * Created on: 14.01.2013 * Author: thomas */ #ifndef STORM_PARSER_NONDETERMINISTICMODELPARSER_H_ #define STORM_PARSER_NONDETERMINISTICMODELPARSER_H_ #include "src/parser/Parser.h" #include "src/models/Mdp.h" #include "src/models/Ctmdp.h" namespace storm { namespace parser { /*! * @brief Load label and transition file and return initialized mdp object * * @note This class creates a new Mdp object that can * be accessed via getMdp(). However, it will not delete this object! * * @note The labeling representation in the file may use at most as much nodes as are specified in the mdp. */ class NondeterministicModelParser: public storm::parser::Parser { public: NondeterministicModelParser(std::string const & transitionSystemFile, std::string const & labelingFile, std::string const & stateRewardFile = "", std::string const & transitionRewardFile = ""); std::shared_ptr> getMdp() { if (this->mdp == nullptr) { this->mdp = std::shared_ptr>(new storm::models::Mdp( this->probabilityMatrix, this->stateLabeling, this->rowMapping, this->stateRewards, this->transitionRewardMatrix )); } return this->mdp; } std::shared_ptr> getCtmdp() { if (this->ctmdp == nullptr) { this->ctmdp = std::shared_ptr>(new storm::models::Ctmdp( this->probabilityMatrix, this->stateLabeling, this->rowMapping, this->stateRewards, this->transitionRewardMatrix )); } return this->ctmdp; } private: std::shared_ptr> probabilityMatrix; std::shared_ptr stateLabeling; std::shared_ptr> rowMapping; std::shared_ptr> stateRewards; std::shared_ptr> transitionRewardMatrix; std::shared_ptr> mdp; std::shared_ptr> ctmdp; }; } /* namespace parser */ } /* namespace storm */ #endif /* STORM_PARSER_NONDETERMINISTICMODELPARSER_H_ */