Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
PrismMenuGameAbstractor.h
Go to the documentation of this file.
1#pragma once
2
4
11
13
15
17
18namespace storm {
19namespace utility {
20namespace solver {
21class SmtSolverFactory;
22}
23} // namespace utility
24
25namespace models {
26namespace symbolic {
27template<storm::dd::DdType Type, typename ValueType>
28class StochasticTwoPlayerGame;
29}
30} // namespace models
31
32namespace prism {
33// Forward-declare concrete Program class.
34class Program;
35} // namespace prism
36} // namespace storm
37
38namespace storm::gbar {
39namespace abstraction {
40namespace prism {
41
42template<storm::dd::DdType DdType, typename ValueType>
43class PrismMenuGameAbstractor : public MenuGameAbstractor<DdType, ValueType> {
44 public:
51 PrismMenuGameAbstractor(storm::prism::Program const& program, std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory,
53
58
59 storm::dd::DdManager<DdType> const& getDdManager() const override;
60
67
74
81 storm::expressions::Expression const& getGuard(uint64_t player1Choice) const override;
82
86 virtual uint64_t getNumberOfUpdates(uint64_t player1Choice) const override;
87
92 std::map<storm::expressions::Variable, storm::expressions::Expression> getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const override;
93
97 virtual std::set<storm::expressions::Variable> const& getAssignedVariables(uint64_t player1Choice) const override;
98
102 std::pair<uint64_t, uint64_t> getPlayer1ChoiceRange() const override;
103
108
110
116 virtual void refine(RefinementCommand const& command) override;
117
125 virtual void exportToDot(std::string const& filename, storm::dd::Bdd<DdType> const& highlightStates, storm::dd::Bdd<DdType> const& filter) const override;
126
127 virtual uint64_t getNumberOfPredicates() const override;
128
129 virtual void addTerminalStates(storm::expressions::Expression const& expression) override;
130
131 virtual void notifyGuardsArePredicates() override;
132
133 protected:
134 using MenuGameAbstractor<DdType, ValueType>::exportToDot;
135
136 private:
142 std::unique_ptr<MenuGame<DdType, ValueType>> buildGame();
143
144 // The concrete program this abstract program refers to.
145 std::reference_wrapper<storm::prism::Program const> program;
146
147 // A factory that can be used to create new SMT solvers.
148 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory;
149
150 // An object containing all information about the abstraction like predicates and the corresponding DDs.
151 AbstractionInformation<DdType> abstractionInformation;
152
153 // The abstract modules of the abstract program.
154 std::vector<ModuleAbstractor<DdType, ValueType>> modules;
155
156 // A state-set abstractor used to determine the initial states of the abstraction.
157 StateSetAbstractor<DdType, ValueType> initialStateAbstractor;
158
159 // A flag indicating whether the valid blocks need to be computed and the game restricted to these.
160 bool restrictToValidBlocks;
161
162 // An object that is used to compute the valid blocks.
163 ValidBlockAbstractor<DdType> validBlockAbstractor;
164
165 // An ADD characterizing the probabilities of commands and their updates.
166 storm::dd::Add<DdType, ValueType> commandUpdateProbabilitiesAdd;
167
168 // The current game-based abstraction.
169 std::unique_ptr<MenuGame<DdType, ValueType>> currentGame;
170
171 // A flag storing whether a refinement was performed.
172 bool refinementPerformed;
173
174 // A list of terminal state expressions.
175 std::vector<storm::expressions::Expression> terminalStateExpressions;
176};
177} // namespace prism
178} // namespace abstraction
179} // namespace storm::gbar
This class represents a discrete-time stochastic two-player game.
Definition MenuGame.h:14
virtual void exportToDot(std::string const &filename, storm::dd::Bdd< DdType > const &highlightStates, storm::dd::Bdd< DdType > const &filter) const override
Exports the current state of the abstraction in the dot format to the given file.
PrismMenuGameAbstractor(PrismMenuGameAbstractor const &)=default
PrismMenuGameAbstractor & operator=(PrismMenuGameAbstractor &&)=default
virtual uint64_t getNumberOfPredicates() const override
Retrieves the number of predicates currently in use.
virtual void notifyGuardsArePredicates() override
Notifies the abstractor that the guards are predicates, which may be used to improve the bottom state...
AbstractionInformation< DdType > const & getAbstractionInformation() const override
Retrieves information about the abstraction.
std::map< storm::expressions::Variable, storm::expressions::Expression > getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const override
Retrieves a mapping from variables to expressions that define their updates wrt.
PrismMenuGameAbstractor(PrismMenuGameAbstractor &&)=default
virtual uint64_t getNumberOfUpdates(uint64_t player1Choice) const override
Retrieves the number of updates of the specified player 1 choice.
storm::expressions::Expression const & getGuard(uint64_t player1Choice) const override
Retrieves the guard predicate of the given player 1 choice.
std::pair< uint64_t, uint64_t > getPlayer1ChoiceRange() const override
Retrieves the range of player 1 choices.
virtual void refine(RefinementCommand const &command) override
Performs the given refinement command.
MenuGame< DdType, ValueType > abstract() override
Uses the current set of predicates to derive the abstract menu game in the form of an ADD.
storm::expressions::Expression getInitialExpression() const override
Retrieves the expression that characterizes the initial states.
storm::dd::DdManager< DdType > const & getDdManager() const override
storm::dd::Bdd< DdType > getStates(storm::expressions::Expression const &expression) override
Retrieves a BDD that characterizes the states corresponding to the given expression.
PrismMenuGameAbstractor & operator=(PrismMenuGameAbstractor const &)=default
virtual void addTerminalStates(storm::expressions::Expression const &expression) override
Adds the expression to the ones characterizing terminal states, i.e.
virtual std::set< storm::expressions::Variable > const & getAssignedVariables(uint64_t player1Choice) const override
Retrieves the variables assigned by the given player 1 choice.