19#include "storm-config.h"
25template<DdType LibraryType>
27 std::set<storm::expressions::Variable>
const& containedMetaVariables)
28 :
Dd<LibraryType>(ddManager, containedMetaVariables), internalBdd(internalBdd) {
32template<DdType LibraryType,
typename ValueType>
37 switch (comparisonType) {
42 [&value, &explicitValues](uint64_t offset) { return explicitValues[offset] < value; }),
48 [&value, &explicitValues](uint64_t offset) { return explicitValues[offset] <= value; }),
54 [&value, &explicitValues](uint64_t offset) { return explicitValues[offset] > value; }),
60 [&value, &explicitValues](uint64_t offset) { return explicitValues[offset] >= value; }),
67template<DdType LibraryType>
71 STORM_LOG_THROW(
false, storm::exceptions::InvalidOperationException,
"Cannot compare rational functions to bound.");
76template<DdType LibraryType>
77template<
typename ValueType>
84template<DdType LibraryType>
86 std::set<storm::expressions::Variable>
const& metaVariables) {
89 [&truthValues](uint64_t offset) { return truthValues[offset]; }),
93template<DdType LibraryType>
95 std::set<storm::expressions::Variable>
const& metaVariables) {
98 [targetOffset](uint64_t offset) { return offset == targetOffset; }),
102template<DdType LibraryType>
104 return internalBdd == other.internalBdd;
107template<DdType LibraryType>
109 return internalBdd != other.internalBdd;
112template<DdType LibraryType>
115 metaVariables.insert(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end());
116 return Bdd<LibraryType>(this->getDdManager(), internalBdd.ite(thenBdd.internalBdd, elseBdd.internalBdd), metaVariables);
119template<DdType LibraryType>
120template<
typename ValueType>
123 metaVariables.insert(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end());
124 return Add<LibraryType, ValueType>(this->getDdManager(), internalBdd.ite(thenAdd.internalAdd, elseAdd.internalAdd), metaVariables);
127template<DdType LibraryType>
132template<DdType LibraryType>
135 internalBdd |= other.internalBdd;
139template<DdType LibraryType>
144template<DdType LibraryType>
147 internalBdd &= other.internalBdd;
151template<DdType LibraryType>
156template<DdType LibraryType>
161template<DdType LibraryType>
166template<DdType LibraryType>
168 return Bdd<LibraryType>(this->getDdManager(), !internalBdd, this->getContainedMetaVariables());
171template<DdType LibraryType>
177template<DdType LibraryType>
183template<DdType LibraryType>
186 return Bdd<LibraryType>(this->getDdManager(), internalBdd.existsAbstractRepresentative(cube.
getInternalBdd()), this->getContainedMetaVariables());
189template<DdType LibraryType>
195template<DdType LibraryType>
197 Bdd<LibraryType> cube = getCube(this->getDdManager(), existentialVariables);
199 std::set<storm::expressions::Variable> unionOfMetaVariables;
200 std::set_union(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), other.
getContainedMetaVariables().begin(),
202 std::set<storm::expressions::Variable> containedMetaVariables;
203 std::set_difference(unionOfMetaVariables.begin(), unionOfMetaVariables.end(), existentialVariables.begin(), existentialVariables.end(),
204 std::inserter(containedMetaVariables, containedMetaVariables.begin()));
209template<DdType LibraryType>
214template<DdType LibraryType>
219template<DdType LibraryType>
221 std::set<storm::expressions::Variable>
const& columnMetaVariables)
const {
222 std::set<storm::expressions::Variable> newMetaVariables;
224 columnMetaVariables.end(), std::inserter(newMetaVariables, newMetaVariables.begin()));
226 std::vector<InternalBdd<LibraryType>> rowVariables;
227 for (
auto const& metaVariable : rowMetaVariables) {
229 for (
auto const& ddVariable : variable.getDdVariables()) {
230 rowVariables.push_back(ddVariable.getInternalBdd());
234 std::vector<InternalBdd<LibraryType>> columnVariables;
235 for (
auto const& metaVariable : columnMetaVariables) {
237 for (
auto const& ddVariable : variable.getDdVariables()) {
238 columnVariables.push_back(ddVariable.getInternalBdd());
242 return Bdd<LibraryType>(this->getDdManager(), internalBdd.relationalProduct(relation.
getInternalBdd(), rowVariables, columnVariables), newMetaVariables);
245template<DdType LibraryType>
247 std::set<storm::expressions::Variable>
const& columnMetaVariables)
const {
248 std::set<storm::expressions::Variable> newMetaVariables;
250 columnMetaVariables.end(), std::inserter(newMetaVariables, newMetaVariables.begin()));
252 std::vector<InternalBdd<LibraryType>> rowVariables;
253 for (
auto const& metaVariable : rowMetaVariables) {
255 for (
auto const& ddVariable : variable.getDdVariables()) {
256 rowVariables.push_back(ddVariable.getInternalBdd());
260 std::vector<InternalBdd<LibraryType>> columnVariables;
261 for (
auto const& metaVariable : columnMetaVariables) {
262 DdMetaVariable<LibraryType>
const& variable = this->getDdManager().getMetaVariable(metaVariable);
263 for (
auto const& ddVariable : variable.getDdVariables()) {
264 columnVariables.push_back(ddVariable.getInternalBdd());
268 return Bdd<LibraryType>(this->getDdManager(), internalBdd.inverseRelationalProduct(relation.
getInternalBdd(), rowVariables, columnVariables),
272template<DdType LibraryType>
274 std::set<storm::expressions::Variable>
const& rowMetaVariables,
275 std::set<storm::expressions::Variable>
const& columnMetaVariables)
const {
276 std::set<storm::expressions::Variable> newMetaVariables;
278 columnMetaVariables.end(), std::inserter(newMetaVariables, newMetaVariables.begin()));
280 std::vector<InternalBdd<LibraryType>> rowVariables;
281 for (
auto const& metaVariable : rowMetaVariables) {
283 for (
auto const& ddVariable : variable.getDdVariables()) {
284 rowVariables.push_back(ddVariable.getInternalBdd());
288 std::vector<InternalBdd<LibraryType>> columnVariables;
289 for (
auto const& metaVariable : columnMetaVariables) {
290 DdMetaVariable<LibraryType>
const& variable = this->getDdManager().getMetaVariable(metaVariable);
291 for (
auto const& ddVariable : variable.getDdVariables()) {
292 columnVariables.push_back(ddVariable.getInternalBdd());
297 internalBdd.inverseRelationalProductWithExtendedRelation(relation.
getInternalBdd(), rowVariables, columnVariables),
301template<DdType LibraryType>
303 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& metaVariablePairs)
const {
304 std::set<storm::expressions::Variable> newContainedMetaVariables;
305 std::set<storm::expressions::Variable> deletedMetaVariables;
306 std::vector<InternalBdd<LibraryType>> from;
307 std::vector<InternalBdd<LibraryType>> to;
308 for (
auto const& metaVariablePair : metaVariablePairs) {
313 if (this->containsMetaVariable(metaVariablePair.first)) {
314 if (this->containsMetaVariable(metaVariablePair.second)) {
317 newContainedMetaVariables.insert(metaVariablePair.second);
318 deletedMetaVariables.insert(metaVariablePair.first);
321 if (!this->containsMetaVariable(metaVariablePair.second)) {
324 newContainedMetaVariables.insert(metaVariablePair.first);
325 deletedMetaVariables.insert(metaVariablePair.second);
329 for (
auto const& ddVariable : variable1.getDdVariables()) {
330 from.emplace_back(ddVariable.getInternalBdd());
332 for (
auto const& ddVariable : variable2.getDdVariables()) {
333 to.emplace_back(ddVariable.getInternalBdd());
337 std::set<storm::expressions::Variable> tmp;
338 std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), deletedMetaVariables.begin(),
339 deletedMetaVariables.end(), std::inserter(tmp, tmp.begin()));
340 std::set<storm::expressions::Variable> containedMetaVariables;
341 std::set_union(tmp.begin(), tmp.end(), newContainedMetaVariables.begin(), newContainedMetaVariables.end(),
342 std::inserter(containedMetaVariables, containedMetaVariables.begin()));
343 return Bdd<LibraryType>(this->getDdManager(), internalBdd.swapVariables(from, to), containedMetaVariables);
346template<DdType LibraryType>
348 std::vector<InternalBdd<LibraryType>> fromBdds;
349 std::vector<InternalBdd<LibraryType>> toBdds;
351 for (
auto const& metaVariable : from) {
352 STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
353 "Cannot rename variable '" << metaVariable.getName() <<
"' that is not present.");
355 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
356 fromBdds.push_back(ddVariable.getInternalBdd());
359 for (
auto const& metaVariable : to) {
360 STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
361 "Cannot rename to variable '" << metaVariable.getName() <<
"' that is already present.");
363 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
364 toBdds.push_back(ddVariable.getInternalBdd());
368 std::set<storm::expressions::Variable> newContainedMetaVariables = to;
369 std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), from.begin(), from.end(),
370 std::inserter(newContainedMetaVariables, newContainedMetaVariables.begin()));
372 STORM_LOG_THROW(fromBdds.size() == toBdds.size(), storm::exceptions::InvalidArgumentException,
"Unable to rename mismatching meta variables.");
373 return Bdd<LibraryType>(this->getDdManager(), internalBdd.swapVariables(fromBdds, toBdds), newContainedMetaVariables);
376template<DdType LibraryType>
378 std::set<storm::expressions::Variable>
const& to)
const {
379 std::vector<InternalBdd<LibraryType>> fromBdds;
380 std::vector<InternalBdd<LibraryType>> toBdds;
382 for (
auto const& metaVariable : from) {
383 STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
384 "Cannot rename variable '" << metaVariable.getName() <<
"' that is not present.");
386 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
387 fromBdds.push_back(ddVariable.getInternalBdd());
390 std::sort(fromBdds.begin(), fromBdds.end(),
392 for (
auto const& metaVariable : to) {
393 STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
394 "Cannot rename to variable '" << metaVariable.getName() <<
"' that is already present.");
396 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
397 toBdds.push_back(ddVariable.getInternalBdd());
400 std::sort(toBdds.begin(), toBdds.end(), [](InternalBdd<LibraryType>
const& a, InternalBdd<LibraryType>
const& b) { return a.getLevel() < b.getLevel(); });
402 std::set<storm::expressions::Variable> newContainedMetaVariables = to;
403 std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), from.begin(), from.end(),
404 std::inserter(newContainedMetaVariables, newContainedMetaVariables.begin()));
406 STORM_LOG_ASSERT(fromBdds.size() >= toBdds.size(),
"Unable to perform rename-abstract with mismatching sizes.");
408 if (fromBdds.size() == toBdds.size()) {
409 return Bdd<LibraryType>(this->getDdManager(), internalBdd.swapVariables(fromBdds, toBdds), newContainedMetaVariables);
412 for (uint64_t index = toBdds.size(); index < fromBdds.size(); ++index) {
413 cube &= fromBdds[index];
415 fromBdds.resize(toBdds.size());
417 return Bdd<LibraryType>(this->getDdManager(), internalBdd.existsAbstract(cube).swapVariables(fromBdds, toBdds), newContainedMetaVariables);
421template<DdType LibraryType>
423 std::set<storm::expressions::Variable>
const& to)
const {
424 std::vector<InternalBdd<LibraryType>> fromBdds;
425 std::vector<InternalBdd<LibraryType>> toBdds;
427 for (
auto const& metaVariable : from) {
428 STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
429 "Cannot rename variable '" << metaVariable.getName() <<
"' that is not present.");
431 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
432 fromBdds.push_back(ddVariable.getInternalBdd());
435 std::sort(fromBdds.begin(), fromBdds.end(),
436 [](InternalBdd<LibraryType>
const& a, InternalBdd<LibraryType>
const& b) { return a.getLevel() < b.getLevel(); });
437 for (
auto const& metaVariable : to) {
438 STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException,
439 "Cannot rename to variable '" << metaVariable.getName() <<
"' that is already present.");
440 DdMetaVariable<LibraryType>
const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable);
441 for (
auto const& ddVariable : ddMetaVariable.getDdVariables()) {
442 toBdds.push_back(ddVariable.getInternalBdd());
445 std::sort(toBdds.begin(), toBdds.end(), [](InternalBdd<LibraryType>
const& a, InternalBdd<LibraryType>
const& b) { return a.getLevel() < b.getLevel(); });
447 std::set<storm::expressions::Variable> newContainedMetaVariables = to;
448 std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), from.begin(), from.end(),
449 std::inserter(newContainedMetaVariables, newContainedMetaVariables.begin()));
451 STORM_LOG_ASSERT(toBdds.size() >= fromBdds.size(),
"Unable to perform rename-concretize with mismatching sizes.");
453 if (fromBdds.size() == toBdds.size()) {
454 return Bdd<LibraryType>(this->getDdManager(), internalBdd.swapVariables(fromBdds, toBdds), newContainedMetaVariables);
456 InternalBdd<LibraryType> negatedCube = this->getDdManager().getBddOne().getInternalBdd();
457 for (uint64_t index = fromBdds.size(); index < toBdds.size(); ++index) {
458 negatedCube &= !toBdds[index];
460 toBdds.resize(fromBdds.size());
462 return Bdd<LibraryType>(this->getDdManager(), (internalBdd && negatedCube).swapVariables(fromBdds, toBdds), newContainedMetaVariables);
466template<DdType LibraryType>
467template<
typename ValueType>
469 return Add<LibraryType, ValueType>(this->getDdManager(), internalBdd.template toAdd<ValueType>(), this->getContainedMetaVariables());
472template<DdType LibraryType>
474 std::set<storm::expressions::Variable> remainingMetaVariables;
475 std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), variables.begin(), variables.end(),
476 std::inserter(remainingMetaVariables, remainingMetaVariables.begin()));
478 std::vector<uint_fast64_t> ddGroupVariableIndices;
479 for (
auto const& variable : variables) {
481 for (
auto const& ddVariable : metaVariable.getDdVariables()) {
482 ddGroupVariableIndices.push_back(ddVariable.getIndex());
485 std::sort(ddGroupVariableIndices.begin(), ddGroupVariableIndices.end());
487 std::vector<InternalBdd<LibraryType>> internalBddGroups = this->internalBdd.splitIntoGroups(ddGroupVariableIndices);
488 std::vector<Bdd<LibraryType>> groups;
489 for (
auto const& internalBdd : internalBddGroups) {
490 groups.emplace_back(
Bdd<LibraryType>(this->getDdManager(), internalBdd, remainingMetaVariables));
496template<DdType LibraryType>
498 return internalBdd.toVector(rowOdd, this->getSortedVariableIndices());
501template<DdType LibraryType>
504 return internalBdd.toExpression(manager);
507template<DdType LibraryType>
509 return Bdd<LibraryType>(this->getDdManager(), internalBdd.getSupport(), this->getContainedMetaVariables());
512template<DdType LibraryType>
514 std::size_t numberOfDdVariables = 0;
515 for (
auto const& metaVariable : this->getContainedMetaVariables()) {
516 numberOfDdVariables += this->getDdManager().getMetaVariable(metaVariable).getNumberOfDdVariables();
518 return internalBdd.getNonZeroCount(numberOfDdVariables);
521template<DdType LibraryType>
523 return internalBdd.getLeafCount();
526template<DdType LibraryType>
528 return internalBdd.getNodeCount();
531template<DdType LibraryType>
533 return internalBdd.getIndex();
536template<DdType LibraryType>
538 return internalBdd.getLevel();
541template<DdType LibraryType>
543 return internalBdd.isOne();
546template<DdType LibraryType>
548 return internalBdd.isZero();
551template<DdType LibraryType>
553 internalBdd.exportToDot(filename, this->getDdManager().getDdVariableNames(), showVariablesIfPossible);
556template<DdType LibraryType>
558 internalBdd.exportToText(filename);
561template<DdType LibraryType>
564 for (
auto const& metaVariable : metaVariables) {
565 cube &= manager.getMetaVariable(metaVariable).getCube();
570template<DdType LibraryType>
572 return internalBdd.createOdd(this->getSortedVariableIndices());
575template<DdType LibraryType>
580template<DdType LibraryType>
581template<
typename ValueType>
583 std::vector<ValueType> result(this->getNonZeroCount());
584 internalBdd.filterExplicitVector(odd, this->getSortedVariableIndices(), values, result);
588template<DdType LibraryType>
591 internalBdd.filterExplicitVector(odd, this->getSortedVariableIndices(), values, result);
598 storm::dd::Odd const& odd, std::set<storm::expressions::Variable>
const& metaVariables,
611#ifdef STORM_HAVE_CARL
619 storm::dd::Odd const& odd, std::set<storm::expressions::Variable>
const& metaVariables,
622#ifdef STORM_HAVE_CARL
624 std::vector<storm::RationalNumber>
const& explicitValues,
storm::dd::Odd const& odd,
625 std::set<storm::expressions::Variable>
const& metaVariables,
628 std::vector<storm::RationalFunction>
const& explicitValues,
storm::dd::Odd const& odd,
629 std::set<storm::expressions::Variable>
const& metaVariables,
636#ifdef STORM_HAVE_CARL
644#ifdef STORM_HAVE_CARL
647 std::vector<storm::RationalFunction>
const& values)
const;
654#ifdef STORM_HAVE_CARL
Bdd< LibraryType > renameVariablesAbstract(std::set< storm::expressions::Variable > const &from, std::set< storm::expressions::Variable > const &to) const
Renames the given meta variables in the BDD.
virtual uint_fast64_t getLevel() const override
Retrieves the level of the topmost variable in the DD.
static Bdd< LibraryType > fromVector(DdManager< LibraryType > const &ddManager, storm::storage::BitVector const &truthValues, storm::dd::Odd const &odd, std::set< storm::expressions::Variable > const &metaVariables)
Constructs a BDD representation of all encodings whose value is true in the given list of truth value...
Bdd< LibraryType > existsAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Existentially abstracts from the given meta variables.
Bdd< LibraryType > inverseRelationalProduct(Bdd< LibraryType > const &relation, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables) const
Computes the inverse relational product of the current BDD and the given BDD representing a relation.
bool isZero() const
Retrieves whether this DD represents the constant zero function.
virtual uint_fast64_t getNonZeroCount() const override
Retrieves the number of encodings that are mapped to a non-zero value.
bool operator!=(Bdd< LibraryType > const &other) const
Retrieves whether the two BDDs represent different functions.
virtual uint_fast64_t getIndex() const override
Retrieves the index of the topmost variable in the DD.
Bdd< LibraryType > & operator&=(Bdd< LibraryType > const &other)
Performs a logical and of the current and the given BDD and assigns it to the current BDD.
std::pair< std::vector< storm::expressions::Expression >, std::unordered_map< uint_fast64_t, storm::expressions::Variable > > toExpression(storm::expressions::ExpressionManager &manager) const
Translates the function the BDD is representing to a set of expressions that characterize the functio...
Bdd< LibraryType > andExists(Bdd< LibraryType > const &other, std::set< storm::expressions::Variable > const &existentialVariables) const
Computes the logical and of the current and the given BDD and existentially abstracts from the given ...
static Bdd< LibraryType > getEncoding(DdManager< LibraryType > const &ddManager, uint64_t targetOffset, storm::dd::Odd const &odd, std::set< storm::expressions::Variable > const &metaVariables)
Constructs the BDD representation of the encoding with the given offset.
virtual uint_fast64_t getNodeCount() const override
Retrieves the number of nodes necessary to represent the DD.
Bdd< LibraryType > swapVariables(std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &metaVariablePairs) const
Swaps the given pairs of meta variables in the BDD.
Bdd< LibraryType > & complement()
Logically complements the current BDD.
Odd createOdd() const
Creates an ODD based on the current BDD.
Bdd< LibraryType > operator&&(Bdd< LibraryType > const &other) const
Performs a logical and of the current and the given BDD.
storm::storage::BitVector toVector(storm::dd::Odd const &rowOdd) const
Converts the BDD to a bit vector.
Bdd< LibraryType > existsAbstractRepresentative(std::set< storm::expressions::Variable > const &metaVariables) const
Similar to existsAbstract, but does not abstract from the variables but rather picks a valuation of e...
static Bdd< LibraryType > getCube(DdManager< LibraryType > const &manager, std::set< storm::expressions::Variable > const &metaVariables)
Retrieves the cube of all given meta variables.
Bdd< LibraryType > universalAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Universally abstracts from the given meta variables.
virtual Bdd< LibraryType > getSupport() const override
Retrieves the support of the current DD.
Add< LibraryType, ValueType > toAdd() const
Converts a BDD to an equivalent ADD.
Bdd< LibraryType > constrain(Bdd< LibraryType > const &constraint) const
Computes the constraint of the current BDD with the given constraint.
Bdd< LibraryType > & operator|=(Bdd< LibraryType > const &other)
Performs a logical or of the current and the given BDD and assigns it to the current BDD.
std::vector< Bdd< LibraryType > > split(std::set< storm::expressions::Variable > const &variables) const
Splits the BDD along the given variables (must be at the top).
Bdd< LibraryType > ite(Bdd< LibraryType > const &thenBdd, Bdd< LibraryType > const &elseBdd) const
Performs an if-then-else with the given operands, i.e.
Bdd< LibraryType > operator!() const
Logically inverts the current BDD.
Bdd< LibraryType > iff(Bdd< LibraryType > const &other) const
Performs a logical iff of the current and the given BDD.
virtual void exportToDot(std::string const &filename, bool showVariablesIfPossible=true) const override
Exports the DD to the given file in the dot format.
Bdd< LibraryType > renameVariables(std::set< storm::expressions::Variable > const &from, std::set< storm::expressions::Variable > const &to) const
Renames the given meta variables in the BDD.
Bdd< LibraryType > inverseRelationalProductWithExtendedRelation(Bdd< LibraryType > const &relation, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables) const
Computes the inverse relational product of the current BDD and the given BDD representing a relation ...
bool isOne() const
Retrieves whether this DD represents the constant one function.
Bdd< LibraryType > exclusiveOr(Bdd< LibraryType > const &other) const
Performs a logical exclusive-or of the current and the given BDD.
Bdd< LibraryType > relationalProduct(Bdd< LibraryType > const &relation, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables) const
Computes the relational product of the current BDD and the given BDD representing a relation.
virtual void exportToText(std::string const &filename) const override
Exports the DD to the given file in the dot format.
Bdd< LibraryType > restrict(Bdd< LibraryType > const &constraint) const
Computes the restriction of the current BDD with the given constraint.
Bdd< LibraryType > implies(Bdd< LibraryType > const &other) const
Performs a logical implication of the current and the given BDD.
Bdd< LibraryType > renameVariablesConcretize(std::set< storm::expressions::Variable > const &from, std::set< storm::expressions::Variable > const &to) const
Renames the given meta variables in the BDD.
InternalBdd< LibraryType > const & getInternalBdd() const
Retrieves the internal BDD.
std::vector< ValueType > filterExplicitVector(Odd const &odd, std::vector< ValueType > const &values) const
Filters the given explicit vector using the symbolic representation of which values to select.
bool operator==(Bdd< LibraryType > const &other) const
Retrieves whether the two BDDs represent the same function.
Bdd< LibraryType > operator||(Bdd< LibraryType > const &other) const
Performs a logical or of the current and the given BDD.
virtual uint_fast64_t getLeafCount() const override
Retrieves the number of leaves of the DD.
static std::set< storm::expressions::Variable > joinMetaVariables(storm::dd::Dd< LibraryType > const &first, storm::dd::Dd< LibraryType > const &second)
Retrieves the set of meta variables contained in both DDs.
std::set< storm::expressions::Variable > const & getContainedMetaVariables() const
Retrieves the set of all meta variables contained in the DD.
std::vector< uint_fast64_t > getSortedVariableIndices() const
Retrieves the (sorted) list of the variable indices of the DD variables given by the meta variable se...
InternalDdManager< LibraryType > & getInternalDdManager()
Retrieves the internal DD manager.
This class is responsible for managing a set of typed variables and all expressions using these varia...
A bit vector that is internally represented as a vector of 64-bit values.
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
static Bdd< LibraryType > fromVector(DdManager< LibraryType > const &, std::vector< storm::RationalFunction > const &, storm::dd::Odd const &, std::set< storm::expressions::Variable > const &, storm::logic::ComparisonType, storm::RationalFunction)
static Bdd< LibraryType > fromVector(DdManager< LibraryType > const &ddManager, std::vector< ValueType > const &explicitValues, storm::dd::Odd const &odd, std::set< storm::expressions::Variable > const &metaVariables, storm::logic::ComparisonType comparisonType, ValueType value)