13namespace abstraction {
18template<storm::dd::DdType DdType,
typename ValueType>
20 std::shared_ptr<storm::utility::solver::SmtSolverFactory>
const& smtSolverFactory,
bool useDecomposition,
21 bool addPredicatesForValidBlocks,
bool debug)
22 : smtSolverFactory(smtSolverFactory), abstractionInformation(abstractionInformation), commands(), module(module) {
24 for (
auto const& command :
module.getCommands()) {
25 commands.emplace_back(command, abstractionInformation, smtSolverFactory, useDecomposition, addPredicatesForValidBlocks, debug);
29template<storm::dd::DdType DdType,
typename ValueType>
31 for (uint_fast64_t index = 0; index < commands.size(); ++index) {
33 commands[index].refine(predicates);
37template<storm::dd::DdType DdType,
typename ValueType>
39 return commands[player1Choice].
getGuard();
42template<storm::dd::DdType DdType,
typename ValueType>
47template<storm::dd::DdType DdType,
typename ValueType>
49 uint64_t auxiliaryChoice)
const {
53template<storm::dd::DdType DdType,
typename ValueType>
58template<storm::dd::DdType DdType,
typename ValueType>
61 std::vector<GameBddResult<DdType>> commandDdsAndUsedOptionVariableCounts;
62 uint_fast64_t maximalNumberOfUsedOptionVariables = 0;
63 for (
auto& command : commands) {
64 commandDdsAndUsedOptionVariableCounts.push_back(command.abstract());
65 maximalNumberOfUsedOptionVariables =
66 std::max(maximalNumberOfUsedOptionVariables, commandDdsAndUsedOptionVariableCounts.back().numberOfPlayer2Variables);
72 for (
auto const& commandDd : commandDdsAndUsedOptionVariableCounts) {
74 commandDd.bdd && this->getAbstractionInformation().encodePlayer2Choice(1, commandDd.numberOfPlayer2Variables, maximalNumberOfUsedOptionVariables);
79template<storm::dd::DdType DdType,
typename ValueType>
81 uint_fast64_t numberOfPlayer2Variables) {
83 this->getAbstractionInformation().getDdManager().getBddZero());
85 for (
auto& command : commands) {
86 BottomStateResult<DdType> commandBottomStateResult = command.getBottomStateTransitions(reachableStates, numberOfPlayer2Variables);
94template<storm::dd::DdType DdType,
typename ValueType>
97 for (
auto const& command : commands) {
98 result += command.getCommandUpdateProbabilitiesAdd();
103template<storm::dd::DdType DdType,
typename ValueType>
108template<storm::dd::DdType DdType,
typename ValueType>
113template<storm::dd::DdType DdType,
typename ValueType>
115 return abstractionInformation.get();
118template<storm::dd::DdType DdType,
typename ValueType>
120 for (
auto& command : commands) {
121 command.notifyGuardIsPredicate();
DdManager< LibraryType > & getDdManager() const
Retrieves the manager that is responsible for this DD.
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.
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.
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.
This class represents the settings for the abstraction procedures.
#define STORM_LOG_TRACE(message)
storm::dd::Bdd< DdType > states
storm::dd::Bdd< DdType > transitions