14#include "storm-config.h"
20namespace abstraction {
25template<storm::dd::DdType DdType,
typename ValueType>
27 std::shared_ptr<storm::utility::solver::SmtSolverFactory>
const& smtSolverFactory,
bool useDecomposition,
28 bool addPredicatesForValidBlocks,
bool debug)
29 : smtSolverFactory(smtSolverFactory), abstractionInformation(abstractionInformation), commands(), module(module) {
31 for (
auto const& command :
module.getCommands()) {
32 commands.emplace_back(command, abstractionInformation, smtSolverFactory, useDecomposition, addPredicatesForValidBlocks, debug);
36template<storm::dd::DdType DdType,
typename ValueType>
38 for (uint_fast64_t index = 0; index < commands.size(); ++index) {
40 commands[index].refine(predicates);
44template<storm::dd::DdType DdType,
typename ValueType>
46 return commands[player1Choice].
getGuard();
49template<storm::dd::DdType DdType,
typename ValueType>
54template<storm::dd::DdType DdType,
typename ValueType>
56 uint64_t auxiliaryChoice)
const {
60template<storm::dd::DdType DdType,
typename ValueType>
65template<storm::dd::DdType DdType,
typename ValueType>
68 std::vector<GameBddResult<DdType>> commandDdsAndUsedOptionVariableCounts;
69 uint_fast64_t maximalNumberOfUsedOptionVariables = 0;
70 for (
auto& command : commands) {
71 commandDdsAndUsedOptionVariableCounts.push_back(command.abstract());
72 maximalNumberOfUsedOptionVariables =
73 std::max(maximalNumberOfUsedOptionVariables, commandDdsAndUsedOptionVariableCounts.back().numberOfPlayer2Variables);
79 for (
auto const& commandDd : commandDdsAndUsedOptionVariableCounts) {
81 commandDd.bdd && this->getAbstractionInformation().encodePlayer2Choice(1, commandDd.numberOfPlayer2Variables, maximalNumberOfUsedOptionVariables);
86template<storm::dd::DdType DdType,
typename ValueType>
88 uint_fast64_t numberOfPlayer2Variables) {
90 this->getAbstractionInformation().getDdManager().getBddZero());
92 for (
auto& command : commands) {
93 BottomStateResult<DdType> commandBottomStateResult = command.getBottomStateTransitions(reachableStates, numberOfPlayer2Variables);
101template<storm::dd::DdType DdType,
typename ValueType>
104 for (
auto const& command : commands) {
105 result += command.getCommandUpdateProbabilitiesAdd();
110template<storm::dd::DdType DdType,
typename ValueType>
115template<storm::dd::DdType DdType,
typename ValueType>
120template<storm::dd::DdType DdType,
typename ValueType>
122 return abstractionInformation.get();
125template<storm::dd::DdType DdType,
typename ValueType>
127 for (
auto& command : commands) {
128 command.notifyGuardIsPredicate();
134#ifdef STORM_HAVE_CARL
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