#ifndef STORM_PRISM_MENU_GAMES_MENUGAME_H_ #define STORM_PRISM_MENU_GAMES_MENUGAME_H_ #include #include "src/models/symbolic/StochasticTwoPlayerGame.h" #include "src/utility/OsDetection.h" namespace storm { namespace prism { namespace menu_games { /*! * This class represents a discrete-time stochastic two-player game. */ template class MenuGame : public storm::models::symbolic::StochasticTwoPlayerGame { public: typedef typename storm::models::symbolic::StochasticTwoPlayerGame::RewardModelType RewardModelType; MenuGame(MenuGame const& other) = default; MenuGame& operator=(MenuGame const& other) = default; #ifndef WINDOWS MenuGame(MenuGame&& other) = default; MenuGame& operator=(MenuGame&& other) = default; #endif /*! * Constructs a model from the given data. * * @param manager The manager responsible for the decision diagrams. * @param reachableStates A DD representing the reachable states. * @param initialStates A DD representing the initial states of the model. * @param transitionMatrix The matrix representing the transitions in the model. * @param rowVariables The set of row meta variables used in the DDs. * @param columVariables The set of column meta variables used in the DDs. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param player1Variables The meta variables used to encode the nondeterministic choices of player 1. * @param player2Variables The meta variables used to encode the nondeterministic choices of player 2. * @param allNondeterminismVariables The meta variables used to encode the nondeterminism in the model. * @param updateVariable The variable used to encode the different updates of the probabilistic program. * @param expressionToBddMap A mapping from expressions (used) in the abstraction to the BDDs encoding * them. */ MenuGame(std::shared_ptr> manager, storm::dd::Bdd reachableStates, storm::dd::Bdd initialStates, storm::dd::Add transitionMatrix, std::set const& rowVariables, std::set const& columnVariables, std::vector> const& rowColumnMetaVariablePairs, std::set const& player1Variables, std::set const& player2Variables, std::set const& allNondeterminismVariables, storm::expressions::Variable const& updateVariable, std::map> const& expressionToBddMap); virtual storm::dd::Bdd getStates(std::string const& label) const override; virtual storm::dd::Bdd getStates(storm::expressions::Expression const& expression) const override; virtual bool hasLabel(std::string const& label) const override; private: // The meta variable used to encode the updates. storm::expressions::Variable updateVariable; // A mapping from expressions that were used in the abstraction process to the the BDDs representing them. std::map> expressionToBddMap; }; } // namespace menu_games } // namespace prism } // namespace storm #endif /* STORM_PRISM_MENU_GAMES_MENUGAME_H_ */