Storm 1.14.0.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
16namespace storm {
17namespace utility {
18namespace solver {
20}
21} // namespace utility
22
23class Environment;
24
25namespace models {
26namespace symbolic {
27template<storm::dd::DdType Type, typename ValueType>
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:
53 std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory,
54 AbstractionOptions const& options = AbstractionOptions());
55
60
61 storm::dd::DdManager<DdType> const& getDdManager() const override;
62
69
76
83 storm::expressions::Expression const& getGuard(uint64_t player1Choice) const override;
84
88 virtual uint64_t getNumberOfUpdates(uint64_t player1Choice) const override;
89
94 std::map<storm::expressions::Variable, storm::expressions::Expression> getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const override;
95
99 virtual std::set<storm::expressions::Variable> const& getAssignedVariables(uint64_t player1Choice) const override;
100
104 std::pair<uint64_t, uint64_t> getPlayer1ChoiceRange() const override;
105
110
112
118 virtual void refine(RefinementCommand const& command) override;
119
127 virtual void exportToDot(std::string const& filename, storm::dd::Bdd<DdType> const& highlightStates, storm::dd::Bdd<DdType> const& filter) const override;
128
129 virtual uint64_t getNumberOfPredicates() const override;
130
131 virtual void addTerminalStates(storm::expressions::Expression const& expression) override;
132
133 virtual void notifyGuardsArePredicates() override;
134
135 protected:
136 using MenuGameAbstractor<DdType, ValueType>::exportToDot;
137
138 private:
144 std::unique_ptr<MenuGame<DdType, ValueType>> buildGame();
145
146 // The concrete program this abstract program refers to.
147 std::reference_wrapper<storm::prism::Program const> program;
148
149 // A factory that can be used to create new SMT solvers.
150 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory;
151
152 // An object containing all information about the abstraction like predicates and the corresponding DDs.
153 AbstractionInformation<DdType> abstractionInformation;
154
155 // The abstract modules of the abstract program.
156 std::vector<ModuleAbstractor<DdType, ValueType>> modules;
157
158 // A state-set abstractor used to determine the initial states of the abstraction.
159 StateSetAbstractor<DdType, ValueType> initialStateAbstractor;
160
161 // A flag indicating whether the valid blocks need to be computed and the game restricted to these.
162 bool restrictToValidBlocks;
163
164 // An object that is used to compute the valid blocks.
165 ValidBlockAbstractor<DdType> validBlockAbstractor;
166
167 // An ADD characterizing the probabilities of commands and their updates.
168 storm::dd::Add<DdType, ValueType> commandUpdateProbabilitiesAdd;
169
170 // The current game-based abstraction.
171 std::unique_ptr<MenuGame<DdType, ValueType>> currentGame;
172
173 // A flag storing whether a refinement was performed.
174 bool refinementPerformed;
175
176 // A list of terminal state expressions.
177 std::vector<storm::expressions::Expression> terminalStateExpressions;
178};
179} // namespace prism
180} // namespace abstraction
181} // namespace storm::gbar
MenuGameAbstractor(AbstractionOptions const &options)
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
PrismMenuGameAbstractor(storm::Environment const &env, storm::prism::Program const &program, std::shared_ptr< storm::utility::solver::SmtSolverFactory > const &smtSolverFactory, AbstractionOptions const &options=AbstractionOptions())
Constructs an abstractor for the given program.
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.
This class represents a discrete-time stochastic two-player game.
Options that configure the game-based abstraction-refinement procedure.