Storm 1.14.0.1
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 {
22}
23} // namespace utility
24
25class Environment;
26
27namespace models {
28namespace symbolic {
29template<storm::dd::DdType Type, typename ValueType>
31}
32} // namespace models
33
34namespace jani {
35// Forward-declare concrete Model class.
36class Model;
37} // namespace jani
38} // namespace storm
39
40namespace storm::gbar {
41namespace abstraction {
42namespace jani {
43
44template<storm::dd::DdType DdType, typename ValueType>
45class JaniMenuGameAbstractor : public MenuGameAbstractor<DdType, ValueType> {
46 public:
55 std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory,
57
62
63 storm::dd::DdManager<DdType> const& getDdManager() const override;
64
71
78
85 storm::expressions::Expression const& getGuard(uint64_t player1Choice) const override;
86
90 virtual uint64_t getNumberOfUpdates(uint64_t player1Choice) const override;
91
96 std::map<storm::expressions::Variable, storm::expressions::Expression> getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const override;
97
101 virtual std::set<storm::expressions::Variable> const& getAssignedVariables(uint64_t player1Choice) const override;
102
106 std::pair<uint64_t, uint64_t> getPlayer1ChoiceRange() const override;
107
112
114
120 virtual void refine(RefinementCommand const& command) override;
121
129 virtual void exportToDot(std::string const& filename, storm::dd::Bdd<DdType> const& highlightStates, storm::dd::Bdd<DdType> const& filter) const override;
130
131 virtual uint64_t getNumberOfPredicates() const override;
132
133 virtual void addTerminalStates(storm::expressions::Expression const& expression) override;
134
135 virtual void notifyGuardsArePredicates() override;
136
137 protected:
138 using MenuGameAbstractor<DdType, ValueType>::exportToDot;
139
140 private:
146 std::unique_ptr<MenuGame<DdType, ValueType>> buildGame();
147
148 // The concrete model this abstractor refers to.
149 std::reference_wrapper<storm::jani::Model const> model;
150
151 // A factory that can be used to create new SMT solvers.
152 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory;
153
154 // An object containing all information about the abstraction like predicates and the corresponding DDs.
155 AbstractionInformation<DdType> abstractionInformation;
156
157 // The abstract modules of the abstract program.
158 std::vector<AutomatonAbstractor<DdType, ValueType>> automata;
159
160 // A state-set abstractor used to determine the initial states of the abstraction.
161 StateSetAbstractor<DdType, ValueType> initialStateAbstractor;
162
163 // A flag indicating whether the valid blocks need to be computed and the game restricted to these.
164 bool restrictToValidBlocks;
165
166 // An object that is used to compute the valid blocks.
167 ValidBlockAbstractor<DdType> validBlockAbstractor;
168
169 // A BDD characterizing the initial locations of the abstracted automata.
170 storm::dd::Bdd<DdType> initialLocationsBdd;
171
172 // An ADD characterizing the probabilities and source/target locations of edges and their updates.
173 storm::dd::Add<DdType, ValueType> edgeDecoratorAdd;
174
175 // The current game-based abstraction.
176 std::unique_ptr<MenuGame<DdType, ValueType>> currentGame;
177
178 // A flag storing whether a refinement was performed.
179 bool refinementPerformed;
180
181 // A list of terminal state expressions.
182 std::vector<storm::expressions::Expression> terminalStateExpressions;
183};
184} // namespace jani
185} // namespace abstraction
186} // namespace storm::gbar
This class represents a discrete-time stochastic two-player game.
Definition MenuGame.h:14
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.
JaniMenuGameAbstractor(storm::Environment const &env, storm::jani::Model const &model, std::shared_ptr< storm::utility::solver::SmtSolverFactory > const &smtSolverFactory, MenuGameAbstractorOptions const &options=MenuGameAbstractorOptions())
Constructs an abstractor for the given model.
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.