Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
JaniMenuGameAbstractor.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>
29}
30} // namespace models
31
32namespace jani {
33// Forward-declare concrete Model class.
34class Model;
35} // namespace jani
36} // namespace storm
37
38namespace storm::gbar {
39namespace abstraction {
40namespace jani {
41
42template<storm::dd::DdType DdType, typename ValueType>
43class JaniMenuGameAbstractor : public MenuGameAbstractor<DdType, ValueType> {
44 public:
51 JaniMenuGameAbstractor(storm::jani::Model const& model, 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
150 std::map<uint_fast64_t, storm::storage::BitVector> decodeChoiceToUpdateSuccessorMapping(storm::dd::Bdd<DdType> const& choice) const;
151
152 // The concrete model this abstractor refers to.
153 std::reference_wrapper<storm::jani::Model const> model;
154
155 // A factory that can be used to create new SMT solvers.
156 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory;
157
158 // An object containing all information about the abstraction like predicates and the corresponding DDs.
159 AbstractionInformation<DdType> abstractionInformation;
160
161 // The abstract modules of the abstract program.
162 std::vector<AutomatonAbstractor<DdType, ValueType>> automata;
163
164 // A state-set abstractor used to determine the initial states of the abstraction.
165 StateSetAbstractor<DdType, ValueType> initialStateAbstractor;
166
167 // A flag indicating whether the valid blocks need to be computed and the game restricted to these.
168 bool restrictToValidBlocks;
169
170 // An object that is used to compute the valid blocks.
171 ValidBlockAbstractor<DdType> validBlockAbstractor;
172
173 // A BDD characterizing the initial locations of the abstracted automata.
174 storm::dd::Bdd<DdType> initialLocationsBdd;
175
176 // An ADD characterizing the probabilities and source/target locations of edges and their updates.
177 storm::dd::Add<DdType, ValueType> edgeDecoratorAdd;
178
179 // The current game-based abstraction.
180 std::unique_ptr<MenuGame<DdType, ValueType>> currentGame;
181
182 // A flag storing whether a refinement was performed.
183 bool refinementPerformed;
184
185 // A list of terminal state expressions.
186 std::vector<storm::expressions::Expression> terminalStateExpressions;
187};
188} // namespace jani
189} // namespace abstraction
190} // namespace storm::gbar
This class represents a discrete-time stochastic two-player game.
Definition MenuGame.h:16
storm::expressions::Expression getInitialExpression() const override
Retrieves the expression that characterizes the initial states.
virtual void refine(RefinementCommand const &command) override
Performs the given refinement command.
storm::dd::DdManager< DdType > const & getDdManager() const override
MenuGame< DdType, ValueType > abstract() override
Uses the current set of predicates to derive the abstract menu game in the form of an ADD.
JaniMenuGameAbstractor(JaniMenuGameAbstractor &&)=default
AbstractionInformation< DdType > const & getAbstractionInformation() const override
Retrieves information about the abstraction.
storm::expressions::Expression const & getGuard(uint64_t player1Choice) const override
Retrieves the guard predicate of the given player 1 choice.
JaniMenuGameAbstractor & operator=(JaniMenuGameAbstractor &&)=default
virtual uint64_t getNumberOfPredicates() const override
Retrieves the number of predicates currently in use.
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.
JaniMenuGameAbstractor & operator=(JaniMenuGameAbstractor const &)=default
virtual std::set< storm::expressions::Variable > const & getAssignedVariables(uint64_t player1Choice) const override
Retrieves the variables assigned by the given player 1 choice.
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.
virtual uint64_t getNumberOfUpdates(uint64_t player1Choice) const override
Retrieves the number of updates of the specified player 1 choice.
std::pair< uint64_t, uint64_t > getPlayer1ChoiceRange() const override
Retrieves the range of player 1 choices.
virtual void notifyGuardsArePredicates() override
Notifies the abstractor that the guards are predicates, which may be used to improve the bottom state...
storm::dd::Bdd< DdType > getStates(storm::expressions::Expression const &expression) override
Retrieves a BDD that characterizes the states corresponding to the given expression.
virtual void addTerminalStates(storm::expressions::Expression const &expression) override
Adds the expression to the ones characterizing terminal states, i.e.
JaniMenuGameAbstractor(JaniMenuGameAbstractor const &)=default
This class represents a discrete-time stochastic two-player game.
LabParser.cpp.
Definition cli.cpp:18