#pragma once #include #include #include #include #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/Bdd.h" #include "storm/abstraction/LocalExpressionInformation.h" #include "storm/solver/SmtSolver.h" namespace storm { namespace utility { namespace solver { class SmtSolverFactory; } } namespace abstraction { template class AbstractionInformation; template class ValidBlockAbstractor { public: ValidBlockAbstractor(AbstractionInformation& abstractionInformation, std::shared_ptr const& smtSolverFactory); storm::dd::Bdd const& getValidBlocks(); void refine(std::vector const& predicates); void constrain(storm::expressions::Expression const& constraint); private: /*! * Checks which parts of the valid blocks need to be recomputed. */ void recomputeValidBlocks(); /*! * Recomputed the valid blocks for the given predicate block. */ void recomputeValidBlocksForPredicateBlock(uint64_t blockIndex); /*! * Retrieves the abstraction information object. */ AbstractionInformation const& getAbstractionInformation() const; /*! * Translates the given model to a source state DD. * * @param model The model to translate. * @param blockIndex The index of the block. * @return The source state encoded as a DD. */ storm::dd::Bdd getSourceStateBdd(storm::solver::SmtSolver::ModelReference const& model, uint64_t blockIndex) const; /// The object storing the information about the abstraction (like predicates etc.) std::reference_wrapper const> abstractionInformation; /// An object storing information about how predicates are related. LocalExpressionInformation localExpressionInformation; /// The BDD storing all valid blocks; storm::dd::Bdd validBlocks; /// A vector of SMT solvers that correspond to the predicate blocks in the local expression information. std::vector> smtSolvers; /// A vector of relevant variables and predicates. Every inner vector corresponds to one block of the local /// expression information. std::vector>> relevantVariablesAndPredicates; /// The decision variables for each predicate block. std::vector> decisionVariables; /// A vector of BDDs that store the valid blocks for the individual predicate blocks to be able to reuse them. std::vector> validBlocksForPredicateBlocks; /// A flag that stores whether we need to possibly recompute the valid blocks (or parts). bool checkForRecomputation; }; } }