diff --git a/src/storage/dd/Bdd.cpp b/src/storage/dd/Bdd.cpp index 2bc04d168..5ea3bc376 100644 --- a/src/storage/dd/Bdd.cpp +++ b/src/storage/dd/Bdd.cpp @@ -2,6 +2,8 @@ #include "src/storage/dd/Add.h" #include "src/storage/dd/Odd.h" +#include "src/logic/ComparisonType.h" + #include "src/storage/dd/DdMetaVariable.h" #include "src/storage/dd/DdManager.h" @@ -19,22 +21,23 @@ namespace storm { } template - Bdd::Bdd(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value) { + Bdd Bdd::fromVector(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value) { switch (comparisonType) { case storm::logic::ComparisonType::Less: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater(), value, std::placeholders::_1)); - break; + return fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater(), value, std::placeholders::_1)); case storm::logic::ComparisonType::LessEqual: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater_equal(), value, std::placeholders::_1)); - break; + return fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater_equal(), value, std::placeholders::_1)); case storm::logic::ComparisonType::Greater: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less(), value, std::placeholders::_1)); - break; + return fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less(), value, std::placeholders::_1)); case storm::logic::ComparisonType::GreaterEqual: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less_equal(), value, std::placeholders::_1)); - break; + return fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less_equal(), value, std::placeholders::_1)); } - + } + + template + template + Bdd Bdd::fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter) { + return Bdd(ddManager, InternalBdd::fromVector(ddManager, values, odd, metaVariables, filter), metaVariables); } template @@ -106,64 +109,36 @@ namespace storm { template Bdd Bdd::existsAbstract(std::set const& metaVariables) const { - Bdd cubeBdd = this->getDdManager()->getBddOne(); - - std::set newMetaVariables = this->getContainedMetaVariables(); - for (auto const& metaVariable : metaVariables) { - // First check whether the BDD contains the meta variable and erase it, if this is the case. - STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidArgumentException, "Cannot abstract from meta variable '" << metaVariable.getName() << "' that is not present in the DD."); - newMetaVariables.erase(metaVariable); - - DdMetaVariable const& ddMetaVariable = this->getDdManager()->getMetaVariable(metaVariable); - cubeBdd &= ddMetaVariable.getCube(); - } - - return Bdd(internalBdd.existsAbstract(cubeBdd)); + Bdd cube = this->getCube(metaVariables); + return Bdd(this->getDdManager(), internalBdd.existsAbstract(cube), Dd::subtractMetaVariables(*this, cube)); } template Bdd Bdd::universalAbstract(std::set const& metaVariables) const { - InternalBdd cubeBdd = this->getDdManager()->getBddOne(); - - std::set newMetaVariables = this->getContainedMetaVariables(); - for (auto const& metaVariable : metaVariables) { - // First check whether the BDD contains the meta variable and erase it, if this is the case. - STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidArgumentException, "Cannot abstract from meta variable '" << metaVariable.getName() << "' that is not present in the DD."); - newMetaVariables.erase(metaVariable); - - DdMetaVariable const& ddMetaVariable = this->getDdManager()->getMetaVariable(metaVariable); - cubeBdd &= ddMetaVariable.getCube(); - } - - return Bdd(internalBdd.universalAbstract(cubeBdd)); + Bdd cube = this->getCube(metaVariables); + return Bdd(this->getDdManager(), internalBdd.universalAbstract(cube), Dd::subtractMetaVariables(*this, cube)); } template Bdd Bdd::andExists(Bdd const& other, std::set const& existentialVariables) const { - InternalBdd cubeBdd(this->getDdManager()->getBddOne()); - for (auto const& metaVariable : existentialVariables) { - DdMetaVariable const& ddMetaVariable = this->getDdManager()->getMetaVariable(metaVariable); - cubeBdd &= ddMetaVariable.getCube(); - } + Bdd cube = this->getCube(existentialVariables); std::set unionOfMetaVariables; std::set_union(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), other.getContainedMetaVariables().begin(), other.getContainedMetaVariables().end(), std::inserter(unionOfMetaVariables, unionOfMetaVariables.begin())); std::set containedMetaVariables; std::set_difference(unionOfMetaVariables.begin(), unionOfMetaVariables.end(), existentialVariables.begin(), existentialVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); - return Bdd(internalBdd.andExists(other.internalBdd, cubeBdd)); + return Bdd(this->getDdManager(), internalBdd.andExists(other, cube), containedMetaVariables); } template Bdd Bdd::constrain(Bdd const& constraint) const { - this->addMetaVariables(constraint.getContainedMetaVariables()); - return internalBdd.constraint(constraint.internalBdd); + return Bdd(this->getDdManager(), internalBdd.constrain(constraint), Dd::joinMetaVariables(*this, constraint)); } template Bdd Bdd::restrict(Bdd const& constraint) const { - this->addMetaVariables(constraint.getContainedMetaVariables()); - return internalBdd.constraint(constraint.internalBdd); + return Bdd(this->getDdManager(), internalBdd.restrict(constraint), Dd::joinMetaVariables(*this, constraint)); } template @@ -191,7 +166,7 @@ namespace storm { template Bdd Bdd::getSupport() const { - return Bdd(internalBdd.getSupport()); + return Bdd(this->getDdManager(), internalBdd.getSupport(), this->getContainedMetaVariables()); } template @@ -233,6 +208,26 @@ namespace storm { internalBdd.exportToDot(filename, this->getDdManager()->getDdVariableNames()); } + template + Bdd Bdd::getCube(std::set const& metaVariables) const { + Bdd cube = this->getDdManager()->getBddOne(); + for (auto const& metaVariable : metaVariables) { + STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidArgumentException, "Cannot abstract from meta variable '" << metaVariable.getName() << "' that is not present in the DD."); + cube &= this->getDdManager()->getMetaVariable(metaVariable).getCube(); + } + return cube; + } + + template + Bdd::operator InternalBdd() { + return internalBdd; + } + + template + Bdd::operator InternalBdd const() const { + return internalBdd; + } + template class Bdd; } } \ No newline at end of file diff --git a/src/storage/dd/Bdd.h b/src/storage/dd/Bdd.h index b116e95dd..ad9c55c08 100644 --- a/src/storage/dd/Bdd.h +++ b/src/storage/dd/Bdd.h @@ -215,7 +215,21 @@ namespace storm { virtual void exportToDot(std::string const& filename) const override; + /*! + * Retrieves the cube of all given meta variables. + * + * @param metaVariables The variables for which to create the cube. + * @return The resulting cube. + */ + Bdd getCube(std::set const& metaVariables) const; + private: + /*! + * We provide a conversion operator from the BDD to its internal type to ease calling the internal functions. + */ + operator InternalBdd(); + operator InternalBdd const() const; + /*! * Creates a DD that encapsulates the given CUDD ADD. * @@ -235,8 +249,8 @@ namespace storm { * @param comparisonType The relation that needs to hold for the values (wrt. to the given value). * @param value The value to compare with. */ - Bdd(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value); - + static Bdd fromVector(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value); + /*! * Builds a BDD representing the values that make the given filter function evaluate to true. * @@ -248,8 +262,7 @@ namespace storm { * @return The resulting (CUDD) BDD. */ template - static BDD fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter); - + static Bdd fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter); // The internal BDD that depends on the chosen library. InternalBdd internalBdd; diff --git a/src/storage/dd/Dd.cpp b/src/storage/dd/Dd.cpp index 5d0b32cef..4f190a134 100644 --- a/src/storage/dd/Dd.cpp +++ b/src/storage/dd/Dd.cpp @@ -62,28 +62,20 @@ namespace storm { template std::vector Dd::getSortedVariableIndices() const { - return getSortedVariableIndices(*this->getDdManager(), this->getContainedMetaVariables()); + return this->getDdManager()->getSortedVariableIndices(this->getContainedMetaVariables()); } template - std::vector Dd::getSortedVariableIndices(DdManager const& manager, std::set const& metaVariables) { - std::vector ddVariableIndices; - for (auto const& metaVariableName : metaVariables) { - auto const& metaVariable = manager.getMetaVariable(metaVariableName); - for (auto const& ddVariable : metaVariable.getDdVariables()) { - ddVariableIndices.push_back(ddVariable.getIndex()); - } - } - - // Next, we need to sort them, since they may be arbitrarily ordered otherwise. - std::sort(ddVariableIndices.begin(), ddVariableIndices.end()); - return ddVariableIndices; + std::set Dd::joinMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second) { + std::set metaVariables; + std::set_union(first.getContainedMetaVariables().begin(), first.getContainedMetaVariables().end(), second.getContainedMetaVariables().begin(), second.getContainedMetaVariables().end(), std::inserter(metaVariables, metaVariables.begin())); + return metaVariables; } template - std::set Dd::joinMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second) { + std::set Dd::subtractMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second) { std::set metaVariables; - std::set_union(first.getContainedMetaVariables().begin(), first.getContainedMetaVariables().end(), second.getContainedMetaVariables().begin(), second.getContainedMetaVariables().end(), std::inserter(metaVariables, metaVariables.begin())); + std::set_difference(first.getContainedMetaVariables().begin(), first.getContainedMetaVariables().end(), second.getContainedMetaVariables().begin(), second.getContainedMetaVariables().end(), std::inserter(metaVariables, metaVariables.begin())); return metaVariables; } diff --git a/src/storage/dd/Dd.h b/src/storage/dd/Dd.h index 7d007153d..be3181f3c 100644 --- a/src/storage/dd/Dd.h +++ b/src/storage/dd/Dd.h @@ -114,15 +114,6 @@ namespace storm { */ std::vector getSortedVariableIndices() const; - /*! - * Retrieves the (sorted) list of the variable indices of the DD variables given by the meta variable set. - * - * @param manager The manager responsible for the DD. - * @param metaVariable The set of meta variables for which to retrieve the index list. - * @return The sorted list of variable indices. - */ - static std::vector getSortedVariableIndices(DdManager const& manager, std::set const& metaVariables); - /*! * Adds the given set of meta variables to the DD. * @@ -168,6 +159,15 @@ namespace storm { */ static std::set joinMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second); + /*! + * Retrieves the set of meta variables that are contained in the first but not the second DD. + * + * @param first The first DD. + * @param second The second DD. + * @return The resulting set of meta variables. + */ + static std::set subtractMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second); + private: // A pointer to the manager responsible for this DD. std::shared_ptr const> ddManager; diff --git a/src/storage/dd/DdManager.cpp b/src/storage/dd/DdManager.cpp index e69de29bb..e9a21873c 100644 --- a/src/storage/dd/DdManager.cpp +++ b/src/storage/dd/DdManager.cpp @@ -0,0 +1,20 @@ + + +namespace storm { + namespace dd { + template + std::vector Dd::getSortedVariableIndices(DdManager const& manager, std::set const& metaVariables) { + std::vector ddVariableIndices; + for (auto const& metaVariableName : metaVariables) { + auto const& metaVariable = manager.getMetaVariable(metaVariableName); + for (auto const& ddVariable : metaVariable.getDdVariables()) { + ddVariableIndices.push_back(ddVariable.getIndex()); + } + } + + // Next, we need to sort them, since they may be arbitrarily ordered otherwise. + std::sort(ddVariableIndices.begin(), ddVariableIndices.end()); + return ddVariableIndices; + } + } +} \ No newline at end of file diff --git a/src/storage/dd/DdManager.h b/src/storage/dd/DdManager.h index 3c1d5e70c..11d378e46 100644 --- a/src/storage/dd/DdManager.h +++ b/src/storage/dd/DdManager.h @@ -14,6 +14,16 @@ namespace storm { Bdd getBddOne() const; Bdd getBddZero() const; DdMetaVariable const& getMetaVariable(storm::expressions::Variable const& variable) const; + std::vector getDdVariableNames() const; + + /*! + * Retrieves the (sorted) list of the variable indices of the DD variables given by the meta variable set. + * + * @param manager The manager responsible for the DD. + * @param metaVariable The set of meta variables for which to retrieve the index list. + * @return The sorted list of variable indices. + */ + static std::vector getSortedVariableIndices(std::set const& metaVariables); }; } } diff --git a/src/storage/dd/DdMetaVariable.h b/src/storage/dd/DdMetaVariable.h index 555569774..1cc920237 100644 --- a/src/storage/dd/DdMetaVariable.h +++ b/src/storage/dd/DdMetaVariable.h @@ -1,6 +1,8 @@ #ifndef STORM_STORAGE_DD_DDMETAVARIBLE_H_ #define STORM_STORAGE_DD_DDMETAVARIBLE_H_ +#include + #include "src/storage/dd/DdType.h" namespace storm { @@ -9,7 +11,8 @@ namespace storm { template class DdMetaVariable { public: - InternalBdd getCube() const; + Bdd getCube() const; + uint_fast64_t getNumberOfDdVariables() const; }; } } diff --git a/src/storage/dd/cudd/InternalCuddBdd.cpp b/src/storage/dd/cudd/InternalCuddBdd.cpp index 52db5fab3..8ac0bac48 100644 --- a/src/storage/dd/cudd/InternalCuddBdd.cpp +++ b/src/storage/dd/cudd/InternalCuddBdd.cpp @@ -2,6 +2,17 @@ namespace storm { namespace dd { + InternalBdd::InternalBdd(std::shared_ptr const> ddManager, BDD cuddBdd) : ddManager(ddManager), cuddBdd(cuddBdd) { + // Intentionally left empty. + } + + template + InternalBdd InternalBdd::fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter) { + std::vector ddVariableIndices = ddManager->getSortedVariableIndices(metaVariables); + uint_fast64_t offset = 0; + return BDD(ddManager->getCuddManager(), fromVectorRec(ddManager->getCuddManager().getManager(), offset, 0, ddVariableIndices.size(), values, odd, ddVariableIndices, filter)); + } + bool InternalBdd::operator==(InternalBdd const& other) const { return this->getCuddBdd() == other.getCuddBdd(); } @@ -11,7 +22,7 @@ namespace storm { } InternalBdd InternalBdd::ite(InternalBdd const& thenDd, InternalBdd const& elseDd) const { - return InternalBdd(this->getDdManager(), this->getCuddBdd().Ite(thenDd.getCuddBdd(), elseDd.getCuddBdd()), metaVariableNames); + return InternalBdd(this->getCuddBdd().Ite(thenDd.getCuddBdd(), elseDd.getCuddBdd())); } InternalBdd InternalBdd::operator||(InternalBdd const& other) const { @@ -37,15 +48,15 @@ namespace storm { } InternalBdd InternalBdd::iff(InternalBdd const& other) const { - return InternalBdd(this->getDdManager(), this->getCuddBdd().Xnor(other.getCuddBdd()), metaVariables); + return InternalBdd(this->getCuddBdd().Xnor(other.getCuddBdd())); } InternalBdd InternalBdd::exclusiveOr(InternalBdd const& other) const { - return InternalBdd(this->getDdManager(), this->getCuddBdd().Xor(other.getCuddBdd()), metaVariables); + return InternalBdd(this->getCuddBdd().Xor(other.getCuddBdd())); } InternalBdd InternalBdd::implies(InternalBdd const& other) const { - return InternalBdd(this->getDdManager(), this->getCuddBdd().Ite(other.getCuddBdd(), this->getDdManager()->getBddOne().getCuddBdd()), metaVariables); + return InternalBdd(this->getCuddBdd().Ite(other.getCuddBdd(), this->getDdManager()->getBddOne().getCuddBdd()), metaVariables); } InternalBdd InternalBdd::operator!() const { @@ -164,15 +175,9 @@ namespace storm { return this->getCuddBdd().getNode(); } - - - - - - - - Add InternalBdd::toAdd() const { - return Add(this->getDdManager(), this->getCuddBdd().Add(), this->getContainedMetaVariables()); + template + Add InternalBdd::toAdd() const { + return Add(this->getCuddBdd().Add()); } @@ -191,12 +196,6 @@ namespace storm { - template - BDD InternalBdd::fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter) { - std::vector ddVariableIndices = getSortedVariableIndices(*ddManager, metaVariables); - uint_fast64_t offset = 0; - return BDD(ddManager->getCuddManager(), fromVectorRec(ddManager->getCuddManager().getManager(), offset, 0, ddVariableIndices.size(), values, odd, ddVariableIndices, filter)); - } template DdNode* InternalBdd::fromVectorRec(::DdManager* manager, uint_fast64_t& currentOffset, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector const& values, Odd const& odd, std::vector const& ddVariableIndices, std::function const& filter) { @@ -290,27 +289,5 @@ namespace storm { } } - InternalBdd::InternalBdd(std::shared_ptr const> ddManager, BDD cuddBdd, std::set const& containedMetaVariables) : Dd(ddManager, containedMetaVariables), cuddBdd(cuddBdd) { - // Intentionally left empty. - } - - InternalBdd::InternalBdd(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value) : Dd(ddManager, metaVariables) { - switch (comparisonType) { - case storm::logic::ComparisonType::Less: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater(), value, std::placeholders::_1)); - break; - case storm::logic::ComparisonType::LessEqual: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::greater_equal(), value, std::placeholders::_1)); - break; - case storm::logic::ComparisonType::Greater: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less(), value, std::placeholders::_1)); - break; - case storm::logic::ComparisonType::GreaterEqual: - this->cuddBdd = fromVector(ddManager, explicitValues, odd, metaVariables, std::bind(std::less_equal(), value, std::placeholders::_1)); - break; - } - - } - } } \ No newline at end of file diff --git a/src/storage/dd/cudd/InternalCuddBdd.h b/src/storage/dd/cudd/InternalCuddBdd.h index 5a8209aa9..f34481cc7 100644 --- a/src/storage/dd/cudd/InternalCuddBdd.h +++ b/src/storage/dd/cudd/InternalCuddBdd.h @@ -1,10 +1,15 @@ #ifndef STORM_STORAGE_DD_CUDD_INTERNALCUDDBDD_H_ #define STORM_STORAGE_DD_CUDD_INTERNALCUDDBDD_H_ +#include + #include "src/storage/dd/DdType.h" #include "src/storage/dd/InternalBdd.h" #include "src/storage/dd/InternalAdd.h" +#include "src/storage/dd/DdManager.h" +#include "src/storage/dd/DdMetaVariable.h" + // Include the C++-interface of CUDD. #include "cuddObj.hh" @@ -29,16 +34,13 @@ namespace storm { class InternalBdd { public: /*! - * Constructs a BDD representation of all encodings that are in the requested relation with the given value. + * Creates a DD that encapsulates the given CUDD ADD. * - * @param ddManager The DD manager responsible for the resulting BDD. - * @param explicitValues The explicit values to compare to the given value. - * @param odd The ODD used for the translation from the explicit representation to a symbolic one. - * @param metaVariables The meta variables to use for the symbolic encoding. - * @param comparisonType The relation that needs to hold for the values (wrt. to the given value). - * @param value The value to compare with. + * @param ddManager The manager responsible for this DD. + * @param cuddBdd The CUDD BDD to store. + * @param containedMetaVariables The meta variables that appear in the DD. */ - InternalBdd(std::shared_ptr const> ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value); + InternalBdd(std::shared_ptr const> ddManager, BDD cuddBdd); // Instantiate all copy/move constructors/assignments with the default implementation. InternalBdd() = default; @@ -47,6 +49,19 @@ namespace storm { InternalBdd(InternalBdd&& other) = default; InternalBdd& operator=(InternalBdd&& other) = default; + /*! + * Builds a BDD representing the values that make the given filter function evaluate to true. + * + * @param ddManager The manager responsible for the BDD. + * @param values The values that are to be checked against the filter function. + * @param odd The ODD used for the translation. + * @param metaVariables The meta variables used for the translation. + * @param filter The filter that evaluates whether an encoding is to be mapped to 0 or 1. + * @return The resulting BDD. + */ + template + static InternalBdd fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter); + /*! * Retrieves whether the two BDDs represent the same function. * @@ -165,7 +180,7 @@ namespace storm { * @param metaVariablePairs A vector of meta variable pairs that are to be swapped for one another. * @return The resulting BDD. */ - InternalBdd swapVariables(std::vector> const& metaVariablePairs) const; + InternalBdd swapVariables(std::vector const>, std::reference_wrapper const>>> const& fromTo) const; /*! * Computes the logical and of the current and the given BDD and existentially abstracts from the given set @@ -175,7 +190,7 @@ namespace storm { * @param existentialVariables The variables from which to existentially abstract. * @return A BDD representing the result. */ - InternalBdd andExists(InternalBdd const& other, std::set const& existentialVariables) const; + InternalBdd andExists(InternalBdd const& other, InternalBdd const& cube) const; /*! * Computes the constraint of the current BDD with the given constraint. That is, the function value of the @@ -209,7 +224,7 @@ namespace storm { * * @return The number of encodings that are mapped to a non-zero value. */ - uint_fast64_t getNonZeroCount() const; + uint_fast64_t getNonZeroCount(uint_fast64_t numberOfDdVariables) const; /*! * Retrieves the number of leaves of the DD. @@ -271,28 +286,6 @@ namespace storm { storm::storage::BitVector toVector(storm::dd::Odd const& rowOdd) const; private: - /*! - * Creates a DD that encapsulates the given CUDD ADD. - * - * @param ddManager The manager responsible for this DD. - * @param cuddBdd The CUDD BDD to store. - * @param containedMetaVariables The meta variables that appear in the DD. - */ - InternalBdd(std::shared_ptr const> ddManager, BDD cuddBdd, std::set const& containedMetaVariables = std::set()); - - /*! - * Builds a BDD representing the values that make the given filter function evaluate to true. - * - * @param ddManager The manager responsible for the BDD. - * @param values The values that are to be checked against the filter function. - * @param odd The ODD used for the translation. - * @param metaVariables The meta variables used for the translation. - * @param filter The filter that evaluates whether an encoding is to be mapped to 0 or 1. - * @return The resulting (CUDD) BDD. - */ - template - static BDD fromVector(std::shared_ptr const> ddManager, std::vector const& values, Odd const& odd, std::set const& metaVariables, std::function const& filter); - /*! * Builds a BDD representing the values that make the given filter function evaluate to true. * @@ -337,6 +330,8 @@ namespace storm { */ DdNode* getCuddDdNode() const; + std::shared_ptr const> ddManager; + BDD cuddBdd; }; }