Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ModuleAbstractor.h
Go to the documentation of this file.
1#pragma once
2
4
6
8
10
11namespace storm {
12namespace prism {
13// Forward-declare concrete module class.
14class Module;
15} // namespace prism
16} // namespace storm
17
18namespace storm::gbar {
19namespace abstraction {
20template<storm::dd::DdType DdType>
22
23template<storm::dd::DdType DdType>
25
26template<storm::dd::DdType DdType>
27struct GameBddResult;
28
29namespace prism {
30template<storm::dd::DdType DdType, typename ValueType>
32 public:
41 ModuleAbstractor(storm::prism::Module const& module, AbstractionInformation<DdType>& abstractionInformation,
42 std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory, bool useDecomposition, bool addPredicatesForValidBlocks,
43 bool debug);
44
49
55 void refine(std::vector<uint_fast64_t> const& predicates);
56
63 storm::expressions::Expression const& getGuard(uint64_t player1Choice) const;
64
68 uint64_t getNumberOfUpdates(uint64_t player1Choice) const;
69
74 std::map<storm::expressions::Variable, storm::expressions::Expression> getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const;
75
79 std::set<storm::expressions::Variable> const& getAssignedVariables(uint64_t player1Choice) const;
80
87
95 BottomStateResult<DdType> getBottomStateTransitions(storm::dd::Bdd<DdType> const& reachableStates, uint_fast64_t numberOfPlayer2Variables);
96
103
109 std::vector<CommandAbstractor<DdType, ValueType>> const& getCommands() const;
110
116 std::vector<CommandAbstractor<DdType, ValueType>>& getCommands();
117
119
120 private:
126 AbstractionInformation<DdType> const& getAbstractionInformation() const;
127
128 // A factory that can be used to create new SMT solvers.
129 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory;
130
131 // The DD-related information.
132 std::reference_wrapper<AbstractionInformation<DdType> const> abstractionInformation;
133
134 // The abstract commands of the abstract module.
135 std::vector<CommandAbstractor<DdType, ValueType>> commands;
136
137 // The concrete module this abstract module refers to.
138 std::reference_wrapper<storm::prism::Module const> module;
139};
140} // namespace prism
141} // namespace abstraction
142} // namespace storm::gbar
BottomStateResult< DdType > getBottomStateTransitions(storm::dd::Bdd< DdType > const &reachableStates, uint_fast64_t numberOfPlayer2Variables)
Retrieves the transitions to bottom states of this module.
std::map< storm::expressions::Variable, storm::expressions::Expression > getVariableUpdates(uint64_t player1Choice, uint64_t auxiliaryChoice) const
Retrieves a mapping from variables to expressions that define their updates wrt.
storm::dd::Add< DdType, ValueType > getCommandUpdateProbabilitiesAdd() const
Retrieves an ADD that maps the encodings of commands and their updates to their probabilities.
void refine(std::vector< uint_fast64_t > const &predicates)
Refines the abstract module with the given predicates.
ModuleAbstractor & operator=(ModuleAbstractor const &)=default
GameBddResult< DdType > abstract()
Computes the abstraction of the module wrt.
ModuleAbstractor(ModuleAbstractor &&)=default
ModuleAbstractor(ModuleAbstractor const &)=default
std::vector< CommandAbstractor< DdType, ValueType > > const & getCommands() const
Retrieves the abstract commands of this abstract module.
ModuleAbstractor(storm::prism::Module const &module, AbstractionInformation< DdType > &abstractionInformation, std::shared_ptr< storm::utility::solver::SmtSolverFactory > const &smtSolverFactory, bool useDecomposition, bool addPredicatesForValidBlocks, bool debug)
Constructs an abstract module from the given module.
ModuleAbstractor & operator=(ModuleAbstractor &&)=default
storm::expressions::Expression const & getGuard(uint64_t player1Choice) const
Retrieves the guard of the given player 1 choice.
std::set< storm::expressions::Variable > const & getAssignedVariables(uint64_t player1Choice) const
Retrieves the variables assigned by the given player 1 choice.
uint64_t getNumberOfUpdates(uint64_t player1Choice) const
Retrieves the number of updates of the specified player 1 choice.