From 03ad4c27833cac122cccd52b6fca26ffb72e6110 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 19 Apr 2017 18:24:47 +0200 Subject: [PATCH 01/95] first version of symbolic bisimulation minimization --- resources/3rdparty/CMakeLists.txt | 1 + .../3rdparty/sylvan/src/storm_wrapper.cpp | 2 + .../src/sylvan_storm_rational_function.c | 8 +- .../sylvan/src/sylvan_storm_rational_number.c | 8 +- resources/examples/testfiles/dtmc/die.pm | 6 - src/storm/models/symbolic/Model.cpp | 15 +- src/storm/models/symbolic/Model.h | 23 +- src/storm/storage/dd/Add.cpp | 10 + src/storm/storage/dd/Add.h | 21 +- src/storm/storage/dd/DdMetaVariable.cpp | 15 + src/storm/storage/dd/DdMetaVariable.h | 5 + .../storage/dd/bisimulation/Partition.cpp | 123 +++++++ src/storm/storage/dd/bisimulation/Partition.h | 73 ++++ .../storage/dd/bisimulation/Signature.cpp | 25 ++ src/storm/storage/dd/bisimulation/Signature.h | 24 ++ .../dd/bisimulation/SignatureRefiner.cpp | 329 ++++++++++++++++++ .../dd/bisimulation/SignatureRefiner.h | 37 ++ src/storm/storage/dd/cudd/InternalCuddAdd.cpp | 7 + src/storm/storage/dd/cudd/InternalCuddAdd.h | 9 + .../storage/dd/cudd/InternalCuddDdManager.h | 6 +- .../storage/dd/sylvan/InternalSylvanAdd.cpp | 5 + .../storage/dd/sylvan/InternalSylvanAdd.h | 16 +- .../dd/sylvan/InternalSylvanDdManager.cpp | 7 +- src/storm/utility/storm.h | 16 +- .../SymbolicBisimulationDecompositionTest.cpp | 27 ++ 25 files changed, 769 insertions(+), 49 deletions(-) create mode 100644 src/storm/storage/dd/bisimulation/Partition.cpp create mode 100644 src/storm/storage/dd/bisimulation/Partition.h create mode 100644 src/storm/storage/dd/bisimulation/Signature.cpp create mode 100644 src/storm/storage/dd/bisimulation/Signature.h create mode 100644 src/storm/storage/dd/bisimulation/SignatureRefiner.cpp create mode 100644 src/storm/storage/dd/bisimulation/SignatureRefiner.h create mode 100644 src/test/storage/SymbolicBisimulationDecompositionTest.cpp diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index b62cfb3d0..97a4b4e74 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -383,6 +383,7 @@ ExternalProject_Add( LOG_CONFIGURE ON LOG_BUILD ON BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/sylvan/src/libsylvan${STATIC_EXT} + BUILD_ALWAYS ) ExternalProject_Get_Property(sylvan source_dir) ExternalProject_Get_Property(sylvan binary_dir) diff --git a/resources/3rdparty/sylvan/src/storm_wrapper.cpp b/resources/3rdparty/sylvan/src/storm_wrapper.cpp index edb31fda1..fe8ed9a91 100644 --- a/resources/3rdparty/sylvan/src/storm_wrapper.cpp +++ b/resources/3rdparty/sylvan/src/storm_wrapper.cpp @@ -18,6 +18,8 @@ #if defined(STORM_HAVE_GMP) && !defined(STORM_USE_CLN_EA) #define RATIONAL_NUMBER_THREAD_SAFE +#else +#warning "Rational numbers do not appear to be thread-safe. Use in sylvan will be protected by mutexes, performance might degrade." #endif // A mutex that is used to lock all operations accessing rational numbers as they are not necessarily thread-safe. diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c index 8cf8a5b88..bf24f2bd1 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c @@ -676,7 +676,7 @@ TASK_4(MTBDD, sylvan_storm_rational_function_equal_norm_d2, MTBDD, a, MTBDD, b, /* Check cache */ MTBDD result; - if (cache_get3(CACHE_MTBDD_EQUAL_NORM_RF, a, b, svalue, &result)) { + if (cache_get3(CACHE_MTBDD_EQUAL_NORM_RF, a, b, (uint64_t)svalue, &result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_CACHED); return result; } @@ -700,7 +700,7 @@ TASK_4(MTBDD, sylvan_storm_rational_function_equal_norm_d2, MTBDD, a, MTBDD, b, if (result == mtbdd_false) *shortcircuit = 1; /* Store in cache */ - if (cache_put3(CACHE_MTBDD_EQUAL_NORM_RF, a, b, svalue, result)) { + if (cache_put3(CACHE_MTBDD_EQUAL_NORM_RF, a, b, (uint64_t)svalue, result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_CACHEDPUT); } @@ -749,7 +749,7 @@ TASK_4(MTBDD, sylvan_storm_rational_function_equal_norm_rel_d2, MTBDD, a, MTBDD, /* Check cache */ MTBDD result; - if (cache_get3(CACHE_MTBDD_EQUAL_NORM_REL_RF, a, b, svalue, &result)) { + if (cache_get3(CACHE_MTBDD_EQUAL_NORM_REL_RF, a, b, (uint64_t)svalue, &result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_REL_CACHED); return result; } @@ -773,7 +773,7 @@ TASK_4(MTBDD, sylvan_storm_rational_function_equal_norm_rel_d2, MTBDD, a, MTBDD, if (result == mtbdd_false) *shortcircuit = 1; /* Store in cache */ - if (cache_put3(CACHE_MTBDD_EQUAL_NORM_REL_RF, a, b, svalue, result)) { + if (cache_put3(CACHE_MTBDD_EQUAL_NORM_REL_RF, a, b, (uint64_t)svalue, result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_REL_CACHEDPUT); } diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c index 692a6f607..7bb207a5b 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c @@ -710,7 +710,7 @@ TASK_4(MTBDD, sylvan_storm_rational_number_equal_norm_d2, MTBDD, a, MTBDD, b, st /* Check cache */ MTBDD result; - if (cache_get3(CACHE_MTBDD_EQUAL_NORM_RN, a, b, svalue, &result)) { + if (cache_get3(CACHE_MTBDD_EQUAL_NORM_RN, a, b, (uint64_t)svalue, &result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_CACHED); return result; } @@ -734,7 +734,7 @@ TASK_4(MTBDD, sylvan_storm_rational_number_equal_norm_d2, MTBDD, a, MTBDD, b, st if (result == mtbdd_false) *shortcircuit = 1; /* Store in cache */ - if (cache_put3(CACHE_MTBDD_EQUAL_NORM_RN, a, b, svalue, result)) { + if (cache_put3(CACHE_MTBDD_EQUAL_NORM_RN, a, b, (uint64_t)svalue, result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_CACHEDPUT); } @@ -783,7 +783,7 @@ TASK_4(MTBDD, sylvan_storm_rational_number_equal_norm_rel_d2, MTBDD, a, MTBDD, b /* Check cache */ MTBDD result; - if (cache_get3(CACHE_MTBDD_EQUAL_NORM_REL_RN, a, b, svalue, &result)) { + if (cache_get3(CACHE_MTBDD_EQUAL_NORM_REL_RN, a, b, (uint64_t)svalue, &result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_REL_CACHED); return result; } @@ -807,7 +807,7 @@ TASK_4(MTBDD, sylvan_storm_rational_number_equal_norm_rel_d2, MTBDD, a, MTBDD, b if (result == mtbdd_false) *shortcircuit = 1; /* Store in cache */ - if (cache_put3(CACHE_MTBDD_EQUAL_NORM_REL_RN, a, b, svalue, result)) { + if (cache_put3(CACHE_MTBDD_EQUAL_NORM_REL_RN, a, b, (uint64_t)svalue, result)) { sylvan_stats_count(MTBDD_EQUAL_NORM_REL_CACHEDPUT); } diff --git a/resources/examples/testfiles/dtmc/die.pm b/resources/examples/testfiles/dtmc/die.pm index af0797cff..5b7eb8e36 100644 --- a/resources/examples/testfiles/dtmc/die.pm +++ b/resources/examples/testfiles/dtmc/die.pm @@ -24,9 +24,3 @@ rewards "coin_flips" endrewards label "one" = s=7&d=1; -label "two" = s=7&d=2; -label "three" = s=7&d=3; -label "four" = s=7&d=4; -label "five" = s=7&d=5; -label "six" = s=7&d=6; -label "done" = s=7; diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index c2ca3650e..94b185b15 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -50,15 +50,10 @@ namespace storm { } template - storm::dd::DdManager const& Model::getManager() const { + storm::dd::DdManager& Model::getManager() const { return *manager; } - - template - storm::dd::DdManager& Model::getManager() { - return *manager; - } - + template std::shared_ptr> const& Model::getManagerAsSharedPointer() const { return manager; @@ -85,6 +80,12 @@ namespace storm { return this->getStates(labelToExpressionMap.at(label)); } + template + storm::expressions::Expression Model::getExpression(std::string const& label) const { + STORM_LOG_THROW(labelToExpressionMap.find(label) != labelToExpressionMap.end(), storm::exceptions::IllegalArgumentException, "The label " << label << " is invalid for the labeling of the model."); + return labelToExpressionMap.at(label); + } + template storm::dd::Bdd Model::getStates(storm::expressions::Expression const& expression) const { if (expression.isTrue()) { diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index 5c9382831..fa7d683ff 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -9,6 +9,7 @@ #include "storm/storage/expressions/Expression.h" #include "storm/storage/expressions/Variable.h" #include "storm/storage/dd/DdType.h" +#include "storm/storage/dd/Bdd.h" #include "storm/models/ModelBase.h" #include "storm/utility/OsDetection.h" @@ -24,9 +25,6 @@ namespace storm { template class Add; - template - class Bdd; - template class DdManager; @@ -104,14 +102,7 @@ namespace storm { * * @return The manager responsible for the DDs that represent this model. */ - storm::dd::DdManager const& getManager() const; - - /*! - * Retrieves the manager responsible for the DDs that represent this model. - * - * @return The manager responsible for the DDs that represent this model. - */ - storm::dd::DdManager& getManager(); + storm::dd::DdManager& getManager() const; /*! * Retrieves the manager responsible for the DDs that represent this model. @@ -143,10 +134,18 @@ namespace storm { * Returns the sets of states labeled with the given label. * * @param label The label for which to get the labeled states. - * @return The set of states labeled with the requested label in the form of a bit vector. + * @return The set of states labeled with the requested label. */ virtual storm::dd::Bdd getStates(std::string const& label) const; + /*! + * Returns the expression for the given label. + * + * @param label The label for which to get the expression. + * @return The expression characterizing the requested label. + */ + virtual storm::expressions::Expression getExpression(std::string const& label) const; + /*! * Returns the set of states labeled satisfying the given expression (that must be of boolean type). * diff --git a/src/storm/storage/dd/Add.cpp b/src/storm/storage/dd/Add.cpp index a3d374d23..6e00de3ec 100644 --- a/src/storm/storage/dd/Add.cpp +++ b/src/storm/storage/dd/Add.cpp @@ -811,6 +811,16 @@ namespace storm { Odd Add::createOdd() const { return internalAdd.createOdd(this->getSortedVariableIndices()); } + + template + InternalAdd const& Add::getInternalAdd() const { + return internalAdd; + } + + template + InternalDdManager const& Add::getInternalDdManager() const { + return internalAdd.getInternalDdManager(); + } template Add::operator InternalAdd() const { diff --git a/src/storm/storage/dd/Add.h b/src/storm/storage/dd/Add.h index 86f443ce3..d7a757eff 100644 --- a/src/storm/storage/dd/Add.h +++ b/src/storm/storage/dd/Add.h @@ -25,6 +25,11 @@ namespace storm { template class AddIterator; + namespace bisimulation { + template + class InternalSignatureRefiner; + } + template class Add : public Dd { public: @@ -33,7 +38,9 @@ namespace storm { template friend class Add; - + + friend class bisimulation::InternalSignatureRefiner; + // Instantiate all copy/move constructors/assignments with the default implementation. Add() = default; Add(Add const& other) = default; @@ -624,7 +631,17 @@ namespace storm { * @return The corresponding ODD. */ Odd createOdd() const; - + + /*! + * Retrieves the internal ADD. + */ + InternalAdd const& getInternalAdd() const; + + /*! + * Retrieves the internal ADD. + */ + InternalDdManager const& getInternalDdManager() const; + private: /*! * Creates an ADD from the given internal ADD. diff --git a/src/storm/storage/dd/DdMetaVariable.cpp b/src/storm/storage/dd/DdMetaVariable.cpp index 620e7311e..440612d7c 100644 --- a/src/storm/storage/dd/DdMetaVariable.cpp +++ b/src/storm/storage/dd/DdMetaVariable.cpp @@ -49,6 +49,21 @@ namespace storm { return this->cube; } + template + uint64_t DdMetaVariable::getHighestLevel() const { + uint64_t result = 0; + bool first = true; + for (auto const& v : ddVariables) { + if (first) { + result = v.getLevel(); + } else { + result = std::max(result, v.getLevel()); + } + } + + return result; + } + template void DdMetaVariable::createCube() { STORM_LOG_ASSERT(!this->ddVariables.empty(), "The DD variables must not be empty."); diff --git a/src/storm/storage/dd/DdMetaVariable.h b/src/storm/storage/dd/DdMetaVariable.h index c596b612a..9b9b736ed 100644 --- a/src/storm/storage/dd/DdMetaVariable.h +++ b/src/storm/storage/dd/DdMetaVariable.h @@ -73,6 +73,11 @@ namespace storm { */ Bdd const& getCube() const; + /*! + * Retrieves the highest level of all DD variables belonging to this meta variable. + */ + uint64_t getHighestLevel() const; + private: /*! * Creates an integer meta variable with the given name and range bounds. diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp new file mode 100644 index 000000000..6ba1c2ca9 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -0,0 +1,123 @@ +#include "storm/storage/dd/bisimulation/Partition.h" + +#include "storm/storage/dd/DdManager.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + Partition::Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partitionAdd(partitionAdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { + // Intentionally left empty. + } + + template + bool Partition::operator==(Partition const& other) { + return this->partitionAdd == other.partitionAdd && this->blockVariable == other.blockVariable && this->nextFreeBlockIndex == other.nextFreeBlockIndex; + } + + template + Partition Partition::replacePartitionAdd(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const { + return Partition(newPartitionAdd, blockVariable, nextFreeBlockIndex); + } + + template + Partition Partition::create(storm::models::symbolic::Model const& model) { + return create(model, model.getLabels()); + } + + template + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& labels) { + std::vector expressions; + for (auto const& label : labels) { + expressions.push_back(model.getExpression(label)); + } + return create(model, expressions); + } + + template + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions) { + storm::dd::DdManager& manager = model.getManager(); + + std::vector> stateSets; + for (auto const& expression : expressions) { + stateSets.emplace_back(model.getStates(expression)); + } + + storm::expressions::Variable blockVariable = createBlockVariable(manager, model.getReachableStates().getNonZeroCount()); + std::pair, uint64_t> partitionAddAndBlockCount = createPartitionAdd(manager, model, stateSets, blockVariable); + return Partition(partitionAddAndBlockCount.first, blockVariable, partitionAddAndBlockCount.second); + } + + template + uint64_t Partition::getNumberOfBlocks() const { + return nextFreeBlockIndex; + } + + template + storm::dd::Add const& Partition::getPartitionAdd() const { + return partitionAdd; + } + + template + storm::expressions::Variable const& Partition::getBlockVariable() const { + return blockVariable; + } + + template + uint64_t Partition::getNextFreeBlockIndex() const { + return nextFreeBlockIndex; + } + + template + void enumerateBlocksRec(std::vector> const& stateSets, storm::dd::Bdd const& currentStateSet, uint64_t offset, storm::expressions::Variable const& blockVariable, std::function const&)> const& callback) { + if (currentStateSet.isZero()) { + return; + } + if (offset == stateSets.size()) { + callback(currentStateSet); + } else { + enumerateBlocksRec(stateSets, currentStateSet && stateSets[offset], offset + 1, blockVariable, callback); + enumerateBlocksRec(stateSets, currentStateSet && !stateSets[offset], offset + 1, blockVariable, callback); + } + } + + template + std::pair, uint64_t> Partition::createPartitionAdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable) { + uint64_t blockCount = 0; + storm::dd::Add partitionAdd = manager.template getAddZero(); + + // Enumerate all realizable blocks. + enumerateBlocksRec(stateSets, model.getReachableStates(), 0, blockVariable, [&manager, &partitionAdd, &blockVariable, &blockCount](storm::dd::Bdd const& stateSet) { + stateSet.template toAdd().exportToDot("states_" + std::to_string(blockCount) + ".dot"); + partitionAdd += (stateSet && manager.getEncoding(blockVariable, blockCount)).template toAdd(); + blockCount++; + } ); + + return std::make_pair(partitionAdd, blockCount); + } + + template + storm::expressions::Variable Partition::createBlockVariable(storm::dd::DdManager& manager, uint64_t numberOfStates) { + storm::expressions::Variable blockVariable; + if (manager.hasMetaVariable("blocks")) { + int64_t counter = 0; + while (manager.hasMetaVariable("block" + std::to_string(counter))) { + ++counter; + } + blockVariable = manager.addMetaVariable("blocks" + std::to_string(counter), 0, numberOfStates, 1).front(); + } else { + blockVariable = manager.addMetaVariable("blocks", 0, numberOfStates, 1).front(); + } + return blockVariable; + } + + template class Partition; + + template class Partition; + template class Partition; + template class Partition; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h new file mode 100644 index 000000000..647acf996 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -0,0 +1,73 @@ +#pragma once + +#include "storm/storage/dd/DdType.h" +#include "storm/storage/dd/Add.h" + +#include "storm/models/symbolic/Model.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class Partition { + public: + Partition() = default; + + /*! + * Creates a new partition from the given data. + * + * @param partitionAdd An ADD that maps encoding over the state/row variables and the block variable to + * one iff the state is in the block. + * @param blockVariable The variable to use for the block encoding. Its range must be [0, x] where x is + * the number of states in the partition. + * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices + * between 0 and this number. + */ + Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex); + + bool operator==(Partition const& other); + + Partition replacePartitionAdd(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; + + /*! + * Creates a partition from the given model that respects all labels. + */ + static Partition create(storm::models::symbolic::Model const& model); + + /*! + * Creates a partition from the given model that respects the given labels. + */ + static Partition create(storm::models::symbolic::Model const& model, std::vector const& labels); + + /*! + * Creates a partition from the given model that respects the given expressions. + */ + static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions); + + uint64_t getNumberOfBlocks() const; + + storm::dd::Add const& getPartitionAdd() const; + + storm::expressions::Variable const& getBlockVariable() const; + + uint64_t getNextFreeBlockIndex() const; + + private: + static std::pair, uint64_t> createPartitionAdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); + + static storm::expressions::Variable createBlockVariable(storm::dd::DdManager& manager, uint64_t numberOfStates); + + // The ADD representing the partition. The ADD is over the row variables of the model and the block variable. + storm::dd::Add partitionAdd; + + // The meta variable used to encode the block of each state in this partition. + storm::expressions::Variable blockVariable; + + // The next free block index. + uint64_t nextFreeBlockIndex; + }; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/Signature.cpp b/src/storm/storage/dd/bisimulation/Signature.cpp new file mode 100644 index 000000000..e4a06feab --- /dev/null +++ b/src/storm/storage/dd/bisimulation/Signature.cpp @@ -0,0 +1,25 @@ +#include "storm/storage/dd/bisimulation/Signature.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + Signature::Signature(storm::dd::Add const& signatureAdd) : signatureAdd(signatureAdd) { + // Intentionally left empty. + } + + template + storm::dd::Add const& Signature::getSignatureAdd() const { + return signatureAdd; + } + + template class Signature; + + template class Signature; + template class Signature; + template class Signature; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/Signature.h b/src/storm/storage/dd/bisimulation/Signature.h new file mode 100644 index 000000000..437839d54 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/Signature.h @@ -0,0 +1,24 @@ +#pragma once + +#include "storm/storage/dd/DdType.h" + +#include "storm/storage/dd/bisimulation/Partition.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class Signature { + public: + Signature(storm::dd::Add const& signatureAdd); + + storm::dd::Add const& getSignatureAdd() const; + + private: + storm::dd::Add signatureAdd; + }; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp new file mode 100644 index 000000000..2ac0dd22c --- /dev/null +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -0,0 +1,329 @@ +#include "storm/storage/dd/bisimulation/SignatureRefiner.h" + +#include + +#include "storm/storage/dd/DdManager.h" + +#include "storm/storage/dd/cudd/InternalCuddDdManager.h" + +#include "storm/utility/macros.h" +#include "storm/exceptions/NotImplementedException.h" + +#include "resources/3rdparty/sparsepp/sparsepp.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + struct CuddPointerPairHash { + std::size_t operator()(std::pair const& pair) const { + std::size_t seed = std::hash()(pair.first); + boost::hash_combine(seed, pair.second); + return seed; + } + }; + + struct SylvanMTBDDPairHash { + std::size_t operator()(std::pair const& pair) const { + std::size_t seed = std::hash()(pair.first); + boost::hash_combine(seed, pair.second); + return seed; + } + }; + + template + class InternalSignatureRefiner; + + template + class InternalSignatureRefiner { + public: + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0) { + // Intentionally left empty. + } + + Partition refine(Partition const& oldPartition, Signature const& signature) { + storm::dd::Add newPartitionAdd = refine(oldPartition, signature.getSignatureAdd()); + ++numberOfRefinements; + return oldPartition.replacePartitionAdd(newPartitionAdd, nextFreeBlockIndex); + } + + private: + storm::dd::Add refine(Partition const& oldPartition, storm::dd::Add const& signatureAdd) { + // Clear the caches. + signatureCache.clear(); + reuseBlocksCache.clear(); + nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); + + // Perform the actual recursive refinement step. + DdNodePtr result = refine(oldPartition.getPartitionAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode()); + + // Construct resulting ADD from the obtained node and the meta information. + storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, cudd::ADD(internalDdManager.getCuddManager(), result)); + storm::dd::Add newPartitionAdd(oldPartition.getPartitionAdd().getDdManager(), internalNewPartitionAdd, oldPartition.getPartitionAdd().getContainedMetaVariables()); + + return newPartitionAdd; + } + + DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode) { + ::DdManager* ddman = internalDdManager.getCuddManager().getManager(); + + // Check the cache whether we have seen the same node before. + auto sigCacheIt = signatureCache.find(std::make_pair(signatureNode, partitionNode)); + if (sigCacheIt != signatureCache.end()) { + // If so, we return the corresponding result. + return sigCacheIt->second; + } + + // Determine the levels in the DDs. + uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode); + uint64_t signatureVariable = Cudd_NodeReadIndex(signatureNode); + uint64_t partitionLevel = Cudd_ReadPerm(ddman, partitionVariable); + uint64_t signatureLevel = Cudd_ReadPerm(ddman, signatureVariable); + uint64_t topLevel = std::min(partitionLevel, signatureLevel); + uint64_t topVariable = topLevel == partitionLevel ? partitionVariable : signatureVariable; + + // Check whether the top variable is still within the state encoding. + if (topLevel <= lastStateLevel) { + // Determine subresults by recursive descent. + DdNodePtr thenResult; + DdNodePtr elseResult; + if (partitionLevel < signatureLevel) { + thenResult = refine(Cudd_T(partitionNode), signatureNode); + Cudd_Ref(thenResult); + elseResult = refine(Cudd_E(partitionNode), signatureNode); + Cudd_Ref(elseResult); + } else if (partitionLevel > signatureLevel) { + thenResult = refine(partitionNode, Cudd_T(signatureNode)); + Cudd_Ref(thenResult); + elseResult = refine(partitionNode, Cudd_E(signatureNode)); + Cudd_Ref(elseResult); + } else { + thenResult = refine(Cudd_T(partitionNode), Cudd_T(signatureNode)); + Cudd_Ref(thenResult); + elseResult = refine(Cudd_E(partitionNode), Cudd_E(signatureNode)); + Cudd_Ref(elseResult); + } + + if (thenResult == elseResult) { + Cudd_Deref(thenResult); + Cudd_Deref(elseResult); + return thenResult; + } + + // Get the node to connect the subresults. + DdNode* var = Cudd_addIthVar(ddman, topVariable); + Cudd_Ref(var); + DdNode* result = Cudd_addIte(ddman, var, thenResult, elseResult); + Cudd_Ref(result); + Cudd_RecursiveDeref(ddman, var); + Cudd_Deref(thenResult); + Cudd_Deref(elseResult); + + // Store the result in the cache. + signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + + Cudd_Deref(result); + return result; + } else { + + // If we are not within the state encoding any more, we hit the signature itself. + + // If we arrived at the constant zero node, then this was an illegal state encoding (we require + // all states to be non-deadlock). + if (signatureNode == Cudd_ReadZero(ddman)) { + return signatureNode; + } + + // If this is the first time (in this traversal) that we encounter this signature, we check + // whether we can assign the old block number to it. + auto reuseCacheIt = reuseBlocksCache.find(partitionNode); + if (reuseCacheIt == reuseBlocksCache.end()) { + reuseBlocksCache.emplace(partitionNode, true); + signatureCache[std::make_pair(signatureNode, partitionNode)] = partitionNode; + return partitionNode; + } else { + DdNode* result; + { + storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex).template toAdd(); + ++nextFreeBlockIndex; + result = blockEncoding.getInternalAdd().getCuddDdNode(); + Cudd_Ref(result); + } + signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + Cudd_Deref(result); + return result; + } + } + } + + storm::dd::DdManager const& manager; + storm::dd::InternalDdManager const& internalDdManager; + storm::expressions::Variable const& blockVariable; + + // The last level that belongs to the state encoding in the DDs. + uint64_t lastStateLevel; + + // The current number of blocks of the new partition. + uint64_t nextFreeBlockIndex; + + // The number of completed refinements. + uint64_t numberOfRefinements; + + // The cache used to identify states with identical signature. + spp::sparse_hash_map, DdNode*, CuddPointerPairHash> signatureCache; + + // The cache used to identify which old block numbers have already been reused. + spp::sparse_hash_map reuseBlocksCache; + }; + + + template + class InternalSignatureRefiner { + public: + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0) { + // Intentionally left empty. + } + + Partition refine(Partition const& oldPartition, Signature const& signature) { + storm::dd::Add newPartitionAdd = refine(oldPartition, signature.getSignatureAdd()); + ++numberOfRefinements; + return oldPartition.replacePartitionAdd(newPartitionAdd, nextFreeBlockIndex); + } + + private: + storm::dd::Add refine(Partition const& oldPartition, storm::dd::Add const& signatureAdd) { + // Clear the caches. + signatureCache.clear(); + reuseBlocksCache.clear(); + nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); + + // Perform the actual recursive refinement step. + MTBDD result = refine(oldPartition.getPartitionAdd().getInternalAdd().getSylvanMtbdd().GetMTBDD(), signatureAdd.getInternalAdd().getSylvanMtbdd().GetMTBDD()); + + // Construct resulting ADD from the obtained node and the meta information. + storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, sylvan::Mtbdd(result)); + storm::dd::Add newPartitionAdd(oldPartition.getPartitionAdd().getDdManager(), internalNewPartitionAdd, oldPartition.getPartitionAdd().getContainedMetaVariables()); + + return newPartitionAdd; + } + + MTBDD refine(MTBDD partitionNode, MTBDD signatureNode) { + LACE_ME; + + // Check the cache whether we have seen the same node before. + auto sigCacheIt = signatureCache.find(std::make_pair(signatureNode, partitionNode)); + if (sigCacheIt != signatureCache.end()) { + // If so, we return the corresponding result. + return sigCacheIt->second; + } + + // Determine levels in the DDs. + BDDVAR signatureVariable = mtbdd_isleaf(signatureNode) ? 0xffffffff : sylvan_var(signatureNode); + BDDVAR partitionVariable = sylvan_var(partitionNode); + BDDVAR topVariable = std::min(signatureVariable, partitionVariable); + + // Check whether the top variable is still within the state encoding. + if (topVariable <= lastStateLevel) { + // Determine subresults by recursive descent. + MTBDD thenResult; + MTBDD elseResult; + if (partitionVariable < signatureVariable) { + thenResult = refine(sylvan_high(partitionNode), signatureNode); + elseResult = refine(sylvan_low(partitionNode), signatureNode); + } else if (partitionVariable > signatureVariable) { + thenResult = refine(partitionNode, sylvan_high(signatureNode)); + elseResult = refine(partitionNode, sylvan_low(signatureNode)); + } else { + thenResult = refine(sylvan_high(partitionNode), sylvan_high(signatureNode)); + elseResult = refine(sylvan_low(partitionNode), sylvan_low(signatureNode)); + } + + if (thenResult == elseResult) { + return thenResult; + } + + // Get the node to connect the subresults. + MTBDD result = mtbdd_ite(sylvan_ithvar(topVariable), thenResult, elseResult); + + // Store the result in the cache. + signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + + return result; + } else { + + // If we are not within the state encoding any more, we hit the signature itself. + + // If we arrived at the constant zero node, then this was an illegal state encoding (we require + // all states to be non-deadlock). + if (mtbdd_iszero(signatureNode)) { + return signatureNode; + } + + // If this is the first time (in this traversal) that we encounter this signature, we check + // whether we can assign the old block number to it. + auto reuseCacheIt = reuseBlocksCache.find(partitionNode); + if (reuseCacheIt == reuseBlocksCache.end()) { + reuseBlocksCache.emplace(partitionNode, true); + signatureCache[std::make_pair(signatureNode, partitionNode)] = partitionNode; + return partitionNode; + } else { + MTBDD result; + { + storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex).template toAdd(); + ++nextFreeBlockIndex; + result = blockEncoding.getInternalAdd().getSylvanMtbdd().GetMTBDD(); + } + signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + return result; + } + } + } + + storm::dd::DdManager const& manager; + storm::dd::InternalDdManager const& internalDdManager; + storm::expressions::Variable const& blockVariable; + + // The last level that belongs to the state encoding in the DDs. + uint64_t lastStateLevel; + + // The current number of blocks of the new partition. + uint64_t nextFreeBlockIndex; + + // The number of completed refinements. + uint64_t numberOfRefinements; + + // The cache used to identify states with identical signature. + spp::sparse_hash_map, MTBDD, SylvanMTBDDPairHash> signatureCache; + + // The cache used to identify which old block numbers have already been reused. + spp::sparse_hash_map reuseBlocksCache; + }; + + template + SignatureRefiner::SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables) : manager(manager), stateVariables(stateVariables) { + uint64_t lastStateLevel = 0; + for (auto const& stateVariable : stateVariables) { + lastStateLevel = std::max(lastStateLevel, manager.getMetaVariable(stateVariable).getHighestLevel()); + } + + internalRefiner = std::make_unique>(manager, blockVariable, lastStateLevel); + } + + template + SignatureRefiner::~SignatureRefiner() = default; + + template + Partition SignatureRefiner::refine(Partition const& oldPartition, Signature const& signature) { + return internalRefiner->refine(oldPartition, signature); + } + + template class SignatureRefiner; + + template class SignatureRefiner; + template class SignatureRefiner; + template class SignatureRefiner; + + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.h b/src/storm/storage/dd/bisimulation/SignatureRefiner.h new file mode 100644 index 000000000..32532dc62 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.h @@ -0,0 +1,37 @@ +#pragma once + +#include "storm/storage/dd/DdType.h" + +#include "storm/storage/dd/bisimulation/Partition.h" +#include "storm/storage/dd/bisimulation/Signature.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class InternalSignatureRefiner; + + template + class SignatureRefiner { + public: + SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables); + + ~SignatureRefiner(); + + Partition refine(Partition const& oldPartition, Signature const& signature); + + private: + // The manager responsible for the DDs. + storm::dd::DdManager const& manager; + + // The variables encodin the states. + std::set const& stateVariables; + + // The internal refiner. + std::unique_ptr> internalRefiner; + }; + + } + } +} diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp index d02222df0..142381d36 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp @@ -209,6 +209,8 @@ namespace storm { summationAdds.push_back(ddVariable.toAdd().getCuddAdd()); } + return InternalAdd(ddManager, this->getCuddAdd().TimesPlus(otherMatrix.getCuddAdd(), summationAdds)); + return InternalAdd(ddManager, this->getCuddAdd().Triangle(otherMatrix.getCuddAdd(), summationAdds)); return InternalAdd(ddManager, this->getCuddAdd().MatrixMultiply(otherMatrix.getCuddAdd(), summationAdds)); } @@ -425,6 +427,11 @@ namespace storm { } } + template + InternalDdManager const& InternalAdd::getInternalDdManager() const { + return *ddManager; + } + template void InternalAdd::composeWithExplicitVector(storm::dd::Odd const& odd, std::vector const& ddVariableIndices, std::vector& targetVector, std::function const& function) const { composeWithExplicitVectorRec(this->getCuddDdNode(), nullptr, 0, ddVariableIndices.size(), 0, odd, ddVariableIndices, targetVector, function); diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.h b/src/storm/storage/dd/cudd/InternalCuddAdd.h index 360a7b0f9..2218e3f62 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.h @@ -38,12 +38,19 @@ namespace storm { template class AddIterator; + + namespace bisimulation { + template + class InternalSignatureRefiner; + } template class InternalAdd { public: friend class InternalBdd; + friend class bisimulation::InternalSignatureRefiner; + /*! * Creates an ADD that encapsulates the given CUDD ADD. * @@ -576,6 +583,8 @@ namespace storm { */ Odd createOdd(std::vector const& ddVariableIndices) const; + InternalDdManager const& getInternalDdManager() const; + private: /*! * Retrieves the CUDD ADD object associated with this ADD. diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.h b/src/storm/storage/dd/cudd/InternalCuddDdManager.h index 17d715206..404f577bf 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.h +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.h @@ -118,21 +118,21 @@ namespace storm { */ uint_fast64_t getNumberOfDdVariables() const; - private: /*! * Retrieves the underlying CUDD manager. * * @return The underlying CUDD manager. */ cudd::Cudd& getCuddManager(); - + /*! * Retrieves the underlying CUDD manager. * * @return The underlying CUDD manager. */ cudd::Cudd const& getCuddManager() const; - + + private: // The manager responsible for the DDs created/modified with this DdManager. cudd::Cudd cuddManager; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index dfa171eef..052fc2925 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -828,6 +828,11 @@ namespace storm { } } + template + InternalDdManager const& InternalAdd::getInternalDdManager() const { + return *ddManager; + } + template void InternalAdd::composeWithExplicitVector(storm::dd::Odd const& odd, std::vector const& ddVariableIndices, std::vector& targetVector, std::function const& function) const { composeWithExplicitVectorRec(mtbdd_regular(this->getSylvanMtbdd().GetMTBDD()), mtbdd_hascomp(this->getSylvanMtbdd().GetMTBDD()), nullptr, 0, ddVariableIndices.size(), 0, odd, ddVariableIndices, targetVector, function); diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h index 13b96d25a..d719462ea 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h @@ -586,6 +586,15 @@ namespace storm { */ Odd createOdd(std::vector const& ddVariableIndices) const; + InternalDdManager const& getInternalDdManager() const; + + /*! + * Retrieves the underlying sylvan MTBDD. + * + * @return The sylvan MTBDD. + */ + sylvan::Mtbdd getSylvanMtbdd() const; + private: /*! * Recursively builds the ODD from an ADD. @@ -721,13 +730,6 @@ namespace storm { */ static ValueType getValue(MTBDD const& node); - /*! - * Retrieves the underlying sylvan MTBDD. - * - * @return The sylvan MTBDD. - */ - sylvan::Mtbdd getSylvanMtbdd() const; - // The manager responsible for this MTBDD. InternalDdManager const* ddManager; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index c026fbb1f..38644c856 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -9,6 +9,7 @@ #include "storm/utility/constants.h" #include "storm/utility/macros.h" #include "storm/exceptions/NotSupportedException.h" +#include "storm/exceptions/InvalidSettingsException.h" #include "storm/utility/sylvan.h" @@ -47,7 +48,11 @@ namespace storm { // Compute the power of two that still fits within the total numbers to store. uint_fast64_t powerOfTwo = findLargestPowerOfTwoFitting(totalNodesToStore); - sylvan::Sylvan::initPackage(1ull << std::max(16ull, powerOfTwo > 24 ? powerOfTwo - 8 : 0ull), 1ull << (powerOfTwo - 1), 1ull << std::max(16ull, powerOfTwo > 24 ? powerOfTwo - 12 : 0ull), 1ull << (powerOfTwo - 1)); + STORM_LOG_THROW(powerOfTwo >= 16, storm::exceptions::InvalidSettingsException, "Too little memory assigned to sylvan."); + + STORM_LOG_TRACE("Assigning " << (1ull << (powerOfTwo - 1)) << " slots to both sylvan's unique table and its cache."); + sylvan::Sylvan::initPackage(1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); + sylvan::Sylvan::setGranularity(3); sylvan::Sylvan::initBdd(); sylvan::Sylvan::initMtbdd(); sylvan::Sylvan::initCustomMtbdd(); diff --git a/src/storm/utility/storm.h b/src/storm/utility/storm.h index 407c0b40c..af63624de 100644 --- a/src/storm/utility/storm.h +++ b/src/storm/utility/storm.h @@ -54,6 +54,7 @@ // Headers for model processing. #include "storm/storage/bisimulation/DeterministicModelBisimulationDecomposition.h" #include "storm/storage/bisimulation/NondeterministicModelBisimulationDecomposition.h" +#include "storm/storage/dd/BisimulationDecomposition.h" #include "storm/transformer/SymbolicToSparseTransformer.h" #include "storm/storage/ModelFormulasPair.h" #include "storm/storage/SymbolicModelDescription.h" @@ -167,20 +168,30 @@ namespace storm { template std::shared_ptr> buildSymbolicModel(storm::storage::SymbolicModelDescription const& model, std::vector> const& formulas) { + std::shared_ptr> result; if (model.isPrismProgram()) { typename storm::builder::DdPrismModelBuilder::Options options; options = typename storm::builder::DdPrismModelBuilder::Options(formulas); storm::builder::DdPrismModelBuilder builder; - return builder.build(model.asPrismProgram(), options); + result = builder.build(model.asPrismProgram(), options); } else { STORM_LOG_THROW(model.isJaniModel(), storm::exceptions::InvalidArgumentException, "Cannot build symbolic model for the given symbolic model description."); typename storm::builder::DdJaniModelBuilder::Options options; options = typename storm::builder::DdJaniModelBuilder::Options(formulas); storm::builder::DdJaniModelBuilder builder; - return builder.build(model.asJaniModel(), options); + result = builder.build(model.asJaniModel(), options); } + + if (storm::settings::getModule().isBisimulationSet()) { + storm::dd::BisimulationDecomposition decomposition(*result); + decomposition.compute(); + + // TODO build quotient and return it. + } + + return result; } template @@ -237,7 +248,6 @@ namespace storm { return performBisimulationMinimization(model, formulas , type); } - template std::shared_ptr preprocessModel(std::shared_ptr model, std::vector> const& formulas) { storm::utility::Stopwatch preprocessingWatch(true); diff --git a/src/test/storage/SymbolicBisimulationDecompositionTest.cpp b/src/test/storage/SymbolicBisimulationDecompositionTest.cpp new file mode 100644 index 000000000..4948f7906 --- /dev/null +++ b/src/test/storage/SymbolicBisimulationDecompositionTest.cpp @@ -0,0 +1,27 @@ +#include "gtest/gtest.h" +#include "storm-config.h" +#include "storm/parser/PrismParser.h" +#include "storm/storage/SymbolicModelDescription.h" +#include "storm/builder/DdPrismModelBuilder.h" +#include "storm/models/symbolic/Dtmc.h" +#include "storm/storage/dd/BisimulationDecomposition.h" + +TEST(SymbolicBisimulationDecompositionTest_Cudd, Die) { + storm::storage::SymbolicModelDescription modelDescription = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/die.pm"); + storm::prism::Program program = modelDescription.preprocess().asPrismProgram(); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(program); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::dd::bisimulation::Partition::create(*model, {"one"})); + decomposition.compute(); +} + +TEST(SymbolicBisimulationDecompositionTest_Cudd, Crowds) { + storm::storage::SymbolicModelDescription modelDescription = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/crowds-5-5.pm"); + storm::prism::Program program = modelDescription.preprocess().asPrismProgram(); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(program); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::dd::bisimulation::Partition::create(*model, {"observe0Greater1"})); + decomposition.compute(); +} From 28e91b8d0f456ab93dffc2a57d94960981304ca2 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 20 Apr 2017 22:15:01 +0200 Subject: [PATCH 02/95] more work on symbolic bisimulation --- resources/3rdparty/CMakeLists.txt | 2 +- .../storage/dd/BisimulationDecomposition.cpp | 84 +++++++++++++++++++ .../storage/dd/BisimulationDecomposition.h | 45 ++++++++++ src/storm/storage/dd/DdManager.cpp | 40 ++++++--- src/storm/storage/dd/DdManager.h | 4 +- .../storage/dd/bisimulation/Partition.cpp | 5 +- .../dd/bisimulation/SignatureRefiner.cpp | 31 +++++-- .../dd/sylvan/InternalSylvanDdManager.cpp | 11 ++- 8 files changed, 196 insertions(+), 26 deletions(-) create mode 100644 src/storm/storage/dd/BisimulationDecomposition.cpp create mode 100644 src/storm/storage/dd/BisimulationDecomposition.h diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 97a4b4e74..95df03f66 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -383,7 +383,7 @@ ExternalProject_Add( LOG_CONFIGURE ON LOG_BUILD ON BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/sylvan/src/libsylvan${STATIC_EXT} - BUILD_ALWAYS + BUILD_ALWAYS 1 ) ExternalProject_Get_Property(sylvan source_dir) ExternalProject_Get_Property(sylvan binary_dir) diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp new file mode 100644 index 000000000..dcc9c54b9 --- /dev/null +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -0,0 +1,84 @@ +#include "storm/storage/dd/BisimulationDecomposition.h" + +#include "storm/storage/dd/bisimulation/SignatureRefiner.h" + +#include "storm/utility/macros.h" +#include "storm/exceptions/InvalidOperationException.h" + +#include + +extern llmsset_t nodes; + +namespace storm { + namespace dd { + + using namespace bisimulation; + + template + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model) : status(Status::Initialized), model(model), currentPartition(bisimulation::Partition::create(model)) { + // Intentionally left empty. + } + + template + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), currentPartition(initialPartition) { + // Intentionally left empty. + } + + template + void BisimulationDecomposition::compute() { +// LACE_ME; + + auto partitionRefinementStart = std::chrono::high_resolution_clock::now(); + this->status = Status::InComputation; + + STORM_LOG_TRACE("Initial partition has " << currentPartition.getNumberOfBlocks() << " blocks."); +#ifndef NDEBUG + STORM_LOG_TRACE("Initial partition ADD has " << currentPartition.getPartitionAdd().getNodeCount() << " nodes."); +#endif + + SignatureRefiner refiner(model.getManager(), currentPartition.getBlockVariable(), model.getRowVariables()); + bool done = false; + uint64_t iterations = 0; + while (!done) { +// currentPartition.getPartitionAdd().exportToDot("part" + std::to_string(iterations) + ".dot"); + Signature signature(model.getTransitionMatrix().multiplyMatrix(currentPartition.getPartitionAdd(), model.getColumnVariables())); +// signature.getSignatureAdd().exportToDot("sig" + std::to_string(iterations) + ".dot"); +#ifndef NDEBUG + STORM_LOG_TRACE("Computed signature ADD with " << signature.getSignatureAdd().getNodeCount() << " nodes."); +#endif + + Partition newPartition = refiner.refine(currentPartition, signature); + + STORM_LOG_TRACE("New partition has " << newPartition.getNumberOfBlocks() << " blocks."); +#ifndef NDEBUG + STORM_LOG_TRACE("Computed new partition ADD with " << newPartition.getPartitionAdd().getNodeCount() << " nodes."); +#endif +// STORM_LOG_TRACE("Current #nodes in table " << llmsset_count_marked(nodes) << " of " << llmsset_get_size(nodes) << " BDD nodes."); + + if (currentPartition == newPartition) { + done = true; + } else { + currentPartition = newPartition; + } + ++iterations; + } + + this->status = Status::FixedPoint; + auto partitionRefinementEnd = std::chrono::high_resolution_clock::now(); + STORM_LOG_DEBUG("Partition refinement completed in " << std::chrono::duration_cast(partitionRefinementEnd - partitionRefinementStart).count() << "ms (" << iterations << " iterations)."); + } + + template + std::shared_ptr> BisimulationDecomposition::getQuotient() const { + STORM_LOG_THROW(this->status == Status::FixedPoint, storm::exceptions::InvalidOperationException, "Cannot extract quotient, because bisimulation decomposition was not completed."); + return nullptr; + } + + template class BisimulationDecomposition; + + template class BisimulationDecomposition; + template class BisimulationDecomposition; + template class BisimulationDecomposition; + + } +} diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h new file mode 100644 index 000000000..131a672e1 --- /dev/null +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -0,0 +1,45 @@ +#pragma once + +#include "storm/storage/dd/DdType.h" + +#include "storm/models/symbolic/Model.h" + +#include "storm/storage/dd/bisimulation/Partition.h" + +namespace storm { + namespace dd { + + template + class BisimulationDecomposition { + public: + enum class Status { + Initialized, InComputation, FixedPoint + }; + + BisimulationDecomposition(storm::models::symbolic::Model const& model); + + BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition); + + /*! + * Computes the decomposition. + */ + void compute(); + + /*! + * Retrieves the quotient model after the bisimulation decomposition was computed. + */ + std::shared_ptr> getQuotient() const; + + private: + // The status of the computation. + Status status; + + // The model for which to compute the bisimulation decomposition. + storm::models::symbolic::Model const& model; + + // The current partition in the partition refinement process. Initially set to the initial partition. + bisimulation::Partition currentPartition; + }; + + } +} diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index 361594a4b..8b38d84ac 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -56,7 +56,7 @@ namespace storm { } template - Bdd DdManager::getEncoding(storm::expressions::Variable const& variable, int_fast64_t value) const { + Bdd DdManager::getEncoding(storm::expressions::Variable const& variable, int_fast64_t value, bool mostSignificantBitAtTop) const { DdMetaVariable const& metaVariable = this->getMetaVariable(variable); STORM_LOG_THROW(value >= metaVariable.getLow() && value <= metaVariable.getHigh(), storm::exceptions::InvalidArgumentException, "Illegal value " << value << " for meta variable '" << variable.getName() << "'."); @@ -67,17 +67,35 @@ namespace storm { std::vector> const& ddVariables = metaVariable.getDdVariables(); Bdd result; - if (value & (1ull << (ddVariables.size() - 1))) { - result = ddVariables[0]; + if (mostSignificantBitAtTop) { + if (value & (1ull << (ddVariables.size() - 1))) { + result = ddVariables[0]; + } else { + result = !ddVariables[0]; + } + + for (std::size_t i = 1; i < ddVariables.size(); ++i) { + if (value & (1ull << (ddVariables.size() - i - 1))) { + result &= ddVariables[i]; + } else { + result &= !ddVariables[i]; + } + } } else { - result = !ddVariables[0]; - } - - for (std::size_t i = 1; i < ddVariables.size(); ++i) { - if (value & (1ull << (ddVariables.size() - i - 1))) { - result &= ddVariables[i]; + if (value & 1ull) { + result = ddVariables[0]; } else { - result &= !ddVariables[i]; + result = !ddVariables[0]; + } + value >>= 1; + + for (std::size_t i = 1; i < ddVariables.size(); ++i) { + if (value & 1ull) { + result &= ddVariables[i]; + } else { + result &= !ddVariables[i]; + } + value >>= 1; } } @@ -164,6 +182,8 @@ namespace storm { ++numberOfBits; } + STORM_LOG_TRACE("Creating meta variable with " << numberOfBits << " bit(s) and " << numberOfLayers << " layer(s)."); + std::stringstream tmp1; std::vector result; for (uint64 layer = 0; layer < numberOfLayers; ++layer) { diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index 24e737ee0..5bce645dd 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -94,10 +94,12 @@ namespace storm { * * @param variable The expression variable associated with the meta variable. * @param value The value the meta variable is supposed to have. + * @param mostSignificantBitAtTop A flag indicating whether the most significant bit of the value is to be + * encoded with the topmost variable or the bottommost. * @return The DD representing the function that maps all inputs which have the given meta variable equal * to the given value one. */ - Bdd getEncoding(storm::expressions::Variable const& variable, int_fast64_t value) const; + Bdd getEncoding(storm::expressions::Variable const& variable, int_fast64_t value, bool mostSignificantBitAtTop = true) const; /*! * Retrieves the BDD representing the range of the meta variable, i.e., a function that maps all legal values diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index 6ba1c2ca9..d2dbdb42a 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -90,10 +90,13 @@ namespace storm { // Enumerate all realizable blocks. enumerateBlocksRec(stateSets, model.getReachableStates(), 0, blockVariable, [&manager, &partitionAdd, &blockVariable, &blockCount](storm::dd::Bdd const& stateSet) { stateSet.template toAdd().exportToDot("states_" + std::to_string(blockCount) + ".dot"); - partitionAdd += (stateSet && manager.getEncoding(blockVariable, blockCount)).template toAdd(); + partitionAdd += (stateSet && manager.getEncoding(blockVariable, blockCount, false)).template toAdd(); blockCount++; } ); + // Move the partition over to the primed variables. + partitionAdd = partitionAdd.swapVariables(model.getRowColumnMetaVariablePairs()); + return std::make_pair(partitionAdd, blockCount); } diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 2ac0dd22c..8695f14a1 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -75,7 +75,7 @@ namespace storm { } // Determine the levels in the DDs. - uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode); + uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode) - 1; uint64_t signatureVariable = Cudd_NodeReadIndex(signatureNode); uint64_t partitionLevel = Cudd_ReadPerm(ddman, partitionVariable); uint64_t signatureLevel = Cudd_ReadPerm(ddman, signatureVariable); @@ -111,7 +111,7 @@ namespace storm { } // Get the node to connect the subresults. - DdNode* var = Cudd_addIthVar(ddman, topVariable); + DdNode* var = Cudd_addIthVar(ddman, topVariable + 1); Cudd_Ref(var); DdNode* result = Cudd_addIte(ddman, var, thenResult, elseResult); Cudd_Ref(result); @@ -144,7 +144,7 @@ namespace storm { } else { DdNode* result; { - storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex).template toAdd(); + storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); ++nextFreeBlockIndex; result = blockEncoding.getInternalAdd().getCuddDdNode(); Cudd_Ref(result); @@ -175,8 +175,7 @@ namespace storm { // The cache used to identify which old block numbers have already been reused. spp::sparse_hash_map reuseBlocksCache; }; - - + template class InternalSignatureRefiner { public: @@ -219,7 +218,7 @@ namespace storm { // Determine levels in the DDs. BDDVAR signatureVariable = mtbdd_isleaf(signatureNode) ? 0xffffffff : sylvan_var(signatureNode); - BDDVAR partitionVariable = sylvan_var(partitionNode); + BDDVAR partitionVariable = mtbdd_isleaf(signatureNode) ? 0xffffffff : sylvan_var(partitionNode) - 1; BDDVAR topVariable = std::min(signatureVariable, partitionVariable); // Check whether the top variable is still within the state encoding. @@ -229,25 +228,37 @@ namespace storm { MTBDD elseResult; if (partitionVariable < signatureVariable) { thenResult = refine(sylvan_high(partitionNode), signatureNode); + sylvan_protect(&thenResult); elseResult = refine(sylvan_low(partitionNode), signatureNode); + sylvan_protect(&elseResult); } else if (partitionVariable > signatureVariable) { thenResult = refine(partitionNode, sylvan_high(signatureNode)); + sylvan_protect(&thenResult); elseResult = refine(partitionNode, sylvan_low(signatureNode)); + sylvan_protect(&elseResult); } else { thenResult = refine(sylvan_high(partitionNode), sylvan_high(signatureNode)); + sylvan_protect(&thenResult); elseResult = refine(sylvan_low(partitionNode), sylvan_low(signatureNode)); + sylvan_protect(&elseResult); } if (thenResult == elseResult) { + sylvan_unprotect(&thenResult); + sylvan_unprotect(&elseResult); return thenResult; } // Get the node to connect the subresults. - MTBDD result = mtbdd_ite(sylvan_ithvar(topVariable), thenResult, elseResult); + MTBDD result = sylvan_makenode(topVariable + 1, elseResult, thenResult);// mtbdd_ite(sylvan_ithvar(topVariable), thenResult, elseResult); + sylvan_protect(&result); + sylvan_unprotect(&thenResult); + sylvan_unprotect(&elseResult); // Store the result in the cache. signatureCache[std::make_pair(signatureNode, partitionNode)] = result; - + + sylvan_unprotect(&result); return result; } else { @@ -269,11 +280,13 @@ namespace storm { } else { MTBDD result; { - storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex).template toAdd(); + storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); ++nextFreeBlockIndex; result = blockEncoding.getInternalAdd().getSylvanMtbdd().GetMTBDD(); + sylvan_protect(&result); } signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + sylvan_unprotect(&result); return result; } } diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 38644c856..9d1cac0e8 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -36,9 +36,9 @@ namespace storm { if (numberOfInstances == 0) { storm::settings::modules::SylvanSettings const& settings = storm::settings::getModule(); if (settings.isNumberOfThreadsSet()) { - lace_init(settings.getNumberOfThreads(), 1000000); + lace_init(settings.getNumberOfThreads(), 1024*1024*16); } else { - lace_init(0, 1000000); + lace_init(0, 1024*1024*16); } lace_startup(0, 0, 0); @@ -50,8 +50,11 @@ namespace storm { STORM_LOG_THROW(powerOfTwo >= 16, storm::exceptions::InvalidSettingsException, "Too little memory assigned to sylvan."); - STORM_LOG_TRACE("Assigning " << (1ull << (powerOfTwo - 1)) << " slots to both sylvan's unique table and its cache."); - sylvan::Sylvan::initPackage(1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); + if ((((1ull << powerOfTwo) + (1ull << (powerOfTwo - 1)))) < totalNodesToStore) { + sylvan::Sylvan::initPackage(1ull << powerOfTwo, 1ull << powerOfTwo, 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); + } else { + sylvan::Sylvan::initPackage(1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); + } sylvan::Sylvan::setGranularity(3); sylvan::Sylvan::initBdd(); sylvan::Sylvan::initMtbdd(); From 8f42bd2ec062a05f30e4a4b83bd7800b2f9c6066 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 6 May 2017 16:12:00 +0200 Subject: [PATCH 03/95] moved to new sparsepp version and made the appropriate changes --- resources/3rdparty/CMakeLists.txt | 31 +- resources/3rdparty/sparsepp/README.md | 29 +- resources/3rdparty/sparsepp/makefile | 17 - resources/3rdparty/sparsepp/sparsepp.h | 5578 ----------------- resources/3rdparty/sparsepp/spp_test.cc | 2982 --------- resources/3rdparty/sparsepp/spp_utils.h | 318 - .../src/sylvan_storm_rational_function.c | 4 + .../sylvan/src/sylvan_storm_rational_number.c | 4 + .../jit/ExplicitJitJaniModelBuilder.cpp | 5 +- .../builder/jit/ExplicitJitJaniModelBuilder.h | 3 + .../settings/modules/BisimulationSettings.cpp | 2 + .../settings/modules/BisimulationSettings.h | 2 + src/storm/storage/dd/Add.cpp | 19 +- src/storm/storage/dd/Add.h | 13 +- src/storm/storage/dd/Bdd.cpp | 5 + src/storm/storage/dd/Bdd.h | 23 +- .../storage/dd/BisimulationDecomposition.cpp | 45 +- src/storm/storage/dd/DdManager.cpp | 14 +- src/storm/storage/dd/DdManager.h | 8 + .../storage/dd/bisimulation/Partition.cpp | 64 +- src/storm/storage/dd/bisimulation/Partition.h | 39 +- .../dd/bisimulation/SignatureComputer.cpp | 32 + .../dd/bisimulation/SignatureComputer.h | 29 + .../dd/bisimulation/SignatureRefiner.cpp | 328 +- src/storm/storage/dd/cudd/InternalCuddAdd.cpp | 9 +- src/storm/storage/dd/cudd/InternalCuddAdd.h | 12 +- .../storage/dd/cudd/InternalCuddDdManager.cpp | 9 +- .../storage/dd/cudd/InternalCuddDdManager.h | 10 +- .../storage/dd/sylvan/InternalSylvanAdd.cpp | 40 +- .../storage/dd/sylvan/InternalSylvanAdd.h | 12 +- .../storage/dd/sylvan/InternalSylvanBdd.h | 27 +- .../dd/sylvan/InternalSylvanDdManager.cpp | 49 +- .../dd/sylvan/InternalSylvanDdManager.h | 8 + src/storm/storage/geometry/NativePolytope.cpp | 2 +- 34 files changed, 671 insertions(+), 9101 deletions(-) delete mode 100644 resources/3rdparty/sparsepp/makefile delete mode 100644 resources/3rdparty/sparsepp/sparsepp.h delete mode 100644 resources/3rdparty/sparsepp/spp_test.cc delete mode 100644 resources/3rdparty/sparsepp/spp_utils.h create mode 100644 src/storm/storage/dd/bisimulation/SignatureComputer.cpp create mode 100644 src/storm/storage/dd/bisimulation/SignatureComputer.h diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index e8365d073..12f665794 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -99,16 +99,24 @@ list(APPEND STORM_DEP_TARGETS ExprTk) # Use the shipped version of Sparsepp message (STATUS "Storm - Including Sparsepp.") -include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp") - -# Add sparsepp.h to the headers that are copied to the include directory in thebuild directory. -add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp - COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h - DEPENDS ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h -) -list(APPEND STORM_RESOURCES_HEADERS "${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h") +set(SPARSEPP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp") +file(GLOB SPARSEPP_HEADERS "${SPARSEPP_INCLUDE_DIR}/*.h") + +# Add the sparsepp headers to the headers that are copied to the include directory in the build directory. +set(SPARSEPP_BINDIR_DIR ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp) +include_directories("${SPARSEPP_BINDIR_DIR}") +foreach(HEADER ${SPARSEPP_HEADERS}) + string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER}) + string(REGEX MATCH "(.*)[/\\]" RELATIVE_DIRECTORY ${RELATIVE_HEADER_PATH}) + string(REGEX REPLACE "${RELATIVE_DIRECTORY}/?" "" HEADER_FILENAME ${RELATIVE_HEADER_PATH}) + add_custom_command( + OUTPUT ${SPARSEPP_BINDIR_DIR}/sparsepp/${HEADER_FILENAME} + COMMAND ${CMAKE_COMMAND} -E make_directory ${SPARSEPP_BINDIR_DIR}/sparsepp + COMMAND ${CMAKE_COMMAND} -E copy ${HEADER} ${SPARSEPP_BINDIR_DIR}/sparsepp/${HEADER_FILENAME} + DEPENDS ${SPARSEPP_INCLUDE_DIR}/${HEADER_FILENAME} + ) + list(APPEND SPARSEPP_BINDIR_HEADERS ${SPARSEPP_BINDIR_DIR}/sparsepp/${HEADER_FILENAME}) +endforeach() ############################################################# ## @@ -380,7 +388,6 @@ ExternalProject_Add( LOG_CONFIGURE ON LOG_BUILD ON BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/sylvan/src/libsylvan${STATIC_EXT} - BUILD_ALWAYS 1 ) ExternalProject_Get_Property(sylvan source_dir) @@ -626,4 +633,4 @@ if(ENABLE_CUDA) include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/") endif() -add_custom_target(copy_resources_headers DEPENDS ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h) +add_custom_target(copy_resources_headers DEPENDS ${SPARSEPP_BINDIR_HEADERS}) diff --git a/resources/3rdparty/sparsepp/README.md b/resources/3rdparty/sparsepp/README.md index 241b116b0..224bb5175 100644 --- a/resources/3rdparty/sparsepp/README.md +++ b/resources/3rdparty/sparsepp/README.md @@ -8,7 +8,7 @@ Sparsepp is derived from Google's excellent [sparsehash](https://github.com/spar - **Extremely low memory usage** (typically about one byte overhead per entry). - **Very efficient**, typically faster than your compiler's unordered map/set or Boost's. - **C++11 support** (if supported by compiler). -- **Single header** implementation - just copy `sparsepp.h` to your project and include it. +- ~~Single header~~ not anymore - **Tested** on Windows (vs2010-2015, g++), linux (g++, clang++) and MacOS (clang++). We believe Sparsepp provides an unparalleled combination of performance and memory usage, and will outperform your compiler's unordered_map on both counts. Only Google's `dense_hash_map` is consistently faster, at the cost of much greater memory usage (especially when the final size of the map is not known in advance). @@ -20,7 +20,7 @@ For a detailed comparison of various hash implementations, including Sparsepp, p ```c++ #include #include -#include +#include using spp::sparse_hash_map; @@ -50,9 +50,7 @@ int main() ## Installation -Since the full Sparsepp implementation is contained in a single header file `sparsepp.h`, the installation consist in copying this header file wherever it will be convenient to include in your project(s). - -Optionally, a second header file `spp_utils.h` is provided, which implements only the spp::hash_combine() functionality. This is useful when we want to specify a hash function for a user-defined class in an header file, without including the full `sparsepp.h` header (this is demonstrated in [example 2](#example-2---providing-a-hash-function-for-a-user-defined-class) below). +No compilation is needed, as this is a header-only library. The installation consist in copying the sparsepp directory wherever it will be convenient to include in your project(s). Also make the path to this directory is provided to the compiler with the `-I` option. ## Warning - iterator invalidation on erase/insert @@ -62,7 +60,7 @@ Optionally, a second header file `spp_utils.h` is provided, which implements onl ## Usage -As shown in the example above, you need to include the header file: `#include ` +As shown in the example above, you need to include the header file: `#include ` This provides the implementation for the following classes: @@ -107,7 +105,7 @@ These classes provide the same interface as std::unordered_map and std::unordere Of course, the user of sparsepp may provide its own hash function, as shown below: ```c++ - #include + #include struct Hash64 { size_t operator()(uint64_t k) const { return (k ^ 14695981039346656037ULL) * 1099511628211ULL; } @@ -125,7 +123,7 @@ These classes provide the same interface as std::unordered_map and std::unordere ``` -2. When the user provides its own hash function, for example when inserting custom classes into a hash map, sometimes the resulting hash keys have similar low order bits and cause many collisions, decreasing the efficiency of the hash map. To address this use case, sparsepp provides an optional 'mixing' of the hash key (see [Integer Hash Function](https://gist.github.com/badboy/6267743) which can be enabled by defining the proprocessor macro: SPP_HASH_MIX. +2. When the user provides its own hash function, for example when inserting custom classes into a hash map, sometimes the resulting hash keys have similar low order bits and cause many collisions, decreasing the efficiency of the hash map. To address this use case, sparsepp provides an optional 'mixing' of the hash key (see [Integer Hash Function](https://gist.github.com/badboy/6267743) which can be enabled by defining the proprocessor macro: SPP_MIX_HASH. ## Example 2 - providing a hash function for a user-defined class @@ -135,7 +133,7 @@ In order to use a sparse_hash_set or sparse_hash_map, a hash function should be #include #include #include -#include "sparsepp.h" +#include using std::string; @@ -179,11 +177,11 @@ int main() The `std::hash` specialization for `Person` combines the hash values for both first and last name using the convenient spp::hash_combine function, and returns the combined hash value. -spp::hash_combine is provided by the header `sparsepp.h`. However, class definitions often appear in header files, and it is desirable to limit the size of headers included in such header files, so we provide the very small header `spp_utils.h` for that purpose: +spp::hash_combine is provided by the header `sparsepp/spp.h`. However, class definitions often appear in header files, and it is desirable to limit the size of headers included in such header files, so we provide the very small header `sparsepp/spp_utils.h` for that purpose: ```c++ #include -#include "spp_utils.h" +#include using std::string; @@ -236,7 +234,7 @@ The following example demontrates how a simple sparse_hash_map can be written to ```c++ #include -#include "sparsepp.h" +#include using spp::sparse_hash_map; using namespace std; @@ -319,5 +317,12 @@ int main(int argc, char* argv[]) } ``` +## Thread safety + +Sparsepp follows the trade safety rules of the Standard C++ library. In Particular: + +- A single sparsepp hash table is thread safe for reading from multiple threads. For example, given a hash table A, it is safe to read A from thread 1 and from thread 2 simultaneously. +- If a single hash table is being written to by one thread, then all reads and writes to that hash table on the same or other threads must be protected. For example, given a hash table A, if thread 1 is writing to A, then thread 2 must be prevented from reading from or writing to A. +- It is safe to read and write to one instance of a type even if another thread is reading or writing to a different instance of the same type. For example, given hash tables A and B of the same type, it is safe if A is being written in thread 1 and B is being read in thread 2. diff --git a/resources/3rdparty/sparsepp/makefile b/resources/3rdparty/sparsepp/makefile deleted file mode 100644 index eed3e5bca..000000000 --- a/resources/3rdparty/sparsepp/makefile +++ /dev/null @@ -1,17 +0,0 @@ -all: spp_test - -clean: - /bin/rm spp_test - -test: - ./spp_test - -spp_test: spp_test.cc sparsepp.h makefile - $(CXX) -O2 -std=c++0x -Wall -pedantic -Wextra -D_XOPEN_SOURCE=700 -D_CRT_SECURE_NO_WARNINGS spp_test.cc -o spp_test - -spp_alloc_test: spp_alloc_test.cc spp_alloc.h spp_bitset.h sparsepp.h makefile - $(CXX) -O2 -DNDEBUG -std=c++11 spp_alloc_test.cc -o spp_alloc_test - -perftest1: perftest1.cc sparsepp.h makefile - $(CXX) -O2 -DNDEBUG -std=c++11 perftest1.cc -o perftest1 - diff --git a/resources/3rdparty/sparsepp/sparsepp.h b/resources/3rdparty/sparsepp/sparsepp.h deleted file mode 100644 index 8fc36ce47..000000000 --- a/resources/3rdparty/sparsepp/sparsepp.h +++ /dev/null @@ -1,5578 +0,0 @@ -#if !defined(sparsepp_h_guard_) -#define sparsepp_h_guard_ - - -// ---------------------------------------------------------------------- -// Copyright (c) 2016, Gregory Popovitch - greg7mdp@gmail.com -// All rights reserved. -// -// This work is derived from Google's sparsehash library -// -// Copyright (c) 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// ---------------------------------------------------------------------- - - -// --------------------------------------------------------------------------- -// Compiler detection code (SPP_ proprocessor macros) derived from Boost -// libraries. Therefore Boost software licence reproduced below. -// --------------------------------------------------------------------------- -// Boost Software License - Version 1.0 - August 17th, 2003 -// -// Permission is hereby granted, free of charge, to any person or organization -// obtaining a copy of the software and accompanying documentation covered by -// this license (the "Software") to use, reproduce, display, distribute, -// execute, and transmit the Software, and to prepare derivative works of the -// Software, and to permit third-parties to whom the Software is furnished to -// do so, all subject to the following: -// -// The copyright notices in the Software and this entire statement, including -// the above license grant, this restriction and the following disclaimer, -// must be included in all copies of the Software, in whole or in part, and -// all derivative works of the Software, unless such copies or derivative -// works are solely in the form of machine-executable object code generated by -// a source language processor. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// --------------------------------------------------------------------------- - - -// some macros for portability -// --------------------------- -#define spp_ spp -#define SPP_NAMESPACE spp_ -#define SPP_START_NAMESPACE namespace spp { -#define SPP_END_NAMESPACE } -#define SPP_GROUP_SIZE 32 // must be 32 or 64 -#define SPP_ALLOC_SZ 0 // must be power of 2 (0 = agressive alloc, 1 = smallest memory usage, 2 = good compromise) -#define SPP_STORE_NUM_ITEMS 1 // little bit more memory, but faster!! - -#if (SPP_GROUP_SIZE == 32) - #define SPP_SHIFT_ 5 - #define SPP_MASK_ 0x1F -#elif (SPP_GROUP_SIZE == 64) - #define SPP_SHIFT_ 6 - #define SPP_MASK_ 0x3F -#else - #error "SPP_GROUP_SIZE must be either 32 or 64" -#endif - -// Boost like configuration -// ------------------------ -#if defined __clang__ - - #if defined(i386) - #include - inline void spp_cpuid(int info[4], int InfoType) { - __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); - } - #endif - - #define SPP_POPCNT __builtin_popcount - #define SPP_POPCNT64 __builtin_popcountll - - #define SPP_HAS_CSTDINT - - #ifndef __has_extension - #define __has_extension __has_feature - #endif - - #if !__has_feature(cxx_exceptions) && !defined(SPP_NO_EXCEPTIONS) - #define SPP_NO_EXCEPTIONS - #endif - - #if !__has_feature(cxx_rtti) && !defined(SPP_NO_RTTI) - #define SPP_NO_RTTI - #endif - - #if !__has_feature(cxx_rtti) && !defined(SPP_NO_TYPEID) - #define SPP_NO_TYPEID - #endif - - #if defined(__int64) && !defined(__GNUC__) - #define SPP_HAS_MS_INT64 - #endif - - #define SPP_HAS_NRVO - - // Branch prediction hints - #if defined(__has_builtin) - #if __has_builtin(__builtin_expect) - #define SPP_LIKELY(x) __builtin_expect(x, 1) - #define SPP_UNLIKELY(x) __builtin_expect(x, 0) - #endif - #endif - - // Clang supports "long long" in all compilation modes. - #define SPP_HAS_LONG_LONG - - #if !__has_feature(cxx_constexpr) - #define SPP_NO_CXX11_CONSTEXPR - #endif - - #if !__has_feature(cxx_decltype) - #define SPP_NO_CXX11_DECLTYPE - #endif - - #if !__has_feature(cxx_decltype_incomplete_return_types) - #define SPP_NO_CXX11_DECLTYPE_N3276 - #endif - - #if !__has_feature(cxx_defaulted_functions) - #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS - #endif - - #if !__has_feature(cxx_deleted_functions) - #define SPP_NO_CXX11_DELETED_FUNCTIONS - #endif - - #if !__has_feature(cxx_explicit_conversions) - #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS - #endif - - #if !__has_feature(cxx_default_function_template_args) - #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS - #endif - - #if !__has_feature(cxx_generalized_initializers) - #define SPP_NO_CXX11_HDR_INITIALIZER_LIST - #endif - - #if !__has_feature(cxx_lambdas) - #define SPP_NO_CXX11_LAMBDAS - #endif - - #if !__has_feature(cxx_local_type_template_args) - #define SPP_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS - #endif - - #if !__has_feature(cxx_nullptr) - #define SPP_NO_CXX11_NULLPTR - #endif - - #if !__has_feature(cxx_range_for) - #define SPP_NO_CXX11_RANGE_BASED_FOR - #endif - - #if !__has_feature(cxx_raw_string_literals) - #define SPP_NO_CXX11_RAW_LITERALS - #endif - - #if !__has_feature(cxx_reference_qualified_functions) - #define SPP_NO_CXX11_REF_QUALIFIERS - #endif - - #if !__has_feature(cxx_generalized_initializers) - #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - #endif - - #if !__has_feature(cxx_rvalue_references) - #define SPP_NO_CXX11_RVALUE_REFERENCES - #endif - - #if !__has_feature(cxx_strong_enums) - #define SPP_NO_CXX11_SCOPED_ENUMS - #endif - - #if !__has_feature(cxx_static_assert) - #define SPP_NO_CXX11_STATIC_ASSERT - #endif - - #if !__has_feature(cxx_alias_templates) - #define SPP_NO_CXX11_TEMPLATE_ALIASES - #endif - - #if !__has_feature(cxx_unicode_literals) - #define SPP_NO_CXX11_UNICODE_LITERALS - #endif - - #if !__has_feature(cxx_variadic_templates) - #define SPP_NO_CXX11_VARIADIC_TEMPLATES - #endif - - #if !__has_feature(cxx_user_literals) - #define SPP_NO_CXX11_USER_DEFINED_LITERALS - #endif - - #if !__has_feature(cxx_alignas) - #define SPP_NO_CXX11_ALIGNAS - #endif - - #if !__has_feature(cxx_trailing_return) - #define SPP_NO_CXX11_TRAILING_RESULT_TYPES - #endif - - #if !__has_feature(cxx_inline_namespaces) - #define SPP_NO_CXX11_INLINE_NAMESPACES - #endif - - #if !__has_feature(cxx_override_control) - #define SPP_NO_CXX11_FINAL - #endif - - #if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) - #define SPP_NO_CXX14_BINARY_LITERALS - #endif - - #if !__has_feature(__cxx_decltype_auto__) - #define SPP_NO_CXX14_DECLTYPE_AUTO - #endif - - #if !__has_feature(__cxx_aggregate_nsdmi__) - #define SPP_NO_CXX14_AGGREGATE_NSDMI - #endif - - #if !__has_feature(__cxx_init_captures__) - #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES - #endif - - #if !__has_feature(__cxx_generic_lambdas__) - #define SPP_NO_CXX14_GENERIC_LAMBDAS - #endif - - - #if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) - #define SPP_NO_CXX14_CONSTEXPR - #endif - - #if !__has_feature(__cxx_return_type_deduction__) - #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION - #endif - - #if !__has_feature(__cxx_variable_templates__) - #define SPP_NO_CXX14_VARIABLE_TEMPLATES - #endif - - #if __cplusplus < 201400 - #define SPP_NO_CXX14_DIGIT_SEPARATORS - #endif - - #if defined(__has_builtin) && __has_builtin(__builtin_unreachable) - #define SPP_UNREACHABLE_RETURN(x) __builtin_unreachable(); - #endif - - #define SPP_ATTRIBUTE_UNUSED __attribute__((__unused__)) - - #ifndef SPP_COMPILER - #define SPP_COMPILER "Clang version " __clang_version__ - #endif - - #define SPP_CLANG 1 - - -#elif defined __GNUC__ - - #define SPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) - - // definition to expand macro then apply to pragma message - // #define VALUE_TO_STRING(x) #x - // #define VALUE(x) VALUE_TO_STRING(x) - // #define VAR_NAME_VALUE(var) #var "=" VALUE(var) - // #pragma message(VAR_NAME_VALUE(SPP_GCC_VERSION)) - - #if defined(i386) - #include - inline void spp_cpuid(int info[4], int InfoType) { - __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); - } - #endif - - // __POPCNT__ defined when the compiled with popcount support - // (-mpopcnt compiler option is given for example) - #ifdef __POPCNT__ - // slower unless compiled iwith -mpopcnt - #define SPP_POPCNT __builtin_popcount - #define SPP_POPCNT64 __builtin_popcountll - #endif - - #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) - #define SPP_GCC_CXX11 - #endif - - #if __GNUC__ == 3 - #if defined (__PATHSCALE__) - #define SPP_NO_TWO_PHASE_NAME_LOOKUP - #define SPP_NO_IS_ABSTRACT - #endif - - #if __GNUC_MINOR__ < 4 - #define SPP_NO_IS_ABSTRACT - #endif - - #define SPP_NO_CXX11_EXTERN_TEMPLATE - #endif - - #if __GNUC__ < 4 - // - // All problems to gcc-3.x and earlier here: - // - #define SPP_NO_TWO_PHASE_NAME_LOOKUP - #ifdef __OPEN64__ - #define SPP_NO_IS_ABSTRACT - #endif - #endif - - // GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links - #if SPP_GCC_VERSION >= 30400 - #define SPP_HAS_PRAGMA_ONCE - #endif - - #if SPP_GCC_VERSION < 40400 - // Previous versions of GCC did not completely implement value-initialization: - // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize - // members", reported by Jonathan Wakely in 2006, - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) - // GCC Bug 33916, "Default constructor fails to initialize array members", - // reported by Michael Elizabeth Chastain in 2007, - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) - // See also: http://www.boost.org/libs/utility/value_init.htm #compiler_issues - #define SPP_NO_COMPLETE_VALUE_INITIALIZATION - #endif - - #if !defined(__EXCEPTIONS) && !defined(SPP_NO_EXCEPTIONS) - #define SPP_NO_EXCEPTIONS - #endif - - // - // Threading support: Turn this on unconditionally here (except for - // those platforms where we can know for sure). It will get turned off again - // later if no threading API is detected. - // - #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) - #define SPP_HAS_THREADS - #endif - - // - // gcc has "long long" - // Except on Darwin with standard compliance enabled (-pedantic) - // Apple gcc helpfully defines this macro we can query - // - #if !defined(__DARWIN_NO_LONG_LONG) - #define SPP_HAS_LONG_LONG - #endif - - // - // gcc implements the named return value optimization since version 3.1 - // - #define SPP_HAS_NRVO - - // Branch prediction hints - #define SPP_LIKELY(x) __builtin_expect(x, 1) - #define SPP_UNLIKELY(x) __builtin_expect(x, 0) - - // - // Dynamic shared object (DSO) and dynamic-link library (DLL) support - // - #if __GNUC__ >= 4 - #if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) - // All Win32 development environments, including 64-bit Windows and MinGW, define - // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, - // so does not define _WIN32 or its variants. - #define SPP_HAS_DECLSPEC - #define SPP_SYMBOL_EXPORT __attribute__((__dllexport__)) - #define SPP_SYMBOL_IMPORT __attribute__((__dllimport__)) - #else - #define SPP_SYMBOL_EXPORT __attribute__((__visibility__("default"))) - #define SPP_SYMBOL_IMPORT - #endif - - #define SPP_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) - #else - // config/platform/win32.hpp will define SPP_SYMBOL_EXPORT, etc., unless already defined - #define SPP_SYMBOL_EXPORT - #endif - - // - // RTTI and typeinfo detection is possible post gcc-4.3: - // - #if SPP_GCC_VERSION > 40300 - #ifndef __GXX_RTTI - #ifndef SPP_NO_TYPEID - #define SPP_NO_TYPEID - #endif - #ifndef SPP_NO_RTTI - #define SPP_NO_RTTI - #endif - #endif - #endif - - // - // Recent GCC versions have __int128 when in 64-bit mode. - // - // We disable this if the compiler is really nvcc with C++03 as it - // doesn't actually support __int128 as of CUDA_VERSION=7500 - // even though it defines __SIZEOF_INT128__. - // See https://svn.boost.org/trac/boost/ticket/8048 - // https://svn.boost.org/trac/boost/ticket/11852 - // Only re-enable this for nvcc if you're absolutely sure - // of the circumstances under which it's supported: - // - #if defined(__CUDACC__) - #if defined(SPP_GCC_CXX11) - #define SPP_NVCC_CXX11 - #else - #define SPP_NVCC_CXX03 - #endif - #endif - - #if defined(__SIZEOF_INT128__) && !defined(SPP_NVCC_CXX03) - #define SPP_HAS_INT128 - #endif - // - // Recent GCC versions have a __float128 native type, we need to - // include a std lib header to detect this - not ideal, but we'll - // be including later anyway when we select the std lib. - // - // Nevertheless, as of CUDA 7.5, using __float128 with the host - // compiler in pre-C++11 mode is still not supported. - // See https://svn.boost.org/trac/boost/ticket/11852 - // - #ifdef __cplusplus - #include - #else - #include - #endif - - #if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(SPP_NVCC_CXX03) - #define SPP_HAS_FLOAT128 - #endif - - // C++0x features in 4.3.n and later - // - #if (SPP_GCC_VERSION >= 40300) && defined(SPP_GCC_CXX11) - // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are - // passed on the command line, which in turn defines - // __GXX_EXPERIMENTAL_CXX0X__. - #define SPP_HAS_DECLTYPE - #define SPP_HAS_RVALUE_REFS - #define SPP_HAS_STATIC_ASSERT - #define SPP_HAS_VARIADIC_TMPL - #define SPP_HAS_CSTDINT - #else - #define SPP_NO_CXX11_DECLTYPE - #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS - #define SPP_NO_CXX11_RVALUE_REFERENCES - #define SPP_NO_CXX11_STATIC_ASSERT - #endif - - // C++0x features in 4.4.n and later - // - #if (SPP_GCC_VERSION < 40400) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_AUTO_DECLARATIONS - #define SPP_NO_CXX11_AUTO_MULTIDECLARATIONS - #define SPP_NO_CXX11_CHAR16_T - #define SPP_NO_CXX11_CHAR32_T - #define SPP_NO_CXX11_HDR_INITIALIZER_LIST - #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS - #define SPP_NO_CXX11_DELETED_FUNCTIONS - #define SPP_NO_CXX11_TRAILING_RESULT_TYPES - #define SPP_NO_CXX11_INLINE_NAMESPACES - #define SPP_NO_CXX11_VARIADIC_TEMPLATES - #endif - - #if SPP_GCC_VERSION < 40500 - #define SPP_NO_SFINAE_EXPR - #endif - - // GCC 4.5 forbids declaration of defaulted functions in private or protected sections - #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS - #endif - - // C++0x features in 4.5.0 and later - // - #if (SPP_GCC_VERSION < 40500) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS - #define SPP_NO_CXX11_LAMBDAS - #define SPP_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS - #define SPP_NO_CXX11_RAW_LITERALS - #define SPP_NO_CXX11_UNICODE_LITERALS - #endif - - // C++0x features in 4.5.1 and later - // - #if (SPP_GCC_VERSION < 40501) || !defined(SPP_GCC_CXX11) - // scoped enums have a serious bug in 4.4.0, so define SPP_NO_CXX11_SCOPED_ENUMS before 4.5.1 - // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 - #define SPP_NO_CXX11_SCOPED_ENUMS - #endif - - // C++0x features in 4.6.n and later - // - #if (SPP_GCC_VERSION < 40600) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_CONSTEXPR - #define SPP_NO_CXX11_NULLPTR - #define SPP_NO_CXX11_RANGE_BASED_FOR - #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - #endif - - // C++0x features in 4.7.n and later - // - #if (SPP_GCC_VERSION < 40700) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_FINAL - #define SPP_NO_CXX11_TEMPLATE_ALIASES - #define SPP_NO_CXX11_USER_DEFINED_LITERALS - #define SPP_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS - #endif - - // C++0x features in 4.8.n and later - // - #if (SPP_GCC_VERSION < 40800) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_ALIGNAS - #endif - - // C++0x features in 4.8.1 and later - // - #if (SPP_GCC_VERSION < 40801) || !defined(SPP_GCC_CXX11) - #define SPP_NO_CXX11_DECLTYPE_N3276 - #define SPP_NO_CXX11_REF_QUALIFIERS - #define SPP_NO_CXX14_BINARY_LITERALS - #endif - - // C++14 features in 4.9.0 and later - // - #if (SPP_GCC_VERSION < 40900) || (__cplusplus < 201300) - #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION - #define SPP_NO_CXX14_GENERIC_LAMBDAS - #define SPP_NO_CXX14_DIGIT_SEPARATORS - #define SPP_NO_CXX14_DECLTYPE_AUTO - #if !((SPP_GCC_VERSION >= 40801) && (SPP_GCC_VERSION < 40900) && defined(SPP_GCC_CXX11)) - #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES - #endif - #endif - - - // C++ 14: - #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) - #define SPP_NO_CXX14_AGGREGATE_NSDMI - #endif - #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) - #define SPP_NO_CXX14_CONSTEXPR - #endif - #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) - #define SPP_NO_CXX14_VARIABLE_TEMPLATES - #endif - - // - // Unused attribute: - #if __GNUC__ >= 4 - #define SPP_ATTRIBUTE_UNUSED __attribute__((__unused__)) - #endif - // - // __builtin_unreachable: - #if SPP_GCC_VERSION >= 40800 - #define SPP_UNREACHABLE_RETURN(x) __builtin_unreachable(); - #endif - - #ifndef SPP_COMPILER - #define SPP_COMPILER "GNU C++ version " __VERSION__ - #endif - - // ConceptGCC compiler: - // http://www.generic-programming.org/software/ConceptGCC/ - #ifdef __GXX_CONCEPTS__ - #define SPP_HAS_CONCEPTS - #define SPP_COMPILER "ConceptGCC version " __VERSION__ - #endif - - -#elif defined _MSC_VER - - #include // for __popcnt() - - #define SPP_POPCNT_CHECK // slower when defined, but we have to check! - #define spp_cpuid(info, x) __cpuid(info, x) - - #define SPP_POPCNT __popcnt - #if (SPP_GROUP_SIZE == 64 && INTPTR_MAX == INT64_MAX) - #define SPP_POPCNT64 __popcnt64 - #endif - - // Attempt to suppress VC6 warnings about the length of decorated names (obsolete): - #pragma warning( disable : 4503 ) // warning: decorated name length exceeded - - #define SPP_HAS_PRAGMA_ONCE - #define SPP_HAS_CSTDINT - - // - // versions check: - // we don't support Visual C++ prior to version 7.1: - #if _MSC_VER < 1310 - #error "Antique compiler not supported" - #endif - - #if _MSC_FULL_VER < 180020827 - #define SPP_NO_FENV_H - #endif - - #if _MSC_VER < 1400 - // although a conforming signature for swprint exists in VC7.1 - // it appears not to actually work: - #define SPP_NO_SWPRINTF - - // Our extern template tests also fail for this compiler: - #define SPP_NO_CXX11_EXTERN_TEMPLATE - - // Variadic macros do not exist for VC7.1 and lower - #define SPP_NO_CXX11_VARIADIC_MACROS - #endif - - #if _MSC_VER < 1500 // 140X == VC++ 8.0 - #undef SPP_HAS_CSTDINT - #define SPP_NO_MEMBER_TEMPLATE_FRIENDS - #endif - - #if _MSC_VER < 1600 // 150X == VC++ 9.0 - // A bug in VC9: - #define SPP_NO_ADL_BARRIER - #endif - - - // MSVC (including the latest checked version) has not yet completely - // implemented value-initialization, as is reported: - // "VC++ does not value-initialize members of derived classes without - // user-declared constructor", reported in 2009 by Sylvester Hesp: - // https: //connect.microsoft.com/VisualStudio/feedback/details/484295 - // "Presence of copy constructor breaks member class initialization", - // reported in 2009 by Alex Vakulenko: - // https: //connect.microsoft.com/VisualStudio/feedback/details/499606 - // "Value-initialization in new-expression", reported in 2005 by - // Pavel Kuznetsov (MetaCommunications Engineering): - // https: //connect.microsoft.com/VisualStudio/feedback/details/100744 - // See also: http: //www.boost.org/libs/utility/value_init.htm #compiler_issues - // (Niels Dekker, LKEB, May 2010) - #define SPP_NO_COMPLETE_VALUE_INITIALIZATION - - #ifndef _NATIVE_WCHAR_T_DEFINED - #define SPP_NO_INTRINSIC_WCHAR_T - #endif - - // - // check for exception handling support: - #if !defined(_CPPUNWIND) && !defined(SPP_NO_EXCEPTIONS) - #define SPP_NO_EXCEPTIONS - #endif - - // - // __int64 support: - // - #define SPP_HAS_MS_INT64 - #if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) - #define SPP_HAS_LONG_LONG - #else - #define SPP_NO_LONG_LONG - #endif - - #if (_MSC_VER >= 1400) && !defined(_DEBUG) - #define SPP_HAS_NRVO - #endif - - #if _MSC_VER >= 1500 // 150X == VC++ 9.0 - #define SPP_HAS_PRAGMA_DETECT_MISMATCH - #endif - - // - // disable Win32 API's if compiler extensions are - // turned off: - // - #if !defined(_MSC_EXTENSIONS) && !defined(SPP_DISABLE_WIN32) - #define SPP_DISABLE_WIN32 - #endif - - #if !defined(_CPPRTTI) && !defined(SPP_NO_RTTI) - #define SPP_NO_RTTI - #endif - - // - // TR1 features: - // - #if _MSC_VER >= 1700 - // #define SPP_HAS_TR1_HASH // don't know if this is true yet. - // #define SPP_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. - #define SPP_HAS_TR1_UNORDERED_MAP - #define SPP_HAS_TR1_UNORDERED_SET - #endif - - // - // C++0x features - // - // See above for SPP_NO_LONG_LONG - - // C++ features supported by VC++ 10 (aka 2010) - // - #if _MSC_VER < 1600 - #define SPP_NO_CXX11_AUTO_DECLARATIONS - #define SPP_NO_CXX11_AUTO_MULTIDECLARATIONS - #define SPP_NO_CXX11_LAMBDAS - #define SPP_NO_CXX11_RVALUE_REFERENCES - #define SPP_NO_CXX11_STATIC_ASSERT - #define SPP_NO_CXX11_NULLPTR - #define SPP_NO_CXX11_DECLTYPE - #endif // _MSC_VER < 1600 - - #if _MSC_VER >= 1600 - #define SPP_HAS_STDINT_H - #endif - - // C++11 features supported by VC++ 11 (aka 2012) - // - #if _MSC_VER < 1700 - #define SPP_NO_CXX11_FINAL - #define SPP_NO_CXX11_RANGE_BASED_FOR - #define SPP_NO_CXX11_SCOPED_ENUMS - #endif // _MSC_VER < 1700 - - // C++11 features supported by VC++ 12 (aka 2013). - // - #if _MSC_FULL_VER < 180020827 - #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS - #define SPP_NO_CXX11_DELETED_FUNCTIONS - #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS - #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS - #define SPP_NO_CXX11_RAW_LITERALS - #define SPP_NO_CXX11_TEMPLATE_ALIASES - #define SPP_NO_CXX11_TRAILING_RESULT_TYPES - #define SPP_NO_CXX11_VARIADIC_TEMPLATES - #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - #define SPP_NO_CXX11_DECLTYPE_N3276 - #endif - - // C++11 features supported by VC++ 14 (aka 2014) CTP1 - #if (_MSC_FULL_VER < 190021730) - #define SPP_NO_CXX11_REF_QUALIFIERS - #define SPP_NO_CXX11_USER_DEFINED_LITERALS - #define SPP_NO_CXX11_ALIGNAS - #define SPP_NO_CXX11_INLINE_NAMESPACES - #define SPP_NO_CXX14_DECLTYPE_AUTO - #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES - #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION - #define SPP_NO_CXX11_HDR_INITIALIZER_LIST - #endif - - // C++11 features not supported by any versions - #define SPP_NO_CXX11_CHAR16_T - #define SPP_NO_CXX11_CHAR32_T - #define SPP_NO_CXX11_CONSTEXPR - #define SPP_NO_CXX11_UNICODE_LITERALS - #define SPP_NO_SFINAE_EXPR - #define SPP_NO_TWO_PHASE_NAME_LOOKUP - - // C++ 14: - #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) - #define SPP_NO_CXX14_AGGREGATE_NSDMI - #endif - - #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) - #define SPP_NO_CXX14_BINARY_LITERALS - #endif - - #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) - #define SPP_NO_CXX14_CONSTEXPR - #endif - - #if (__cplusplus < 201304) // There's no SD6 check for this.... - #define SPP_NO_CXX14_DIGIT_SEPARATORS - #endif - - #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) - #define SPP_NO_CXX14_GENERIC_LAMBDAS - #endif - - #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) - #define SPP_NO_CXX14_VARIABLE_TEMPLATES - #endif - -#endif - -// from boost/config/suffix.hpp -// ---------------------------- -#ifndef SPP_ATTRIBUTE_UNUSED - #define SPP_ATTRIBUTE_UNUSED -#endif - -// includes -// -------- -#if defined(SPP_HAS_CSTDINT) && (__cplusplus >= 201103) - #include -#else - #if defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) - #include - #else - #include - #endif -#endif - -#include -#include -#include -#include // for numeric_limits -#include // For swap(), eg -#include // for iterator tags -#include // for equal_to<>, select1st<>, std::unary_function, etc -#include // for alloc, uninitialized_copy, uninitialized_fill -#include // for malloc/realloc/free -#include // for ptrdiff_t -#include // for placement new -#include // For length_error -#include // for pair<> -#include -#include -#include - -#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) - #include -#endif - -#if (SPP_GROUP_SIZE == 32) - typedef uint32_t group_bm_type; -#else - typedef uint64_t group_bm_type; -#endif - -template class HashObject; // for Google's benchmark, not in spp namespace! - -// ---------------------------------------------------------------------- -// H A S H F U N C T I O N S -// ---------------------------- -// -// Implements spp::spp_hash() and spp::hash_combine() -// -// This is exactly the content of spp_utils.h, except for the copyright -// attributions at the beginning -// -// WARNING: Any change here has to be duplicated in spp_utils.h. -// ---------------------------------------------------------------------- - -#if !defined(spp_utils_h_guard_) -#define spp_utils_h_guard_ - -#if defined(_MSC_VER) - #if (_MSC_VER >= 1600 ) // vs2010 (1900 is vs2015) - #include - #define SPP_HASH_CLASS std::hash - #else - #include - #define SPP_HASH_CLASS stdext::hash_compare - #endif - #if (_MSC_FULL_VER < 190021730) - #define SPP_NO_CXX11_NOEXCEPT - #endif -#elif defined(__GNUC__) - #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) - #include - #define SPP_HASH_CLASS std::hash - - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) < 40600 - #define SPP_NO_CXX11_NOEXCEPT - #endif - #else - #include - #define SPP_HASH_CLASS std::tr1::hash - #define SPP_NO_CXX11_NOEXCEPT - #endif -#elif defined __clang__ - #include - #define SPP_HASH_CLASS std::hash - - #if !__has_feature(cxx_noexcept) - #define SPP_NO_CXX11_NOEXCEPT - #endif -#else - #include - #define SPP_HASH_CLASS std::hash -#endif - -#ifdef SPP_NO_CXX11_NOEXCEPT - #define SPP_NOEXCEPT -#else - #define SPP_NOEXCEPT noexcept -#endif - -#ifdef SPP_NO_CXX11_CONSTEXPR - #define SPP_CONSTEXPR -#else - #define SPP_CONSTEXPR constexpr -#endif - -#define SPP_INLINE - -#ifndef SPP_NAMESPACE - #define SPP_NAMESPACE spp -#endif - -namespace SPP_NAMESPACE -{ - -template -struct spp_hash -{ - SPP_INLINE size_t operator()(const T &__v) const SPP_NOEXCEPT - { - SPP_HASH_CLASS hasher; - return hasher(__v); - } -}; - -template -struct spp_hash -{ - static size_t spp_log2 (size_t val) SPP_NOEXCEPT - { - size_t res = 0; - while (val > 1) - { - val >>= 1; - res++; - } - return res; - } - - SPP_INLINE size_t operator()(const T *__v) const SPP_NOEXCEPT - { - static const size_t shift = 3; // spp_log2(1 + sizeof(T)); // T might be incomplete! - return static_cast((*(reinterpret_cast(&__v))) >> shift); - } -}; - -// from http://burtleburtle.net/bob/hash/integer.html -// fast and efficient for power of two table sizes where we always -// consider the last bits. -// --------------------------------------------------------------- -inline size_t spp_mix_32(uint32_t a) -{ - a = a ^ (a >> 4); - a = (a ^ 0xdeadbeef) + (a << 5); - a = a ^ (a >> 11); - return static_cast(a); -} - -// Maybe we should do a more thorough scrambling as described in -// https://gist.github.com/badboy/6267743 -// ------------------------------------------------------------- -inline size_t spp_mix_64(uint64_t a) -{ - a = a ^ (a >> 4); - a = (a ^ 0xdeadbeef) + (a << 5); - a = a ^ (a >> 11); - return a; -} - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(bool __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(signed char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(unsigned char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(wchar_t __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int16_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint16_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int32_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint32_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int64_t __v) const SPP_NOEXCEPT - { return spp_mix_64(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint64_t __v) const SPP_NOEXCEPT - { return spp_mix_64(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(float __v) const SPP_NOEXCEPT - { - // -0.0 and 0.0 should return same hash - uint32_t *as_int = reinterpret_cast(&__v); - return (__v == 0) ? static_cast(0) : spp_mix_32(*as_int); - } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(double __v) const SPP_NOEXCEPT - { - // -0.0 and 0.0 should return same hash - uint64_t *as_int = reinterpret_cast(&__v); - return (__v == 0) ? static_cast(0) : spp_mix_64(*as_int); - } -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value); -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value) - { - seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2); - } -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value) - { - seed ^= value + T(0xc6a4a7935bd1e995) + (seed << 6) + (seed >> 2); - } -}; - -template -inline void hash_combine(std::size_t& seed, T const& v) -{ - spp::spp_hash hasher; - Combiner combiner; - - combiner(seed, hasher(v)); -} - -} - -#endif // spp_utils_h_guard_ - -SPP_START_NAMESPACE - -// ---------------------------------------------------------------------- -// U T I L F U N C T I O N S -// ---------------------------------------------------------------------- -template -inline void throw_exception(const E& exception) -{ -#if !defined(SPP_NO_EXCEPTIONS) - throw exception; -#else - assert(0); - abort(); -#endif -} - -// ---------------------------------------------------------------------- -// M U T A B L E P A I R H A C K -// turn mutable std::pair into correct value_type std::pair -// ---------------------------------------------------------------------- -template -struct cvt -{ - typedef T type; -}; - -template -struct cvt > -{ - typedef std::pair type; -}; - -template -struct cvt > -{ - typedef const std::pair type; -}; - -// ---------------------------------------------------------------------- -// M O V E I T E R A T O R -// ---------------------------------------------------------------------- -#ifdef SPP_NO_CXX11_RVALUE_REFERENCES - #define MK_MOVE_IT(p) (p) -#else - #define MK_MOVE_IT(p) std::make_move_iterator(p) -#endif - - -// ---------------------------------------------------------------------- -// A L L O C A T O R S T U F F -// ---------------------------------------------------------------------- -template -class libc_allocator_with_realloc -{ -public: - typedef T value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - - libc_allocator_with_realloc() {} - libc_allocator_with_realloc(const libc_allocator_with_realloc& /*unused*/) {} - ~libc_allocator_with_realloc() {} - - pointer address(reference r) const { return &r; } - const_pointer address(const_reference r) const { return &r; } - - pointer allocate(size_type n, const_pointer /*unused*/= 0) - { - return static_cast(malloc(n * sizeof(value_type))); - } - - void deallocate(pointer p, size_type /*unused*/) - { - free(p); - } - - pointer reallocate(pointer p, size_type n) - { - return static_cast(realloc(p, n * sizeof(value_type))); - } - - size_type max_size() const - { - return static_cast(-1) / sizeof(value_type); - } - - void construct(pointer p, const value_type& val) - { - new(p) value_type(val); - } - - void destroy(pointer p) { p->~value_type(); } - - template - explicit libc_allocator_with_realloc(const libc_allocator_with_realloc& /*unused*/) {} - - template - struct rebind - { - typedef libc_allocator_with_realloc other; - }; -}; - -// ---------------------------------------------------------------------- -// libc_allocator_with_realloc specialization. -// ---------------------------------------------------------------------- -template<> -class libc_allocator_with_realloc -{ -public: - typedef void value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef void* pointer; - typedef const void* const_pointer; - - template - struct rebind - { - typedef libc_allocator_with_realloc other; - }; -}; - -template -inline bool operator==(const libc_allocator_with_realloc& /*unused*/, - const libc_allocator_with_realloc& /*unused*/) -{ - return true; -} - -template -inline bool operator!=(const libc_allocator_with_realloc& /*unused*/, - const libc_allocator_with_realloc& /*unused*/) -{ - return false; -} - -// ---------------------------------------------------------------------- -// I N T E R N A L S T U F F -// ---------------------------------------------------------------------- -#ifdef SPP_NO_CXX11_STATIC_ASSERT - template struct SppCompileAssert { }; - #define SPP_COMPILE_ASSERT(expr, msg) \ - SPP_ATTRIBUTE_UNUSED typedef SppCompileAssert<(bool(expr))> spp_bogus_[bool(expr) ? 1 : -1] -#else - #define SPP_COMPILE_ASSERT static_assert -#endif - -namespace sparsehash_internal -{ - -// Adaptor methods for reading/writing data from an INPUT or OUPTUT -// variable passed to serialize() or unserialize(). For now we -// have implemented INPUT/OUTPUT for FILE*, istream*/ostream* (note -// they are pointers, unlike typical use), or else a pointer to -// something that supports a Read()/Write() method. -// -// For technical reasons, we implement read_data/write_data in two -// stages. The actual work is done in *_data_internal, which takes -// the stream argument twice: once as a template type, and once with -// normal type information. (We only use the second version.) We do -// this because of how C++ picks what function overload to use. If we -// implemented this the naive way: -// bool read_data(istream* is, const void* data, size_t length); -// template read_data(T* fp, const void* data, size_t length); -// C++ would prefer the second version for every stream type except -// istream. However, we want C++ to prefer the first version for -// streams that are *subclasses* of istream, such as istringstream. -// This is not possible given the way template types are resolved. So -// we split the stream argument in two, one of which is templated and -// one of which is not. The specialized functions (like the istream -// version above) ignore the template arg and use the second, 'type' -// arg, getting subclass matching as normal. The 'catch-all' -// functions (the second version above) use the template arg to deduce -// the type, and use a second, void* arg to achieve the desired -// 'catch-all' semantics. - - // ----- low-level I/O for FILE* ---- - - template - inline bool read_data_internal(Ignored* /*unused*/, FILE* fp, - void* data, size_t length) - { - return fread(data, length, 1, fp) == 1; - } - - template - inline bool write_data_internal(Ignored* /*unused*/, FILE* fp, - const void* data, size_t length) - { - return fwrite(data, length, 1, fp) == 1; - } - - // ----- low-level I/O for iostream ---- - - // We want the caller to be responsible for #including , not - // us, because iostream is a big header! According to the standard, - // it's only legal to delay the instantiation the way we want to if - // the istream/ostream is a template type. So we jump through hoops. - template - inline bool read_data_internal_for_istream(ISTREAM* fp, - void* data, size_t length) - { - return fp->read(reinterpret_cast(data), - static_cast(length)).good(); - } - template - inline bool read_data_internal(Ignored* /*unused*/, std::istream* fp, - void* data, size_t length) - { - return read_data_internal_for_istream(fp, data, length); - } - - template - inline bool write_data_internal_for_ostream(OSTREAM* fp, - const void* data, size_t length) - { - return fp->write(reinterpret_cast(data), - static_cast(length)).good(); - } - template - inline bool write_data_internal(Ignored* /*unused*/, std::ostream* fp, - const void* data, size_t length) - { - return write_data_internal_for_ostream(fp, data, length); - } - - // ----- low-level I/O for custom streams ---- - - // The INPUT type needs to support a Read() method that takes a - // buffer and a length and returns the number of bytes read. - template - inline bool read_data_internal(INPUT* fp, void* /*unused*/, - void* data, size_t length) - { - return static_cast(fp->Read(data, length)) == length; - } - - // The OUTPUT type needs to support a Write() operation that takes - // a buffer and a length and returns the number of bytes written. - template - inline bool write_data_internal(OUTPUT* fp, void* /*unused*/, - const void* data, size_t length) - { - return static_cast(fp->Write(data, length)) == length; - } - - // ----- low-level I/O: the public API ---- - - template - inline bool read_data(INPUT* fp, void* data, size_t length) - { - return read_data_internal(fp, fp, data, length); - } - - template - inline bool write_data(OUTPUT* fp, const void* data, size_t length) - { - return write_data_internal(fp, fp, data, length); - } - - // Uses read_data() and write_data() to read/write an integer. - // length is the number of bytes to read/write (which may differ - // from sizeof(IntType), allowing us to save on a 32-bit system - // and load on a 64-bit system). Excess bytes are taken to be 0. - // INPUT and OUTPUT must match legal inputs to read/write_data (above). - // -------------------------------------------------------------------- - template - bool read_bigendian_number(INPUT* fp, IntType* value, size_t length) - { - *value = 0; - unsigned char byte; - // We require IntType to be unsigned or else the shifting gets all screwy. - SPP_COMPILE_ASSERT(static_cast(-1) > static_cast(0), "serializing_int_requires_an_unsigned_type"); - for (size_t i = 0; i < length; ++i) - { - if (!read_data(fp, &byte, sizeof(byte))) - return false; - *value |= static_cast(byte) << ((length - 1 - i) * 8); - } - return true; - } - - template - bool write_bigendian_number(OUTPUT* fp, IntType value, size_t length) - { - unsigned char byte; - // We require IntType to be unsigned or else the shifting gets all screwy. - SPP_COMPILE_ASSERT(static_cast(-1) > static_cast(0), "serializing_int_requires_an_unsigned_type"); - for (size_t i = 0; i < length; ++i) - { - byte = (sizeof(value) <= length-1 - i) - ? static_cast(0) : static_cast((value >> ((length-1 - i) * 8)) & 255); - if (!write_data(fp, &byte, sizeof(byte))) return false; - } - return true; - } - - // If your keys and values are simple enough, you can pass this - // serializer to serialize()/unserialize(). "Simple enough" means - // value_type is a POD type that contains no pointers. Note, - // however, we don't try to normalize endianness. - // This is the type used for NopointerSerializer. - // --------------------------------------------------------------- - template struct pod_serializer - { - template - bool operator()(INPUT* fp, value_type* value) const - { - return read_data(fp, value, sizeof(*value)); - } - - template - bool operator()(OUTPUT* fp, const value_type& value) const - { - return write_data(fp, &value, sizeof(value)); - } - }; - - - // Settings contains parameters for growing and shrinking the table. - // It also packages zero-size functor (ie. hasher). - // - // It does some munging of the hash value for the cases where - // the original hash function is not be very good. - // --------------------------------------------------------------- - template - class sh_hashtable_settings : public HashFunc - { - private: -#ifndef SPP_MIX_HASH - template struct Mixer - { - inline T operator()(T h) const { return h; } - }; -#else - template struct Mixer - { - inline T operator()(T h) const; - }; - - template struct Mixer - { - inline T operator()(T h) const - { - // from Thomas Wang - https://gist.github.com/badboy/6267743 - // --------------------------------------------------------- - h = (h ^ 61) ^ (h >> 16); - h = h + (h << 3); - h = h ^ (h >> 4); - h = h * 0x27d4eb2d; - h = h ^ (h >> 15); - return h; - } - }; - - template struct Mixer - { - inline T operator()(T h) const - { - // from Thomas Wang - https://gist.github.com/badboy/6267743 - // --------------------------------------------------------- - h = (~h) + (h << 21); // h = (h << 21) - h - 1; - h = h ^ (h >> 24); - h = (h + (h << 3)) + (h << 8); // h * 265 - h = h ^ (h >> 14); - h = (h + (h << 2)) + (h << 4); // h * 21 - h = h ^ (h >> 28); - h = h + (h << 31); - return h; - } - }; -#endif - - public: - typedef Key key_type; - typedef HashFunc hasher; - typedef SizeType size_type; - - public: - sh_hashtable_settings(const hasher& hf, - const float ht_occupancy_flt, - const float ht_empty_flt) - : hasher(hf), - enlarge_threshold_(0), - shrink_threshold_(0), - consider_shrink_(false), - num_ht_copies_(0) - { - set_enlarge_factor(ht_occupancy_flt); - set_shrink_factor(ht_empty_flt); - } - - size_t hash(const key_type& v) const - { - size_t h = hasher::operator()(v); - Mixer mixer; - - return mixer(h); - } - - float enlarge_factor() const { return enlarge_factor_; } - void set_enlarge_factor(float f) { enlarge_factor_ = f; } - float shrink_factor() const { return shrink_factor_; } - void set_shrink_factor(float f) { shrink_factor_ = f; } - - size_type enlarge_threshold() const { return enlarge_threshold_; } - void set_enlarge_threshold(size_type t) { enlarge_threshold_ = t; } - size_type shrink_threshold() const { return shrink_threshold_; } - void set_shrink_threshold(size_type t) { shrink_threshold_ = t; } - - size_type enlarge_size(size_type x) const { return static_cast(x * enlarge_factor_); } - size_type shrink_size(size_type x) const { return static_cast(x * shrink_factor_); } - - bool consider_shrink() const { return consider_shrink_; } - void set_consider_shrink(bool t) { consider_shrink_ = t; } - - unsigned int num_ht_copies() const { return num_ht_copies_; } - void inc_num_ht_copies() { ++num_ht_copies_; } - - // Reset the enlarge and shrink thresholds - void reset_thresholds(size_type num_buckets) - { - set_enlarge_threshold(enlarge_size(num_buckets)); - set_shrink_threshold(shrink_size(num_buckets)); - // whatever caused us to reset already considered - set_consider_shrink(false); - } - - // Caller is resposible for calling reset_threshold right after - // set_resizing_parameters. - // ------------------------------------------------------------ - void set_resizing_parameters(float shrink, float grow) - { - assert(shrink >= 0.0f); - assert(grow <= 1.0f); - if (shrink > grow/2.0f) - shrink = grow / 2.0f; // otherwise we thrash hashtable size - set_shrink_factor(shrink); - set_enlarge_factor(grow); - } - - // This is the smallest size a hashtable can be without being too crowded - // If you like, you can give a min #buckets as well as a min #elts - // ---------------------------------------------------------------------- - size_type min_buckets(size_type num_elts, size_type min_buckets_wanted) - { - float enlarge = enlarge_factor(); - size_type sz = HT_MIN_BUCKETS; // min buckets allowed - while (sz < min_buckets_wanted || - num_elts >= static_cast(sz * enlarge)) - { - // This just prevents overflowing size_type, since sz can exceed - // max_size() here. - // ------------------------------------------------------------- - if (static_cast(sz * 2) < sz) - throw_exception(std::length_error("resize overflow")); // protect against overflow - sz *= 2; - } - return sz; - } - - private: - size_type enlarge_threshold_; // table.size() * enlarge_factor - size_type shrink_threshold_; // table.size() * shrink_factor - float enlarge_factor_; // how full before resize - float shrink_factor_; // how empty before resize - bool consider_shrink_; // if we should try to shrink before next insert - - unsigned int num_ht_copies_; // num_ht_copies is a counter incremented every Copy/Move - }; - -} // namespace sparsehash_internal - -#undef SPP_COMPILE_ASSERT - -// ---------------------------------------------------------------------- -// S P A R S E T A B L E -// ---------------------------------------------------------------------- -// -// A sparsetable is a random container that implements a sparse array, -// that is, an array that uses very little memory to store unassigned -// indices (in this case, between 1-2 bits per unassigned index). For -// instance, if you allocate an array of size 5 and assign a[2] = , then a[2] will take up a lot of memory but a[0], a[1], -// a[3], and a[4] will not. Array elements that have a value are -// called "assigned". Array elements that have no value yet, or have -// had their value cleared using erase() or clear(), are called -// "unassigned". -// -// Unassigned values seem to have the default value of T (see below). -// Nevertheless, there is a difference between an unassigned index and -// one explicitly assigned the value of T(). The latter is considered -// assigned. -// -// Access to an array element is constant time, as is insertion and -// deletion. Insertion and deletion may be fairly slow, however: -// because of this container's memory economy, each insert and delete -// causes a memory reallocation. -// -// NOTE: You should not test(), get(), or set() any index that is -// greater than sparsetable.size(). If you need to do that, call -// resize() first. -// -// --- Template parameters -// PARAMETER DESCRIPTION DEFAULT -// T The value of the array: the type of -- -// object that is stored in the array. -// -// Alloc: Allocator to use to allocate memory. libc_allocator_with_realloc -// -// --- Model of -// Random Access Container -// -// --- Type requirements -// T must be Copy Constructible. It need not be Assignable. -// -// --- Public base classes -// None. -// -// --- Members -// -// [*] All iterators are const in a sparsetable (though nonempty_iterators -// may not be). Use get() and set() to assign values, not iterators. -// -// [+] iterators are random-access iterators. nonempty_iterators are -// bidirectional iterators. - -// [*] If you shrink a sparsetable using resize(), assigned elements -// past the end of the table are removed using erase(). If you grow -// a sparsetable, new unassigned indices are created. -// -// [+] Note that operator[] returns a const reference. You must use -// set() to change the value of a table element. -// -// [!] Unassignment also calls the destructor. -// -// Iterators are invalidated whenever an item is inserted or -// deleted (ie set() or erase() is used) or when the size of -// the table changes (ie resize() or clear() is used). - - -// --------------------------------------------------------------------------- -// type_traits we need -// --------------------------------------------------------------------------- -template -struct integral_constant { static const T value = v; }; - -template const T integral_constant::value; - -typedef integral_constant true_type; -typedef integral_constant false_type; - -template struct is_same : public false_type { }; -template struct is_same : public true_type { }; - -template struct remove_const { typedef T type; }; -template struct remove_const { typedef T type; }; - -template struct remove_volatile { typedef T type; }; -template struct remove_volatile { typedef T type; }; - -template struct remove_cv { - typedef typename remove_const::type>::type type; -}; - -// ---------------- is_integral ---------------------------------------- -template struct is_integral; -template struct is_integral : false_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -template<> struct is_integral : true_type { }; -#ifdef SPP_HAS_LONG_LONG - template<> struct is_integral : true_type { }; - template<> struct is_integral : true_type { }; -#endif -template struct is_integral : is_integral { }; -template struct is_integral : is_integral { }; -template struct is_integral : is_integral { }; - -// ---------------- is_floating_point ---------------------------------------- -template struct is_floating_point; -template struct is_floating_point : false_type { }; -template<> struct is_floating_point : true_type { }; -template<> struct is_floating_point : true_type { }; -template<> struct is_floating_point : true_type { }; -template struct is_floating_point : is_floating_point { }; -template struct is_floating_point : is_floating_point { }; -template struct is_floating_point : is_floating_point { }; - -// ---------------- is_pointer ---------------------------------------- -template struct is_pointer; -template struct is_pointer : false_type { }; -template struct is_pointer : true_type { }; -template struct is_pointer : is_pointer { }; -template struct is_pointer : is_pointer { }; -template struct is_pointer : is_pointer { }; - -// ---------------- is_reference ---------------------------------------- -template struct is_reference; -template struct is_reference : false_type {}; -template struct is_reference : true_type {}; - -// ---------------- is_relocatable ---------------------------------------- -// relocatable values can be moved around in memory using memcpy and remain -// correct. Most types are relocatable, an example of a type who is not would -// be a struct which contains a pointer to a buffer inside itself - this is the -// case for std::string in gcc 5. -// ------------------------------------------------------------------------ -template struct is_relocatable; -template struct is_relocatable : - integral_constant::value || is_floating_point::value)> -{ }; - -template struct is_relocatable > : true_type { }; - -template struct is_relocatable : is_relocatable { }; -template struct is_relocatable : is_relocatable { }; -template struct is_relocatable : is_relocatable { }; -template struct is_relocatable : is_relocatable { }; -template struct is_relocatable > : - integral_constant::value && is_relocatable::value)> -{ }; - -// --------------------------------------------------------------------------- -// Our iterator as simple as iterators can be: basically it's just -// the index into our table. Dereference, the only complicated -// thing, we punt to the table class. This just goes to show how -// much machinery STL requires to do even the most trivial tasks. -// -// A NOTE ON ASSIGNING: -// A sparse table does not actually allocate memory for entries -// that are not filled. Because of this, it becomes complicated -// to have a non-const iterator: we don't know, if the iterator points -// to a not-filled bucket, whether you plan to fill it with something -// or whether you plan to read its value (in which case you'll get -// the default bucket value). Therefore, while we can define const -// operations in a pretty 'normal' way, for non-const operations, we -// define something that returns a helper object with operator= and -// operator& that allocate a bucket lazily. We use this for table[] -// and also for regular table iterators. - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// Our iterator as simple as iterators can be: basically it's just -// the index into our table. Dereference, the only complicated -// thing, we punt to the table class. This just goes to show how -// much machinery STL requires to do even the most trivial tasks. -// -// By templatizing over tabletype, we have one iterator type which -// we can use for both sparsetables and sparsebins. In fact it -// works on any class that allows size() and operator[] (eg vector), -// as long as it does the standard STL typedefs too (eg value_type). - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -template -class table_iterator -{ -public: - typedef table_iterator iterator; - - typedef std::random_access_iterator_tag iterator_category; - typedef typename tabletype::value_type value_type; - typedef typename tabletype::difference_type difference_type; - typedef typename tabletype::size_type size_type; - - explicit table_iterator(tabletype *tbl = 0, size_type p = 0) : - table(tbl), pos(p) - { } - - // Helper function to assert things are ok; eg pos is still in range - void check() const - { - assert(table); - assert(pos <= table->size()); - } - - // Arithmetic: we just do arithmetic on pos. We don't even need to - // do bounds checking, since STL doesn't consider that its job. :-) - iterator& operator+=(size_type t) { pos += t; check(); return *this; } - iterator& operator-=(size_type t) { pos -= t; check(); return *this; } - iterator& operator++() { ++pos; check(); return *this; } - iterator& operator--() { --pos; check(); return *this; } - iterator operator++(int) - { - iterator tmp(*this); // for x++ - ++pos; check(); return tmp; - } - - iterator operator--(int) - { - iterator tmp(*this); // for x-- - --pos; check(); return tmp; - } - - iterator operator+(difference_type i) const - { - iterator tmp(*this); - tmp += i; return tmp; - } - - iterator operator-(difference_type i) const - { - iterator tmp(*this); - tmp -= i; return tmp; - } - - difference_type operator-(iterator it) const - { // for "x = it2 - it" - assert(table == it.table); - return pos - it.pos; - } - - // Comparisons. - bool operator==(const iterator& it) const - { - return table == it.table && pos == it.pos; - } - - bool operator<(const iterator& it) const - { - assert(table == it.table); // life is bad bad bad otherwise - return pos < it.pos; - } - - bool operator!=(const iterator& it) const { return !(*this == it); } - bool operator<=(const iterator& it) const { return !(it < *this); } - bool operator>(const iterator& it) const { return it < *this; } - bool operator>=(const iterator& it) const { return !(*this < it); } - - // Here's the info we actually need to be an iterator - tabletype *table; // so we can dereference and bounds-check - size_type pos; // index into the table -}; - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -template -class const_table_iterator -{ -public: - typedef table_iterator iterator; - typedef const_table_iterator const_iterator; - - typedef std::random_access_iterator_tag iterator_category; - typedef typename tabletype::value_type value_type; - typedef typename tabletype::difference_type difference_type; - typedef typename tabletype::size_type size_type; - typedef typename tabletype::const_reference reference; // we're const-only - typedef typename tabletype::const_pointer pointer; - - // The "real" constructor - const_table_iterator(const tabletype *tbl, size_type p) - : table(tbl), pos(p) { } - - // The default constructor, used when I define vars of type table::iterator - const_table_iterator() : table(NULL), pos(0) { } - - // The copy constructor, for when I say table::iterator foo = tbl.begin() - // Also converts normal iterators to const iterators // not explicit on purpose - const_table_iterator(const iterator &from) - : table(from.table), pos(from.pos) { } - - // The default destructor is fine; we don't define one - // The default operator= is fine; we don't define one - - // The main thing our iterator does is dereference. If the table entry - // we point to is empty, we return the default value type. - reference operator*() const { return (*table)[pos]; } - pointer operator->() const { return &(operator*()); } - - // Helper function to assert things are ok; eg pos is still in range - void check() const - { - assert(table); - assert(pos <= table->size()); - } - - // Arithmetic: we just do arithmetic on pos. We don't even need to - // do bounds checking, since STL doesn't consider that its job. :-) - const_iterator& operator+=(size_type t) { pos += t; check(); return *this; } - const_iterator& operator-=(size_type t) { pos -= t; check(); return *this; } - const_iterator& operator++() { ++pos; check(); return *this; } - const_iterator& operator--() { --pos; check(); return *this; } - const_iterator operator++(int) { const_iterator tmp(*this); // for x++ - ++pos; check(); return tmp; } - const_iterator operator--(int) { const_iterator tmp(*this); // for x-- - --pos; check(); return tmp; } - const_iterator operator+(difference_type i) const - { - const_iterator tmp(*this); - tmp += i; - return tmp; - } - const_iterator operator-(difference_type i) const - { - const_iterator tmp(*this); - tmp -= i; - return tmp; - } - difference_type operator-(const_iterator it) const - { // for "x = it2 - it" - assert(table == it.table); - return pos - it.pos; - } - reference operator[](difference_type n) const - { - return *(*this + n); // simple though not totally efficient - } - - // Comparisons. - bool operator==(const const_iterator& it) const - { - return table == it.table && pos == it.pos; - } - - bool operator<(const const_iterator& it) const - { - assert(table == it.table); // life is bad bad bad otherwise - return pos < it.pos; - } - bool operator!=(const const_iterator& it) const { return !(*this == it); } - bool operator<=(const const_iterator& it) const { return !(it < *this); } - bool operator>(const const_iterator& it) const { return it < *this; } - bool operator>=(const const_iterator& it) const { return !(*this < it); } - - // Here's the info we actually need to be an iterator - const tabletype *table; // so we can dereference and bounds-check - size_type pos; // index into the table -}; - -// --------------------------------------------------------------------------- -// This is a 2-D iterator. You specify a begin and end over a list -// of *containers*. We iterate over each container by iterating over -// it. It's actually simple: -// VECTOR.begin() VECTOR[0].begin() --------> VECTOR[0].end() ---, -// | ________________________________________________/ -// | \_> VECTOR[1].begin() --------> VECTOR[1].end() -, -// | ___________________________________________________/ -// v \_> ...... -// VECTOR.end() -// -// It's impossible to do random access on one of these things in constant -// time, so it's just a bidirectional iterator. -// -// Unfortunately, because we need to use this for a non-empty iterator, -// we use ne_begin() and ne_end() instead of begin() and end() -// (though only going across, not down). -// --------------------------------------------------------------------------- - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -template -class Two_d_iterator : public std::iterator -{ -public: - typedef Two_d_iterator iterator; - - // T can be std::pair, but we need to return std::pair - // --------------------------------------------------------------------- - typedef typename spp_::cvt::type value_type; - typedef value_type& reference; - typedef value_type* pointer; - - explicit Two_d_iterator(row_it curr) : row_current(curr), col_current(0) - { - if (row_current && !row_current->is_marked()) - { - col_current = row_current->ne_begin(); - advance_past_end(); // in case cur->begin() == cur->end() - } - } - - explicit Two_d_iterator(row_it curr, col_it col) : row_current(curr), col_current(col) - { - assert(col); - } - - // The default constructor - Two_d_iterator() : row_current(0), col_current(0) { } - - // Need this explicitly so we can convert normal iterators <=> const iterators - // not explicit on purpose - // --------------------------------------------------------------------------- - template - Two_d_iterator(const Two_d_iterator& it) : - row_current (*(row_it *)&it.row_current), - col_current (*(col_it *)&it.col_current) - { } - - // The default destructor is fine; we don't define one - // The default operator= is fine; we don't define one - - reference operator*() const { return *(col_current); } - pointer operator->() const { return &(operator*()); } - - // Arithmetic: we just do arithmetic on pos. We don't even need to - // do bounds checking, since STL doesn't consider that its job. :-) - // NOTE: this is not amortized constant time! What do we do about it? - // ------------------------------------------------------------------ - void advance_past_end() - { - // used when col_current points to end() - while (col_current == row_current->ne_end()) - { - // end of current row - // ------------------ - ++row_current; // go to beginning of next - if (!row_current->is_marked()) // col is irrelevant at end - col_current = row_current->ne_begin(); - else - break; // don't go past row_end - } - } - - friend size_t operator-(iterator l, iterator f) - { - if (f.row_current->is_marked()) - return 0; - - size_t diff(0); - while (f != l) - { - ++diff; - ++f; - } - return diff; - } - - iterator& operator++() - { - // assert(!row_current->is_marked()); // how to ++ from there? - ++col_current; - advance_past_end(); // in case col_current is at end() - return *this; - } - - iterator& operator--() - { - while (row_current->is_marked() || - col_current == row_current->ne_begin()) - { - --row_current; - col_current = row_current->ne_end(); // this is 1 too far - } - --col_current; - return *this; - } - iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; } - iterator operator--(int) { iterator tmp(*this); --*this; return tmp; } - - - // Comparisons. - bool operator==(const iterator& it) const - { - return (row_current == it.row_current && - (!row_current || row_current->is_marked() || col_current == it.col_current)); - } - - bool operator!=(const iterator& it) const { return !(*this == it); } - - // Here's the info we actually need to be an iterator - // These need to be public so we convert from iterator to const_iterator - // --------------------------------------------------------------------- - row_it row_current; - col_it col_current; -}; - - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -template -class Two_d_destructive_iterator : public Two_d_iterator -{ -public: - typedef Two_d_destructive_iterator iterator; - - Two_d_destructive_iterator(Alloc &alloc, row_it curr) : - _alloc(alloc) - { - this->row_current = curr; - this->col_current = 0; - if (this->row_current && !this->row_current->is_marked()) - { - this->col_current = this->row_current->ne_begin(); - advance_past_end(); // in case cur->begin() == cur->end() - } - } - - // Arithmetic: we just do arithmetic on pos. We don't even need to - // do bounds checking, since STL doesn't consider that its job. :-) - // NOTE: this is not amortized constant time! What do we do about it? - // ------------------------------------------------------------------ - void advance_past_end() - { - // used when col_current points to end() - while (this->col_current == this->row_current->ne_end()) - { - this->row_current->clear(_alloc, true); // This is what differs from non-destructive iterators above - - // end of current row - // ------------------ - ++this->row_current; // go to beginning of next - if (!this->row_current->is_marked()) // col is irrelevant at end - this->col_current = this->row_current->ne_begin(); - else - break; // don't go past row_end - } - } - - iterator& operator++() - { - // assert(!this->row_current->is_marked()); // how to ++ from there? - ++this->col_current; - advance_past_end(); // in case col_current is at end() - return *this; - } - -private: - Two_d_destructive_iterator& operator=(const Two_d_destructive_iterator &o); - - Alloc &_alloc; -}; - - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -static const char spp_bits_in[256] = { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, -}; - -static inline uint32_t s_spp_popcount_default_lut(uint32_t i) -{ - uint32_t res = static_cast(spp_bits_in[i & 0xFF]); - res += static_cast(spp_bits_in[(i >> 8) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 16) & 0xFF]); - res += static_cast(spp_bits_in[i >> 24]); - return res; -} - -static inline uint32_t s_spp_popcount_default_lut(uint64_t i) -{ - uint32_t res = static_cast(spp_bits_in[i & 0xFF]); - res += static_cast(spp_bits_in[(i >> 8) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 16) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 24) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 32) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 40) & 0xFF]); - res += static_cast(spp_bits_in[(i >> 48) & 0xFF]); - res += static_cast(spp_bits_in[i >> 56]); - return res; -} - -// faster than the lookup table (LUT) -// ---------------------------------- -static inline uint32_t s_spp_popcount_default(uint32_t i) -{ - i = i - ((i >> 1) & 0x55555555); - i = (i & 0x33333333) + ((i >> 2) & 0x33333333); - return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; -} - -// faster than the lookup table (LUT) -// ---------------------------------- -static inline uint32_t s_spp_popcount_default(uint64_t x) -{ - const uint64_t m1 = uint64_t(0x5555555555555555); // binary: 0101... - const uint64_t m2 = uint64_t(0x3333333333333333); // binary: 00110011.. - const uint64_t m4 = uint64_t(0x0f0f0f0f0f0f0f0f); // binary: 4 zeros, 4 ones ... - const uint64_t h01 = uint64_t(0x0101010101010101); // the sum of 256 to the power of 0,1,2,3... - - x -= (x >> 1) & m1; // put count of each 2 bits into those 2 bits - x = (x & m2) + ((x >> 2) & m2); // put count of each 4 bits into those 4 bits - x = (x + (x >> 4)) & m4; // put count of each 8 bits into those 8 bits - return (x * h01)>>56; // returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24)+... -} - -#if defined(SPP_POPCNT_CHECK) -static inline bool spp_popcount_check() -{ - int cpuInfo[4] = { -1 }; - spp_cpuid(cpuInfo, 1); - if (cpuInfo[2] & (1 << 23)) - return true; // means SPP_POPCNT supported - return false; -} -#endif - -#if defined(SPP_POPCNT_CHECK) && defined(SPP_POPCNT) - -static inline uint32_t spp_popcount(uint32_t i) -{ - static const bool s_ok = spp_popcount_check(); - return s_ok ? SPP_POPCNT(i) : s_spp_popcount_default(i); -} - -#else - -static inline uint32_t spp_popcount(uint32_t i) -{ -#if defined(SPP_POPCNT) - return static_cast(SPP_POPCNT(i)); -#else - return s_spp_popcount_default(i); -#endif -} - -#endif - -#if defined(SPP_POPCNT_CHECK) && defined(SPP_POPCNT64) - -static inline uint32_t spp_popcount(uint64_t i) -{ - static const bool s_ok = spp_popcount_check(); - return s_ok ? (uint32_t)SPP_POPCNT64(i) : s_spp_popcount_default(i); -} - -#else - -static inline uint32_t spp_popcount(uint64_t i) -{ -#if defined(SPP_POPCNT64) - return static_cast(SPP_POPCNT64(i)); -#elif 1 - return s_spp_popcount_default(i); -#endif -} - -#endif - -// --------------------------------------------------------------------------- -// SPARSE-TABLE -// ------------ -// The idea is that a table with (logically) t buckets is divided -// into t/M *groups* of M buckets each. (M is a constant, typically -// 32) Each group is stored sparsely. -// Thus, inserting into the table causes some array to grow, which is -// slow but still constant time. Lookup involves doing a -// logical-position-to-sparse-position lookup, which is also slow but -// constant time. The larger M is, the slower these operations are -// but the less overhead (slightly). -// -// To store the sparse array, we store a bitmap B, where B[i] = 1 iff -// bucket i is non-empty. Then to look up bucket i we really look up -// array[# of 1s before i in B]. This is constant time for fixed M. -// -// Terminology: the position of an item in the overall table (from -// 1 .. t) is called its "location." The logical position in a group -// (from 1 .. M) is called its "position." The actual location in -// the array (from 1 .. # of non-empty buckets in the group) is -// called its "offset." -// --------------------------------------------------------------------------- - -template -class sparsegroup -{ -public: - // Basic types - typedef typename spp::cvt::type value_type; - typedef Alloc allocator_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* pointer; - typedef const value_type* const_pointer; - - typedef uint8_t size_type; // max # of buckets - - // These are our special iterators, that go over non-empty buckets in a - // group. These aren't const-only because you can change non-empty bcks. - // --------------------------------------------------------------------- - typedef pointer ne_iterator; - typedef const_pointer const_ne_iterator; - typedef std::reverse_iterator reverse_ne_iterator; - typedef std::reverse_iterator const_reverse_ne_iterator; - - // We'll have versions for our special non-empty iterator too - // ---------------------------------------------------------- - ne_iterator ne_begin() { return reinterpret_cast(_group); } - const_ne_iterator ne_begin() const { return reinterpret_cast(_group); } - const_ne_iterator ne_cbegin() const { return reinterpret_cast(_group); } - ne_iterator ne_end() { return reinterpret_cast(_group + _num_items()); } - const_ne_iterator ne_end() const { return reinterpret_cast(_group + _num_items()); } - const_ne_iterator ne_cend() const { return reinterpret_cast(_group + _num_items()); } - reverse_ne_iterator ne_rbegin() { return reverse_ne_iterator(ne_end()); } - const_reverse_ne_iterator ne_rbegin() const { return const_reverse_ne_iterator(ne_cend()); } - const_reverse_ne_iterator ne_crbegin() const { return const_reverse_ne_iterator(ne_cend()); } - reverse_ne_iterator ne_rend() { return reverse_ne_iterator(ne_begin()); } - const_reverse_ne_iterator ne_rend() const { return const_reverse_ne_iterator(ne_cbegin()); } - const_reverse_ne_iterator ne_crend() const { return const_reverse_ne_iterator(ne_cbegin()); } - -private: - // T can be std::pair, but we need to return std::pair - // --------------------------------------------------------------------- - typedef T mutable_value_type; - typedef mutable_value_type& mutable_reference; - typedef const mutable_value_type& const_mutable_reference; - typedef mutable_value_type* mutable_pointer; - typedef const mutable_value_type* const_mutable_pointer; - -#define spp_mutable_ref(x) (*(reinterpret_cast(&(x)))) -#define spp_const_mutable_ref(x) (*(reinterpret_cast(&(x)))) - - typedef typename Alloc::template rebind::other value_alloc_type; - - bool _bmtest(size_type i) const { return !!(_bitmap & (static_cast(1) << i)); } - void _bmset(size_type i) { _bitmap |= static_cast(1) << i; } - void _bmclear(size_type i) { _bitmap &= ~(static_cast(1) << i); } - - bool _bme_test(size_type i) const { return !!(_bm_erased & (static_cast(1) << i)); } - void _bme_set(size_type i) { _bm_erased |= static_cast(1) << i; } - void _bme_clear(size_type i) { _bm_erased &= ~(static_cast(1) << i); } - - bool _bmtest_strict(size_type i) const - { return !!((_bitmap | _bm_erased) & (static_cast(1) << i)); } - - - static uint32_t _sizing(uint32_t n) - { -#if !defined(SPP_ALLOC_SZ) || (SPP_ALLOC_SZ == 0) - // aggressive allocation first, then decreasing as sparsegroups fill up - // -------------------------------------------------------------------- - static uint8_t s_alloc_batch_sz[SPP_GROUP_SIZE] = { 0 }; - if (!s_alloc_batch_sz[0]) - { - // 32 bit bitmap - // ........ .... .... .. .. .. .. . . . . . . . . - // 8 12 16 18 20 22 24 25 26 ... 32 - // ------------------------------------------------------ - uint8_t group_sz = SPP_GROUP_SIZE / 4; - uint8_t group_start_alloc = SPP_GROUP_SIZE / 8; //4; - uint8_t alloc_sz = group_start_alloc; - for (int i=0; i<4; ++i) - { - for (int j=0; j 2) - group_start_alloc /= 2; - alloc_sz += group_start_alloc; - } - } - - return n ? static_cast(s_alloc_batch_sz[n-1]) : 0; // more aggressive alloc at the beginning - -#elif (SPP_ALLOC_SZ == 1) - // use as little memory as possible - slowest insert/delete in table - // ----------------------------------------------------------------- - return n; -#else - // decent compromise when SPP_ALLOC_SZ == 2 - // ---------------------------------------- - static size_type sz_minus_1 = SPP_ALLOC_SZ - 1; - return (n + sz_minus_1) & ~sz_minus_1; -#endif - } - - mutable_pointer _allocate_group(Alloc &alloc, uint32_t n /* , bool tight = false */) - { - // ignore tight since we don't store num_alloc - // num_alloc = (uint8_t)(tight ? n : _sizing(n)); - - uint32_t num_alloc = (uint8_t)_sizing(n); - _set_num_alloc(num_alloc); - mutable_pointer retval = alloc.allocate(static_cast(num_alloc)); - if (retval == NULL) - { - // the allocator is supposed to throw an exception if the allocation fails. - fprintf(stderr, "sparsehash FATAL ERROR: failed to allocate %d groups\n", num_alloc); - exit(1); - } - return retval; - } - - void _free_group(Alloc &alloc, uint32_t num_alloc) - { - if (_group) - { - uint32_t num_buckets = _num_items(); - if (num_buckets) - { - mutable_pointer end_it = _group + num_buckets; - for (mutable_pointer p = _group; p != end_it; ++p) - p->~mutable_value_type(); - } - alloc.deallocate(_group, (typename allocator_type::size_type)num_alloc); - _group = NULL; - } - } - - // private because should not be called - no allocator! - sparsegroup &operator=(const sparsegroup& x); - - static size_type _pos_to_offset(group_bm_type bm, size_type pos) - { - //return (size_type)((uint32_t)~((int32_t(-1) + pos) >> 31) & spp_popcount(bm << (SPP_GROUP_SIZE - pos))); - //return (size_type)(pos ? spp_popcount(bm << (SPP_GROUP_SIZE - pos)) : 0); - return static_cast(spp_popcount(bm & ((static_cast(1) << pos) - 1))); - } - -public: - - // get_iter() in sparsetable needs it - size_type pos_to_offset(size_type pos) const - { - return _pos_to_offset(_bitmap, pos); - } - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4146) -#endif - - // Returns the (logical) position in the bm[] array, i, such that - // bm[i] is the offset-th set bit in the array. It is the inverse - // of pos_to_offset. get_pos() uses this function to find the index - // of an ne_iterator in the table. Bit-twiddling from - // http://hackersdelight.org/basics.pdf - // ----------------------------------------------------------------- - static size_type offset_to_pos(group_bm_type bm, size_type offset) - { - for (; offset > 0; offset--) - bm &= (bm-1); // remove right-most set bit - - // Clear all bits to the left of the rightmost bit (the &), - // and then clear the rightmost bit but set all bits to the - // right of it (the -1). - // -------------------------------------------------------- - bm = (bm & -bm) - 1; - return static_cast(spp_popcount(bm)); - } - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - - size_type offset_to_pos(size_type offset) const - { - return offset_to_pos(_bitmap, offset); - } - -public: - // Constructors -- default and copy -- and destructor - explicit sparsegroup() : - _group(0), _bitmap(0), _bm_erased(0) - { - _set_num_items(0); - _set_num_alloc(0); - } - - sparsegroup(const sparsegroup& x) : - _group(0), _bitmap(x._bitmap), _bm_erased(x._bm_erased) - { - _set_num_items(0); - _set_num_alloc(0); - assert(_group == 0); if (_group) exit(1); - } - - sparsegroup(const sparsegroup& x, allocator_type& a) : - _group(0), _bitmap(x._bitmap), _bm_erased(x._bm_erased) - { - _set_num_items(0); - _set_num_alloc(0); - - uint32_t num_items = x._num_items(); - if (num_items) - { - _group = _allocate_group(a, num_items /* , true */); - _set_num_items(num_items); - std::uninitialized_copy(x._group, x._group + num_items, _group); - } - } - - ~sparsegroup() { assert(_group == 0); if (_group) exit(1); } - - void destruct(allocator_type& a) { _free_group(a, _num_alloc()); } - - // Many STL algorithms use swap instead of copy constructors - void swap(sparsegroup& x) - { - using std::swap; - - swap(_group, x._group); - swap(_bitmap, x._bitmap); - swap(_bm_erased, x._bm_erased); -#ifdef SPP_STORE_NUM_ITEMS - swap(_num_buckets, x._num_buckets); - swap(_num_allocated, x._num_allocated); -#endif - } - - // It's always nice to be able to clear a table without deallocating it - void clear(Alloc &alloc, bool erased) - { - _free_group(alloc, _num_alloc()); - _bitmap = 0; - if (erased) - _bm_erased = 0; - _set_num_items(0); - _set_num_alloc(0); - } - - // Functions that tell you about size. Alas, these aren't so useful - // because our table is always fixed size. - size_type size() const { return static_cast(SPP_GROUP_SIZE); } - size_type max_size() const { return static_cast(SPP_GROUP_SIZE); } - - bool empty() const { return false; } - - // We also may want to know how many *used* buckets there are - size_type num_nonempty() const { return (size_type)_num_items(); } - - // TODO(csilvers): make protected + friend - // This is used by sparse_hashtable to get an element from the table - // when we know it exists. - reference unsafe_get(size_type i) const - { - // assert(_bmtest(i)); - return (reference)_group[pos_to_offset(i)]; - } - - typedef std::pair SetResult; - -private: - typedef spp_::integral_constant::value && - spp_::is_same >::value)> - realloc_and_memmove_ok; - - // ------------------------- memory at *p is uninitialized => need to construct - void _init_val(mutable_value_type *p, reference val) - { -#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) - ::new (p) mutable_value_type(std::move(val)); -#else - ::new (p) mutable_value_type(val); -#endif - } - - // ------------------------- memory at *p is uninitialized => need to construct - void _init_val(mutable_value_type *p, const_reference val) - { - ::new (p) mutable_value_type(val); - } - - // ------------------------------------------------ memory at *p is initialized - void _set_val(mutable_value_type *p, reference val) - { -#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) - *p = std::move(val); -#else - using std::swap; - swap(*p, spp_mutable_ref(val)); -#endif - } - - // ------------------------------------------------ memory at *p is initialized - void _set_val(mutable_value_type *p, const_reference val) - { - *p = spp_const_mutable_ref(val); - } - - // Our default allocator - try to merge memory buffers - // right now it uses Google's traits, but we should use something like folly::IsRelocatable - // return true if the slot was constructed (i.e. contains a valid mutable_value_type - // --------------------------------------------------------------------------------- - template - void _set_aux(Alloc &alloc, size_type offset, Val &val, spp_::true_type) - { - //static int x=0; if (++x < 10) printf("x\n"); // check we are getting here - - uint32_t num_items = _num_items(); - uint32_t num_alloc = _sizing(num_items); - - if (num_items == num_alloc) - { - num_alloc = _sizing(num_items + 1); - _group = alloc.reallocate(_group, num_alloc); - _set_num_alloc(num_alloc); - } - - for (uint32_t i = num_items; i > offset; --i) - memcpy(_group + i, _group + i-1, sizeof(*_group)); - - _init_val(_group + offset, val); - } - - // Create space at _group[offset], without special assumptions about value_type - // and allocator_type, with a default value - // return true if the slot was constructed (i.e. contains a valid mutable_value_type - // --------------------------------------------------------------------------------- - template - void _set_aux(Alloc &alloc, size_type offset, Val &val, spp_::false_type) - { - uint32_t num_items = _num_items(); - uint32_t num_alloc = _sizing(num_items); - - //assert(num_alloc == (uint32_t)_num_allocated); - if (num_items < num_alloc) - { - // create new object at end and rotate it to position - _init_val(&_group[num_items], val); - std::rotate(_group + offset, _group + num_items, _group + num_items + 1); - return; - } - - // This is valid because 0 <= offset <= num_items - mutable_pointer p = _allocate_group(alloc, _sizing(num_items + 1)); - if (offset) - std::uninitialized_copy(MK_MOVE_IT(_group), - MK_MOVE_IT(_group + offset), - p); - if (num_items > offset) - std::uninitialized_copy(MK_MOVE_IT(_group + offset), - MK_MOVE_IT(_group + num_items), - p + offset + 1); - _init_val(p + offset, val); - _free_group(alloc, num_alloc); - _group = p; - } - - // ---------------------------------------------------------------------------------- - template - void _set(Alloc &alloc, size_type i, size_type offset, Val &val) - { - if (!_bmtest(i)) - { - _set_aux(alloc, offset, val, realloc_and_memmove_ok()); - _incr_num_items(); - _bmset(i); - } - else - _set_val(&_group[offset], val); - } - -public: - - // This returns the pointer to the inserted item - // --------------------------------------------- - template - pointer set(Alloc &alloc, size_type i, Val &val) - { - _bme_clear(i); // in case this was an "erased" location - - size_type offset = pos_to_offset(i); - _set(alloc, i, offset, val); // may change _group pointer - return (pointer)(_group + offset); - } - - // We let you see if a bucket is non-empty without retrieving it - // ------------------------------------------------------------- - bool test(size_type i) const - { - return _bmtest(i); - } - - // also tests for erased values - // ---------------------------- - bool test_strict(size_type i) const - { - return _bmtest_strict(i); - } - -private: - // Shrink the array, assuming value_type has trivial copy - // constructor and destructor, and the allocator_type is the default - // libc_allocator_with_alloc. - // ----------------------------------------------------------------------- - void _group_erase_aux(Alloc &alloc, size_type offset, spp_::true_type) - { - // static int x=0; if (++x < 10) printf("Y\n"); // check we are getting here - uint32_t num_items = _num_items(); - uint32_t num_alloc = _sizing(num_items); - - if (num_items == 1) - { - assert(offset == 0); - _free_group(alloc, num_alloc); - _set_num_alloc(0); - return; - } - - _group[offset].~mutable_value_type(); - - for (size_type i = offset; i < num_items - 1; ++i) - memcpy(_group + i, _group + i + 1, sizeof(*_group)); - - if (_sizing(num_items - 1) != num_alloc) - { - num_alloc = _sizing(num_items - 1); - assert(num_alloc); // because we have at least 1 item left - _set_num_alloc(num_alloc); - _group = alloc.reallocate(_group, num_alloc); - } - } - - // Shrink the array, without any special assumptions about value_type and - // allocator_type. - // -------------------------------------------------------------------------- - void _group_erase_aux(Alloc &alloc, size_type offset, spp_::false_type) - { - uint32_t num_items = _num_items(); - uint32_t num_alloc = _sizing(num_items); - - if (_sizing(num_items - 1) != num_alloc) - { - mutable_pointer p = 0; - if (num_items > 1) - { - p = _allocate_group(alloc, num_items - 1); - if (offset) - std::uninitialized_copy(MK_MOVE_IT(_group), - MK_MOVE_IT(_group + offset), - p); - if (static_cast(offset + 1) < num_items) - std::uninitialized_copy(MK_MOVE_IT(_group + offset + 1), - MK_MOVE_IT(_group + num_items), - p + offset); - } - else - { - assert(offset == 0); - _set_num_alloc(0); - } - _free_group(alloc, num_alloc); - _group = p; - } - else - { - std::rotate(_group + offset, _group + offset + 1, _group + num_items); - _group[num_items - 1].~mutable_value_type(); - } - } - - void _group_erase(Alloc &alloc, size_type offset) - { - _group_erase_aux(alloc, offset, realloc_and_memmove_ok()); - } - -public: - template - bool erase_ne(Alloc &alloc, twod_iter &it) - { - assert(_group && it.col_current != ne_end()); - size_type offset = (size_type)(it.col_current - ne_begin()); - size_type pos = offset_to_pos(offset); - - if (_num_items() <= 1) - { - clear(alloc, false); - it.col_current = 0; - } - else - { - _group_erase(alloc, offset); - _decr_num_items(); - _bmclear(pos); - - // in case _group_erase reallocated the buffer - it.col_current = reinterpret_cast(_group) + offset; - } - _bme_set(pos); // remember that this position has been erased - it.advance_past_end(); - return true; - } - - - // This takes the specified elements out of the group. This is - // "undefining", rather than "clearing". - // TODO(austern): Make this exception safe: handle exceptions from - // value_type's copy constructor. - // --------------------------------------------------------------- - void erase(Alloc &alloc, size_type i) - { - if (_bmtest(i)) - { - // trivial to erase empty bucket - if (_num_items() == 1) - clear(alloc, false); - else - { - _group_erase(alloc, pos_to_offset(i)); - _decr_num_items(); - _bmclear(i); - } - _bme_set(i); // remember that this position has been erased - } - } - - // I/O - // We support reading and writing groups to disk. We don't store - // the actual array contents (which we don't know how to store), - // just the bitmap and size. Meant to be used with table I/O. - // -------------------------------------------------------------- - template bool write_metadata(OUTPUT *fp) const - { - // warning: we write 4 or 8 bytes for the bitmap, instead of 6 in the - // original google sparsehash - // ------------------------------------------------------------------ - if (!sparsehash_internal::write_data(fp, &_bitmap, sizeof(_bitmap))) - return false; - - return true; - } - - // Reading destroys the old group contents! Returns true if all was ok. - template bool read_metadata(Alloc &alloc, INPUT *fp) - { - clear(alloc, true); - - if (!sparsehash_internal::read_data(fp, &_bitmap, sizeof(_bitmap))) - return false; - - // We'll allocate the space, but we won't fill it: it will be - // left as uninitialized raw memory. - uint32_t num_items = spp_popcount(_bitmap); // yes, _num_buckets not set - _set_num_items(num_items); - _group = num_items ? _allocate_group(alloc, num_items/* , true */) : 0; - return true; - } - - // Again, only meaningful if value_type is a POD. - template bool read_nopointer_data(INPUT *fp) - { - for (ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!sparsehash_internal::read_data(fp, &(*it), sizeof(*it))) - return false; - return true; - } - - // If your keys and values are simple enough, we can write them - // to disk for you. "simple enough" means POD and no pointers. - // However, we don't try to normalize endianness. - // ------------------------------------------------------------ - template bool write_nopointer_data(OUTPUT *fp) const - { - for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!sparsehash_internal::write_data(fp, &(*it), sizeof(*it))) - return false; - return true; - } - - - // Comparisons. We only need to define == and < -- we get - // != > <= >= via relops.h (which we happily included above). - // Note the comparisons are pretty arbitrary: we compare - // values of the first index that isn't equal (using default - // value for empty buckets). - // --------------------------------------------------------- - bool operator==(const sparsegroup& x) const - { - return (_bitmap == x._bitmap && - _bm_erased == x._bm_erased && - std::equal(_group, _group + _num_items(), x._group)); - } - - bool operator<(const sparsegroup& x) const - { - // also from - return std::lexicographical_compare(_group, _group + _num_items(), - x._group, x._group + x._num_items()); - } - - bool operator!=(const sparsegroup& x) const { return !(*this == x); } - bool operator<=(const sparsegroup& x) const { return !(x < *this); } - bool operator> (const sparsegroup& x) const { return x < *this; } - bool operator>=(const sparsegroup& x) const { return !(*this < x); } - - void mark() { _group = (mutable_value_type *)static_cast(-1); } - bool is_marked() const { return _group == (mutable_value_type *)static_cast(-1); } - -private: - // --------------------------------------------------------------------------- - template - class alloc_impl : public A - { - public: - typedef typename A::pointer pointer; - typedef typename A::size_type size_type; - - // Convert a normal allocator to one that has realloc_or_die() - explicit alloc_impl(const A& a) : A(a) { } - - // realloc_or_die should only be used when using the default - // allocator (libc_allocator_with_realloc). - pointer realloc_or_die(pointer /*ptr*/, size_type /*n*/) - { - fprintf(stderr, "realloc_or_die is only supported for " - "libc_allocator_with_realloc\n"); - exit(1); - return NULL; - } - }; - - // A template specialization of alloc_impl for - // libc_allocator_with_realloc that can handle realloc_or_die. - // ----------------------------------------------------------- - template - class alloc_impl > - : public libc_allocator_with_realloc - { - public: - typedef typename libc_allocator_with_realloc::pointer pointer; - typedef typename libc_allocator_with_realloc::size_type size_type; - - explicit alloc_impl(const libc_allocator_with_realloc& a) - : libc_allocator_with_realloc(a) - { } - - pointer realloc_or_die(pointer ptr, size_type n) - { - pointer retval = this->reallocate(ptr, n); - if (retval == NULL) { - fprintf(stderr, "sparsehash: FATAL ERROR: failed to reallocate " - "%lu elements for ptr %p", static_cast(n), ptr); - exit(1); - } - return retval; - } - }; - -#ifdef SPP_STORE_NUM_ITEMS - uint32_t _num_items() const { return (uint32_t)_num_buckets; } - void _set_num_items(uint32_t val) { _num_buckets = static_cast(val); } - void _incr_num_items() { ++_num_buckets; } - void _decr_num_items() { --_num_buckets; } - uint32_t _num_alloc() const { return (uint32_t)_num_allocated; } - void _set_num_alloc(uint32_t val) { _num_allocated = static_cast(val); } -#else - uint32_t _num_items() const { return spp_popcount(_bitmap); } - void _set_num_items(uint32_t ) { } - void _incr_num_items() { } - void _decr_num_items() { } - uint32_t _num_alloc() const { return _sizing(_num_items()); } - void _set_num_alloc(uint32_t val) { } -#endif - - // The actual data - // --------------- - mutable_value_type * _group; // (small) array of T's - group_bm_type _bitmap; - group_bm_type _bm_erased; // ones where items have been erased - -#ifdef SPP_STORE_NUM_ITEMS - size_type _num_buckets; - size_type _num_allocated; -#endif -}; - -// --------------------------------------------------------------------------- -// We need a global swap as well -// --------------------------------------------------------------------------- -template -inline void swap(sparsegroup &x, sparsegroup &y) -{ - x.swap(y); -} - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -template > -class sparsetable -{ -private: - typedef typename Alloc::template rebind::other value_alloc_type; - - typedef typename Alloc::template rebind< - sparsegroup >::other group_alloc_type; - typedef typename group_alloc_type::size_type group_size_type; - - typedef T mutable_value_type; - typedef mutable_value_type* mutable_pointer; - typedef const mutable_value_type* const_mutable_pointer; - -public: - // Basic types - // ----------- - typedef typename spp::cvt::type value_type; - typedef Alloc allocator_type; - typedef typename value_alloc_type::size_type size_type; - typedef typename value_alloc_type::difference_type difference_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* pointer; - typedef const value_type* const_pointer; - - typedef sparsegroup group_type; - - typedef group_type& GroupsReference; - typedef const group_type& GroupsConstReference; - - typedef typename group_type::ne_iterator ColIterator; - typedef typename group_type::const_ne_iterator ColConstIterator; - - typedef table_iterator > iterator; // defined with index - typedef const_table_iterator > const_iterator; // defined with index - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - // These are our special iterators, that go over non-empty buckets in a - // table. These aren't const only because you can change non-empty bcks. - // ---------------------------------------------------------------------- - typedef Two_d_iterator ne_iterator; - - typedef Two_d_iterator const_ne_iterator; - - // Another special iterator: it frees memory as it iterates (used to resize). - // Obviously, you can only iterate over it once, which is why it's an input iterator - // --------------------------------------------------------------------------------- - typedef Two_d_destructive_iterator destructive_iterator; - - typedef std::reverse_iterator reverse_ne_iterator; - typedef std::reverse_iterator const_reverse_ne_iterator; - - - // Iterator functions - // ------------------ - iterator begin() { return iterator(this, 0); } - const_iterator begin() const { return const_iterator(this, 0); } - const_iterator cbegin() const { return const_iterator(this, 0); } - iterator end() { return iterator(this, size()); } - const_iterator end() const { return const_iterator(this, size()); } - const_iterator cend() const { return const_iterator(this, size()); } - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { return const_reverse_iterator(cend()); } - const_reverse_iterator crbegin() const { return const_reverse_iterator(cend()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { return const_reverse_iterator(cbegin()); } - const_reverse_iterator crend() const { return const_reverse_iterator(cbegin()); } - - // Versions for our special non-empty iterator - // ------------------------------------------ - ne_iterator ne_begin() { return ne_iterator (_first_group); } - const_ne_iterator ne_begin() const { return const_ne_iterator(_first_group); } - const_ne_iterator ne_cbegin() const { return const_ne_iterator(_first_group); } - ne_iterator ne_end() { return ne_iterator (_last_group); } - const_ne_iterator ne_end() const { return const_ne_iterator(_last_group); } - const_ne_iterator ne_cend() const { return const_ne_iterator(_last_group); } - - reverse_ne_iterator ne_rbegin() { return reverse_ne_iterator(ne_end()); } - const_reverse_ne_iterator ne_rbegin() const { return const_reverse_ne_iterator(ne_end()); } - const_reverse_ne_iterator ne_crbegin() const { return const_reverse_ne_iterator(ne_end()); } - reverse_ne_iterator ne_rend() { return reverse_ne_iterator(ne_begin()); } - const_reverse_ne_iterator ne_rend() const { return const_reverse_ne_iterator(ne_begin()); } - const_reverse_ne_iterator ne_crend() const { return const_reverse_ne_iterator(ne_begin()); } - - destructive_iterator destructive_begin() - { - return destructive_iterator(_alloc, _first_group); - } - - destructive_iterator destructive_end() - { - return destructive_iterator(_alloc, _last_group); - } - - // How to deal with the proper group - static group_size_type num_groups(group_size_type num) - { - // how many to hold num buckets - return num == 0 ? (group_size_type)0 : - (group_size_type)(((num-1) / SPP_GROUP_SIZE) + 1); - } - - typename group_type::size_type pos_in_group(size_type i) const - { - return static_cast(i & SPP_MASK_); - } - - size_type group_num(size_type i) const - { - return (size_type)(i >> SPP_SHIFT_); - } - - GroupsReference which_group(size_type i) - { - return _first_group[group_num(i)]; - } - - GroupsConstReference which_group(size_type i) const - { - return _first_group[group_num(i)]; - } - - void _alloc_group_array(group_size_type sz, group_type *&first, group_type *&last) - { - if (sz) - { - first = _group_alloc.allocate((size_type)(sz + 1)); // + 1 for end marker - first[sz].mark(); // for the ne_iterator - last = first + sz; - } - } - - void _free_group_array(group_type *&first, group_type *&last) - { - if (first) - { - _group_alloc.deallocate(first, (group_size_type)(last - first + 1)); // + 1 for end marker - first = last = 0; - } - } - - void _allocate_groups(size_type sz) - { - if (sz) - { - _alloc_group_array(sz, _first_group, _last_group); - std::uninitialized_fill(_first_group, _last_group, group_type()); - } - } - - void _free_groups() - { - if (_first_group) - { - for (group_type *g = _first_group; g != _last_group; ++g) - g->destruct(_alloc); - _free_group_array(_first_group, _last_group); - } - } - - void _cleanup() - { - _free_groups(); // sets _first_group = _last_group = 0 - _table_size = 0; - _num_buckets = 0; - } - - void _init() - { - _first_group = 0; - _last_group = 0; - _table_size = 0; - _num_buckets = 0; - } - - void _copy(const sparsetable &o) - { - _table_size = o._table_size; - _num_buckets = o._num_buckets; - _alloc = o._alloc; // todo - copy or move allocator according to... - _group_alloc = o._group_alloc; // http://en.cppreference.com/w/cpp/container/unordered_map/unordered_map - - group_size_type sz = (group_size_type)(o._last_group - o._first_group); - if (sz) - { - _alloc_group_array(sz, _first_group, _last_group); - for (group_size_type i=0; iswap(o); - } - - sparsetable(sparsetable&& o, const Alloc &alloc) - { - _init(); - this->swap(o); - _alloc = alloc; // [gp todo] is this correct? - } - - sparsetable& operator=(sparsetable&& o) - { - _cleanup(); - this->swap(o); - return *this; - } -#endif - - // Many STL algorithms use swap instead of copy constructors - void swap(sparsetable& o) - { - using std::swap; - - swap(_first_group, o._first_group); - swap(_last_group, o._last_group); - swap(_table_size, o._table_size); - swap(_num_buckets, o._num_buckets); - if (_alloc != o._alloc) - swap(_alloc, o._alloc); - if (_group_alloc != o._group_alloc) - swap(_group_alloc, o._group_alloc); - } - - // It's always nice to be able to clear a table without deallocating it - void clear() - { - _free_groups(); - _num_buckets = 0; - _table_size = 0; - } - - inline allocator_type get_allocator() const - { - return _alloc; - } - - - // Functions that tell you about size. - // NOTE: empty() is non-intuitive! It does not tell you the number - // of not-empty buckets (use num_nonempty() for that). Instead - // it says whether you've allocated any buckets or not. - // ---------------------------------------------------------------- - size_type size() const { return _table_size; } - size_type max_size() const { return _alloc.max_size(); } - bool empty() const { return _table_size == 0; } - size_type num_nonempty() const { return _num_buckets; } - - // OK, we'll let you resize one of these puppies - void resize(size_type new_size) - { - group_size_type sz = num_groups(new_size); - group_size_type old_sz = (group_size_type)(_last_group - _first_group); - - if (sz != old_sz) - { - // resize group array - // ------------------ - group_type *first = 0, *last = 0; - if (sz) - { - _alloc_group_array(sz, first, last); - memcpy(first, _first_group, sizeof(*first) * (std::min)(sz, old_sz)); - } - - if (sz < old_sz) - { - for (group_type *g = _first_group + sz; g != _last_group; ++g) - g->destruct(_alloc); - } - else - std::uninitialized_fill(first + old_sz, last, group_type()); - - _free_group_array(_first_group, _last_group); - _first_group = first; - _last_group = last; - } -#if 0 - // used only in test program - // todo: fix if sparsetable to be used directly - // -------------------------------------------- - if (new_size < _table_size) - { - // lower num_buckets, clear last group - if (pos_in_group(new_size) > 0) // need to clear inside last group - groups.back().erase(_alloc, groups.back().begin() + pos_in_group(new_size), - groups.back().end()); - _num_buckets = 0; // refigure # of used buckets - for (const group_type *group = _first_group; group != _last_group; ++group) - _num_buckets += group->num_nonempty(); - } -#endif - _table_size = new_size; - } - - // We let you see if a bucket is non-empty without retrieving it - // ------------------------------------------------------------- - bool test(size_type i) const - { - // assert(i < _table_size); - return which_group(i).test(pos_in_group(i)); - } - - // also tests for erased values - // ---------------------------- - bool test_strict(size_type i) const - { - // assert(i < _table_size); - return which_group(i).test_strict(pos_in_group(i)); - } - - friend struct GrpPos; - - struct GrpPos - { - typedef typename sparsetable::ne_iterator ne_iter; - GrpPos(const sparsetable &table, size_type i) : - grp(table.which_group(i)), pos(table.pos_in_group(i)) {} - - bool test_strict() const { return grp.test_strict(pos); } - bool test() const { return grp.test(pos); } - typename sparsetable::reference unsafe_get() const { return grp.unsafe_get(pos); } - ne_iter get_iter(typename sparsetable::reference ref) - { - return ne_iter((group_type *)&grp, &ref); - } - - void erase(sparsetable &table) // item *must* be present - { - assert(table._num_buckets); - ((group_type &)grp).erase(table._alloc, pos); - --table._num_buckets; - } - - private: - GrpPos* operator=(const GrpPos&); - - const group_type &grp; - typename group_type::size_type pos; - }; - - bool test(iterator pos) const - { - return which_group(pos.pos).test(pos_in_group(pos.pos)); - } - - bool test(const_iterator pos) const - { - return which_group(pos.pos).test(pos_in_group(pos.pos)); - } - - // TODO(csilvers): make protected + friend - // This is used by sparse_hashtable to get an element from the table - // when we know it exists (because the caller has called test(i)). - // ----------------------------------------------------------------- - reference unsafe_get(size_type i) const - { - assert(i < _table_size); - // assert(test(i)); - return which_group(i).unsafe_get(pos_in_group(i)); - } - - // Needed for hashtables, gets as a ne_iterator. Crashes for empty bcks - const_ne_iterator get_iter(size_type i) const - { - //assert(test(i)); // how can a ne_iterator point to an empty bucket? - - size_type grp_idx = group_num(i); - - return const_ne_iterator(_first_group + grp_idx, - (_first_group[grp_idx].ne_begin() + - _first_group[grp_idx].pos_to_offset(pos_in_group(i)))); - } - - const_ne_iterator get_iter(size_type i, ColIterator col_it) const - { - return const_ne_iterator(_first_group + group_num(i), col_it); - } - - // For nonempty we can return a non-const version - ne_iterator get_iter(size_type i) - { - //assert(test(i)); // how can a nonempty_iterator point to an empty bucket? - - size_type grp_idx = group_num(i); - - return ne_iterator(_first_group + grp_idx, - (_first_group[grp_idx].ne_begin() + - _first_group[grp_idx].pos_to_offset(pos_in_group(i)))); - } - - ne_iterator get_iter(size_type i, ColIterator col_it) - { - return ne_iterator(_first_group + group_num(i), col_it); - } - - // And the reverse transformation. - size_type get_pos(const const_ne_iterator& it) const - { - difference_type current_row = it.row_current - _first_group; - difference_type current_col = (it.col_current - _first_group[current_row].ne_begin()); - return ((current_row * SPP_GROUP_SIZE) + - _first_group[current_row].offset_to_pos(current_col)); - } - - // Val can be reference or const_reference - // --------------------------------------- - template - reference set(size_type i, Val &val) - { - assert(i < _table_size); - group_type &group = which_group(i); - typename group_type::size_type old_numbuckets = group.num_nonempty(); - pointer p(group.set(_alloc, pos_in_group(i), val)); - _num_buckets += group.num_nonempty() - old_numbuckets; - return *p; - } - - // used in _move_from (where we can move the old value instead of copying it - void move(size_type i, reference val) - { - assert(i < _table_size); - which_group(i).set(_alloc, pos_in_group(i), val); - ++_num_buckets; - } - - // This takes the specified elements out of the table. - // -------------------------------------------------- - void erase(size_type i) - { - assert(i < _table_size); - - GroupsReference grp(which_group(i)); - typename group_type::size_type old_numbuckets = grp.num_nonempty(); - grp.erase(_alloc, pos_in_group(i)); - _num_buckets += grp.num_nonempty() - old_numbuckets; - } - - void erase(iterator pos) - { - erase(pos.pos); - } - - void erase(iterator start_it, iterator end_it) - { - // This could be more efficient, but then we'd need to figure - // out if we spanned groups or not. Doesn't seem worth it. - for (; start_it != end_it; ++start_it) - erase(start_it); - } - - const_ne_iterator erase(const_ne_iterator it) - { - ne_iterator res(it); - if (res.row_current->erase_ne(_alloc, res)) - _num_buckets--; - return res; - } - - const_ne_iterator erase(const_ne_iterator f, const_ne_iterator l) - { - size_t diff = l - f; - while (diff--) - f = erase(f); - return f; - } - - // We support reading and writing tables to disk. We don't store - // the actual array contents (which we don't know how to store), - // just the groups and sizes. Returns true if all went ok. - -private: - // Every time the disk format changes, this should probably change too - typedef unsigned long MagicNumberType; - static const MagicNumberType MAGIC_NUMBER = 0x24687531; - - // Old versions of this code write all data in 32 bits. We need to - // support these files as well as having support for 64-bit systems. - // So we use the following encoding scheme: for values < 2^32-1, we - // store in 4 bytes in big-endian order. For values > 2^32, we - // store 0xFFFFFFF followed by 8 bytes in big-endian order. This - // causes us to mis-read old-version code that stores exactly - // 0xFFFFFFF, but I don't think that is likely to have happened for - // these particular values. - template - static bool write_32_or_64(OUTPUT* fp, IntType value) - { - if (value < 0xFFFFFFFFULL) { // fits in 4 bytes - if (!sparsehash_internal::write_bigendian_number(fp, value, 4)) - return false; - } - else - { - if (!sparsehash_internal::write_bigendian_number(fp, 0xFFFFFFFFUL, 4)) - return false; - if (!sparsehash_internal::write_bigendian_number(fp, value, 8)) - return false; - } - return true; - } - - template - static bool read_32_or_64(INPUT* fp, IntType *value) - { // reads into value - MagicNumberType first4 = 0; // a convenient 32-bit unsigned type - if (!sparsehash_internal::read_bigendian_number(fp, &first4, 4)) - return false; - - if (first4 < 0xFFFFFFFFULL) - { - *value = first4; - } - else - { - if (!sparsehash_internal::read_bigendian_number(fp, value, 8)) - return false; - } - return true; - } - -public: - // read/write_metadata() and read_write/nopointer_data() are DEPRECATED. - // Use serialize() and unserialize(), below, for new code. - - template - bool write_metadata(OUTPUT *fp) const - { - if (!write_32_or_64(fp, MAGIC_NUMBER)) return false; - if (!write_32_or_64(fp, _table_size)) return false; - if (!write_32_or_64(fp, _num_buckets)) return false; - - for (const group_type *group = _first_group; group != _last_group; ++group) - if (group->write_metadata(fp) == false) - return false; - return true; - } - - // Reading destroys the old table contents! Returns true if read ok. - template - bool read_metadata(INPUT *fp) - { - size_type magic_read = 0; - if (!read_32_or_64(fp, &magic_read)) return false; - if (magic_read != MAGIC_NUMBER) - { - clear(); // just to be consistent - return false; - } - - if (!read_32_or_64(fp, &_table_size)) return false; - if (!read_32_or_64(fp, &_num_buckets)) return false; - - resize(_table_size); // so the vector's sized ok - for (group_type *group = _first_group; group != _last_group; ++group) - if (group->read_metadata(_alloc, fp) == false) - return false; - return true; - } - - // This code is identical to that for SparseGroup - // If your keys and values are simple enough, we can write them - // to disk for you. "simple enough" means no pointers. - // However, we don't try to normalize endianness - bool write_nopointer_data(FILE *fp) const - { - for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!fwrite(&*it, sizeof(*it), 1, fp)) - return false; - return true; - } - - // When reading, we have to override the potential const-ness of *it - bool read_nopointer_data(FILE *fp) - { - for (ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!fread(reinterpret_cast(&(*it)), sizeof(*it), 1, fp)) - return false; - return true; - } - - // INPUT and OUTPUT must be either a FILE, *or* a C++ stream - // (istream, ostream, etc) *or* a class providing - // Read(void*, size_t) and Write(const void*, size_t) - // (respectively), which writes a buffer into a stream - // (which the INPUT/OUTPUT instance presumably owns). - - typedef sparsehash_internal::pod_serializer NopointerSerializer; - - // ValueSerializer: a functor. operator()(OUTPUT*, const value_type&) - template - bool serialize(ValueSerializer serializer, OUTPUT *fp) - { - if (!write_metadata(fp)) - return false; - for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!serializer(fp, *it)) - return false; - return true; - } - - // ValueSerializer: a functor. operator()(INPUT*, value_type*) - template - bool unserialize(ValueSerializer serializer, INPUT *fp) - { - clear(); - if (!read_metadata(fp)) - return false; - for (ne_iterator it = ne_begin(); it != ne_end(); ++it) - if (!serializer(fp, &*it)) - return false; - return true; - } - - // Comparisons. Note the comparisons are pretty arbitrary: we - // compare values of the first index that isn't equal (using default - // value for empty buckets). - bool operator==(const sparsetable& x) const - { - return (_table_size == x._table_size && - _num_buckets == x._num_buckets && - _first_group == x._first_group); - } - - bool operator<(const sparsetable& x) const - { - return std::lexicographical_compare(begin(), end(), x.begin(), x.end()); - } - bool operator!=(const sparsetable& x) const { return !(*this == x); } - bool operator<=(const sparsetable& x) const { return !(x < *this); } - bool operator>(const sparsetable& x) const { return x < *this; } - bool operator>=(const sparsetable& x) const { return !(*this < x); } - - -private: - // The actual data - // --------------- - group_type * _first_group; - group_type * _last_group; - size_type _table_size; // how many buckets they want - size_type _num_buckets; // number of non-empty buckets - group_alloc_type _group_alloc; - value_alloc_type _alloc; -}; - -// We need a global swap as well -// --------------------------------------------------------------------------- -template -inline void swap(sparsetable &x, sparsetable &y) -{ - x.swap(y); -} - - -// ---------------------------------------------------------------------- -// S P A R S E _ H A S H T A B L E -// ---------------------------------------------------------------------- -// Hashtable class, used to implement the hashed associative containers -// hash_set and hash_map. -// -// Value: what is stored in the table (each bucket is a Value). -// Key: something in a 1-to-1 correspondence to a Value, that can be used -// to search for a Value in the table (find() takes a Key). -// HashFcn: Takes a Key and returns an integer, the more unique the better. -// ExtractKey: given a Value, returns the unique Key associated with it. -// Must inherit from unary_function, or at least have a -// result_type enum indicating the return type of operator(). -// EqualKey: Given two Keys, says whether they are the same (that is, -// if they are both associated with the same Value). -// Alloc: STL allocator to use to allocate memory. -// -// ---------------------------------------------------------------------- - -// The probing method -// ------------------ -// Linear probing -// #define JUMP_(key, num_probes) ( 1 ) -// Quadratic probing -#define JUMP_(key, num_probes) ( num_probes ) - - -// ------------------------------------------------------------------- -// ------------------------------------------------------------------- -template -class sparse_hashtable -{ -private: - typedef Value mutable_value_type; - typedef typename Alloc::template rebind::other value_alloc_type; - -public: - typedef Key key_type; - typedef typename spp::cvt::type value_type; - typedef HashFcn hasher; // user provided or spp_hash - typedef EqualKey key_equal; - typedef Alloc allocator_type; - - typedef typename value_alloc_type::size_type size_type; - typedef typename value_alloc_type::difference_type difference_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* pointer; - typedef const value_type* const_pointer; - - // Table is the main storage class. - typedef sparsetable Table; - typedef typename Table::ne_iterator ne_it; - typedef typename Table::const_ne_iterator cne_it; - typedef typename Table::destructive_iterator dest_it; - typedef typename Table::ColIterator ColIterator; - - typedef ne_it iterator; - typedef cne_it const_iterator; - typedef dest_it destructive_iterator; - - // These come from tr1. For us they're the same as regular iterators. - // ------------------------------------------------------------------- - typedef iterator local_iterator; - typedef const_iterator const_local_iterator; - - // How full we let the table get before we resize - // ---------------------------------------------- - static const int HT_OCCUPANCY_PCT; // = 80 (out of 100); - - // How empty we let the table get before we resize lower, by default. - // (0.0 means never resize lower.) - // It should be less than OCCUPANCY_PCT / 2 or we thrash resizing - // ------------------------------------------------------------------ - static const int HT_EMPTY_PCT; // = 0.4 * HT_OCCUPANCY_PCT; - - // Minimum size we're willing to let hashtables be. - // Must be a power of two, and at least 4. - // Note, however, that for a given hashtable, the initial size is a - // function of the first constructor arg, and may be >HT_MIN_BUCKETS. - // ------------------------------------------------------------------ - static const size_type HT_MIN_BUCKETS = 4; - - // By default, if you don't specify a hashtable size at - // construction-time, we use this size. Must be a power of two, and - // at least HT_MIN_BUCKETS. - // ----------------------------------------------------------------- - static const size_type HT_DEFAULT_STARTING_BUCKETS = 32; - - // iterators - // --------- - iterator begin() { return _mk_iterator(table.ne_begin()); } - iterator end() { return _mk_iterator(table.ne_end()); } - const_iterator begin() const { return _mk_const_iterator(table.ne_cbegin()); } - const_iterator end() const { return _mk_const_iterator(table.ne_cend()); } - const_iterator cbegin() const { return _mk_const_iterator(table.ne_cbegin()); } - const_iterator cend() const { return _mk_const_iterator(table.ne_cend()); } - - // These come from tr1 unordered_map. They iterate over 'bucket' n. - // For sparsehashtable, we could consider each 'group' to be a bucket, - // I guess, but I don't really see the point. We'll just consider - // bucket n to be the n-th element of the sparsetable, if it's occupied, - // or some empty element, otherwise. - // --------------------------------------------------------------------- - local_iterator begin(size_type i) - { - return _mk_iterator(table.test(i) ? table.get_iter(i) : table.ne_end()); - } - - local_iterator end(size_type i) - { - local_iterator it = begin(i); - if (table.test(i)) - ++it; - return _mk_iterator(it); - } - - const_local_iterator begin(size_type i) const - { - return _mk_const_iterator(table.test(i) ? table.get_iter(i) : table.ne_cend()); - } - - const_local_iterator end(size_type i) const - { - const_local_iterator it = begin(i); - if (table.test(i)) - ++it; - return _mk_const_iterator(it); - } - - const_local_iterator cbegin(size_type i) const { return begin(i); } - const_local_iterator cend(size_type i) const { return end(i); } - - // This is used when resizing - // -------------------------- - destructive_iterator destructive_begin() { return _mk_destructive_iterator(table.destructive_begin()); } - destructive_iterator destructive_end() { return _mk_destructive_iterator(table.destructive_end()); } - - - // accessor functions for the things we templatize on, basically - // ------------------------------------------------------------- - hasher hash_funct() const { return settings; } - key_equal key_eq() const { return key_info; } - allocator_type get_allocator() const { return table.get_allocator(); } - - // Accessor function for statistics gathering. - unsigned int num_table_copies() const { return settings.num_ht_copies(); } - -private: - // This is used as a tag for the copy constructor, saying to destroy its - // arg We have two ways of destructively copying: with potentially growing - // the hashtable as we copy, and without. To make sure the outside world - // can't do a destructive copy, we make the typename private. - // ----------------------------------------------------------------------- - enum MoveDontCopyT {MoveDontCopy, MoveDontGrow}; - - void _squash_deleted() - { - // gets rid of any deleted entries we have - // --------------------------------------- - if (num_deleted) - { - // get rid of deleted before writing - sparse_hashtable tmp(MoveDontGrow, *this); - swap(tmp); // now we are tmp - } - assert(num_deleted == 0); - } - - // creating iterators from sparsetable::ne_iterators - // ------------------------------------------------- - iterator _mk_iterator(ne_it it) const { return it; } - const_iterator _mk_const_iterator(cne_it it) const { return it; } - destructive_iterator _mk_destructive_iterator(dest_it it) const { return it; } - -public: - size_type size() const { return table.num_nonempty(); } - size_type max_size() const { return table.max_size(); } - bool empty() const { return size() == 0; } - size_type bucket_count() const { return table.size(); } - size_type max_bucket_count() const { return max_size(); } - // These are tr1 methods. Their idea of 'bucket' doesn't map well to - // what we do. We just say every bucket has 0 or 1 items in it. - size_type bucket_size(size_type i) const - { - return (size_type)(begin(i) == end(i) ? 0 : 1); - } - -private: - // Because of the above, size_type(-1) is never legal; use it for errors - // --------------------------------------------------------------------- - static const size_type ILLEGAL_BUCKET = size_type(-1); - - // Used after a string of deletes. Returns true if we actually shrunk. - // TODO(csilvers): take a delta so we can take into account inserts - // done after shrinking. Maybe make part of the Settings class? - // -------------------------------------------------------------------- - bool _maybe_shrink() - { - assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two - assert(bucket_count() >= HT_MIN_BUCKETS); - bool retval = false; - - // If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS, - // we'll never shrink until you get relatively big, and we'll never - // shrink below HT_DEFAULT_STARTING_BUCKETS. Otherwise, something - // like "dense_hash_set x; x.insert(4); x.erase(4);" will - // shrink us down to HT_MIN_BUCKETS buckets, which is too small. - // --------------------------------------------------------------- - const size_type num_remain = table.num_nonempty(); - const size_type shrink_threshold = settings.shrink_threshold(); - if (shrink_threshold > 0 && num_remain < shrink_threshold && - bucket_count() > HT_DEFAULT_STARTING_BUCKETS) - { - const float shrink_factor = settings.shrink_factor(); - size_type sz = (size_type)(bucket_count() / 2); // find how much we should shrink - while (sz > HT_DEFAULT_STARTING_BUCKETS && - num_remain < static_cast(sz * shrink_factor)) - { - sz /= 2; // stay a power of 2 - } - sparse_hashtable tmp(MoveDontCopy, *this, sz); - swap(tmp); // now we are tmp - retval = true; - } - settings.set_consider_shrink(false); // because we just considered it - return retval; - } - - // We'll let you resize a hashtable -- though this makes us copy all! - // When you resize, you say, "make it big enough for this many more elements" - // Returns true if we actually resized, false if size was already ok. - // -------------------------------------------------------------------------- - bool _resize_delta(size_type delta) - { - bool did_resize = false; - if (settings.consider_shrink()) - { - // see if lots of deletes happened - if (_maybe_shrink()) - did_resize = true; - } - if (table.num_nonempty() >= - (std::numeric_limits::max)() - delta) - { - throw_exception(std::length_error("resize overflow")); - } - - size_type num_occupied = (size_type)(table.num_nonempty() + num_deleted); - - if (bucket_count() >= HT_MIN_BUCKETS && - (num_occupied + delta) <= settings.enlarge_threshold()) - return did_resize; // we're ok as we are - - // Sometimes, we need to resize just to get rid of all the - // "deleted" buckets that are clogging up the hashtable. So when - // deciding whether to resize, count the deleted buckets (which - // are currently taking up room). - // ------------------------------------------------------------- - const size_type needed_size = - settings.min_buckets((size_type)(num_occupied + delta), (size_type)0); - - if (needed_size <= bucket_count()) // we have enough buckets - return did_resize; - - size_type resize_to = settings.min_buckets((size_type)(num_occupied + delta), bucket_count()); - - if (resize_to < needed_size && // may double resize_to - resize_to < (std::numeric_limits::max)() / 2) - { - // This situation means that we have enough deleted elements, - // that once we purge them, we won't actually have needed to - // grow. But we may want to grow anyway: if we just purge one - // element, say, we'll have to grow anyway next time we - // insert. Might as well grow now, since we're already going - // through the trouble of copying (in order to purge the - // deleted elements). - const size_type target = - static_cast(settings.shrink_size((size_type)(resize_to*2))); - if (table.num_nonempty() + delta >= target) - { - // Good, we won't be below the shrink threshhold even if we double. - resize_to *= 2; - } - } - - sparse_hashtable tmp(MoveDontCopy, *this, resize_to); - swap(tmp); // now we are tmp - return true; - } - - // Used to actually do the rehashing when we grow/shrink a hashtable - // ----------------------------------------------------------------- - void _copy_from(const sparse_hashtable &ht, size_type min_buckets_wanted) - { - clear(); // clear table, set num_deleted to 0 - - // If we need to change the size of our table, do it now - const size_type resize_to = settings.min_buckets(ht.size(), min_buckets_wanted); - - if (resize_to > bucket_count()) - { - // we don't have enough buckets - table.resize(resize_to); // sets the number of buckets - settings.reset_thresholds(bucket_count()); - } - - // We use a normal iterator to get bcks from ht - // We could use insert() here, but since we know there are - // no duplicates, we can be more efficient - assert((bucket_count() & (bucket_count()-1)) == 0); // a power of two - for (const_iterator it = ht.begin(); it != ht.end(); ++it) - { - size_type num_probes = 0; // how many times we've probed - size_type bucknum; - const size_type bucket_count_minus_one = bucket_count() - 1; - for (bucknum = hash(get_key(*it)) & bucket_count_minus_one; - table.test(bucknum); // table.test() OK since no erase() - bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) - { - ++num_probes; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - table.set(bucknum, *it); // copies the value to here - } - settings.inc_num_ht_copies(); - } - - // Implementation is like _copy_from, but it destroys the table of the - // "from" guy by freeing sparsetable memory as we iterate. This is - // useful in resizing, since we're throwing away the "from" guy anyway. - // -------------------------------------------------------------------- - void _move_from(MoveDontCopyT mover, sparse_hashtable &ht, - size_type min_buckets_wanted) - { - clear(); - - // If we need to change the size of our table, do it now - size_type resize_to; - if (mover == MoveDontGrow) - resize_to = ht.bucket_count(); // keep same size as old ht - else // MoveDontCopy - resize_to = settings.min_buckets(ht.size(), min_buckets_wanted); - if (resize_to > bucket_count()) - { - // we don't have enough buckets - table.resize(resize_to); // sets the number of buckets - settings.reset_thresholds(bucket_count()); - } - - // We use a normal iterator to get bcks from ht - // We could use insert() here, but since we know there are - // no duplicates, we can be more efficient - assert((bucket_count() & (bucket_count()-1)) == 0); // a power of two - const size_type bucket_count_minus_one = (const size_type)(bucket_count() - 1); - - // THIS IS THE MAJOR LINE THAT DIFFERS FROM COPY_FROM(): - for (destructive_iterator it = ht.destructive_begin(); - it != ht.destructive_end(); ++it) - { - size_type num_probes = 0; - size_type bucknum; - for (bucknum = hash(get_key(*it)) & bucket_count_minus_one; - table.test(bucknum); // table.test() OK since no erase() - bucknum = (size_type)((bucknum + JUMP_(key, num_probes)) & (bucket_count()-1))) - { - ++num_probes; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - table.move(bucknum, *it); // moves the value to here - } - settings.inc_num_ht_copies(); - } - - - // Required by the spec for hashed associative container -public: - // Though the docs say this should be num_buckets, I think it's much - // more useful as num_elements. As a special feature, calling with - // req_elements==0 will cause us to shrink if we can, saving space. - // ----------------------------------------------------------------- - void resize(size_type req_elements) - { - // resize to this or larger - if (settings.consider_shrink() || req_elements == 0) - _maybe_shrink(); - if (req_elements > table.num_nonempty()) // we only grow - _resize_delta((size_type)(req_elements - table.num_nonempty())); - } - - // Get and change the value of shrink_factor and enlarge_factor. The - // description at the beginning of this file explains how to choose - // the values. Setting the shrink parameter to 0.0 ensures that the - // table never shrinks. - // ------------------------------------------------------------------ - void get_resizing_parameters(float* shrink, float* grow) const - { - *shrink = settings.shrink_factor(); - *grow = settings.enlarge_factor(); - } - - float get_shrink_factor() const { return settings.shrink_factor(); } - float get_enlarge_factor() const { return settings.enlarge_factor(); } - - void set_resizing_parameters(float shrink, float grow) { - settings.set_resizing_parameters(shrink, grow); - settings.reset_thresholds(bucket_count()); - } - - void set_shrink_factor(float shrink) - { - set_resizing_parameters(shrink, get_enlarge_factor()); - } - - void set_enlarge_factor(float grow) - { - set_resizing_parameters(get_shrink_factor(), grow); - } - - // CONSTRUCTORS -- as required by the specs, we take a size, - // but also let you specify a hashfunction, key comparator, - // and key extractor. We also define a copy constructor and =. - // DESTRUCTOR -- the default is fine, surprisingly. - // ------------------------------------------------------------ - explicit sparse_hashtable(size_type expected_max_items_in_table = 0, - const HashFcn& hf = HashFcn(), - const EqualKey& eql = EqualKey(), - const ExtractKey& ext = ExtractKey(), - const SetKey& set = SetKey(), - const Alloc& alloc = Alloc()) - : settings(hf), - key_info(ext, set, eql), - num_deleted(0), - table((expected_max_items_in_table == 0 - ? HT_DEFAULT_STARTING_BUCKETS - : settings.min_buckets(expected_max_items_in_table, 0)), - value_alloc_type(alloc)) - { - settings.reset_thresholds(bucket_count()); - } - - // As a convenience for resize(), we allow an optional second argument - // which lets you make this new hashtable a different size than ht. - // We also provide a mechanism of saying you want to "move" the ht argument - // into us instead of copying. - // ------------------------------------------------------------------------ - sparse_hashtable(const sparse_hashtable& ht, - size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS) - : settings(ht.settings), - key_info(ht.key_info), - num_deleted(0), - table(0) - { - settings.reset_thresholds(bucket_count()); - _copy_from(ht, min_buckets_wanted); - } - -#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) - - sparse_hashtable(sparse_hashtable&& o) : - settings(std::move(o.settings)), - key_info(std::move(o.key_info)), - num_deleted(o.num_deleted), - table(std::move(o.table)) - { - } - - sparse_hashtable(sparse_hashtable&& o, const Alloc& alloc) : - settings(std::move(o.settings)), - key_info(std::move(o.key_info)), - num_deleted(o.num_deleted), - table(std::move(o.table), alloc) - { - } - - sparse_hashtable& operator=(sparse_hashtable&& o) - { - using std::swap; - - sparse_hashtable tmp(std::move(o)); - swap(tmp, *this); - return *this; - } -#endif - - sparse_hashtable(MoveDontCopyT mover, - sparse_hashtable& ht, - size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS) - : settings(ht.settings), - key_info(ht.key_info), - num_deleted(0), - table(min_buckets_wanted, ht.table.get_allocator()) - { - settings.reset_thresholds(bucket_count()); - _move_from(mover, ht, min_buckets_wanted); - } - - sparse_hashtable& operator=(const sparse_hashtable& ht) - { - if (&ht == this) - return *this; // don't copy onto ourselves - settings = ht.settings; - key_info = ht.key_info; - num_deleted = ht.num_deleted; - - // _copy_from() calls clear and sets num_deleted to 0 too - _copy_from(ht, HT_MIN_BUCKETS); - - // we purposefully don't copy the allocator, which may not be copyable - return *this; - } - - // Many STL algorithms use swap instead of copy constructors - void swap(sparse_hashtable& ht) - { - using std::swap; - - swap(settings, ht.settings); - swap(key_info, ht.key_info); - swap(num_deleted, ht.num_deleted); - table.swap(ht.table); - settings.reset_thresholds(bucket_count()); // also resets consider_shrink - ht.settings.reset_thresholds(ht.bucket_count()); - // we purposefully don't swap the allocator, which may not be swap-able - } - - // It's always nice to be able to clear a table without deallocating it - void clear() - { - if (!empty() || num_deleted != 0) - { - table.clear(); - table = Table(HT_DEFAULT_STARTING_BUCKETS); - } - settings.reset_thresholds(bucket_count()); - num_deleted = 0; - } - - // LOOKUP ROUTINES -private: - - enum pos_type { pt_empty = 0, pt_erased, pt_full }; - // ------------------------------------------------------------------- - class Position - { - public: - - Position() : _t(pt_empty) {} - Position(pos_type t, size_type idx) : _t(t), _idx(idx) {} - - pos_type _t; - size_type _idx; - }; - - // Returns a pair: - // - 'first' is a code, 2 if key already present, 0 or 1 otherwise. - // - 'second' is a position, where the key should go - // Note: because of deletions where-to-insert is not trivial: it's the - // first deleted bucket we see, as long as we don't find the key later - // ------------------------------------------------------------------- - Position _find_position(const key_type &key) const - { - size_type num_probes = 0; // how many times we've probed - const size_type bucket_count_minus_one = (const size_type)(bucket_count() - 1); - size_type bucknum = hash(key) & bucket_count_minus_one; - Position pos; - - while (1) - { - // probe until something happens - // ----------------------------- - typename Table::GrpPos grp_pos(table, bucknum); - - if (!grp_pos.test_strict()) - { - // bucket is empty => key not present - return pos._t ? pos : Position(pt_empty, bucknum); - } - else if (grp_pos.test()) - { - reference ref(grp_pos.unsafe_get()); - - if (equals(key, get_key(ref))) - return Position(pt_full, bucknum); - } - else if (pos._t == pt_empty) - { - // first erased position - pos._t = pt_erased; - pos._idx = bucknum; - } - - ++num_probes; // we're doing another probe - bucknum = (size_type)((bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one); - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - } - -public: - // I hate to duplicate find() like that, but it is - // significantly faster to not have the intermediate pair - // ------------------------------------------------------------------ - iterator find(const key_type& key) - { - size_type num_probes = 0; // how many times we've probed - const size_type bucket_count_minus_one = bucket_count() - 1; - size_type bucknum = hash(key) & bucket_count_minus_one; - - while (1) // probe until something happens - { - typename Table::GrpPos grp_pos(table, bucknum); - - if (!grp_pos.test_strict()) - return end(); // bucket is empty - if (grp_pos.test()) - { - reference ref(grp_pos.unsafe_get()); - - if (equals(key, get_key(ref))) - return grp_pos.get_iter(ref); - } - ++num_probes; // we're doing another probe - bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - } - - // Wish I could avoid the duplicate find() const and non-const. - // ------------------------------------------------------------ - const_iterator find(const key_type& key) const - { - size_type num_probes = 0; // how many times we've probed - const size_type bucket_count_minus_one = bucket_count() - 1; - size_type bucknum = hash(key) & bucket_count_minus_one; - - while (1) // probe until something happens - { - typename Table::GrpPos grp_pos(table, bucknum); - - if (!grp_pos.test_strict()) - return end(); // bucket is empty - else if (grp_pos.test()) - { - reference ref(grp_pos.unsafe_get()); - - if (equals(key, get_key(ref))) - return _mk_const_iterator(table.get_iter(bucknum, &ref)); - } - ++num_probes; // we're doing another probe - bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - } - - // This is a tr1 method: the bucket a given key is in, or what bucket - // it would be put in, if it were to be inserted. Shrug. - // ------------------------------------------------------------------ - size_type bucket(const key_type& key) const - { - Position pos = _find_position(key); - return pos._idx; - } - - // Counts how many elements have key key. For maps, it's either 0 or 1. - // --------------------------------------------------------------------- - size_type count(const key_type &key) const - { - Position pos = _find_position(key); - return (size_type)(pos._t == pt_full ? 1 : 0); - } - - // Likewise, equal_range doesn't really make sense for us. Oh well. - // ----------------------------------------------------------------- - std::pair equal_range(const key_type& key) - { - iterator pos = find(key); // either an iterator or end - if (pos == end()) - return std::pair(pos, pos); - else - { - const iterator startpos = pos++; - return std::pair(startpos, pos); - } - } - - std::pair equal_range(const key_type& key) const - { - const_iterator pos = find(key); // either an iterator or end - if (pos == end()) - return std::pair(pos, pos); - else - { - const const_iterator startpos = pos++; - return std::pair(startpos, pos); - } - } - - - // INSERTION ROUTINES -private: - // Private method used by insert_noresize and find_or_insert. - template - reference _insert_at(T& obj, size_type pos, bool erased) - { - if (size() >= max_size()) - { - throw_exception(std::length_error("insert overflow")); - } - if (erased) - { - assert(num_deleted); - --num_deleted; - } - return table.set(pos, obj); - } - - // If you know *this is big enough to hold obj, use this routine - template - std::pair _insert_noresize(T& obj) - { - Position pos = _find_position(get_key(obj)); - bool already_there = (pos._t == pt_full); - - if (!already_there) - { - reference ref(_insert_at(obj, pos._idx, pos._t == pt_erased)); - return std::pair(_mk_iterator(table.get_iter(pos._idx, &ref)), true); - } - return std::pair(_mk_iterator(table.get_iter(pos._idx)), false); - } - - // Specializations of insert(it, it) depending on the power of the iterator: - // (1) Iterator supports operator-, resize before inserting - template - void _insert(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag /*unused*/) - { - int64_t dist = std::distance(f, l); - if (dist < 0 || static_cast(dist) >= (std::numeric_limits::max)()) - throw_exception(std::length_error("insert-range overflow")); - - _resize_delta(static_cast(dist)); - - for (; dist > 0; --dist, ++f) - _insert_noresize(*f); - } - - // (2) Arbitrary iterator, can't tell how much to resize - template - void _insert(InputIterator f, InputIterator l, std::input_iterator_tag /*unused*/) - { - for (; f != l; ++f) - _insert(*f); - } - -public: - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) - template - std::pair emplace(Args&&... args) - { - _resize_delta(1); - value_type obj(std::forward(args)...); - return _insert_noresize(obj); - } -#endif - - // This is the normal insert routine, used by the outside world - std::pair insert(const_reference obj) - { - _resize_delta(1); // adding an object, grow if need be - return _insert_noresize(obj); - } - - // When inserting a lot at a time, we specialize on the type of iterator - template - void insert(InputIterator f, InputIterator l) - { - // specializes on iterator type - _insert(f, l, - typename std::iterator_traits::iterator_category()); - } - - // DefaultValue is a functor that takes a key and returns a value_type - // representing the default value to be inserted if none is found. - template - value_type& find_or_insert(const key_type& key) - { - size_type num_probes = 0; // how many times we've probed - const size_type bucket_count_minus_one = bucket_count() - 1; - size_type bucknum = hash(key) & bucket_count_minus_one; - DefaultValue default_value; - size_type erased_pos = 0; - bool erased = false; - - while (1) // probe until something happens - { - typename Table::GrpPos grp_pos(table, bucknum); - - if (!grp_pos.test_strict()) - { - // not found - if (_resize_delta(1)) - { - // needed to rehash to make room - // Since we resized, we can't use pos, so recalculate where to insert. - value_type def(default_value(key)); - return *(_insert_noresize(def).first); - } - else - { - // no need to rehash, insert right here - value_type def(default_value(key)); - return _insert_at(def, erased ? erased_pos : bucknum, erased); - } - } - if (grp_pos.test()) - { - reference ref(grp_pos.unsafe_get()); - - if (equals(key, get_key(ref))) - return ref; - } - else if (!erased) - { - // first erased position - erased_pos = bucknum; - erased = true; - } - - ++num_probes; // we're doing another probe - bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - } - - size_type erase(const key_type& key) - { - size_type num_probes = 0; // how many times we've probed - const size_type bucket_count_minus_one = bucket_count() - 1; - size_type bucknum = hash(key) & bucket_count_minus_one; - - while (1) // probe until something happens - { - typename Table::GrpPos grp_pos(table, bucknum); - - if (!grp_pos.test_strict()) - return 0; // bucket is empty, we deleted nothing - if (grp_pos.test()) - { - reference ref(grp_pos.unsafe_get()); - - if (equals(key, get_key(ref))) - { - grp_pos.erase(table); - ++num_deleted; - settings.set_consider_shrink(true); // will think about shrink after next insert - return 1; // because we deleted one thing - } - } - ++num_probes; // we're doing another probe - bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; - assert(num_probes < bucket_count() - && "Hashtable is full: an error in key_equal<> or hash<>"); - } - } - - const_iterator erase(const_iterator pos) - { - if (pos == cend()) - return cend(); // sanity check - - const_iterator nextpos = table.erase(pos); - ++num_deleted; - settings.set_consider_shrink(true); - return nextpos; - } - - const_iterator erase(const_iterator f, const_iterator l) - { - if (f == cend()) - return cend(); // sanity check - - size_type num_before = table.num_nonempty(); - const_iterator nextpos = table.erase(f, l); - num_deleted += num_before - table.num_nonempty(); - settings.set_consider_shrink(true); - return nextpos; - } - - // Deleted key routines - just to keep google test framework happy - // we don't actually use the deleted key - // --------------------------------------------------------------- - void set_deleted_key(const key_type& key) - { - _squash_deleted(); - key_info.delkey = key; - } - - void clear_deleted_key() - { - _squash_deleted(); - } - - key_type deleted_key() const - { - return key_info.delkey; - } - - - bool operator==(const sparse_hashtable& ht) const - { - if (this == &ht) - return true; - - if (size() != ht.size()) - return false; - - for (const_iterator it = begin(); it != end(); ++it) - { - const_iterator it2 = ht.find(get_key(*it)); - if ((it2 == ht.end()) || (*it != *it2)) - return false; - } - - return true; - } - - bool operator!=(const sparse_hashtable& ht) const - { - return !(*this == ht); - } - - - // I/O - // We support reading and writing hashtables to disk. NOTE that - // this only stores the hashtable metadata, not the stuff you've - // actually put in the hashtable! Alas, since I don't know how to - // write a hasher or key_equal, you have to make sure everything - // but the table is the same. We compact before writing. - // - // The OUTPUT type needs to support a Write() operation. File and - // OutputBuffer are appropriate types to pass in. - // - // The INPUT type needs to support a Read() operation. File and - // InputBuffer are appropriate types to pass in. - // ------------------------------------------------------------- - template - bool write_metadata(OUTPUT *fp) - { - _squash_deleted(); // so we don't have to worry about delkey - return table.write_metadata(fp); - } - - template - bool read_metadata(INPUT *fp) - { - num_deleted = 0; // since we got rid before writing - const bool result = table.read_metadata(fp); - settings.reset_thresholds(bucket_count()); - return result; - } - - // Only meaningful if value_type is a POD. - template - bool write_nopointer_data(OUTPUT *fp) - { - return table.write_nopointer_data(fp); - } - - // Only meaningful if value_type is a POD. - template - bool read_nopointer_data(INPUT *fp) - { - return table.read_nopointer_data(fp); - } - - // INPUT and OUTPUT must be either a FILE, *or* a C++ stream - // (istream, ostream, etc) *or* a class providing - // Read(void*, size_t) and Write(const void*, size_t) - // (respectively), which writes a buffer into a stream - // (which the INPUT/OUTPUT instance presumably owns). - - typedef sparsehash_internal::pod_serializer NopointerSerializer; - - // ValueSerializer: a functor. operator()(OUTPUT*, const value_type&) - template - bool serialize(ValueSerializer serializer, OUTPUT *fp) - { - _squash_deleted(); // so we don't have to worry about delkey - return table.serialize(serializer, fp); - } - - // ValueSerializer: a functor. operator()(INPUT*, value_type*) - template - bool unserialize(ValueSerializer serializer, INPUT *fp) - { - num_deleted = 0; // since we got rid before writing - const bool result = table.unserialize(serializer, fp); - settings.reset_thresholds(bucket_count()); - return result; - } - -private: - - // Package templated functors with the other types to eliminate memory - // needed for storing these zero-size operators. Since ExtractKey and - // hasher's operator() might have the same function signature, they - // must be packaged in different classes. - // ------------------------------------------------------------------------- - struct Settings : - sparsehash_internal::sh_hashtable_settings - { - explicit Settings(const hasher& hf) - : sparsehash_internal::sh_hashtable_settings - (hf, HT_OCCUPANCY_PCT / 100.0f, HT_EMPTY_PCT / 100.0f) {} - }; - - // KeyInfo stores delete key and packages zero-size functors: - // ExtractKey and SetKey. - // --------------------------------------------------------- - class KeyInfo : public ExtractKey, public SetKey, public EqualKey - { - public: - KeyInfo(const ExtractKey& ek, const SetKey& sk, const EqualKey& eq) - : ExtractKey(ek), SetKey(sk), EqualKey(eq) - { - } - - // We want to return the exact same type as ExtractKey: Key or const Key& - typename ExtractKey::result_type get_key(const_reference v) const - { - return ExtractKey::operator()(v); - } - - bool equals(const key_type& a, const key_type& b) const - { - return EqualKey::operator()(a, b); - } - - typename spp_::remove_const::type delkey; - }; - - // Utility functions to access the templated operators - size_t hash(const key_type& v) const - { - return settings.hash(v); - } - - bool equals(const key_type& a, const key_type& b) const - { - return key_info.equals(a, b); - } - - typename ExtractKey::result_type get_key(const_reference v) const - { - return key_info.get_key(v); - } - -private: - // Actual data - // ----------- - Settings settings; - KeyInfo key_info; - size_type num_deleted; - Table table; // holds num_buckets and num_elements too -}; - - -// We need a global swap as well -// ----------------------------- -template -inline void swap(sparse_hashtable &x, - sparse_hashtable &y) -{ - x.swap(y); -} - -#undef JUMP_ - -// ----------------------------------------------------------------------------- -template -const typename sparse_hashtable::size_type -sparse_hashtable::ILLEGAL_BUCKET; - -// How full we let the table get before we resize. Knuth says .8 is -// good -- higher causes us to probe too much, though saves memory -// ----------------------------------------------------------------------------- -template -const int sparse_hashtable::HT_OCCUPANCY_PCT = 50; - -// How empty we let the table get before we resize lower. -// It should be less than OCCUPANCY_PCT / 2 or we thrash resizing -// ----------------------------------------------------------------------------- -template -const int sparse_hashtable::HT_EMPTY_PCT -= static_cast(0.4 * - sparse_hashtable::HT_OCCUPANCY_PCT); - - - - -// ---------------------------------------------------------------------- -// S P A R S E _ H A S H _ M A P -// ---------------------------------------------------------------------- -template , - class EqualKey = std::equal_to, - class Alloc = libc_allocator_with_realloc > > -class sparse_hash_map -{ -private: - // Apparently select1st is not stl-standard, so we define our own - struct SelectKey - { - typedef const Key& result_type; - - inline const Key& operator()(const std::pair& p) const - { - return p.first; - } - }; - - struct SetKey - { - inline void operator()(std::pair* value, const Key& new_key) const - { - *const_cast(&value->first) = new_key; - } - }; - - // For operator[]. - struct DefaultValue - { - inline std::pair operator()(const Key& key) const - { - return std::make_pair(key, T()); - } - }; - - // The actual data - typedef sparse_hashtable::type, T>, Key, HashFcn, SelectKey, - SetKey, EqualKey, Alloc> ht; - -public: - typedef typename ht::key_type key_type; - typedef T data_type; - typedef T mapped_type; - typedef typename std::pair value_type; - typedef typename ht::hasher hasher; - typedef typename ht::key_equal key_equal; - typedef Alloc allocator_type; - - typedef typename ht::size_type size_type; - typedef typename ht::difference_type difference_type; - typedef typename ht::pointer pointer; - typedef typename ht::const_pointer const_pointer; - typedef typename ht::reference reference; - typedef typename ht::const_reference const_reference; - - typedef typename ht::iterator iterator; - typedef typename ht::const_iterator const_iterator; - typedef typename ht::local_iterator local_iterator; - typedef typename ht::const_local_iterator const_local_iterator; - - // Iterator functions - iterator begin() { return rep.begin(); } - iterator end() { return rep.end(); } - const_iterator begin() const { return rep.cbegin(); } - const_iterator end() const { return rep.cend(); } - const_iterator cbegin() const { return rep.cbegin(); } - const_iterator cend() const { return rep.cend(); } - - // These come from tr1's unordered_map. For us, a bucket has 0 or 1 elements. - local_iterator begin(size_type i) { return rep.begin(i); } - local_iterator end(size_type i) { return rep.end(i); } - const_local_iterator begin(size_type i) const { return rep.begin(i); } - const_local_iterator end(size_type i) const { return rep.end(i); } - const_local_iterator cbegin(size_type i) const { return rep.cbegin(i); } - const_local_iterator cend(size_type i) const { return rep.cend(i); } - - // Accessor functions - // ------------------ - allocator_type get_allocator() const { return rep.get_allocator(); } - hasher hash_funct() const { return rep.hash_funct(); } - hasher hash_function() const { return hash_funct(); } - key_equal key_eq() const { return rep.key_eq(); } - - - // Constructors - // ------------ - explicit sparse_hash_map(size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) - : rep(n, hf, eql, SelectKey(), SetKey(), alloc) - { - } - - explicit sparse_hash_map(const allocator_type& alloc) : - rep(0, hasher(), key_equal(), SelectKey(), SetKey(), alloc) - { - } - - sparse_hash_map(size_type n, const allocator_type& alloc) : - rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) - { - } - - sparse_hash_map(size_type n, const hasher& hf, const allocator_type& alloc) : - rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) - { - } - - template - sparse_hash_map(InputIterator f, InputIterator l, - size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) - : rep(n, hf, eql, SelectKey(), SetKey(), alloc) - { - rep.insert(f, l); - } - - template - sparse_hash_map(InputIterator f, InputIterator l, - size_type n, const allocator_type& alloc) - : rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) - { - rep.insert(f, l); - } - - template - sparse_hash_map(InputIterator f, InputIterator l, - size_type n, const hasher& hf, const allocator_type& alloc) - : rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) - { - rep.insert(f, l); - } - - sparse_hash_map(const sparse_hash_map &o) : - rep(o.rep) - {} - - sparse_hash_map(const sparse_hash_map &o, - const allocator_type& alloc) : - rep(o.rep, alloc) - {} - -#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) - sparse_hash_map(const sparse_hash_map &&o) : - rep(std::move(o.rep)) - {} - - sparse_hash_map(const sparse_hash_map &&o, - const allocator_type& alloc) : - rep(std::move(o.rep), alloc) - {} -#endif - -#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) - sparse_hash_map(std::initializer_list init, - size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) - : rep(n, hf, eql, SelectKey(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_map(std::initializer_list init, - size_type n, const allocator_type& alloc) : - rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_map(std::initializer_list init, - size_type n, const hasher& hf, const allocator_type& alloc) : - rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_map& operator=(std::initializer_list init) - { - rep.clear(); - rep.insert(init.begin(), init.end()); - return *this; - } - - void insert(std::initializer_list init) - { - rep.insert(init.begin(), init.end()); - } -#endif - - sparse_hash_map& operator=(const sparse_hash_map &o) - { - rep = o.rep; - return *this; - } - - void clear() { rep.clear(); } - void swap(sparse_hash_map& hs) { rep.swap(hs.rep); } - - // Functions concerning size - // ------------------------- - size_type size() const { return rep.size(); } - size_type max_size() const { return rep.max_size(); } - bool empty() const { return rep.empty(); } - size_type bucket_count() const { return rep.bucket_count(); } - size_type max_bucket_count() const { return rep.max_bucket_count(); } - - size_type bucket_size(size_type i) const { return rep.bucket_size(i); } - size_type bucket(const key_type& key) const { return rep.bucket(key); } - float load_factor() const { return size() * 1.0f / bucket_count(); } - - float max_load_factor() const { return rep.get_enlarge_factor(); } - void max_load_factor(float grow) { rep.set_enlarge_factor(grow); } - - float min_load_factor() const { return rep.get_shrink_factor(); } - void min_load_factor(float shrink){ rep.set_shrink_factor(shrink); } - - void set_resizing_parameters(float shrink, float grow) - { - rep.set_resizing_parameters(shrink, grow); - } - - void resize(size_type cnt) { rep.resize(cnt); } - void rehash(size_type cnt) { resize(cnt); } // c++11 name - void reserve(size_type cnt) { resize(cnt); } // c++11 - - // Lookup - // ------ - iterator find(const key_type& key) { return rep.find(key); } - const_iterator find(const key_type& key) const { return rep.find(key); } - - mapped_type& operator[](const key_type& key) - { - return rep.template find_or_insert(key).second; - } - - size_type count(const key_type& key) const { return rep.count(key); } - - std::pair - equal_range(const key_type& key) { return rep.equal_range(key); } - - std::pair - equal_range(const key_type& key) const { return rep.equal_range(key); } - - mapped_type& at(const key_type& key) - { - iterator it = rep.find(key); - if (it == rep.end()) - throw_exception(std::out_of_range("at: key not present")); - return it->second; - } - - const mapped_type& at(const key_type& key) const - { - const_iterator it = rep.find(key); - if (it == rep.cend()) - throw_exception(std::out_of_range("at: key not present")); - return it->second; - } - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) - template - std::pair emplace(Args&&... args) - { - return rep.emplace(std::forward(args)...); - } - - template - iterator emplace_hint(const_iterator , Args&&... args) - { - return rep.emplace(std::forward(args)...).first; - } -#endif - - // Insert - // ------ - std::pair - insert(const value_type& obj) { return rep.insert(obj); } - - template - void insert(InputIterator f, InputIterator l) { rep.insert(f, l); } - - void insert(const_iterator f, const_iterator l) { rep.insert(f, l); } - - iterator insert(iterator /*unused*/, const value_type& obj) { return insert(obj).first; } - iterator insert(const_iterator /*unused*/, const value_type& obj) { return insert(obj).first; } - - // Deleted key routines - just to keep google test framework happy - // we don't actually use the deleted key - // --------------------------------------------------------------- - void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); } - void clear_deleted_key() { rep.clear_deleted_key(); } - key_type deleted_key() const { return rep.deleted_key(); } - - // Erase - // ----- - size_type erase(const key_type& key) { return rep.erase(key); } - iterator erase(iterator it) { return rep.erase(it); } - iterator erase(iterator f, iterator l) { return rep.erase(f, l); } - iterator erase(const_iterator it) { return rep.erase(it); } - iterator erase(const_iterator f, const_iterator l){ return rep.erase(f, l); } - - // Comparison - // ---------- - bool operator==(const sparse_hash_map& hs) const { return rep == hs.rep; } - bool operator!=(const sparse_hash_map& hs) const { return rep != hs.rep; } - - - // I/O -- this is an add-on for writing metainformation to disk - // - // For maximum flexibility, this does not assume a particular - // file type (though it will probably be a FILE *). We just pass - // the fp through to rep. - - // If your keys and values are simple enough, you can pass this - // serializer to serialize()/unserialize(). "Simple enough" means - // value_type is a POD type that contains no pointers. Note, - // however, we don't try to normalize endianness. - // --------------------------------------------------------------- - typedef typename ht::NopointerSerializer NopointerSerializer; - - // serializer: a class providing operator()(OUTPUT*, const value_type&) - // (writing value_type to OUTPUT). You can specify a - // NopointerSerializer object if appropriate (see above). - // fp: either a FILE*, OR an ostream*/subclass_of_ostream*, OR a - // pointer to a class providing size_t Write(const void*, size_t), - // which writes a buffer into a stream (which fp presumably - // owns) and returns the number of bytes successfully written. - // Note basic_ostream is not currently supported. - // --------------------------------------------------------------- - template - bool serialize(ValueSerializer serializer, OUTPUT* fp) - { - return rep.serialize(serializer, fp); - } - - // serializer: a functor providing operator()(INPUT*, value_type*) - // (reading from INPUT and into value_type). You can specify a - // NopointerSerializer object if appropriate (see above). - // fp: either a FILE*, OR an istream*/subclass_of_istream*, OR a - // pointer to a class providing size_t Read(void*, size_t), - // which reads into a buffer from a stream (which fp presumably - // owns) and returns the number of bytes successfully read. - // Note basic_istream is not currently supported. - // NOTE: Since value_type is std::pair, ValueSerializer - // may need to do a const cast in order to fill in the key. - // NOTE: if Key or T are not POD types, the serializer MUST use - // placement-new to initialize their values, rather than a normal - // equals-assignment or similar. (The value_type* passed into the - // serializer points to garbage memory.) - // --------------------------------------------------------------- - template - bool unserialize(ValueSerializer serializer, INPUT* fp) - { - return rep.unserialize(serializer, fp); - } - - // The four methods below are DEPRECATED. - // Use serialize() and unserialize() for new code. - // ----------------------------------------------- - template - bool write_metadata(OUTPUT *fp) { return rep.write_metadata(fp); } - - template - bool read_metadata(INPUT *fp) { return rep.read_metadata(fp); } - - template - bool write_nopointer_data(OUTPUT *fp) { return rep.write_nopointer_data(fp); } - - template - bool read_nopointer_data(INPUT *fp) { return rep.read_nopointer_data(fp); } - - -private: - // The actual data - // --------------- - ht rep; -}; - -// We need a global swap as well -template -inline void swap(sparse_hash_map& hm1, - sparse_hash_map& hm2) -{ - hm1.swap(hm2); -} - -// ---------------------------------------------------------------------- -// S P A R S E _ H A S H _ S E T -// ---------------------------------------------------------------------- - -template , - class EqualKey = std::equal_to, - class Alloc = libc_allocator_with_realloc > -class sparse_hash_set -{ -private: - // Apparently identity is not stl-standard, so we define our own - struct Identity - { - typedef const Value& result_type; - const Value& operator()(const Value& v) const { return v; } - }; - - struct SetKey - { - void operator()(Value* value, const Value& new_key) const - { - *value = new_key; - } - }; - - typedef sparse_hashtable ht; - -public: - typedef typename ht::key_type key_type; - typedef typename ht::value_type value_type; - typedef typename ht::hasher hasher; - typedef typename ht::key_equal key_equal; - typedef Alloc allocator_type; - - typedef typename ht::size_type size_type; - typedef typename ht::difference_type difference_type; - typedef typename ht::const_pointer pointer; - typedef typename ht::const_pointer const_pointer; - typedef typename ht::const_reference reference; - typedef typename ht::const_reference const_reference; - - typedef typename ht::const_iterator iterator; - typedef typename ht::const_iterator const_iterator; - typedef typename ht::const_local_iterator local_iterator; - typedef typename ht::const_local_iterator const_local_iterator; - - - // Iterator functions -- recall all iterators are const - iterator begin() const { return rep.begin(); } - iterator end() const { return rep.end(); } - const_iterator cbegin() const { return rep.cbegin(); } - const_iterator cend() const { return rep.cend(); } - - // These come from tr1's unordered_set. For us, a bucket has 0 or 1 elements. - local_iterator begin(size_type i) const { return rep.begin(i); } - local_iterator end(size_type i) const { return rep.end(i); } - local_iterator cbegin(size_type i) const { return rep.cbegin(i); } - local_iterator cend(size_type i) const { return rep.cend(i); } - - - // Accessor functions - // ------------------ - allocator_type get_allocator() const { return rep.get_allocator(); } - hasher hash_funct() const { return rep.hash_funct(); } - hasher hash_function() const { return hash_funct(); } // tr1 name - key_equal key_eq() const { return rep.key_eq(); } - - - // Constructors - // ------------ - explicit sparse_hash_set(size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) : - rep(n, hf, eql, Identity(), SetKey(), alloc) - { - } - - explicit sparse_hash_set(const allocator_type& alloc) : - rep(0, hasher(), key_equal(), Identity(), SetKey(), alloc) - { - } - - sparse_hash_set(size_type n, const allocator_type& alloc) : - rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) - { - } - - sparse_hash_set(size_type n, const hasher& hf, - const allocator_type& alloc) : - rep(n, hf, key_equal(), Identity(), SetKey(), alloc) - { - } - - template - sparse_hash_set(InputIterator f, InputIterator l, - size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) - : rep(n, hf, eql, Identity(), SetKey(), alloc) - { - rep.insert(f, l); - } - - template - sparse_hash_set(InputIterator f, InputIterator l, - size_type n, const allocator_type& alloc) - : rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) - { - rep.insert(f, l); - } - - template - sparse_hash_set(InputIterator f, InputIterator l, - size_type n, const hasher& hf, const allocator_type& alloc) - : rep(n, hf, key_equal(), Identity(), SetKey(), alloc) - { - rep.insert(f, l); - } - - sparse_hash_set(const sparse_hash_set &o) : - rep(o.rep) - {} - - sparse_hash_set(const sparse_hash_set &o, - const allocator_type& alloc) : - rep(o.rep, alloc) - {} - -#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) - sparse_hash_set(const sparse_hash_set &&o) : - rep(std::move(o.rep)) - {} - - sparse_hash_set(const sparse_hash_set &&o, - const allocator_type& alloc) : - rep(std::move(o.rep), alloc) - {} -#endif - -#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) - sparse_hash_set(std::initializer_list init, - size_type n = 0, - const hasher& hf = hasher(), - const key_equal& eql = key_equal(), - const allocator_type& alloc = allocator_type()) : - rep(n, hf, eql, Identity(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_set(std::initializer_list init, - size_type n, const allocator_type& alloc) : - rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_set(std::initializer_list init, - size_type n, const hasher& hf, - const allocator_type& alloc) : - rep(n, hf, key_equal(), Identity(), SetKey(), alloc) - { - rep.insert(init.begin(), init.end()); - } - - sparse_hash_set& operator=(std::initializer_list init) - { - rep.clear(); - rep.insert(init.begin(), init.end()); - return *this; - } - - void insert(std::initializer_list init) - { - rep.insert(init.begin(), init.end()); - } - -#endif - - sparse_hash_set& operator=(const sparse_hash_set &o) - { - rep = o.rep; - return *this; - } - - void clear() { rep.clear(); } - void swap(sparse_hash_set& hs) { rep.swap(hs.rep); } - - - // Functions concerning size - // ------------------------- - size_type size() const { return rep.size(); } - size_type max_size() const { return rep.max_size(); } - bool empty() const { return rep.empty(); } - size_type bucket_count() const { return rep.bucket_count(); } - size_type max_bucket_count() const { return rep.max_bucket_count(); } - - size_type bucket_size(size_type i) const { return rep.bucket_size(i); } - size_type bucket(const key_type& key) const { return rep.bucket(key); } - - float load_factor() const { return size() * 1.0f / bucket_count(); } - - float max_load_factor() const { return rep.get_enlarge_factor(); } - void max_load_factor(float grow) { rep.set_enlarge_factor(grow); } - - float min_load_factor() const { return rep.get_shrink_factor(); } - void min_load_factor(float shrink){ rep.set_shrink_factor(shrink); } - - void set_resizing_parameters(float shrink, float grow) - { - rep.set_resizing_parameters(shrink, grow); - } - - void resize(size_type cnt) { rep.resize(cnt); } - void rehash(size_type cnt) { resize(cnt); } // c++11 name - void reserve(size_type cnt) { resize(cnt); } // c++11 - - // Lookup - // ------ - iterator find(const key_type& key) const { return rep.find(key); } - - size_type count(const key_type& key) const { return rep.count(key); } - - std::pair - equal_range(const key_type& key) const { return rep.equal_range(key); } - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) - template - std::pair emplace(Args&&... args) - { - return rep.emplace(std::forward(args)...); - } - - template - iterator emplace_hint(const_iterator , Args&&... args) - { - return rep.emplace(std::forward(args)...).first; - } -#endif - - // Insert - // ------ - std::pair insert(const value_type& obj) - { - std::pair p = rep.insert(obj); - return std::pair(p.first, p.second); // const to non-const - } - - template - void insert(InputIterator f, InputIterator l) { rep.insert(f, l); } - - void insert(const_iterator f, const_iterator l) { rep.insert(f, l); } - - iterator insert(iterator /*unused*/, const value_type& obj) { return insert(obj).first; } - - // Deleted key - do nothing - just to keep google test framework happy - // ------------------------------------------------------------------- - void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); } - void clear_deleted_key() { rep.clear_deleted_key(); } - key_type deleted_key() const { return rep.deleted_key(); } - - // Erase - // ----- - size_type erase(const key_type& key) { return rep.erase(key); } - iterator erase(iterator it) { return rep.erase(it); } - iterator erase(iterator f, iterator l) { return rep.erase(f, l); } - - // Comparison - // ---------- - bool operator==(const sparse_hash_set& hs) const { return rep == hs.rep; } - bool operator!=(const sparse_hash_set& hs) const { return rep != hs.rep; } - - - // I/O -- this is an add-on for writing metainformation to disk - // - // For maximum flexibility, this does not assume a particular - // file type (though it will probably be a FILE *). We just pass - // the fp through to rep. - - // If your keys and values are simple enough, you can pass this - // serializer to serialize()/unserialize(). "Simple enough" means - // value_type is a POD type that contains no pointers. Note, - // however, we don't try to normalize endianness. - // --------------------------------------------------------------- - typedef typename ht::NopointerSerializer NopointerSerializer; - - // serializer: a class providing operator()(OUTPUT*, const value_type&) - // (writing value_type to OUTPUT). You can specify a - // NopointerSerializer object if appropriate (see above). - // fp: either a FILE*, OR an ostream*/subclass_of_ostream*, OR a - // pointer to a class providing size_t Write(const void*, size_t), - // which writes a buffer into a stream (which fp presumably - // owns) and returns the number of bytes successfully written. - // Note basic_ostream is not currently supported. - // --------------------------------------------------------------- - template - bool serialize(ValueSerializer serializer, OUTPUT* fp) - { - return rep.serialize(serializer, fp); - } - - // serializer: a functor providing operator()(INPUT*, value_type*) - // (reading from INPUT and into value_type). You can specify a - // NopointerSerializer object if appropriate (see above). - // fp: either a FILE*, OR an istream*/subclass_of_istream*, OR a - // pointer to a class providing size_t Read(void*, size_t), - // which reads into a buffer from a stream (which fp presumably - // owns) and returns the number of bytes successfully read. - // Note basic_istream is not currently supported. - // NOTE: Since value_type is const Key, ValueSerializer - // may need to do a const cast in order to fill in the key. - // NOTE: if Key is not a POD type, the serializer MUST use - // placement-new to initialize its value, rather than a normal - // equals-assignment or similar. (The value_type* passed into - // the serializer points to garbage memory.) - // --------------------------------------------------------------- - template - bool unserialize(ValueSerializer serializer, INPUT* fp) - { - return rep.unserialize(serializer, fp); - } - - // The four methods below are DEPRECATED. - // Use serialize() and unserialize() for new code. - // ----------------------------------------------- - template - bool write_metadata(OUTPUT *fp) { return rep.write_metadata(fp); } - - template - bool read_metadata(INPUT *fp) { return rep.read_metadata(fp); } - - template - bool write_nopointer_data(OUTPUT *fp) { return rep.write_nopointer_data(fp); } - - template - bool read_nopointer_data(INPUT *fp) { return rep.read_nopointer_data(fp); } - -private: - // The actual data - // --------------- - ht rep; -}; - -template -inline void swap(sparse_hash_set& hs1, - sparse_hash_set& hs2) -{ - hs1.swap(hs2); -} - - -SPP_END_NAMESPACE - -#endif // sparsepp_h_guard_ diff --git a/resources/3rdparty/sparsepp/spp_test.cc b/resources/3rdparty/sparsepp/spp_test.cc deleted file mode 100644 index e17eb0f82..000000000 --- a/resources/3rdparty/sparsepp/spp_test.cc +++ /dev/null @@ -1,2982 +0,0 @@ -// ---------------------------------------------------------------------- -// Copyright (c) 2016, Gregory Popovitch - greg7mdp@gmail.com -// All rights reserved. -// -// This work is derived from Google's sparsehash library -// -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// ---------------------------------------------------------------------- - -#ifdef _MSC_VER - #pragma warning( disable : 4820 ) // '6' bytes padding added after data member... - #pragma warning( disable : 4710 ) // function not inlined - #pragma warning( disable : 4514 ) // unreferenced inline function has been removed - #pragma warning( disable : 4996 ) // 'fopen': This function or variable may be unsafe -#endif - -#include "sparsepp.h" - -#ifdef _MSC_VER - #pragma warning( disable : 4127 ) // conditional expression is constant - #pragma warning(push, 0) -#endif - - -#include -#include // for size_t -#include -#include -#include -#include -#include -#include -#include // for class typeinfo (returned by typeid) -#include -#include // for length_error - -namespace sparsehash_internal = SPP_NAMESPACE::sparsehash_internal; -using SPP_NAMESPACE::sparsetable; -using SPP_NAMESPACE::sparse_hashtable; -using SPP_NAMESPACE::sparse_hash_map; -using SPP_NAMESPACE::sparse_hash_set; - - - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -#ifndef _MSC_VER // windows defines its own version - #define _strdup strdup - #ifdef __MINGW32__ // mingw has trouble writing to /tmp - static std::string TmpFile(const char* basename) - { - return std::string("./#") + basename; - } - #endif -#else - #pragma warning(disable : 4996) - #define snprintf sprintf_s - #define WIN32_LEAN_AND_MEAN /* We always want minimal includes */ - #include - std::string TmpFile(const char* basename) - { - char tmppath_buffer[1024]; - int tmppath_len = GetTempPathA(sizeof(tmppath_buffer), tmppath_buffer); - if (tmppath_len <= 0 || tmppath_len >= sizeof(tmppath_buffer)) - return basename; // an error, so just bail on tmppath - - sprintf_s(tmppath_buffer + tmppath_len, 1024 - tmppath_len, "\\%s", basename); - return tmppath_buffer; - } -#endif - -#ifdef _MSC_VER - #pragma warning(pop) -#endif - - -// --------------------------------------------------------------------- -// This is the "default" interface, which just passes everything -// through to the underlying hashtable. You'll need to subclass it to -// specialize behavior for an individual hashtable. -// --------------------------------------------------------------------- -template -class BaseHashtableInterface -{ -public: - virtual ~BaseHashtableInterface() {} - - typedef typename HT::key_type key_type; - typedef typename HT::value_type value_type; - typedef typename HT::hasher hasher; - typedef typename HT::key_equal key_equal; - typedef typename HT::allocator_type allocator_type; - - typedef typename HT::size_type size_type; - typedef typename HT::difference_type difference_type; - typedef typename HT::pointer pointer; - typedef typename HT::const_pointer const_pointer; - typedef typename HT::reference reference; - typedef typename HT::const_reference const_reference; - - class const_iterator; - - class iterator : public HT::iterator - { - public: - iterator() : parent_(NULL) { } // this allows code like "iterator it;" - iterator(typename HT::iterator it, const BaseHashtableInterface* parent) - : HT::iterator(it), parent_(parent) { } - key_type key() { return parent_->it_to_key(*this); } - - private: - friend class BaseHashtableInterface::const_iterator; // for its ctor - const BaseHashtableInterface* parent_; - }; - - class const_iterator : public HT::const_iterator - { - public: - const_iterator() : parent_(NULL) { } - const_iterator(typename HT::const_iterator it, - const BaseHashtableInterface* parent) - : HT::const_iterator(it), parent_(parent) { } - - const_iterator(typename HT::iterator it, - BaseHashtableInterface* parent) - : HT::const_iterator(it), parent_(parent) { } - - // The parameter type here *should* just be "iterator", but MSVC - // gets confused by that, so I'm overly specific. - const_iterator(typename BaseHashtableInterface::iterator it) - : HT::const_iterator(it), parent_(it.parent_) { } - - key_type key() { return parent_->it_to_key(*this); } - - private: - const BaseHashtableInterface* parent_; - }; - - class const_local_iterator; - - class local_iterator : public HT::local_iterator - { - public: - local_iterator() : parent_(NULL) { } - local_iterator(typename HT::local_iterator it, - const BaseHashtableInterface* parent) - : HT::local_iterator(it), parent_(parent) { } - key_type key() { return parent_->it_to_key(*this); } - - private: - friend class BaseHashtableInterface::const_local_iterator; // for its ctor - const BaseHashtableInterface* parent_; - }; - - class const_local_iterator : public HT::const_local_iterator - { - public: - const_local_iterator() : parent_(NULL) { } - const_local_iterator(typename HT::const_local_iterator it, - const BaseHashtableInterface* parent) - : HT::const_local_iterator(it), parent_(parent) { } - const_local_iterator(typename HT::local_iterator it, - BaseHashtableInterface* parent) - : HT::const_local_iterator(it), parent_(parent) { } - const_local_iterator(local_iterator it) - : HT::const_local_iterator(it), parent_(it.parent_) { } - key_type key() { return parent_->it_to_key(*this); } - - private: - const BaseHashtableInterface* parent_; - }; - - iterator begin() { return iterator(ht_.begin(), this); } - iterator end() { return iterator(ht_.end(), this); } - const_iterator begin() const { return const_iterator(ht_.begin(), this); } - const_iterator end() const { return const_iterator(ht_.end(), this); } - local_iterator begin(size_type i) { return local_iterator(ht_.begin(i), this); } - local_iterator end(size_type i) { return local_iterator(ht_.end(i), this); } - const_local_iterator begin(size_type i) const { return const_local_iterator(ht_.begin(i), this); } - const_local_iterator end(size_type i) const { return const_local_iterator(ht_.end(i), this); } - - hasher hash_funct() const { return ht_.hash_funct(); } - hasher hash_function() const { return ht_.hash_function(); } - key_equal key_eq() const { return ht_.key_eq(); } - allocator_type get_allocator() const { return ht_.get_allocator(); } - - BaseHashtableInterface(size_type expected_max_items_in_table, - const hasher& hf, - const key_equal& eql, - const allocator_type& alloc) - : ht_(expected_max_items_in_table, hf, eql, alloc) { } - - // Not all ht_'s support this constructor: you should only call it - // from a subclass if you know your ht supports it. Otherwise call - // the previous constructor, followed by 'insert(f, l);'. - template - BaseHashtableInterface(InputIterator f, InputIterator l, - size_type expected_max_items_in_table, - const hasher& hf, - const key_equal& eql, - const allocator_type& alloc) - : ht_(f, l, expected_max_items_in_table, hf, eql, alloc) { - } - - // This is the version of the constructor used by dense_*, which - // requires an empty key in the constructor. - template - BaseHashtableInterface(InputIterator f, InputIterator l, key_type empty_k, - size_type expected_max_items_in_table, - const hasher& hf, - const key_equal& eql, - const allocator_type& alloc) - : ht_(f, l, empty_k, expected_max_items_in_table, hf, eql, alloc) { - } - - // This is the constructor appropriate for {dense,sparse}hashtable. - template - BaseHashtableInterface(size_type expected_max_items_in_table, - const hasher& hf, - const key_equal& eql, - const ExtractKey& ek, - const SetKey& sk, - const allocator_type& alloc) - : ht_(expected_max_items_in_table, hf, eql, ek, sk, alloc) { } - - - void clear() { ht_.clear(); } - void swap(BaseHashtableInterface& other) { ht_.swap(other.ht_); } - - // Only part of the API for some hashtable implementations. - void clear_no_resize() { clear(); } - - size_type size() const { return ht_.size(); } - size_type max_size() const { return ht_.max_size(); } - bool empty() const { return ht_.empty(); } - size_type bucket_count() const { return ht_.bucket_count(); } - size_type max_bucket_count() const { return ht_.max_bucket_count(); } - - size_type bucket_size(size_type i) const { - return ht_.bucket_size(i); - } - size_type bucket(const key_type& key) const { - return ht_.bucket(key); - } - - float load_factor() const { return ht_.load_factor(); } - float max_load_factor() const { return ht_.max_load_factor(); } - void max_load_factor(float grow) { ht_.max_load_factor(grow); } - float min_load_factor() const { return ht_.min_load_factor(); } - void min_load_factor(float shrink) { ht_.min_load_factor(shrink); } - void set_resizing_parameters(float shrink, float grow) { - ht_.set_resizing_parameters(shrink, grow); - } - - void resize(size_type hint) { ht_.resize(hint); } - void rehash(size_type hint) { ht_.rehash(hint); } - - iterator find(const key_type& key) { - return iterator(ht_.find(key), this); - } - - const_iterator find(const key_type& key) const { - return const_iterator(ht_.find(key), this); - } - - // Rather than try to implement operator[], which doesn't make much - // sense for set types, we implement two methods: bracket_equal and - // bracket_assign. By default, bracket_equal(a, b) returns true if - // ht[a] == b, and false otherwise. (Note that this follows - // operator[] semantics exactly, including inserting a if it's not - // already in the hashtable, before doing the equality test.) For - // sets, which have no operator[], b is ignored, and bracket_equal - // returns true if key is in the set and false otherwise. - // bracket_assign(a, b) is equivalent to ht[a] = b. For sets, b is - // ignored, and bracket_assign is equivalent to ht.insert(a). - template - bool bracket_equal(const key_type& key, const AssignValue& expected) { - return ht_[key] == expected; - } - - template - void bracket_assign(const key_type& key, const AssignValue& value) { - ht_[key] = value; - } - - size_type count(const key_type& key) const { return ht_.count(key); } - - std::pair equal_range(const key_type& key) - { - std::pair r - = ht_.equal_range(key); - return std::pair(iterator(r.first, this), - iterator(r.second, this)); - } - std::pair equal_range(const key_type& key) const - { - std::pair r - = ht_.equal_range(key); - return std::pair( - const_iterator(r.first, this), const_iterator(r.second, this)); - } - - const_iterator random_element(class ACMRandom* r) const { - return const_iterator(ht_.random_element(r), this); - } - - iterator random_element(class ACMRandom* r) { - return iterator(ht_.random_element(r), this); - } - - std::pair insert(const value_type& obj) { - std::pair r = ht_.insert(obj); - return std::pair(iterator(r.first, this), r.second); - } - template - void insert(InputIterator f, InputIterator l) { - ht_.insert(f, l); - } - void insert(typename HT::const_iterator f, typename HT::const_iterator l) { - ht_.insert(f, l); - } - iterator insert(typename HT::iterator, const value_type& obj) { - return iterator(insert(obj).first, this); - } - - // These will commonly need to be overridden by the child. - void set_empty_key(const key_type& k) { ht_.set_empty_key(k); } - void clear_empty_key() { ht_.clear_empty_key(); } - key_type empty_key() const { return ht_.empty_key(); } - - void set_deleted_key(const key_type& k) { ht_.set_deleted_key(k); } - void clear_deleted_key() { ht_.clear_deleted_key(); } - key_type deleted_key() const { return ht_.deleted_key(); } - - size_type erase(const key_type& key) { return ht_.erase(key); } - void erase(typename HT::iterator it) { ht_.erase(it); } - void erase(typename HT::iterator f, typename HT::iterator l) { - ht_.erase(f, l); - } - - bool operator==(const BaseHashtableInterface& other) const { - return ht_ == other.ht_; - } - bool operator!=(const BaseHashtableInterface& other) const { - return ht_ != other.ht_; - } - - template - bool serialize(ValueSerializer serializer, OUTPUT *fp) { - return ht_.serialize(serializer, fp); - } - template - bool unserialize(ValueSerializer serializer, INPUT *fp) { - return ht_.unserialize(serializer, fp); - } - - template - bool write_metadata(OUTPUT *fp) { - return ht_.write_metadata(fp); - } - template - bool read_metadata(INPUT *fp) { - return ht_.read_metadata(fp); - } - template - bool write_nopointer_data(OUTPUT *fp) { - return ht_.write_nopointer_data(fp); - } - template - bool read_nopointer_data(INPUT *fp) { - return ht_.read_nopointer_data(fp); - } - - // low-level stats - int num_table_copies() const { return (int)ht_.num_table_copies(); } - - // Not part of the hashtable API, but is provided to make testing easier. - virtual key_type get_key(const value_type& value) const = 0; - // All subclasses should define get_data(value_type) as well. I don't - // provide an abstract-virtual definition here, because the return type - // differs between subclasses (not all subclasses define data_type). - //virtual data_type get_data(const value_type& value) const = 0; - //virtual data_type default_data() const = 0; - - // These allow introspection into the interface. "Supports" means - // that the implementation of this functionality isn't a noop. - virtual bool supports_clear_no_resize() const = 0; - virtual bool supports_empty_key() const = 0; - virtual bool supports_deleted_key() const = 0; - virtual bool supports_brackets() const = 0; // has a 'real' operator[] - virtual bool supports_readwrite() const = 0; - virtual bool supports_num_table_copies() const = 0; - virtual bool supports_serialization() const = 0; - -protected: - HT ht_; - - // These are what subclasses have to define to get class-specific behavior - virtual key_type it_to_key(const iterator& it) const = 0; - virtual key_type it_to_key(const const_iterator& it) const = 0; - virtual key_type it_to_key(const local_iterator& it) const = 0; - virtual key_type it_to_key(const const_local_iterator& it) const = 0; -}; - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template , - class EqualKey = std::equal_to, - class Alloc = spp::libc_allocator_with_realloc > > -class HashtableInterface_SparseHashMap - : public BaseHashtableInterface< sparse_hash_map > -{ -private: - typedef sparse_hash_map ht; - typedef BaseHashtableInterface p; // parent - -public: - explicit HashtableInterface_SparseHashMap( - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(expected_max_items, hf, eql, alloc) { } - - template - HashtableInterface_SparseHashMap( - InputIterator f, InputIterator l, - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(f, l, expected_max_items, hf, eql, alloc) { } - - typename p::key_type get_key(const typename p::value_type& value) const { - return value.first; - } - typename ht::data_type get_data(const typename p::value_type& value) const { - return value.second; - } - typename ht::data_type default_data() const { - return typename ht::data_type(); - } - - bool supports_clear_no_resize() const { return false; } - bool supports_empty_key() const { return false; } - bool supports_deleted_key() const { return false; } - bool supports_brackets() const { return true; } - bool supports_readwrite() const { return true; } - bool supports_num_table_copies() const { return false; } - bool supports_serialization() const { return true; } - - void set_empty_key(const typename p::key_type&) { } - void clear_empty_key() { } - typename p::key_type empty_key() const { return typename p::key_type(); } - - int num_table_copies() const { return 0; } - - typedef typename ht::NopointerSerializer NopointerSerializer; - -protected: - template - friend void swap(HashtableInterface_SparseHashMap& a, - HashtableInterface_SparseHashMap& b); - - typename p::key_type it_to_key(const typename p::iterator& it) const { - return it->first; - } - typename p::key_type it_to_key(const typename p::const_iterator& it) const { - return it->first; - } - typename p::key_type it_to_key(const typename p::local_iterator& it) const { - return it->first; - } - typename p::key_type it_to_key(const typename p::const_local_iterator& it) const { - return it->first; - } -}; - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template -void swap(HashtableInterface_SparseHashMap& a, - HashtableInterface_SparseHashMap& b) -{ - swap(a.ht_, b.ht_); -} - - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template , - class EqualKey = std::equal_to, - class Alloc = spp::libc_allocator_with_realloc > -class HashtableInterface_SparseHashSet - : public BaseHashtableInterface< sparse_hash_set > -{ -private: - typedef sparse_hash_set ht; - typedef BaseHashtableInterface p; // parent - -public: - explicit HashtableInterface_SparseHashSet( - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(expected_max_items, hf, eql, alloc) { } - - template - HashtableInterface_SparseHashSet( - InputIterator f, InputIterator l, - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(f, l, expected_max_items, hf, eql, alloc) { } - - template - bool bracket_equal(const typename p::key_type& key, const AssignValue&) { - return this->ht_.find(key) != this->ht_.end(); - } - - template - void bracket_assign(const typename p::key_type& key, const AssignValue&) { - this->ht_.insert(key); - } - - typename p::key_type get_key(const typename p::value_type& value) const { - return value; - } - // For sets, the only 'data' is that an item is actually inserted. - bool get_data(const typename p::value_type&) const { - return true; - } - bool default_data() const { - return true; - } - - bool supports_clear_no_resize() const { return false; } - bool supports_empty_key() const { return false; } - bool supports_deleted_key() const { return false; } - bool supports_brackets() const { return false; } - bool supports_readwrite() const { return true; } - bool supports_num_table_copies() const { return false; } - bool supports_serialization() const { return true; } - - void set_empty_key(const typename p::key_type&) { } - void clear_empty_key() { } - typename p::key_type empty_key() const { return typename p::key_type(); } - - int num_table_copies() const { return 0; } - - typedef typename ht::NopointerSerializer NopointerSerializer; - -protected: - template - friend void swap(HashtableInterface_SparseHashSet& a, - HashtableInterface_SparseHashSet& b); - - typename p::key_type it_to_key(const typename p::iterator& it) const { - return *it; - } - typename p::key_type it_to_key(const typename p::const_iterator& it) const { - return *it; - } - typename p::key_type it_to_key(const typename p::local_iterator& it) const { - return *it; - } - typename p::key_type it_to_key(const typename p::const_local_iterator& it) - const { - return *it; - } -}; - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template -void swap(HashtableInterface_SparseHashSet& a, - HashtableInterface_SparseHashSet& b) -{ - swap(a.ht_, b.ht_); -} - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template -class HashtableInterface_SparseHashtable - : public BaseHashtableInterface< sparse_hashtable > -{ -private: - typedef sparse_hashtable ht; - typedef BaseHashtableInterface p; // parent - -public: - explicit HashtableInterface_SparseHashtable( - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(expected_max_items, hf, eql, - ExtractKey(), SetKey(), alloc) { } - - template - HashtableInterface_SparseHashtable( - InputIterator f, InputIterator l, - typename p::size_type expected_max_items = 0, - const typename p::hasher& hf = typename p::hasher(), - const typename p::key_equal& eql = typename p::key_equal(), - const typename p::allocator_type& alloc = typename p::allocator_type()) - : BaseHashtableInterface(expected_max_items, hf, eql, - ExtractKey(), SetKey(), alloc) { - this->insert(f, l); - } - - float max_load_factor() const { - float shrink, grow; - this->ht_.get_resizing_parameters(&shrink, &grow); - return grow; - } - void max_load_factor(float new_grow) { - float shrink, grow; - this->ht_.get_resizing_parameters(&shrink, &grow); - this->ht_.set_resizing_parameters(shrink, new_grow); - } - float min_load_factor() const { - float shrink, grow; - this->ht_.get_resizing_parameters(&shrink, &grow); - return shrink; - } - void min_load_factor(float new_shrink) { - float shrink, grow; - this->ht_.get_resizing_parameters(&shrink, &grow); - this->ht_.set_resizing_parameters(new_shrink, grow); - } - - template - bool bracket_equal(const typename p::key_type&, const AssignValue&) { - return false; - } - - template - void bracket_assign(const typename p::key_type&, const AssignValue&) { - } - - typename p::key_type get_key(const typename p::value_type& value) const { - return extract_key(value); - } - typename p::value_type get_data(const typename p::value_type& value) const { - return value; - } - typename p::value_type default_data() const { - return typename p::value_type(); - } - - bool supports_clear_no_resize() const { return false; } - bool supports_empty_key() const { return false; } - bool supports_deleted_key() const { return false; } - bool supports_brackets() const { return false; } - bool supports_readwrite() const { return true; } - bool supports_num_table_copies() const { return true; } - bool supports_serialization() const { return true; } - - void set_empty_key(const typename p::key_type&) { } - void clear_empty_key() { } - typename p::key_type empty_key() const { return typename p::key_type(); } - - // These tr1 names aren't defined for sparse_hashtable. - typename p::hasher hash_function() { return this->hash_funct(); } - void rehash(typename p::size_type hint) { this->resize(hint); } - - // TODO(csilvers): also support/test destructive_begin()/destructive_end()? - - typedef typename ht::NopointerSerializer NopointerSerializer; - -protected: - template - friend void swap( - HashtableInterface_SparseHashtable& a, - HashtableInterface_SparseHashtable& b); - - typename p::key_type it_to_key(const typename p::iterator& it) const { - return extract_key(*it); - } - typename p::key_type it_to_key(const typename p::const_iterator& it) const { - return extract_key(*it); - } - typename p::key_type it_to_key(const typename p::local_iterator& it) const { - return extract_key(*it); - } - typename p::key_type it_to_key(const typename p::const_local_iterator& it) - const { - return extract_key(*it); - } - -private: - ExtractKey extract_key; -}; - -// --------------------------------------------------------------------- -// --------------------------------------------------------------------- -template -void swap(HashtableInterface_SparseHashtable& a, - HashtableInterface_SparseHashtable& b) { - swap(a.ht_, b.ht_); -} - -void EXPECT_TRUE(bool cond) -{ - if (!cond) - { - ::fputs("Test failed:\n", stderr); - ::exit(1); - } -} - -SPP_START_NAMESPACE - - -namespace testing -{ - -#define EXPECT_FALSE(a) EXPECT_TRUE(!(a)) -#define EXPECT_EQ(a, b) EXPECT_TRUE((a) == (b)) -#define EXPECT_NE(a, b) EXPECT_TRUE((a) != (b)) -#define EXPECT_LT(a, b) EXPECT_TRUE((a) < (b)) -#define EXPECT_GT(a, b) EXPECT_TRUE((a) > (b)) -#define EXPECT_LE(a, b) EXPECT_TRUE((a) <= (b)) -#define EXPECT_GE(a, b) EXPECT_TRUE((a) >= (b)) - -#define EXPECT_DEATH(cmd, expected_error_string) \ - try { \ - cmd; \ - EXPECT_FALSE("did not see expected error: " #expected_error_string); \ - } catch (const std::length_error&) { \ - /* Good, the cmd failed. */ \ - } - -#define TEST(suitename, testname) \ - class TEST_##suitename##_##testname { \ - public: \ - TEST_##suitename##_##testname() { \ - ::fputs("Running " #suitename "." #testname "\n", stderr); \ - Run(); \ - } \ - void Run(); \ - }; \ - static TEST_##suitename##_##testname \ - test_instance_##suitename##_##testname; \ - void TEST_##suitename##_##testname::Run() - - -template -struct TypeList3 -{ - typedef C1 type1; - typedef C2 type2; - typedef C3 type3; -}; - -// I need to list 9 types here, for code below to compile, though -// only the first 3 are ever used. -#define TYPED_TEST_CASE_3(classname, typelist) \ - typedef typelist::type1 classname##_type1; \ - typedef typelist::type2 classname##_type2; \ - typedef typelist::type3 classname##_type3; \ - SPP_ATTRIBUTE_UNUSED static const int classname##_numtypes = 3; \ - typedef typelist::type1 classname##_type4; \ - typedef typelist::type1 classname##_type5; \ - typedef typelist::type1 classname##_type6; \ - typedef typelist::type1 classname##_type7; \ - typedef typelist::type1 classname##_type8; \ - typedef typelist::type1 classname##_type9 - -template -struct TypeList9 -{ - typedef C1 type1; - typedef C2 type2; - typedef C3 type3; - typedef C4 type4; - typedef C5 type5; - typedef C6 type6; - typedef C7 type7; - typedef C8 type8; - typedef C9 type9; -}; - -#define TYPED_TEST_CASE_9(classname, typelist) \ - typedef typelist::type1 classname##_type1; \ - typedef typelist::type2 classname##_type2; \ - typedef typelist::type3 classname##_type3; \ - typedef typelist::type4 classname##_type4; \ - typedef typelist::type5 classname##_type5; \ - typedef typelist::type6 classname##_type6; \ - typedef typelist::type7 classname##_type7; \ - typedef typelist::type8 classname##_type8; \ - typedef typelist::type9 classname##_type9; \ - static const int classname##_numtypes = 9 - -#define TYPED_TEST(superclass, testname) \ - template \ - class TEST_onetype_##superclass##_##testname : \ - public superclass { \ - public: \ - TEST_onetype_##superclass##_##testname() { \ - Run(); \ - } \ - private: \ - void Run(); \ - }; \ - class TEST_typed_##superclass##_##testname { \ - public: \ - explicit TEST_typed_##superclass##_##testname() { \ - if (superclass##_numtypes >= 1) { \ - ::fputs("Running " #superclass "." #testname ".1\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 2) { \ - ::fputs("Running " #superclass "." #testname ".2\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 3) { \ - ::fputs("Running " #superclass "." #testname ".3\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 4) { \ - ::fputs("Running " #superclass "." #testname ".4\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 5) { \ - ::fputs("Running " #superclass "." #testname ".5\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 6) { \ - ::fputs("Running " #superclass "." #testname ".6\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 7) { \ - ::fputs("Running " #superclass "." #testname ".7\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 8) { \ - ::fputs("Running " #superclass "." #testname ".8\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - if (superclass##_numtypes >= 9) { \ - ::fputs("Running " #superclass "." #testname ".9\n", stderr); \ - TEST_onetype_##superclass##_##testname t; \ - } \ - } \ - }; \ - static TEST_typed_##superclass##_##testname \ - test_instance_typed_##superclass##_##testname; \ - template \ - void TEST_onetype_##superclass##_##testname::Run() - -// This is a dummy class just to make converting from internal-google -// to opensourcing easier. -class Test { }; - -} // namespace testing - -SPP_END_NAMESPACE - - -namespace testing = SPP_NAMESPACE::testing; - -using std::cout; -using std::pair; -using std::set; -using std::string; -using std::vector; - -typedef unsigned char uint8; - -#ifdef _MSC_VER -// Below, we purposefully test having a very small allocator size. -// This causes some "type conversion too small" errors when using this -// allocator with sparsetable buckets. We're testing to make sure we -// handle that situation ok, so we don't need the compiler warnings. -#pragma warning(disable:4244) -#define ATTRIBUTE_UNUSED -#else -#define ATTRIBUTE_UNUSED __attribute__((unused)) -#endif - -namespace { - -#ifndef _MSC_VER // windows defines its own version -# ifdef __MINGW32__ // mingw has trouble writing to /tmp -static string TmpFile(const char* basename) { - return string("./#") + basename; -} -# else -static string TmpFile(const char* basename) { - string kTmpdir = "/tmp"; - return kTmpdir + "/" + basename; -} -# endif -#endif - -// Used as a value in some of the hashtable tests. It's just some -// arbitrary user-defined type with non-trivial memory management. -// --------------------------------------------------------------- -struct ValueType -{ -public: - ValueType() : s_(kDefault) { } - ValueType(const char* init_s) : s_(kDefault) { set_s(init_s); } - ~ValueType() { set_s(NULL); } - ValueType(const ValueType& that) : s_(kDefault) { operator=(that); } - void operator=(const ValueType& that) { set_s(that.s_); } - bool operator==(const ValueType& that) const { - return strcmp(this->s(), that.s()) == 0; - } - void set_s(const char* new_s) { - if (s_ != kDefault) - free(const_cast(s_)); - s_ = (new_s == NULL ? kDefault : reinterpret_cast(_strdup(new_s))); - } - const char* s() const { return s_; } -private: - const char* s_; - static const char* const kDefault; -}; - -const char* const ValueType::kDefault = "hi"; - -// This is used by the low-level sparse/dense_hashtable classes, -// which support the most general relationship between keys and -// values: the key is derived from the value through some arbitrary -// function. (For classes like sparse_hash_map, the 'value' is a -// key/data pair, and the function to derive the key is -// FirstElementOfPair.) KeyToValue is the inverse of this function, -// so GetKey(KeyToValue(key)) == key. To keep the tests a bit -// simpler, we've chosen to make the key and value actually be the -// same type, which is why we need only one template argument for the -// types, rather than two (one for the key and one for the value). -template -struct SetKey -{ - void operator()(KeyAndValueT* value, const KeyAndValueT& new_key) const - { - *value = KeyToValue()(new_key); - } -}; - -// A hash function that keeps track of how often it's called. We use -// a simple djb-hash so we don't depend on how STL hashes. We use -// this same method to do the key-comparison, so we can keep track -// of comparison-counts too. -struct Hasher -{ - explicit Hasher(int i=0) : id_(i), num_hashes_(0), num_compares_(0) { } - int id() const { return id_; } - int num_hashes() const { return num_hashes_; } - int num_compares() const { return num_compares_; } - - size_t operator()(int a) const { - num_hashes_++; - return static_cast(a); - } - size_t operator()(const char* a) const { - num_hashes_++; - size_t hash = 0; - for (size_t i = 0; a[i]; i++ ) - hash = 33 * hash + a[i]; - return hash; - } - size_t operator()(const string& a) const { - num_hashes_++; - size_t hash = 0; - for (size_t i = 0; i < a.length(); i++ ) - hash = 33 * hash + a[i]; - return hash; - } - size_t operator()(const int* a) const { - num_hashes_++; - return static_cast(reinterpret_cast(a)); - } - bool operator()(int a, int b) const { - num_compares_++; - return a == b; - } - bool operator()(const string& a, const string& b) const { - num_compares_++; - return a == b; - } - bool operator()(const char* a, const char* b) const { - num_compares_++; - // The 'a == b' test is necessary, in case a and b are both NULL. - return (a == b || (a && b && strcmp(a, b) == 0)); - } - -private: - mutable int id_; - mutable int num_hashes_; - mutable int num_compares_; -}; - -// Allocator that allows controlling its size in various ways, to test -// allocator overflow. Because we use this allocator in a vector, we -// need to define != and swap for gcc. -// ------------------------------------------------------------------ -template(~0)> -struct Alloc -{ - typedef T value_type; - typedef SizeT size_type; - typedef ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - - explicit Alloc(int i=0, int* count=NULL) : id_(i), count_(count) {} - ~Alloc() {} - pointer address(reference r) const { return &r; } - const_pointer address(const_reference r) const { return &r; } - pointer allocate(size_type n, const_pointer = 0) { - if (count_) ++(*count_); - return static_cast(malloc(n * sizeof(value_type))); - } - void deallocate(pointer p, size_type) { - free(p); - } - pointer reallocate(pointer p, size_type n) { - if (count_) ++(*count_); - return static_cast(realloc(p, n * sizeof(value_type))); - } - size_type max_size() const { - return static_cast(MAX_SIZE); - } - void construct(pointer p, const value_type& val) { - new(p) value_type(val); - } - void destroy(pointer p) { p->~value_type(); } - - bool is_custom_alloc() const { return true; } - - template - Alloc(const Alloc& that) - : id_(that.id_), count_(that.count_) { - } - - template - struct rebind { - typedef Alloc other; - }; - - bool operator==(const Alloc& that) const { - return this->id_ == that.id_ && this->count_ == that.count_; - } - bool operator!=(const Alloc& that) const { - return !this->operator==(that); - } - - int id() const { return id_; } - - // I have to make these public so the constructor used for rebinding - // can see them. Normally, I'd just make them private and say: - // template friend struct Alloc; - // but MSVC 7.1 barfs on that. So public it is. But no peeking! -public: - int id_; - int* count_; -}; - - -// Below are a few fun routines that convert a value into a key, used -// for dense_hashtable and sparse_hashtable. It's our responsibility -// to make sure, when we insert values into these objects, that the -// values match the keys we insert them under. To allow us to use -// these routines for SetKey as well, we require all these functions -// be their own inverse: f(f(x)) == x. -template -struct Negation { - typedef Value result_type; - Value operator()(Value& v) { return -v; } - const Value operator()(const Value& v) const { return -v; } -}; - -struct Capital -{ - typedef string result_type; - string operator()(string& s) { - return string(1, s[0] ^ 32) + s.substr(1); - } - const string operator()(const string& s) const { - return string(1, s[0] ^ 32) + s.substr(1); - } -}; - -struct Identity -{ // lame, I know, but an important case to test. - typedef const char* result_type; - const char* operator()(const char* s) const { - return s; - } -}; - -// This is just to avoid memory leaks -- it's a global pointer to -// all the memory allocated by UniqueObjectHelper. We'll use it -// to semi-test sparsetable as well. :-) -std::vector g_unique_charstar_objects(16, (char *)0); - -// This is an object-generator: pass in an index, and it will return a -// unique object of type ItemType. We provide specializations for the -// types we actually support. -template ItemType UniqueObjectHelper(int index); -template<> int UniqueObjectHelper(int index) -{ - return index; -} -template<> string UniqueObjectHelper(int index) -{ - char buffer[64]; - snprintf(buffer, sizeof(buffer), "%d", index); - return buffer; -} -template<> char* UniqueObjectHelper(int index) -{ - // First grow the table if need be. - size_t table_size = g_unique_charstar_objects.size(); - while (index >= static_cast(table_size)) { - assert(table_size * 2 > table_size); // avoid overflow problems - table_size *= 2; - } - if (table_size > g_unique_charstar_objects.size()) - g_unique_charstar_objects.resize(table_size, (char *)0); - - if (!g_unique_charstar_objects[static_cast(index)]) { - char buffer[64]; - snprintf(buffer, sizeof(buffer), "%d", index); - g_unique_charstar_objects[static_cast(index)] = _strdup(buffer); - } - return g_unique_charstar_objects[static_cast(index)]; -} -template<> const char* UniqueObjectHelper(int index) { - return UniqueObjectHelper(index); -} -template<> ValueType UniqueObjectHelper(int index) { - return ValueType(UniqueObjectHelper(index).c_str()); -} -template<> pair UniqueObjectHelper(int index) { - return pair(index, index + 1); -} -template<> pair UniqueObjectHelper(int index) -{ - return pair( - UniqueObjectHelper(index), UniqueObjectHelper(index + 1)); -} -template<> pair UniqueObjectHelper(int index) -{ - return pair( - UniqueObjectHelper(index), UniqueObjectHelper(index+1)); -} - -class ValueSerializer -{ -public: - bool operator()(FILE* fp, const int& value) { - return fwrite(&value, sizeof(value), 1, fp) == 1; - } - bool operator()(FILE* fp, int* value) { - return fread(value, sizeof(*value), 1, fp) == 1; - } - bool operator()(FILE* fp, const string& value) { - const size_t size = value.size(); - return (*this)(fp, (int)size) && fwrite(value.c_str(), size, 1, fp) == 1; - } - bool operator()(FILE* fp, string* value) { - int size; - if (!(*this)(fp, &size)) return false; - char* buf = new char[(size_t)size]; - if (fread(buf, (size_t)size, 1, fp) != 1) { - delete[] buf; - return false; - } - new (value) string(buf, (size_t)size); - delete[] buf; - return true; - } - template - bool operator()(OUTPUT* fp, const ValueType& v) { - return (*this)(fp, string(v.s())); - } - template - bool operator()(INPUT* fp, ValueType* v) { - string data; - if (!(*this)(fp, &data)) return false; - new(v) ValueType(data.c_str()); - return true; - } - template - bool operator()(OUTPUT* fp, const char* const& value) { - // Just store the index. - return (*this)(fp, atoi(value)); - } - template - bool operator()(INPUT* fp, const char** value) { - // Look up via index. - int index; - if (!(*this)(fp, &index)) return false; - *value = UniqueObjectHelper(index); - return true; - } - template - bool operator()(OUTPUT* fp, std::pair* value) { - return (*this)(fp, const_cast(&value->first)) - && (*this)(fp, &value->second); - } - template - bool operator()(INPUT* fp, const std::pair& value) { - return (*this)(fp, value.first) && (*this)(fp, value.second); - } -}; - -template -class HashtableTest : public ::testing::Test -{ -public: - HashtableTest() : ht_() { } - // Give syntactically-prettier access to UniqueObjectHelper. - typename HashtableType::value_type UniqueObject(int index) { - return UniqueObjectHelper(index); - } - typename HashtableType::key_type UniqueKey(int index) { - return this->ht_.get_key(this->UniqueObject(index)); - } -protected: - HashtableType ht_; -}; - -} - -// These are used to specify the empty key and deleted key in some -// contexts. They can't be in the unnamed namespace, or static, -// because the template code requires external linkage. -extern const string kEmptyString("--empty string--"); -extern const string kDeletedString("--deleted string--"); -extern const int kEmptyInt = 0; -extern const int kDeletedInt = -1234676543; // an unlikely-to-pick int -extern const char* const kEmptyCharStar = "--empty char*--"; -extern const char* const kDeletedCharStar = "--deleted char*--"; - -namespace { - -#define INT_HASHTABLES \ - HashtableInterface_SparseHashMap >, \ - HashtableInterface_SparseHashSet >, \ - /* This is a table where the key associated with a value is -value */ \ - HashtableInterface_SparseHashtable, \ - SetKey >, \ - Hasher, Alloc > - -#define STRING_HASHTABLES \ - HashtableInterface_SparseHashMap >, \ - HashtableInterface_SparseHashSet >, \ - /* This is a table where the key associated with a value is Cap(value) */ \ - HashtableInterface_SparseHashtable, \ - Hasher, Alloc > - -// --------------------------------------------------------------------- -// I'd like to use ValueType keys for SparseHashtable<> and -// DenseHashtable<> but I can't due to memory-management woes (nobody -// really owns the char* involved). So instead I do something simpler. -// --------------------------------------------------------------------- -#define CHARSTAR_HASHTABLES \ - HashtableInterface_SparseHashMap >, \ - HashtableInterface_SparseHashSet >, \ - HashtableInterface_SparseHashtable, \ - Hasher, Alloc > - -// --------------------------------------------------------------------- -// This is the list of types we run each test against. -// We need to define the same class 4 times due to limitations in the -// testing framework. Basically, we associate each class below with -// the set of types we want to run tests on it with. -// --------------------------------------------------------------------- -template class HashtableIntTest - : public HashtableTest { }; - -template class HashtableStringTest - : public HashtableTest { }; - -template class HashtableCharStarTest - : public HashtableTest { }; - -template class HashtableAllTest - : public HashtableTest { }; - -typedef testing::TypeList3 IntHashtables; -typedef testing::TypeList3 StringHashtables; -typedef testing::TypeList3 CharStarHashtables; -typedef testing::TypeList9 AllHashtables; - -TYPED_TEST_CASE_3(HashtableIntTest, IntHashtables); -TYPED_TEST_CASE_3(HashtableStringTest, StringHashtables); -TYPED_TEST_CASE_3(HashtableCharStarTest, CharStarHashtables); -TYPED_TEST_CASE_9(HashtableAllTest, AllHashtables); - -// ------------------------------------------------------------------------ -// First, some testing of the underlying infrastructure. - -#if 0 - -TEST(HashtableCommonTest, HashMunging) -{ - const Hasher hasher; - - // We don't munge the hash value on non-pointer template types. - { - const sparsehash_internal::sh_hashtable_settings - settings(hasher, 0.0, 0.0); - const int v = 1000; - EXPECT_EQ(hasher(v), settings.hash(v)); - } - - { - // We do munge the hash value on pointer template types. - const sparsehash_internal::sh_hashtable_settings - settings(hasher, 0.0, 0.0); - int* v = NULL; - v += 0x10000; // get a non-trivial pointer value - EXPECT_NE(hasher(v), settings.hash(v)); - } - { - const sparsehash_internal::sh_hashtable_settings - settings(hasher, 0.0, 0.0); - const int* v = NULL; - v += 0x10000; // get a non-trivial pointer value - EXPECT_NE(hasher(v), settings.hash(v)); - } -} - -#endif - -// ------------------------------------------------------------------------ -// If the first arg to TYPED_TEST is HashtableIntTest, it will run -// this test on all the hashtable types, with key=int and value=int. -// Likewise, HashtableStringTest will have string key/values, and -// HashtableCharStarTest will have char* keys and -- just to mix it up -// a little -- ValueType values. HashtableAllTest will run all three -// key/value types on all 6 hashtables types, for 9 test-runs total -// per test. -// -// In addition, TYPED_TEST makes available the magic keyword -// TypeParam, which is the type being used for the current test. - -// This first set of tests just tests the public API, going through -// the public typedefs and methods in turn. It goes approximately -// in the definition-order in sparse_hash_map.h. -// ------------------------------------------------------------------------ -TYPED_TEST(HashtableIntTest, Typedefs) -{ - // Make sure all the standard STL-y typedefs are defined. The exact - // key/value types don't matter here, so we only bother testing on - // the int tables. This is just a compile-time "test"; nothing here - // can fail at runtime. - this->ht_.set_deleted_key(-2); // just so deleted_key succeeds - typename TypeParam::key_type kt; - typename TypeParam::value_type vt; - typename TypeParam::hasher h; - typename TypeParam::key_equal ke; - typename TypeParam::allocator_type at; - - typename TypeParam::size_type st; - typename TypeParam::difference_type dt; - typename TypeParam::pointer p; - typename TypeParam::const_pointer cp; - // I can't declare variables of reference-type, since I have nothing - // to point them to, so I just make sure that these types exist. - ATTRIBUTE_UNUSED typedef typename TypeParam::reference r; - ATTRIBUTE_UNUSED typedef typename TypeParam::const_reference cf; - - typename TypeParam::iterator i; - typename TypeParam::const_iterator ci; - typename TypeParam::local_iterator li; - typename TypeParam::const_local_iterator cli; - - // Now make sure the variables are used, so the compiler doesn't - // complain. Where possible, I "use" the variable by calling the - // method that's supposed to return the unique instance of the - // relevant type (eg. get_allocator()). Otherwise, I try to call a - // different, arbitrary function that returns the type. Sometimes - // the type isn't used at all, and there's no good way to use the - // variable. - kt = this->ht_.deleted_key(); - (void)vt; // value_type may not be copyable. Easiest not to try. - h = this->ht_.hash_funct(); - ke = this->ht_.key_eq(); - at = this->ht_.get_allocator(); - st = this->ht_.size(); - (void)dt; - (void)p; - (void)cp; - (void)kt; - (void)st; - i = this->ht_.begin(); - ci = this->ht_.begin(); - li = this->ht_.begin(0); - cli = this->ht_.begin(0); -} - -TYPED_TEST(HashtableAllTest, NormalIterators) -{ - EXPECT_TRUE(this->ht_.begin() == this->ht_.end()); - this->ht_.insert(this->UniqueObject(1)); - { - typename TypeParam::iterator it = this->ht_.begin(); - EXPECT_TRUE(it != this->ht_.end()); - ++it; - EXPECT_TRUE(it == this->ht_.end()); - } -} - - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) - -template struct MyHash; -typedef std::pair StringPair; - -template<> struct MyHash -{ - size_t operator()(StringPair const& p) const - { - return std::hash()(p.first); - } -}; - -class MovableOnlyType -{ - std::string _str; - std::uint64_t _int; - -public: - // Make object movable and non-copyable - MovableOnlyType(MovableOnlyType &&) = default; - MovableOnlyType(const MovableOnlyType &) = delete; - MovableOnlyType& operator=(MovableOnlyType &&) = default; - MovableOnlyType& operator=(const MovableOnlyType &) = delete; - MovableOnlyType() : _str("whatever"), _int(2) {} -}; - -void movable_emplace_test(std::size_t iterations, int container_size) -{ - for (std::size_t i=0;i m; - m.reserve(static_cast(container_size)); - char buff[20]; - for (int j=0; j mymap; - - mymap.emplace ("NCC-1701", "J.T. Kirk"); - mymap.emplace ("NCC-1701-D", "J.L. Picard"); - mymap.emplace ("NCC-74656", "K. Janeway"); - EXPECT_TRUE(mymap["NCC-74656"] == std::string("K. Janeway")); - - sparse_hash_set > myset; - myset.emplace ("NCC-1701", "J.T. Kirk"); - } - - movable_emplace_test(10, 50); -} -#endif - - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) -TEST(HashtableTest, IncompleteTypes) -{ - int i; - sparse_hash_map ht2; - ht2[&i] = 3; - - struct Bogus; - sparse_hash_map ht3; - ht3[(Bogus *)0] = 8; -} -#endif - - -#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) -TEST(HashtableTest, ReferenceWrapper) -{ - sparse_hash_map> x; - int a = 5; - x.insert(std::make_pair(3, std::ref(a))); - EXPECT_EQ(x.at(3), 5); -} -#endif - - -TEST(HashtableTest, ModifyViaIterator) -{ - // This only works for hash-maps, since only they have non-const values. - { - sparse_hash_map ht; - ht[1] = 2; - sparse_hash_map::iterator it = ht.find(1); - EXPECT_TRUE(it != ht.end()); - EXPECT_EQ(1, it->first); - EXPECT_EQ(2, it->second); - it->second = 5; - it = ht.find(1); - EXPECT_TRUE(it != ht.end()); - EXPECT_EQ(5, it->second); - } -} - -TYPED_TEST(HashtableAllTest, ConstIterators) -{ - this->ht_.insert(this->UniqueObject(1)); - typename TypeParam::const_iterator it = this->ht_.begin(); - EXPECT_TRUE(it != (typename TypeParam::const_iterator)this->ht_.end()); - ++it; - EXPECT_TRUE(it == (typename TypeParam::const_iterator)this->ht_.end()); -} - -TYPED_TEST(HashtableAllTest, LocalIterators) -{ - // Now, tr1 begin/end (the local iterator that takes a bucket-number). - // ht::bucket() returns the bucket that this key would be inserted in. - this->ht_.insert(this->UniqueObject(1)); - const typename TypeParam::size_type bucknum = - this->ht_.bucket(this->UniqueKey(1)); - typename TypeParam::local_iterator b = this->ht_.begin(bucknum); - typename TypeParam::local_iterator e = this->ht_.end(bucknum); - EXPECT_TRUE(b != e); - b++; - EXPECT_TRUE(b == e); - - // Check an empty bucket. We can just xor the bottom bit and be sure - // of getting a legal bucket, since #buckets is always a power of 2. - EXPECT_TRUE(this->ht_.begin(bucknum ^ 1) == this->ht_.end(bucknum ^ 1)); - // Another test, this time making sure we're using the right types. - typename TypeParam::local_iterator b2 = this->ht_.begin(bucknum ^ 1); - typename TypeParam::local_iterator e2 = this->ht_.end(bucknum ^ 1); - EXPECT_TRUE(b2 == e2); -} - -TYPED_TEST(HashtableAllTest, ConstLocalIterators) -{ - this->ht_.insert(this->UniqueObject(1)); - const typename TypeParam::size_type bucknum = - this->ht_.bucket(this->UniqueKey(1)); - typename TypeParam::const_local_iterator b = this->ht_.begin(bucknum); - typename TypeParam::const_local_iterator e = this->ht_.end(bucknum); - EXPECT_TRUE(b != e); - b++; - EXPECT_TRUE(b == e); - typename TypeParam::const_local_iterator b2 = this->ht_.begin(bucknum ^ 1); - typename TypeParam::const_local_iterator e2 = this->ht_.end(bucknum ^ 1); - EXPECT_TRUE(b2 == e2); -} - -TYPED_TEST(HashtableAllTest, Iterating) -{ - // Test a bit more iterating than just one ++. - this->ht_.insert(this->UniqueObject(1)); - this->ht_.insert(this->UniqueObject(11)); - this->ht_.insert(this->UniqueObject(111)); - this->ht_.insert(this->UniqueObject(1111)); - this->ht_.insert(this->UniqueObject(11111)); - this->ht_.insert(this->UniqueObject(111111)); - this->ht_.insert(this->UniqueObject(1111111)); - this->ht_.insert(this->UniqueObject(11111111)); - this->ht_.insert(this->UniqueObject(111111111)); - typename TypeParam::iterator it = this->ht_.begin(); - for (int i = 1; i <= 9; i++) { // start at 1 so i is never 0 - // && here makes it easier to tell what loop iteration the test failed on. - EXPECT_TRUE(i && (it++ != this->ht_.end())); - } - EXPECT_TRUE(it == this->ht_.end()); -} - -TYPED_TEST(HashtableIntTest, Constructors) -{ - // The key/value types don't matter here, so I just test on one set - // of tables, the ones with int keys, which can easily handle the - // placement-news we have to do below. - Hasher hasher(1); // 1 is a unique id - int alloc_count = 0; - Alloc alloc(2, &alloc_count); - - TypeParam ht_noarg; - TypeParam ht_onearg(100); - TypeParam ht_twoarg(100, hasher); - TypeParam ht_threearg(100, hasher, hasher); // hasher serves as key_equal too - TypeParam ht_fourarg(100, hasher, hasher, alloc); - - // The allocator should have been called at most once, for the last ht. - EXPECT_GE(1, alloc_count); - int old_alloc_count = alloc_count; - - const typename TypeParam::value_type input[] = { - this->UniqueObject(1), - this->UniqueObject(2), - this->UniqueObject(4), - this->UniqueObject(8) - }; - const int num_inputs = sizeof(input) / sizeof(input[0]); - const typename TypeParam::value_type *begin = &input[0]; - const typename TypeParam::value_type *end = begin + num_inputs; - TypeParam ht_iter_noarg(begin, end); - TypeParam ht_iter_onearg(begin, end, 100); - TypeParam ht_iter_twoarg(begin, end, 100, hasher); - TypeParam ht_iter_threearg(begin, end, 100, hasher, hasher); - TypeParam ht_iter_fourarg(begin, end, 100, hasher, hasher, alloc); - // Now the allocator should have been called more. - EXPECT_GT(alloc_count, old_alloc_count); - old_alloc_count = alloc_count; - - // Let's do a lot more inserting and make sure the alloc-count goes up - for (int i = 2; i < 2000; i++) - ht_fourarg.insert(this->UniqueObject(i)); - EXPECT_GT(alloc_count, old_alloc_count); - - EXPECT_LT(ht_noarg.bucket_count(), 100u); - EXPECT_GE(ht_onearg.bucket_count(), 100u); - EXPECT_GE(ht_twoarg.bucket_count(), 100u); - EXPECT_GE(ht_threearg.bucket_count(), 100u); - EXPECT_GE(ht_fourarg.bucket_count(), 100u); - EXPECT_GE(ht_iter_onearg.bucket_count(), 100u); - - // When we pass in a hasher -- it can serve both as the hash-function - // and the key-equal function -- its id should be 1. Where we don't - // pass it in and use the default Hasher object, the id should be 0. - EXPECT_EQ(0, ht_noarg.hash_funct().id()); - EXPECT_EQ(0, ht_noarg.key_eq().id()); - EXPECT_EQ(0, ht_onearg.hash_funct().id()); - EXPECT_EQ(0, ht_onearg.key_eq().id()); - EXPECT_EQ(1, ht_twoarg.hash_funct().id()); - EXPECT_EQ(0, ht_twoarg.key_eq().id()); - EXPECT_EQ(1, ht_threearg.hash_funct().id()); - EXPECT_EQ(1, ht_threearg.key_eq().id()); - - EXPECT_EQ(0, ht_iter_noarg.hash_funct().id()); - EXPECT_EQ(0, ht_iter_noarg.key_eq().id()); - EXPECT_EQ(0, ht_iter_onearg.hash_funct().id()); - EXPECT_EQ(0, ht_iter_onearg.key_eq().id()); - EXPECT_EQ(1, ht_iter_twoarg.hash_funct().id()); - EXPECT_EQ(0, ht_iter_twoarg.key_eq().id()); - EXPECT_EQ(1, ht_iter_threearg.hash_funct().id()); - EXPECT_EQ(1, ht_iter_threearg.key_eq().id()); - - // Likewise for the allocator - EXPECT_EQ(0, ht_threearg.get_allocator().id()); - EXPECT_EQ(0, ht_iter_threearg.get_allocator().id()); - EXPECT_EQ(2, ht_fourarg.get_allocator().id()); - EXPECT_EQ(2, ht_iter_fourarg.get_allocator().id()); -} - -TYPED_TEST(HashtableAllTest, OperatorEquals) -{ - { - TypeParam ht1, ht2; - ht1.set_deleted_key(this->UniqueKey(1)); - ht2.set_deleted_key(this->UniqueKey(2)); - - ht1.insert(this->UniqueObject(10)); - ht2.insert(this->UniqueObject(20)); - EXPECT_FALSE(ht1 == ht2); - ht1 = ht2; - EXPECT_TRUE(ht1 == ht2); - } - { - TypeParam ht1, ht2; - ht1.insert(this->UniqueObject(30)); - ht1 = ht2; - EXPECT_EQ(0u, ht1.size()); - } - { - TypeParam ht1, ht2; - ht1.set_deleted_key(this->UniqueKey(1)); - ht2.insert(this->UniqueObject(1)); // has same key as ht1.delkey - ht1 = ht2; // should reset deleted-key to 'unset' - EXPECT_EQ(1u, ht1.size()); - EXPECT_EQ(1u, ht1.count(this->UniqueKey(1))); - } -} - -TYPED_TEST(HashtableAllTest, Clear) -{ - for (int i = 1; i < 200; i++) { - this->ht_.insert(this->UniqueObject(i)); - } - this->ht_.clear(); - EXPECT_EQ(0u, this->ht_.size()); - // TODO(csilvers): do we want to enforce that the hashtable has or - // has not shrunk? It does for dense_* but not sparse_*. -} - -TYPED_TEST(HashtableAllTest, ClearNoResize) -{ - if (!this->ht_.supports_clear_no_resize()) - return; - typename TypeParam::size_type empty_bucket_count = this->ht_.bucket_count(); - int last_element = 1; - while (this->ht_.bucket_count() == empty_bucket_count) { - this->ht_.insert(this->UniqueObject(last_element)); - ++last_element; - } - typename TypeParam::size_type last_bucket_count = this->ht_.bucket_count(); - this->ht_.clear_no_resize(); - EXPECT_EQ(last_bucket_count, this->ht_.bucket_count()); - EXPECT_TRUE(this->ht_.empty()); - - // When inserting the same number of elements again, no resize - // should be necessary. - for (int i = 1; i < last_element; ++i) { - this->ht_.insert(this->UniqueObject(last_element + i)); - EXPECT_EQ(last_bucket_count, this->ht_.bucket_count()); - } -} - -TYPED_TEST(HashtableAllTest, Swap) -{ - // Let's make a second hashtable with its own hasher, key_equal, etc. - Hasher hasher(1); // 1 is a unique id - TypeParam other_ht(200, hasher, hasher); - - this->ht_.set_deleted_key(this->UniqueKey(1)); - other_ht.set_deleted_key(this->UniqueKey(2)); - - for (int i = 3; i < 2000; i++) { - this->ht_.insert(this->UniqueObject(i)); - } - this->ht_.erase(this->UniqueKey(1000)); - other_ht.insert(this->UniqueObject(2001)); - typename TypeParam::size_type expected_buckets = other_ht.bucket_count(); - - this->ht_.swap(other_ht); - - EXPECT_EQ(this->UniqueKey(2), this->ht_.deleted_key()); - EXPECT_EQ(this->UniqueKey(1), other_ht.deleted_key()); - - EXPECT_EQ(1, this->ht_.hash_funct().id()); - EXPECT_EQ(0, other_ht.hash_funct().id()); - - EXPECT_EQ(1, this->ht_.key_eq().id()); - EXPECT_EQ(0, other_ht.key_eq().id()); - - EXPECT_EQ(expected_buckets, this->ht_.bucket_count()); - EXPECT_GT(other_ht.bucket_count(), 200u); - - EXPECT_EQ(1u, this->ht_.size()); - EXPECT_EQ(1996u, other_ht.size()); // because we erased 1000 - - EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(111))); - EXPECT_EQ(1u, other_ht.count(this->UniqueKey(111))); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(2001))); - EXPECT_EQ(0u, other_ht.count(this->UniqueKey(2001))); - EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(1000))); - EXPECT_EQ(0u, other_ht.count(this->UniqueKey(1000))); - - // We purposefully don't swap allocs -- they're not necessarily swappable. - - // Now swap back, using the free-function swap - // NOTE: MSVC seems to have trouble with this free swap, not quite - // sure why. I've given up trying to fix it though. -#ifdef _MSC_VER - other_ht.swap(this->ht_); -#else - std::swap(this->ht_, other_ht); -#endif - - EXPECT_EQ(this->UniqueKey(1), this->ht_.deleted_key()); - EXPECT_EQ(this->UniqueKey(2), other_ht.deleted_key()); - EXPECT_EQ(0, this->ht_.hash_funct().id()); - EXPECT_EQ(1, other_ht.hash_funct().id()); - EXPECT_EQ(1996u, this->ht_.size()); - EXPECT_EQ(1u, other_ht.size()); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(111))); - EXPECT_EQ(0u, other_ht.count(this->UniqueKey(111))); - - // A user reported a crash with this code using swap to clear. - // We've since fixed the bug; this prevents a regression. - TypeParam swap_to_clear_ht; - swap_to_clear_ht.set_deleted_key(this->UniqueKey(1)); - for (int i = 2; i < 10000; ++i) { - swap_to_clear_ht.insert(this->UniqueObject(i)); - } - TypeParam empty_ht; - empty_ht.swap(swap_to_clear_ht); - swap_to_clear_ht.set_deleted_key(this->UniqueKey(1)); - for (int i = 2; i < 10000; ++i) { - swap_to_clear_ht.insert(this->UniqueObject(i)); - } -} - -TYPED_TEST(HashtableAllTest, Size) -{ - EXPECT_EQ(0u, this->ht_.size()); - for (int i = 1; i < 1000; i++) { // go through some resizes - this->ht_.insert(this->UniqueObject(i)); - EXPECT_EQ(static_cast(i), this->ht_.size()); - } - this->ht_.clear(); - EXPECT_EQ(0u, this->ht_.size()); - - this->ht_.set_deleted_key(this->UniqueKey(1)); - EXPECT_EQ(0u, this->ht_.size()); // deleted key doesn't count - for (int i = 2; i < 1000; i++) { // go through some resizes - this->ht_.insert(this->UniqueObject(i)); - this->ht_.erase(this->UniqueKey(i)); - EXPECT_EQ(0u, this->ht_.size()); - } -} - -TEST(HashtableTest, MaxSizeAndMaxBucketCount) -{ - // The max size depends on the allocator. So we can't use the - // built-in allocator type; instead, we make our own types. - sparse_hash_set > ht_default; - sparse_hash_set > ht_char; - sparse_hash_set > ht_104; - - EXPECT_GE(ht_default.max_size(), 256u); - EXPECT_EQ(255u, ht_char.max_size()); - EXPECT_EQ(104u, ht_104.max_size()); - - // In our implementations, MaxBucketCount == MaxSize. - EXPECT_EQ(ht_default.max_size(), ht_default.max_bucket_count()); - EXPECT_EQ(ht_char.max_size(), ht_char.max_bucket_count()); - EXPECT_EQ(ht_104.max_size(), ht_104.max_bucket_count()); -} - -TYPED_TEST(HashtableAllTest, Empty) -{ - EXPECT_TRUE(this->ht_.empty()); - - this->ht_.insert(this->UniqueObject(1)); - EXPECT_FALSE(this->ht_.empty()); - - this->ht_.clear(); - EXPECT_TRUE(this->ht_.empty()); - - TypeParam empty_ht; - this->ht_.insert(this->UniqueObject(1)); - this->ht_.swap(empty_ht); - EXPECT_TRUE(this->ht_.empty()); -} - -TYPED_TEST(HashtableAllTest, BucketCount) -{ - TypeParam ht(100); - // constructor arg is number of *items* to be inserted, not the - // number of buckets, so we expect more buckets. - EXPECT_GT(ht.bucket_count(), 100u); - for (int i = 1; i < 200; i++) { - ht.insert(this->UniqueObject(i)); - } - EXPECT_GT(ht.bucket_count(), 200u); -} - -TYPED_TEST(HashtableAllTest, BucketAndBucketSize) -{ - const typename TypeParam::size_type expected_bucknum = this->ht_.bucket( - this->UniqueKey(1)); - EXPECT_EQ(0u, this->ht_.bucket_size(expected_bucknum)); - - this->ht_.insert(this->UniqueObject(1)); - EXPECT_EQ(expected_bucknum, this->ht_.bucket(this->UniqueKey(1))); - EXPECT_EQ(1u, this->ht_.bucket_size(expected_bucknum)); - - // Check that a bucket we didn't insert into, has a 0 size. Since - // we have an even number of buckets, bucknum^1 is guaranteed in range. - EXPECT_EQ(0u, this->ht_.bucket_size(expected_bucknum ^ 1)); -} - -TYPED_TEST(HashtableAllTest, LoadFactor) -{ - const typename TypeParam::size_type kSize = 16536; - // Check growing past various thresholds and then shrinking below - // them. - for (float grow_threshold = 0.2f; - grow_threshold <= 0.8f; - grow_threshold += 0.2f) - { - TypeParam ht; - ht.set_deleted_key(this->UniqueKey(1)); - ht.max_load_factor(grow_threshold); - ht.min_load_factor(0.0); - EXPECT_EQ(grow_threshold, ht.max_load_factor()); - EXPECT_EQ(0.0, ht.min_load_factor()); - - ht.resize(kSize); - size_t bucket_count = ht.bucket_count(); - // Erase and insert an element to set consider_shrink = true, - // which should not cause a shrink because the threshold is 0.0. - ht.insert(this->UniqueObject(2)); - ht.erase(this->UniqueKey(2)); - for (int i = 2;; ++i) - { - ht.insert(this->UniqueObject(i)); - if (static_cast(ht.size())/bucket_count < grow_threshold) { - EXPECT_EQ(bucket_count, ht.bucket_count()); - } else { - EXPECT_GT(ht.bucket_count(), bucket_count); - break; - } - } - // Now set a shrink threshold 1% below the current size and remove - // items until the size falls below that. - const float shrink_threshold = static_cast(ht.size()) / - ht.bucket_count() - 0.01f; - - // This time around, check the old set_resizing_parameters interface. - ht.set_resizing_parameters(shrink_threshold, 1.0); - EXPECT_EQ(1.0, ht.max_load_factor()); - EXPECT_EQ(shrink_threshold, ht.min_load_factor()); - - bucket_count = ht.bucket_count(); - for (int i = 2;; ++i) - { - ht.erase(this->UniqueKey(i)); - // A resize is only triggered by an insert, so add and remove a - // value every iteration to trigger the shrink as soon as the - // threshold is passed. - ht.erase(this->UniqueKey(i+1)); - ht.insert(this->UniqueObject(i+1)); - if (static_cast(ht.size())/bucket_count > shrink_threshold) { - EXPECT_EQ(bucket_count, ht.bucket_count()); - } else { - EXPECT_LT(ht.bucket_count(), bucket_count); - break; - } - } - } -} - -TYPED_TEST(HashtableAllTest, ResizeAndRehash) -{ - // resize() and rehash() are synonyms. rehash() is the tr1 name. - TypeParam ht(10000); - ht.max_load_factor(0.8f); // for consistency's sake - - for (int i = 1; i < 100; ++i) - ht.insert(this->UniqueObject(i)); - ht.resize(0); - // Now ht should be as small as possible. - EXPECT_LT(ht.bucket_count(), 300u); - - ht.rehash(9000); // use the 'rehash' version of the name. - // Bucket count should be next power of 2, after considering max_load_factor. - EXPECT_EQ(16384u, ht.bucket_count()); - for (int i = 101; i < 200; ++i) - ht.insert(this->UniqueObject(i)); - // Adding a few hundred buckets shouldn't have caused a resize yet. - EXPECT_EQ(ht.bucket_count(), 16384u); -} - -TYPED_TEST(HashtableAllTest, FindAndCountAndEqualRange) -{ - pair eq_pair; - pair const_eq_pair; - - EXPECT_TRUE(this->ht_.empty()); - EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) == this->ht_.end()); - EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(1))); - eq_pair = this->ht_.equal_range(this->UniqueKey(1)); - EXPECT_TRUE(eq_pair.first == eq_pair.second); - - this->ht_.insert(this->UniqueObject(1)); - EXPECT_FALSE(this->ht_.empty()); - this->ht_.insert(this->UniqueObject(11)); - this->ht_.insert(this->UniqueObject(111)); - this->ht_.insert(this->UniqueObject(1111)); - this->ht_.insert(this->UniqueObject(11111)); - this->ht_.insert(this->UniqueObject(111111)); - this->ht_.insert(this->UniqueObject(1111111)); - this->ht_.insert(this->UniqueObject(11111111)); - this->ht_.insert(this->UniqueObject(111111111)); - EXPECT_EQ(9u, this->ht_.size()); - typename TypeParam::const_iterator it = this->ht_.find(this->UniqueKey(1)); - EXPECT_EQ(it.key(), this->UniqueKey(1)); - - // Allow testing the const version of the methods as well. - const TypeParam ht = this->ht_; - - // Some successful lookups (via find, count, and equal_range). - EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) != this->ht_.end()); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1))); - eq_pair = this->ht_.equal_range(this->UniqueKey(1)); - EXPECT_TRUE(eq_pair.first != eq_pair.second); - EXPECT_EQ(eq_pair.first.key(), this->UniqueKey(1)); - ++eq_pair.first; - EXPECT_TRUE(eq_pair.first == eq_pair.second); - - EXPECT_TRUE(ht.find(this->UniqueKey(1)) != ht.end()); - EXPECT_EQ(1u, ht.count(this->UniqueKey(1))); - const_eq_pair = ht.equal_range(this->UniqueKey(1)); - EXPECT_TRUE(const_eq_pair.first != const_eq_pair.second); - EXPECT_EQ(const_eq_pair.first.key(), this->UniqueKey(1)); - ++const_eq_pair.first; - EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); - - EXPECT_TRUE(this->ht_.find(this->UniqueKey(11111)) != this->ht_.end()); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(11111))); - eq_pair = this->ht_.equal_range(this->UniqueKey(11111)); - EXPECT_TRUE(eq_pair.first != eq_pair.second); - EXPECT_EQ(eq_pair.first.key(), this->UniqueKey(11111)); - ++eq_pair.first; - EXPECT_TRUE(eq_pair.first == eq_pair.second); - - EXPECT_TRUE(ht.find(this->UniqueKey(11111)) != ht.end()); - EXPECT_EQ(1u, ht.count(this->UniqueKey(11111))); - const_eq_pair = ht.equal_range(this->UniqueKey(11111)); - EXPECT_TRUE(const_eq_pair.first != const_eq_pair.second); - EXPECT_EQ(const_eq_pair.first.key(), this->UniqueKey(11111)); - ++const_eq_pair.first; - EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); - - // Some unsuccessful lookups (via find, count, and equal_range). - EXPECT_TRUE(this->ht_.find(this->UniqueKey(11112)) == this->ht_.end()); - EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(11112))); - eq_pair = this->ht_.equal_range(this->UniqueKey(11112)); - EXPECT_TRUE(eq_pair.first == eq_pair.second); - - EXPECT_TRUE(ht.find(this->UniqueKey(11112)) == ht.end()); - EXPECT_EQ(0u, ht.count(this->UniqueKey(11112))); - const_eq_pair = ht.equal_range(this->UniqueKey(11112)); - EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); - - EXPECT_TRUE(this->ht_.find(this->UniqueKey(11110)) == this->ht_.end()); - EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(11110))); - eq_pair = this->ht_.equal_range(this->UniqueKey(11110)); - EXPECT_TRUE(eq_pair.first == eq_pair.second); - - EXPECT_TRUE(ht.find(this->UniqueKey(11110)) == ht.end()); - EXPECT_EQ(0u, ht.count(this->UniqueKey(11110))); - const_eq_pair = ht.equal_range(this->UniqueKey(11110)); - EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); -} - -TYPED_TEST(HashtableAllTest, BracketInsert) -{ - // tests operator[], for those types that support it. - if (!this->ht_.supports_brackets()) - return; - - // bracket_equal is equivalent to ht_[a] == b. It should insert a if - // it doesn't already exist. - EXPECT_TRUE(this->ht_.bracket_equal(this->UniqueKey(1), - this->ht_.default_data())); - EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) != this->ht_.end()); - - // bracket_assign is equivalent to ht_[a] = b. - this->ht_.bracket_assign(this->UniqueKey(2), - this->ht_.get_data(this->UniqueObject(4))); - EXPECT_TRUE(this->ht_.find(this->UniqueKey(2)) != this->ht_.end()); - EXPECT_TRUE(this->ht_.bracket_equal( - this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(4)))); - - this->ht_.bracket_assign( - this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6))); - EXPECT_TRUE(this->ht_.bracket_equal( - this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6)))); - // bracket_equal shouldn't have modified the value. - EXPECT_TRUE(this->ht_.bracket_equal( - this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6)))); - - // Verify that an operator[] that doesn't cause a resize, also - // doesn't require an extra rehash. - TypeParam ht(100); - EXPECT_EQ(0, ht.hash_funct().num_hashes()); - ht.bracket_assign(this->UniqueKey(2), ht.get_data(this->UniqueObject(2))); - EXPECT_EQ(1, ht.hash_funct().num_hashes()); - - // And overwriting, likewise, should only cause one extra hash. - ht.bracket_assign(this->UniqueKey(2), ht.get_data(this->UniqueObject(2))); - EXPECT_EQ(2, ht.hash_funct().num_hashes()); -} - - -TYPED_TEST(HashtableAllTest, InsertValue) -{ - // First, try some straightforward insertions. - EXPECT_TRUE(this->ht_.empty()); - this->ht_.insert(this->UniqueObject(1)); - EXPECT_FALSE(this->ht_.empty()); - this->ht_.insert(this->UniqueObject(11)); - this->ht_.insert(this->UniqueObject(111)); - this->ht_.insert(this->UniqueObject(1111)); - this->ht_.insert(this->UniqueObject(11111)); - this->ht_.insert(this->UniqueObject(111111)); - this->ht_.insert(this->UniqueObject(1111111)); - this->ht_.insert(this->UniqueObject(11111111)); - this->ht_.insert(this->UniqueObject(111111111)); - EXPECT_EQ(9u, this->ht_.size()); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1))); - EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1111))); - - // Check the return type. - pair insert_it; - insert_it = this->ht_.insert(this->UniqueObject(1)); - EXPECT_EQ(false, insert_it.second); // false: already present - EXPECT_TRUE(*insert_it.first == this->UniqueObject(1)); - - insert_it = this->ht_.insert(this->UniqueObject(2)); - EXPECT_EQ(true, insert_it.second); // true: not already present - EXPECT_TRUE(*insert_it.first == this->UniqueObject(2)); -} - -TYPED_TEST(HashtableIntTest, InsertRange) -{ - // We just test the ints here, to make the placement-new easier. - TypeParam ht_source; - ht_source.insert(this->UniqueObject(10)); - ht_source.insert(this->UniqueObject(100)); - ht_source.insert(this->UniqueObject(1000)); - ht_source.insert(this->UniqueObject(10000)); - ht_source.insert(this->UniqueObject(100000)); - ht_source.insert(this->UniqueObject(1000000)); - - const typename TypeParam::value_type input[] = { - // This is a copy of the first element in ht_source. - *ht_source.begin(), - this->UniqueObject(2), - this->UniqueObject(4), - this->UniqueObject(8) - }; - - set set_input; - set_input.insert(this->UniqueObject(1111111)); - set_input.insert(this->UniqueObject(111111)); - set_input.insert(this->UniqueObject(11111)); - set_input.insert(this->UniqueObject(1111)); - set_input.insert(this->UniqueObject(111)); - set_input.insert(this->UniqueObject(11)); - - // Insert from ht_source, an iterator of the same type as us. - typename TypeParam::const_iterator begin = ht_source.begin(); - typename TypeParam::const_iterator end = begin; - std::advance(end, 3); - this->ht_.insert(begin, end); // insert 3 elements from ht_source - EXPECT_EQ(3u, this->ht_.size()); - EXPECT_TRUE(*this->ht_.begin() == this->UniqueObject(10) || - *this->ht_.begin() == this->UniqueObject(100) || - *this->ht_.begin() == this->UniqueObject(1000) || - *this->ht_.begin() == this->UniqueObject(10000) || - *this->ht_.begin() == this->UniqueObject(100000) || - *this->ht_.begin() == this->UniqueObject(1000000)); - - // And insert from set_input, a separate, non-random-access iterator. - typename set::const_iterator set_begin; - typename set::const_iterator set_end; - set_begin = set_input.begin(); - set_end = set_begin; - std::advance(set_end, 3); - this->ht_.insert(set_begin, set_end); - EXPECT_EQ(6u, this->ht_.size()); - - // Insert from input as well, a separate, random-access iterator. - // The first element of input overlaps with an existing element - // of ht_, so this should only up the size by 2. - this->ht_.insert(&input[0], &input[3]); - EXPECT_EQ(8u, this->ht_.size()); -} - -TEST(HashtableTest, InsertValueToMap) -{ - // For the maps in particular, ensure that inserting doesn't change - // the value. - sparse_hash_map shm; - pair::iterator, bool> shm_it; - shm[1] = 2; // test a different method of inserting - shm_it = shm.insert(pair(1, 3)); - EXPECT_EQ(false, shm_it.second); - EXPECT_EQ(1, shm_it.first->first); - EXPECT_EQ(2, shm_it.first->second); - shm_it.first->second = 20; - EXPECT_EQ(20, shm[1]); - - shm_it = shm.insert(pair(2, 4)); - EXPECT_EQ(true, shm_it.second); - EXPECT_EQ(2, shm_it.first->first); - EXPECT_EQ(4, shm_it.first->second); - EXPECT_EQ(4, shm[2]); -} - -TYPED_TEST(HashtableStringTest, EmptyKey) -{ - // Only run the string tests, to make it easier to know what the - // empty key should be. - if (!this->ht_.supports_empty_key()) - return; - EXPECT_EQ(kEmptyString, this->ht_.empty_key()); -} - -TYPED_TEST(HashtableAllTest, DeletedKey) -{ - if (!this->ht_.supports_deleted_key()) - return; - this->ht_.insert(this->UniqueObject(10)); - this->ht_.insert(this->UniqueObject(20)); - this->ht_.set_deleted_key(this->UniqueKey(1)); - EXPECT_EQ(this->ht_.deleted_key(), this->UniqueKey(1)); - EXPECT_EQ(2u, this->ht_.size()); - this->ht_.erase(this->UniqueKey(20)); - EXPECT_EQ(1u, this->ht_.size()); - - // Changing the deleted key is fine. - this->ht_.set_deleted_key(this->UniqueKey(2)); - EXPECT_EQ(this->ht_.deleted_key(), this->UniqueKey(2)); - EXPECT_EQ(1u, this->ht_.size()); -} - -TYPED_TEST(HashtableAllTest, Erase) -{ - this->ht_.set_deleted_key(this->UniqueKey(1)); - EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(20))); - this->ht_.insert(this->UniqueObject(10)); - this->ht_.insert(this->UniqueObject(20)); - EXPECT_EQ(1u, this->ht_.erase(this->UniqueKey(20))); - EXPECT_EQ(1u, this->ht_.size()); - EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(20))); - EXPECT_EQ(1u, this->ht_.size()); - EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(19))); - EXPECT_EQ(1u, this->ht_.size()); - - typename TypeParam::iterator it = this->ht_.find(this->UniqueKey(10)); - EXPECT_TRUE(it != this->ht_.end()); - this->ht_.erase(it); - EXPECT_EQ(0u, this->ht_.size()); - - for (int i = 10; i < 100; i++) - this->ht_.insert(this->UniqueObject(i)); - EXPECT_EQ(90u, this->ht_.size()); - this->ht_.erase(this->ht_.begin(), this->ht_.end()); - EXPECT_EQ(0u, this->ht_.size()); -} - -TYPED_TEST(HashtableAllTest, EraseDoesNotResize) -{ - this->ht_.set_deleted_key(this->UniqueKey(1)); - for (int i = 10; i < 2000; i++) { - this->ht_.insert(this->UniqueObject(i)); - } - const typename TypeParam::size_type old_count = this->ht_.bucket_count(); - for (int i = 10; i < 1000; i++) { // erase half one at a time - EXPECT_EQ(1u, this->ht_.erase(this->UniqueKey(i))); - } - this->ht_.erase(this->ht_.begin(), this->ht_.end()); // and the rest at once - EXPECT_EQ(0u, this->ht_.size()); - EXPECT_EQ(old_count, this->ht_.bucket_count()); -} - -TYPED_TEST(HashtableAllTest, Equals) -{ - // The real test here is whether two hashtables are equal if they - // have the same items but in a different order. - TypeParam ht1; - TypeParam ht2; - - EXPECT_TRUE(ht1 == ht1); - EXPECT_FALSE(ht1 != ht1); - EXPECT_TRUE(ht1 == ht2); - EXPECT_FALSE(ht1 != ht2); - ht1.set_deleted_key(this->UniqueKey(1)); - // Only the contents affect equality, not things like deleted-key. - EXPECT_TRUE(ht1 == ht2); - EXPECT_FALSE(ht1 != ht2); - ht1.resize(2000); - EXPECT_TRUE(ht1 == ht2); - - // The choice of allocator/etc doesn't matter either. - Hasher hasher(1); - Alloc alloc(2, NULL); - TypeParam ht3(5, hasher, hasher, alloc); - EXPECT_TRUE(ht1 == ht3); - EXPECT_FALSE(ht1 != ht3); - - ht1.insert(this->UniqueObject(2)); - EXPECT_TRUE(ht1 != ht2); - EXPECT_FALSE(ht1 == ht2); // this should hold as well! - - ht2.insert(this->UniqueObject(2)); - EXPECT_TRUE(ht1 == ht2); - - for (int i = 3; i <= 2000; i++) { - ht1.insert(this->UniqueObject(i)); - } - for (int i = 2000; i >= 3; i--) { - ht2.insert(this->UniqueObject(i)); - } - EXPECT_TRUE(ht1 == ht2); -} - -TEST(HashtableTest, IntIO) -{ - // Since the set case is just a special (easier) case than the map case, I - // just test on sparse_hash_map. This handles the easy case where we can - // use the standard reader and writer. - sparse_hash_map ht_out; - ht_out.set_deleted_key(0); - for (int i = 1; i < 1000; i++) { - ht_out[i] = i * i; - } - ht_out.erase(563); // just to test having some erased keys when we write. - ht_out.erase(22); - - string file(TmpFile("intio")); - FILE* fp = fopen(file.c_str(), "wb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_out.write_metadata(fp)); - EXPECT_TRUE(ht_out.write_nopointer_data(fp)); - fclose(fp); - } - - sparse_hash_map ht_in; - fp = fopen(file.c_str(), "rb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_in.read_metadata(fp)); - EXPECT_TRUE(ht_in.read_nopointer_data(fp)); - fclose(fp); - } - - EXPECT_EQ(1, ht_in[1]); - EXPECT_EQ(998001, ht_in[999]); - EXPECT_EQ(100, ht_in[10]); - EXPECT_EQ(441, ht_in[21]); - EXPECT_EQ(0, ht_in[22]); // should not have been saved - EXPECT_EQ(0, ht_in[563]); -} - -TEST(HashtableTest, StringIO) -{ - // Since the set case is just a special (easier) case than the map case, - // I just test on sparse_hash_map. This handles the difficult case where - // we have to write our own custom reader/writer for the data. - typedef sparse_hash_map SP; - SP ht_out; - ht_out.set_deleted_key(string("")); - - for (int i = 32; i < 128; i++) { - // This maps 'a' to 32 a's, 'b' to 33 b's, etc. - ht_out[string(1, (char)i)] = string((size_t)i, (char)i); - } - ht_out.erase("c"); // just to test having some erased keys when we write. - ht_out.erase("y"); - - string file(TmpFile("stringio")); - FILE* fp = fopen(file.c_str(), "wb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_out.write_metadata(fp)); - - for (SP::const_iterator it = ht_out.cbegin(); it != ht_out.cend(); ++it) - { - const string::size_type first_size = it->first.length(); - fwrite(&first_size, sizeof(first_size), 1, fp); // ignore endianness issues - fwrite(it->first.c_str(), first_size, 1, fp); - - const string::size_type second_size = it->second.length(); - fwrite(&second_size, sizeof(second_size), 1, fp); - fwrite(it->second.c_str(), second_size, 1, fp); - } - fclose(fp); - } - - sparse_hash_map ht_in; - fp = fopen(file.c_str(), "rb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_in.read_metadata(fp)); - for (sparse_hash_map::iterator - it = ht_in.begin(); it != ht_in.end(); ++it) { - string::size_type first_size; - EXPECT_EQ(1u, fread(&first_size, sizeof(first_size), 1, fp)); - char* first = new char[first_size]; - EXPECT_EQ(1u, fread(first, first_size, 1, fp)); - - string::size_type second_size; - EXPECT_EQ(1u, fread(&second_size, sizeof(second_size), 1, fp)); - char* second = new char[second_size]; - EXPECT_EQ(1u, fread(second, second_size, 1, fp)); - - // it points to garbage, so we have to use placement-new to initialize. - // We also have to use const-cast since it->first is const. - new(const_cast(&it->first)) string(first, first_size); - new(&it->second) string(second, second_size); - delete[] first; - delete[] second; - } - fclose(fp); - } - EXPECT_EQ(string(" "), ht_in[" "]); - EXPECT_EQ(string("+++++++++++++++++++++++++++++++++++++++++++"), ht_in["+"]); - EXPECT_EQ(string(""), ht_in["c"]); // should not have been saved - EXPECT_EQ(string(""), ht_in["y"]); -} - -TYPED_TEST(HashtableAllTest, Serialization) -{ - if (!this->ht_.supports_serialization()) return; - TypeParam ht_out; - ht_out.set_deleted_key(this->UniqueKey(2000)); - for (int i = 1; i < 100; i++) { - ht_out.insert(this->UniqueObject(i)); - } - // just to test having some erased keys when we write. - ht_out.erase(this->UniqueKey(56)); - ht_out.erase(this->UniqueKey(22)); - - string file(TmpFile("serialization")); - FILE* fp = fopen(file.c_str(), "wb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_out.serialize(ValueSerializer(), fp)); - fclose(fp); - } - - TypeParam ht_in; - fp = fopen(file.c_str(), "rb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_in.unserialize(ValueSerializer(), fp)); - fclose(fp); - } - - EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); - EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); - EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); - // should not have been saved - EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); -} - -TYPED_TEST(HashtableIntTest, NopointerSerialization) -{ - if (!this->ht_.supports_serialization()) return; - TypeParam ht_out; - ht_out.set_deleted_key(this->UniqueKey(2000)); - for (int i = 1; i < 100; i++) { - ht_out.insert(this->UniqueObject(i)); - } - // just to test having some erased keys when we write. - ht_out.erase(this->UniqueKey(56)); - ht_out.erase(this->UniqueKey(22)); - - string file(TmpFile("nopointer_serialization")); - FILE* fp = fopen(file.c_str(), "wb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), fp)); - fclose(fp); - } - - TypeParam ht_in; - fp = fopen(file.c_str(), "rb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), fp)); - fclose(fp); - } - - EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); - EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); - EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); - // should not have been saved - EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); -} - -// We don't support serializing to a string by default, but you can do -// it by writing your own custom input/output class. -class StringIO { - public: - explicit StringIO(string* s) : s_(s) {} - size_t Write(const void* buf, size_t len) { - s_->append(reinterpret_cast(buf), len); - return len; - } - size_t Read(void* buf, size_t len) { - if (s_->length() < len) - len = s_->length(); - memcpy(reinterpret_cast(buf), s_->data(), len); - s_->erase(0, len); - return len; - } - private: - StringIO& operator=(const StringIO&); - string* const s_; -}; - -TYPED_TEST(HashtableIntTest, SerializingToString) -{ - if (!this->ht_.supports_serialization()) return; - TypeParam ht_out; - ht_out.set_deleted_key(this->UniqueKey(2000)); - for (int i = 1; i < 100; i++) { - ht_out.insert(this->UniqueObject(i)); - } - // just to test having some erased keys when we write. - ht_out.erase(this->UniqueKey(56)); - ht_out.erase(this->UniqueKey(22)); - - string stringbuf; - StringIO stringio(&stringbuf); - EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), - &stringio)); - - TypeParam ht_in; - EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), - &stringio)); - - EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); - EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); - EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); - // should not have been saved - EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); -} - -// An easier way to do the above would be to use the existing stream methods. -TYPED_TEST(HashtableIntTest, SerializingToStringStream) -{ - if (!this->ht_.supports_serialization()) return; - TypeParam ht_out; - ht_out.set_deleted_key(this->UniqueKey(2000)); - for (int i = 1; i < 100; i++) { - ht_out.insert(this->UniqueObject(i)); - } - // just to test having some erased keys when we write. - ht_out.erase(this->UniqueKey(56)); - ht_out.erase(this->UniqueKey(22)); - - std::stringstream string_buffer; - EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), - &string_buffer)); - - TypeParam ht_in; - EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), - &string_buffer)); - - EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); - EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); - EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); - // should not have been saved - EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); - EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); -} - -// Verify that the metadata serialization is endianness and word size -// agnostic. -TYPED_TEST(HashtableAllTest, MetadataSerializationAndEndianness) -{ - TypeParam ht_out; - string kExpectedDense("\x13W\x86""B\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0", - 24); - - // GP change - switched size from 20 to formula, because the sparsegroup bitmap is 4 or 8 bytes and not 6 - string kExpectedSparse("$hu1\0\0\0 \0\0\0\0\0\0\0\0\0\0\0", 12 + sizeof(group_bm_type)); - - if (ht_out.supports_readwrite()) { - size_t num_bytes = 0; - string file(TmpFile("metadata_serialization")); - FILE* fp = fopen(file.c_str(), "wb"); - if (fp) - { - EXPECT_TRUE(fp != NULL); - - EXPECT_TRUE(ht_out.write_metadata(fp)); - EXPECT_TRUE(ht_out.write_nopointer_data(fp)); - - num_bytes = (const size_t)ftell(fp); - fclose(fp); - } - - char contents[24] = {0}; - fp = fopen(file.c_str(), "rb"); - if (fp) - { - EXPECT_LE(num_bytes, static_cast(24)); - EXPECT_EQ(num_bytes, fread(contents, 1, num_bytes <= 24 ? num_bytes : 24, fp)); - EXPECT_EQ(EOF, fgetc(fp)); // check we're *exactly* the right size - fclose(fp); - } - // TODO(csilvers): check type of ht_out instead of looking at the 1st byte. - if (contents[0] == kExpectedDense[0]) { - EXPECT_EQ(kExpectedDense, string(contents, num_bytes)); - } else { - EXPECT_EQ(kExpectedSparse, string(contents, num_bytes)); - } - } - - // Do it again with new-style serialization. Here we can use StringIO. - if (ht_out.supports_serialization()) { - string stringbuf; - StringIO stringio(&stringbuf); - EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), - &stringio)); - if (stringbuf[0] == kExpectedDense[0]) { - EXPECT_EQ(kExpectedDense, stringbuf); - } else { - EXPECT_EQ(kExpectedSparse, stringbuf); - } - } -} - - -// ------------------------------------------------------------------------ -// The above tests test the general API for correctness. These tests -// test a few corner cases that have tripped us up in the past, and -// more general, cross-API issues like memory management. - -TYPED_TEST(HashtableAllTest, BracketOperatorCrashing) -{ - this->ht_.set_deleted_key(this->UniqueKey(1)); - for (int iters = 0; iters < 10; iters++) { - // We start at 33 because after shrinking, we'll be at 32 buckets. - for (int i = 33; i < 133; i++) { - this->ht_.bracket_assign(this->UniqueKey(i), - this->ht_.get_data(this->UniqueObject(i))); - } - this->ht_.clear_no_resize(); - // This will force a shrink on the next insert, which we want to test. - this->ht_.bracket_assign(this->UniqueKey(2), - this->ht_.get_data(this->UniqueObject(2))); - this->ht_.erase(this->UniqueKey(2)); - } -} - -// For data types with trivial copy-constructors and destructors, we -// should use an optimized routine for data-copying, that involves -// memmove. We test this by keeping count of how many times the -// copy-constructor is called; it should be much less with the -// optimized code. -struct Memmove -{ -public: - Memmove(): i(0) {} - explicit Memmove(int ival): i(ival) {} - Memmove(const Memmove& that) { this->i = that.i; num_copies++; } - int i; - static int num_copies; -}; -int Memmove::num_copies = 0; - -struct NoMemmove -{ -public: - NoMemmove(): i(0) {} - explicit NoMemmove(int ival): i(ival) {} - NoMemmove(const NoMemmove& that) { this->i = that.i; num_copies++; } - int i; - static int num_copies; -}; -int NoMemmove::num_copies = 0; - -} // unnamed namespace - -#if 0 -// This is what tells the hashtable code it can use memmove for this class: -namespace google { - -template<> struct has_trivial_copy : true_type { }; -template<> struct has_trivial_destructor : true_type { }; - -}; -#endif - -namespace -{ - -TEST(HashtableTest, SimpleDataTypeOptimizations) -{ - // Only sparsehashtable optimizes moves in this way. - sparse_hash_map memmove; - sparse_hash_map nomemmove; - sparse_hash_map > - memmove_nonstandard_alloc; - - Memmove::num_copies = 0; - for (int i = 10000; i > 0; i--) { - memmove[i] = Memmove(i); - } - // GP change - const int memmove_copies = Memmove::num_copies; - - NoMemmove::num_copies = 0; - for (int i = 10000; i > 0; i--) { - nomemmove[i] = NoMemmove(i); - } - // GP change - const int nomemmove_copies = NoMemmove::num_copies; - - Memmove::num_copies = 0; - for (int i = 10000; i > 0; i--) { - memmove_nonstandard_alloc[i] = Memmove(i); - } - // GP change - const int memmove_nonstandard_alloc_copies = Memmove::num_copies; - - // GP change - commented out following two lines - //EXPECT_GT(nomemmove_copies, memmove_copies); - //EXPECT_EQ(nomemmove_copies, memmove_nonstandard_alloc_copies); -} - -TYPED_TEST(HashtableAllTest, ResizeHysteresis) -{ - // We want to make sure that when we create a hashtable, and then - // add and delete one element, the size of the hashtable doesn't - // change. - this->ht_.set_deleted_key(this->UniqueKey(1)); - typename TypeParam::size_type old_bucket_count = this->ht_.bucket_count(); - this->ht_.insert(this->UniqueObject(4)); - this->ht_.erase(this->UniqueKey(4)); - this->ht_.insert(this->UniqueObject(4)); - this->ht_.erase(this->UniqueKey(4)); - EXPECT_EQ(old_bucket_count, this->ht_.bucket_count()); - - // Try it again, but with a hashtable that starts very small - TypeParam ht(2); - EXPECT_LT(ht.bucket_count(), 32u); // verify we really do start small - ht.set_deleted_key(this->UniqueKey(1)); - old_bucket_count = ht.bucket_count(); - ht.insert(this->UniqueObject(4)); - ht.erase(this->UniqueKey(4)); - ht.insert(this->UniqueObject(4)); - ht.erase(this->UniqueKey(4)); - EXPECT_EQ(old_bucket_count, ht.bucket_count()); -} - -TEST(HashtableTest, ConstKey) -{ - // Sometimes people write hash_map, even though the - // const isn't necessary. Make sure we handle this cleanly. - sparse_hash_map shm; - shm.set_deleted_key(1); - shm[10] = 20; -} - -TYPED_TEST(HashtableAllTest, ResizeActuallyResizes) -{ - // This tests for a problem we had where we could repeatedly "resize" - // a hashtable to the same size it was before, on every insert. - // ----------------------------------------------------------------- - const typename TypeParam::size_type kSize = 1<<10; // Pick any power of 2 - const float kResize = 0.8f; // anything between 0.5 and 1 is fine. - const int kThreshold = static_cast(kSize * kResize - 1); - this->ht_.set_resizing_parameters(0, kResize); - this->ht_.set_deleted_key(this->UniqueKey(kThreshold + 100)); - - // Get right up to the resizing threshold. - for (int i = 0; i <= kThreshold; i++) { - this->ht_.insert(this->UniqueObject(i+1)); - } - // The bucket count should equal kSize. - EXPECT_EQ(kSize, this->ht_.bucket_count()); - - // Now start doing erase+insert pairs. This should cause us to - // copy the hashtable at most once. - const int pre_copies = this->ht_.num_table_copies(); - for (int i = 0; i < static_cast(kSize); i++) { - this->ht_.erase(this->UniqueKey(kThreshold)); - this->ht_.insert(this->UniqueObject(kThreshold)); - } - EXPECT_LT(this->ht_.num_table_copies(), pre_copies + 2); - - // Now create a hashtable where we go right to the threshold, then - // delete everything and do one insert. Even though our hashtable - // is now tiny, we should still have at least kSize buckets, because - // our shrink threshhold is 0. - // ----------------------------------------------------------------- - TypeParam ht2; - ht2.set_deleted_key(this->UniqueKey(kThreshold + 100)); - ht2.set_resizing_parameters(0, kResize); - EXPECT_LT(ht2.bucket_count(), kSize); - for (int i = 0; i <= kThreshold; i++) { - ht2.insert(this->UniqueObject(i+1)); - } - EXPECT_EQ(ht2.bucket_count(), kSize); - for (int i = 0; i <= kThreshold; i++) { - ht2.erase(this->UniqueKey(i+1)); - EXPECT_EQ(ht2.bucket_count(), kSize); - } - ht2.insert(this->UniqueObject(kThreshold+2)); - EXPECT_GE(ht2.bucket_count(), kSize); -} - -TEST(HashtableTest, CXX11) -{ -#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) - { - // Initializer lists - // ----------------- - typedef sparse_hash_map Smap; - - Smap smap({ {1, 1}, {2, 2} }); - EXPECT_EQ(smap.size(), 2); - - smap = { {1, 1}, {2, 2}, {3, 4} }; - EXPECT_EQ(smap.size(), 3); - - smap.insert({{5, 1}, {6, 1}}); - EXPECT_EQ(smap.size(), 5); - EXPECT_EQ(smap[6], 1); - EXPECT_EQ(smap.at(6), 1); - try - { - EXPECT_EQ(smap.at(999), 1); - } - catch (...) - {}; - - sparse_hash_set sset({ 1, 3, 4, 5 }); - EXPECT_EQ(sset.size(), 4); - } -#endif -} - - - -TEST(HashtableTest, NestedHashtables) -{ - // People can do better than to have a hash_map of hash_maps, but we - // should still support it. I try a few different mappings. - sparse_hash_map, Hasher, Hasher> ht1; - - ht1["hi"]; // create a sub-ht with the default values - ht1["lo"][1] = "there"; - sparse_hash_map, Hasher, Hasher> - ht1copy = ht1; -} - -TEST(HashtableDeathTest, ResizeOverflow) -{ - sparse_hash_map ht2; - EXPECT_DEATH(ht2.resize(static_cast(-1)), "overflows size_type"); -} - -TEST(HashtableDeathTest, InsertSizeTypeOverflow) -{ - static const int kMax = 256; - vector test_data(kMax); - for (int i = 0; i < kMax; ++i) { - test_data[(size_t)i] = i+1000; - } - - sparse_hash_set > shs; - - // Test we are using the correct allocator - EXPECT_TRUE(shs.get_allocator().is_custom_alloc()); - - // Test size_type overflow in insert(it, it) - EXPECT_DEATH(shs.insert(test_data.begin(), test_data.end()), "overflows size_type"); -} - -TEST(HashtableDeathTest, InsertMaxSizeOverflow) -{ - static const int kMax = 256; - vector test_data(kMax); - for (int i = 0; i < kMax; ++i) { - test_data[(size_t)i] = i+1000; - } - - sparse_hash_set > shs; - - // Test max_size overflow - EXPECT_DEATH(shs.insert(test_data.begin(), test_data.begin() + 11), "exceed max_size"); -} - -TEST(HashtableDeathTest, ResizeSizeTypeOverflow) -{ - // Test min-buckets overflow, when we want to resize too close to size_type - sparse_hash_set > shs; - - EXPECT_DEATH(shs.resize(250), "overflows size_type"); -} - -TEST(HashtableDeathTest, ResizeDeltaOverflow) -{ - static const int kMax = 256; - vector test_data(kMax); - for (int i = 0; i < kMax; ++i) { - test_data[(size_t)i] = i+1000; - } - - sparse_hash_set > shs; - - for (int i = 0; i < 9; i++) { - shs.insert(i); - } - EXPECT_DEATH(shs.insert(test_data.begin(), test_data.begin() + 250), - "overflows size_type"); -} - -// ------------------------------------------------------------------------ -// This informational "test" comes last so it's easy to see. -// Also, benchmarks. - -TYPED_TEST(HashtableAllTest, ClassSizes) -{ - std::cout << "sizeof(" << typeid(TypeParam).name() << "): " - << sizeof(this->ht_) << "\n"; -} - -} // unnamed namespace - -int main(int, char **) -{ - // All the work is done in the static constructors. If they don't - // die, the tests have all passed. - cout << "PASS\n"; - return 0; -} diff --git a/resources/3rdparty/sparsepp/spp_utils.h b/resources/3rdparty/sparsepp/spp_utils.h deleted file mode 100644 index 96a8f5bf3..000000000 --- a/resources/3rdparty/sparsepp/spp_utils.h +++ /dev/null @@ -1,318 +0,0 @@ -// ---------------------------------------------------------------------- -// Copyright (c) 2016, Steven Gregory Popovitch - greg7mdp@gmail.com -// All rights reserved. -// -// Code derived derived from Boost libraries. -// Boost software licence reproduced below. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * The name of Steven Gregory Popovitch may not be used to -// endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// ---------------------------------------------------------------------- - -// --------------------------------------------------------------------------- -// Boost Software License - Version 1.0 - August 17th, 2003 -// -// Permission is hereby granted, free of charge, to any person or organization -// obtaining a copy of the software and accompanying documentation covered by -// this license (the "Software") to use, reproduce, display, distribute, -// execute, and transmit the Software, and to prepare derivative works of the -// Software, and to permit third-parties to whom the Software is furnished to -// do so, all subject to the following: -// -// The copyright notices in the Software and this entire statement, including -// the above license grant, this restriction and the following disclaimer, -// must be included in all copies of the Software, in whole or in part, and -// all derivative works of the Software, unless such copies or derivative -// works are solely in the form of machine-executable object code generated by -// a source language processor. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// --------------------------------------------------------------------------- - -// ---------------------------------------------------------------------- -// H A S H F U N C T I O N S -// ---------------------------- -// -// Implements spp::spp_hash() and spp::hash_combine() -// -// The exact same code is duplicated in sparsepp.h. -// -// WARNING: Any change here has to be duplicated in sparsepp.h. -// ---------------------------------------------------------------------- - -#if !defined(spp_utils_h_guard_) -#define spp_utils_h_guard_ - -#if defined(_MSC_VER) - #if (_MSC_VER >= 1600 ) // vs2010 (1900 is vs2015) - #include - #define SPP_HASH_CLASS std::hash - #else - #include - #define SPP_HASH_CLASS stdext::hash_compare - #endif - #if (_MSC_FULL_VER < 190021730) - #define SPP_NO_CXX11_NOEXCEPT - #endif -#elif defined(__GNUC__) - #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) - #include - #define SPP_HASH_CLASS std::hash - - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) < 40600 - #define SPP_NO_CXX11_NOEXCEPT - #endif - #else - #include - #define SPP_HASH_CLASS std::tr1::hash - #define SPP_NO_CXX11_NOEXCEPT - #endif -#elif defined __clang__ - #include - #define SPP_HASH_CLASS std::hash - - #if !__has_feature(cxx_noexcept) - #define SPP_NO_CXX11_NOEXCEPT - #endif -#else - #include - #define SPP_HASH_CLASS std::hash -#endif - -#ifdef SPP_NO_CXX11_NOEXCEPT - #define SPP_NOEXCEPT -#else - #define SPP_NOEXCEPT noexcept -#endif - -#ifdef SPP_NO_CXX11_CONSTEXPR - #define SPP_CONSTEXPR -#else - #define SPP_CONSTEXPR constexpr -#endif - -#define SPP_INLINE - -#ifndef SPP_NAMESPACE - #define SPP_NAMESPACE spp -#endif - -namespace SPP_NAMESPACE -{ - -template -struct spp_hash -{ - SPP_INLINE size_t operator()(const T &__v) const SPP_NOEXCEPT - { - SPP_HASH_CLASS hasher; - return hasher(__v); - } -}; - -template -struct spp_hash -{ - static size_t spp_log2 (size_t val) SPP_NOEXCEPT - { - size_t res = 0; - while (val > 1) - { - val >>= 1; - res++; - } - return res; - } - - SPP_INLINE size_t operator()(const T *__v) const SPP_NOEXCEPT - { - static const size_t shift = 3; // spp_log2(1 + sizeof(T)); // T might be incomplete! - return static_cast((*(reinterpret_cast(&__v))) >> shift); - } -}; - -// from http://burtleburtle.net/bob/hash/integer.html -// fast and efficient for power of two table sizes where we always -// consider the last bits. -// --------------------------------------------------------------- -inline size_t spp_mix_32(uint32_t a) -{ - a = a ^ (a >> 4); - a = (a ^ 0xdeadbeef) + (a << 5); - a = a ^ (a >> 11); - return static_cast(a); -} - -// Maybe we should do a more thorough scrambling as described in -// https://gist.github.com/badboy/6267743 -// ------------------------------------------------------------- -inline size_t spp_mix_64(uint64_t a) -{ - a = a ^ (a >> 4); - a = (a ^ 0xdeadbeef) + (a << 5); - a = a ^ (a >> 11); - return a; -} - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(bool __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(signed char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(unsigned char __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(wchar_t __v) const SPP_NOEXCEPT - { return static_cast(__v); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int16_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint16_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int32_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint32_t __v) const SPP_NOEXCEPT - { return spp_mix_32(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(int64_t __v) const SPP_NOEXCEPT - { return spp_mix_64(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(uint64_t __v) const SPP_NOEXCEPT - { return spp_mix_64(static_cast(__v)); } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(float __v) const SPP_NOEXCEPT - { - // -0.0 and 0.0 should return same hash - uint32_t *as_int = reinterpret_cast(&__v); - return (__v == 0) ? static_cast(0) : spp_mix_32(*as_int); - } -}; - -template <> -struct spp_hash : public std::unary_function -{ - SPP_INLINE size_t operator()(double __v) const SPP_NOEXCEPT - { - // -0.0 and 0.0 should return same hash - uint64_t *as_int = reinterpret_cast(&__v); - return (__v == 0) ? static_cast(0) : spp_mix_64(*as_int); - } -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value); -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value) - { - seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2); - } -}; - -template struct Combiner -{ - inline void operator()(T& seed, T value) - { - seed ^= value + T(0xc6a4a7935bd1e995) + (seed << 6) + (seed >> 2); - } -}; - -template -inline void hash_combine(std::size_t& seed, T const& v) -{ - spp::spp_hash hasher; - Combiner combiner; - - combiner(seed, hasher(v)); -} - -} - -#endif // spp_utils_h_guard_ - diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c index 33c51e3fa..e7d3b1162 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c @@ -114,6 +114,8 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_function_op_plus, MTBDD*, pa, MTBDD*, p /* Check for partial functions */ if (a == mtbdd_false) return b; if (b == mtbdd_false) return a; + + if (a == mtbdd_true || b == mtbdd_true) return mtbdd_true; /* If both leaves, compute plus */ if (mtbdd_isleaf(a) && mtbdd_isleaf(b)) { @@ -163,6 +165,8 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_function_op_times, MTBDD*, pa, MTBDD*, /* Check for partial functions */ if (a == mtbdd_false || b == mtbdd_false) return mtbdd_false; + if (a == mtbdd_true) return b; + if (b == mtbdd_true) return a; /* If both leaves, compute multiplication */ if (mtbdd_isleaf(a) && mtbdd_isleaf(b)) { diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c index ee70252e3..174fbd154 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c @@ -114,6 +114,8 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_number_op_plus, MTBDD*, pa, MTBDD*, pb) /* Check for partial functions */ if (a == mtbdd_false) return b; if (b == mtbdd_false) return a; + + if (a == mtbdd_true || b == mtbdd_true) return mtbdd_true; /* If both leaves, compute plus */ if (mtbdd_isleaf(a) && mtbdd_isleaf(b)) { @@ -163,6 +165,8 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_number_op_times, MTBDD*, pa, MTBDD*, pb /* Check for partial functions */ if (a == mtbdd_false || b == mtbdd_false) return mtbdd_false; + if (a == mtbdd_true) return b; + if (b == mtbdd_true) return a; /* If both leaves, compute multiplication */ if (mtbdd_isleaf(a) && mtbdd_isleaf(b)) { diff --git a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp index 6df0210e9..9237a91ac 100644 --- a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp +++ b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp @@ -92,6 +92,7 @@ namespace storm { } else { carlIncludeDirectory = STORM_CARL_INCLUDE_DIR; } + sparseppIncludeDirectory = STORM_BUILD_DIR "/include/resources/3rdparty/sparsepp/"; // Register all transient variables as transient. for (auto const& variable : this->model.getGlobalVariables().getTransientVariables()) { @@ -1648,7 +1649,7 @@ namespace storm { #include "storm/adapters/CarlAdapter.h" {% endif %} -#include "resources/3rdparty/sparsepp/sparsepp.h" +#include #include "storm/builder/jit/StateSet.h" #include "storm/builder/jit/JitModelBuilderInterface.h" @@ -2405,7 +2406,7 @@ namespace storm { dynamicLibraryPath += DYLIB_EXTENSION; std::string dynamicLibraryFilename = boost::filesystem::absolute(dynamicLibraryPath).string(); - std::string command = compiler + " " + sourceFilename + " " + compilerFlags + " -I" + stormIncludeDirectory + " -I" + boostIncludeDirectory + " -I" + carlIncludeDirectory + " -o " + dynamicLibraryFilename; + std::string command = compiler + " " + sourceFilename + " " + compilerFlags + " -I" + stormIncludeDirectory + " -I" + sparseppIncludeDirectory + " -I" + boostIncludeDirectory + " -I" + carlIncludeDirectory + " -o " + dynamicLibraryFilename; boost::optional error = execute(command); if (error) { diff --git a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.h b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.h index 65321ad9f..0980d7def 100644 --- a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.h +++ b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.h @@ -192,6 +192,9 @@ namespace storm { /// The include directory of carl. std::string carlIncludeDirectory; + /// The include directory of sparsepp. + std::string sparseppIncludeDirectory; + /// A cache that is used by carl. std::shared_ptr>> cache; }; diff --git a/src/storm/settings/modules/BisimulationSettings.cpp b/src/storm/settings/modules/BisimulationSettings.cpp index de0a6ad2e..a626df55e 100644 --- a/src/storm/settings/modules/BisimulationSettings.cpp +++ b/src/storm/settings/modules/BisimulationSettings.cpp @@ -6,6 +6,8 @@ #include "storm/settings/Argument.h" #include "storm/settings/SettingsManager.h" +#include "storm/exceptions/InvalidSettingsException.h" + namespace storm { namespace settings { namespace modules { diff --git a/src/storm/settings/modules/BisimulationSettings.h b/src/storm/settings/modules/BisimulationSettings.h index 8c644cd9c..cd8dffbe2 100644 --- a/src/storm/settings/modules/BisimulationSettings.h +++ b/src/storm/settings/modules/BisimulationSettings.h @@ -15,6 +15,8 @@ namespace storm { // An enumeration of all available bisimulation types. enum class BisimulationType { Strong, Weak }; + enum class CachingStrategy { FullDirect, FullLate, Granularity, Minimal }; + /*! * Creates a new set of bisimulation settings. */ diff --git a/src/storm/storage/dd/Add.cpp b/src/storm/storage/dd/Add.cpp index 6e00de3ec..23403e843 100644 --- a/src/storm/storage/dd/Add.cpp +++ b/src/storm/storage/dd/Add.cpp @@ -241,7 +241,24 @@ namespace storm { template Add Add::multiplyMatrix(Add const& otherMatrix, std::set const& summationMetaVariables) const { - // Create the CUDD summation variables. + // Create the summation variables. + std::vector> summationDdVariables; + for (auto const& metaVariable : summationMetaVariables) { + for (auto const& ddVariable : this->getDdManager().getMetaVariable(metaVariable).getDdVariables()) { + summationDdVariables.push_back(ddVariable); + } + } + + std::set unionOfMetaVariables = Dd::joinMetaVariables(*this, otherMatrix); + std::set containedMetaVariables; + std::set_difference(unionOfMetaVariables.begin(), unionOfMetaVariables.end(), summationMetaVariables.begin(), summationMetaVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); + + return Add(this->getDdManager(), internalAdd.multiplyMatrix(otherMatrix, summationDdVariables), containedMetaVariables); + } + + template + Add Add::multiplyMatrix(Bdd const& otherMatrix, std::set const& summationMetaVariables) const { + // Create the summation variables. std::vector> summationDdVariables; for (auto const& metaVariable : summationMetaVariables) { for (auto const& ddVariable : this->getDdManager().getMetaVariable(metaVariable).getDdVariables()) { diff --git a/src/storm/storage/dd/Add.h b/src/storm/storage/dd/Add.h index d7a757eff..d8466e46d 100644 --- a/src/storm/storage/dd/Add.h +++ b/src/storm/storage/dd/Add.h @@ -339,7 +339,18 @@ namespace storm { * @return An ADD representing the result of the matrix-matrix multiplication. */ Add multiplyMatrix(Add const& otherMatrix, std::set const& summationMetaVariables) const; - + + /*! + * Multiplies the current ADD (representing a matrix) with the given matrix (given by a BDD) by summing over + * the given meta variables. + * + * @param otherMatrix The matrix with which to multiply. + * @param summationMetaVariables The names of the meta variables over which to sum during the matrix- + * matrix multiplication. + * @return An ADD representing the result of the matrix-matrix multiplication. + */ + Add multiplyMatrix(Bdd const& otherMatrix, std::set const& summationMetaVariables) const; + /*! * Computes a BDD that represents the function in which all assignments with a function value strictly * larger than the given value are mapped to one and all others to zero. diff --git a/src/storm/storage/dd/Bdd.cpp b/src/storm/storage/dd/Bdd.cpp index d58758b6e..7af94004c 100644 --- a/src/storm/storage/dd/Bdd.cpp +++ b/src/storm/storage/dd/Bdd.cpp @@ -356,6 +356,11 @@ namespace storm { return internalBdd.createOdd(this->getSortedVariableIndices()); } + template + InternalBdd const& Bdd::getInternalBdd() const { + return internalBdd; + } + template template std::vector Bdd::filterExplicitVector(Odd const& odd, std::vector const& values) const { diff --git a/src/storm/storage/dd/Bdd.h b/src/storm/storage/dd/Bdd.h index b1a6840fe..1250b2632 100644 --- a/src/storm/storage/dd/Bdd.h +++ b/src/storm/storage/dd/Bdd.h @@ -29,6 +29,15 @@ namespace storm { template friend class Add; + /*! + * Creates a DD that encapsulates the given internal BDD. + * + * @param ddManager The manager responsible for this DD. + * @param internalBdd The internal BDD to store. + * @param containedMetaVariables The meta variables that appear in the DD. + */ + Bdd(DdManager const& ddManager, InternalBdd const& internalBdd, std::set const& containedMetaVariables = std::set()); + // Instantiate all copy/move constructors/assignments with the default implementation. Bdd() = default; Bdd(Bdd const& other) = default; @@ -353,6 +362,11 @@ namespace storm { */ storm::storage::BitVector filterExplicitVector(Odd const& odd, storm::storage::BitVector const& values) const; + /*! + * Retrieves the internal BDD. + */ + InternalBdd const& getInternalBdd() const; + friend struct std::hash>; template @@ -364,15 +378,6 @@ namespace storm { */ operator InternalBdd() const; - /*! - * Creates a DD that encapsulates the given internal BDD. - * - * @param ddManager The manager responsible for this DD. - * @param internalBdd The internal BDD to store. - * @param containedMetaVariables The meta variables that appear in the DD. - */ - Bdd(DdManager const& ddManager, InternalBdd const& internalBdd, std::set const& containedMetaVariables = std::set()); - // The internal BDD that depends on the chosen library. InternalBdd internalBdd; }; diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index dcc9c54b9..4893340a6 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -1,5 +1,6 @@ #include "storm/storage/dd/BisimulationDecomposition.h" +#include "storm/storage/dd/bisimulation/SignatureComputer.h" #include "storm/storage/dd/bisimulation/SignatureRefiner.h" #include "storm/utility/macros.h" @@ -26,46 +27,52 @@ namespace storm { template void BisimulationDecomposition::compute() { -// LACE_ME; - - auto partitionRefinementStart = std::chrono::high_resolution_clock::now(); this->status = Status::InComputation; + auto start = std::chrono::high_resolution_clock::now(); + std::chrono::high_resolution_clock::duration totalSignatureTime(0); + std::chrono::high_resolution_clock::duration totalRefinementTime(0); STORM_LOG_TRACE("Initial partition has " << currentPartition.getNumberOfBlocks() << " blocks."); #ifndef NDEBUG - STORM_LOG_TRACE("Initial partition ADD has " << currentPartition.getPartitionAdd().getNodeCount() << " nodes."); + STORM_LOG_TRACE("Initial partition has " << currentPartition.getNodeCount() << " nodes."); #endif SignatureRefiner refiner(model.getManager(), currentPartition.getBlockVariable(), model.getRowVariables()); + SignatureComputer signatureComputer(model); bool done = false; uint64_t iterations = 0; while (!done) { -// currentPartition.getPartitionAdd().exportToDot("part" + std::to_string(iterations) + ".dot"); - Signature signature(model.getTransitionMatrix().multiplyMatrix(currentPartition.getPartitionAdd(), model.getColumnVariables())); -// signature.getSignatureAdd().exportToDot("sig" + std::to_string(iterations) + ".dot"); -#ifndef NDEBUG - STORM_LOG_TRACE("Computed signature ADD with " << signature.getSignatureAdd().getNodeCount() << " nodes."); -#endif + ++iterations; + auto iterationStart = std::chrono::high_resolution_clock::now(); + + auto signatureStart = std::chrono::high_resolution_clock::now(); + Signature signature = signatureComputer.compute(currentPartition); + auto signatureEnd = std::chrono::high_resolution_clock::now(); + totalSignatureTime += (signatureEnd - signatureStart); + auto refinementStart = std::chrono::high_resolution_clock::now(); Partition newPartition = refiner.refine(currentPartition, signature); - - STORM_LOG_TRACE("New partition has " << newPartition.getNumberOfBlocks() << " blocks."); -#ifndef NDEBUG - STORM_LOG_TRACE("Computed new partition ADD with " << newPartition.getPartitionAdd().getNodeCount() << " nodes."); -#endif -// STORM_LOG_TRACE("Current #nodes in table " << llmsset_count_marked(nodes) << " of " << llmsset_get_size(nodes) << " BDD nodes."); +// newPartition.getPartitionAdd().exportToDot("part" + std::to_string(iterations) + ".dot"); + auto refinementEnd = std::chrono::high_resolution_clock::now(); + totalRefinementTime += (refinementEnd - refinementStart); + auto signatureTime = std::chrono::duration_cast(signatureEnd - signatureStart).count(); + auto refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); + auto iterationTime = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - iterationStart).count(); + STORM_LOG_DEBUG("Iteration " << iterations << " produced " << newPartition.getNumberOfBlocks() << " blocks and was completed in " << iterationTime << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms). Signature DD has " << signature.getSignatureAdd().getNodeCount() << " nodes and partition DD has " << currentPartition.getNodeCount() << " nodes."); + if (currentPartition == newPartition) { done = true; } else { currentPartition = newPartition; } - ++iterations; } this->status = Status::FixedPoint; - auto partitionRefinementEnd = std::chrono::high_resolution_clock::now(); - STORM_LOG_DEBUG("Partition refinement completed in " << std::chrono::duration_cast(partitionRefinementEnd - partitionRefinementStart).count() << "ms (" << iterations << " iterations)."); + auto end = std::chrono::high_resolution_clock::now(); + auto totalSignatureTimeInMilliseconds = std::chrono::duration_cast(totalSignatureTime).count(); + auto totalRefinementTimeInMilliseconds = std::chrono::duration_cast(totalRefinementTime).count(); + STORM_LOG_DEBUG("Partition refinement completed in " << std::chrono::duration_cast(end - start).count() << "ms (" << iterations << " iterations, signature: " << totalSignatureTimeInMilliseconds << "ms, refinement: " << totalRefinementTimeInMilliseconds << "ms)."); } template diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index c4f529702..65a46debf 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -42,6 +42,12 @@ namespace storm { Add DdManager::getAddZero() const { return Add(*this, internalDdManager.template getAddZero()); } + + template + template + Add DdManager::getAddUndefined() const { + return Add(*this, internalDdManager.template getAddUndefined()); + } template template @@ -460,7 +466,6 @@ namespace storm { template Add DdManager::getIdentity(storm::expressions::Variable const& variable) const; template Add DdManager::getIdentity(storm::expressions::Variable const& variable) const; - template class DdManager; template Add DdManager::getAddZero() const; @@ -470,6 +475,13 @@ namespace storm { template Add DdManager::getAddZero() const; #endif + template Add DdManager::getAddUndefined() const; + template Add DdManager::getAddUndefined() const; +#ifdef STORM_HAVE_CARL + template Add DdManager::getAddUndefined() const; + template Add DdManager::getAddUndefined() const; +#endif + template Add DdManager::getAddOne() const; template Add DdManager::getAddOne() const; #ifdef STORM_HAVE_CARL diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index 5bce645dd..cade43736 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -72,6 +72,14 @@ namespace storm { template Add getAddZero() const; + /*! + * Retrieves an ADD representing the an undefined value. + * + * @return An ADD representing an undefined value. + */ + template + Add getAddUndefined() const; + /*! * Retrieves an ADD representing the constant infinity function. * diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index d2dbdb42a..994db80c7 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -7,20 +7,30 @@ namespace storm { namespace bisimulation { template - Partition::Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partitionAdd(partitionAdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { + Partition::Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partition(partitionAdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. } - + + template + Partition::Partition(storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partition(partitionBdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { + // Intentionally left empty. + } + template bool Partition::operator==(Partition const& other) { - return this->partitionAdd == other.partitionAdd && this->blockVariable == other.blockVariable && this->nextFreeBlockIndex == other.nextFreeBlockIndex; + return this->partition == other.partition && this->blockVariable == other.blockVariable && this->nextFreeBlockIndex == other.nextFreeBlockIndex; } template - Partition Partition::replacePartitionAdd(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const { + Partition Partition::replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const { return Partition(newPartitionAdd, blockVariable, nextFreeBlockIndex); } - + + template + Partition Partition::replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const { + return Partition(newPartitionBdd, blockVariable, nextFreeBlockIndex); + } + template Partition Partition::create(storm::models::symbolic::Model const& model) { return create(model, model.getLabels()); @@ -45,8 +55,14 @@ namespace storm { } storm::expressions::Variable blockVariable = createBlockVariable(manager, model.getReachableStates().getNonZeroCount()); - std::pair, uint64_t> partitionAddAndBlockCount = createPartitionAdd(manager, model, stateSets, blockVariable); - return Partition(partitionAddAndBlockCount.first, blockVariable, partitionAddAndBlockCount.second); + std::pair, uint64_t> partitionBddAndBlockCount = createPartitionBdd(manager, model, stateSets, blockVariable); + + // Store the partition as an ADD only in the case of CUDD. + if (DdType == storm::dd::DdType::CUDD) { + return Partition(partitionBddAndBlockCount.first.template toAdd(), blockVariable, partitionBddAndBlockCount.second); + } else { + return Partition(partitionBddAndBlockCount.first, blockVariable, partitionBddAndBlockCount.second); + } } template @@ -55,8 +71,23 @@ namespace storm { } template - storm::dd::Add const& Partition::getPartitionAdd() const { - return partitionAdd; + bool Partition::storedAsAdd() const { + return partition.which() == 1; + } + + template + bool Partition::storedAsBdd() const { + return partition.which() == 0; + } + + template + storm::dd::Add const& Partition::asAdd() const { + return boost::get>(partition); + } + + template + storm::dd::Bdd const& Partition::asBdd() const { + return boost::get>(partition); } template @@ -69,6 +100,15 @@ namespace storm { return nextFreeBlockIndex; } + template + uint64_t Partition::getNodeCount() const { + if (this->storedAsBdd()) { + return asBdd().getNodeCount(); + } else { + return asAdd().getNodeCount(); + } + } + template void enumerateBlocksRec(std::vector> const& stateSets, storm::dd::Bdd const& currentStateSet, uint64_t offset, storm::expressions::Variable const& blockVariable, std::function const&)> const& callback) { if (currentStateSet.isZero()) { @@ -83,14 +123,14 @@ namespace storm { } template - std::pair, uint64_t> Partition::createPartitionAdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable) { + std::pair, uint64_t> Partition::createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable) { uint64_t blockCount = 0; - storm::dd::Add partitionAdd = manager.template getAddZero(); + storm::dd::Bdd partitionAdd = manager.getBddZero(); // Enumerate all realizable blocks. enumerateBlocksRec(stateSets, model.getReachableStates(), 0, blockVariable, [&manager, &partitionAdd, &blockVariable, &blockCount](storm::dd::Bdd const& stateSet) { stateSet.template toAdd().exportToDot("states_" + std::to_string(blockCount) + ".dot"); - partitionAdd += (stateSet && manager.getEncoding(blockVariable, blockCount, false)).template toAdd(); + partitionAdd |= (stateSet && manager.getEncoding(blockVariable, blockCount, false)); blockCount++; } ); diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h index 647acf996..a206c33a5 100644 --- a/src/storm/storage/dd/bisimulation/Partition.h +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -1,7 +1,10 @@ #pragma once +#include + #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/Add.h" +#include "storm/storage/dd/Bdd.h" #include "storm/models/symbolic/Model.h" @@ -26,10 +29,24 @@ namespace storm { */ Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex); - bool operator==(Partition const& other); + /*! + * Creates a new partition from the given data. + * + * @param partitionBdd A BDD that maps encoding over the state/row variables and the block variable to + * true iff the state is in the block. + * @param blockVariable The variable to use for the block encoding. Its range must be [0, x] where x is + * the number of states in the partition. + * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices + * between 0 and this number. + */ + Partition(storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex); - Partition replacePartitionAdd(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; + bool operator==(Partition const& other); + Partition replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; + + Partition replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const; + /*! * Creates a partition from the given model that respects all labels. */ @@ -47,24 +64,30 @@ namespace storm { uint64_t getNumberOfBlocks() const; - storm::dd::Add const& getPartitionAdd() const; + bool storedAsAdd() const; + bool storedAsBdd() const; + + storm::dd::Add const& asAdd() const; + storm::dd::Bdd const& asBdd() const; storm::expressions::Variable const& getBlockVariable() const; uint64_t getNextFreeBlockIndex() const; + uint64_t getNodeCount() const; + private: - static std::pair, uint64_t> createPartitionAdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); + static std::pair, uint64_t> createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); static storm::expressions::Variable createBlockVariable(storm::dd::DdManager& manager, uint64_t numberOfStates); - // The ADD representing the partition. The ADD is over the row variables of the model and the block variable. - storm::dd::Add partitionAdd; + /// The DD representing the partition. The DD is over the row variables of the model and the block variable. + boost::variant, storm::dd::Add> partition; - // The meta variable used to encode the block of each state in this partition. + /// The meta variable used to encode the block of each state in this partition. storm::expressions::Variable blockVariable; - // The next free block index. + /// The next free block index. uint64_t nextFreeBlockIndex; }; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp new file mode 100644 index 000000000..873d81608 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -0,0 +1,32 @@ +#include "storm/storage/dd/bisimulation/SignatureComputer.h" + +#include "storm/storage/dd/DdManager.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model) : model(model), transitionMatrix(model.getTransitionMatrix()) { + if (DdType == storm::dd::DdType::Sylvan) { + this->transitionMatrix = this->transitionMatrix.notZero().ite(this->transitionMatrix, this->transitionMatrix.getDdManager().template getAddUndefined()); + } + } + + template + Signature SignatureComputer::compute(Partition const& partition) { + if (partition.storedAsBdd()) { + return Signature(this->transitionMatrix.multiplyMatrix(partition.asBdd(), model.getColumnVariables())); + } else { + return Signature(this->transitionMatrix.multiplyMatrix(partition.asAdd(), model.getColumnVariables())); + } + } + + template class SignatureComputer; + + template class SignatureComputer; + template class SignatureComputer; + template class SignatureComputer; + } + } +} diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.h b/src/storm/storage/dd/bisimulation/SignatureComputer.h new file mode 100644 index 000000000..f2de03f49 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.h @@ -0,0 +1,29 @@ +#pragma once + +#include "storm/storage/dd/DdType.h" + +#include "storm/storage/dd/bisimulation/Signature.h" +#include "storm/storage/dd/bisimulation/Partition.h" + +#include "storm/models/symbolic/Model.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class SignatureComputer { + public: + SignatureComputer(storm::models::symbolic::Model const& model); + + Signature compute(Partition const& partition); + + private: + storm::models::symbolic::Model const& model; + + storm::dd::Add transitionMatrix; + }; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 8695f14a1..3f101776d 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -1,15 +1,24 @@ #include "storm/storage/dd/bisimulation/SignatureRefiner.h" #include +#include #include "storm/storage/dd/DdManager.h" #include "storm/storage/dd/cudd/InternalCuddDdManager.h" #include "storm/utility/macros.h" +#include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/NotImplementedException.h" -#include "resources/3rdparty/sparsepp/sparsepp.h" +#include "storm/settings/SettingsManager.h" +#include "storm/settings/modules/BisimulationSettings.h" + +#include + +#include "sylvan_cache.h" +#include "sylvan_table.h" +#include "sylvan_int.h" namespace storm { namespace dd { @@ -18,7 +27,7 @@ namespace storm { struct CuddPointerPairHash { std::size_t operator()(std::pair const& pair) const { std::size_t seed = std::hash()(pair.first); - boost::hash_combine(seed, pair.second); + spp::hash_combine(seed, pair.second); return seed; } }; @@ -26,40 +35,75 @@ namespace storm { struct SylvanMTBDDPairHash { std::size_t operator()(std::pair const& pair) const { std::size_t seed = std::hash()(pair.first); - boost::hash_combine(seed, pair.second); + spp::hash_combine(seed, pair.second); return seed; } }; + struct SylvanMTBDDPairLess { + std::size_t operator()(std::pair const& a, std::pair const& b) const { + if (a.first < b.first) { + return true; + } else if (a.first == b.first && a.second < b.second) { + return true; + } + return false; + } + }; + template class InternalSignatureRefiner; + class ReuseWrapper { + public: + ReuseWrapper() : ReuseWrapper(false) { + // Intentionally left empty. + } + + ReuseWrapper(bool value) : value(value) { + // Intentionally left empty. + } + + bool isReused() const { + return value; + } + + void setReused() { + value = true; + } + + private: + bool value; + }; + template class InternalSignatureRefiner { public: - InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0) { + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { // Intentionally left empty. } Partition refine(Partition const& oldPartition, Signature const& signature) { storm::dd::Add newPartitionAdd = refine(oldPartition, signature.getSignatureAdd()); ++numberOfRefinements; - return oldPartition.replacePartitionAdd(newPartitionAdd, nextFreeBlockIndex); + return oldPartition.replacePartition(newPartitionAdd, nextFreeBlockIndex); } private: storm::dd::Add refine(Partition const& oldPartition, storm::dd::Add const& signatureAdd) { + STORM_LOG_ASSERT(oldPartition.storedAsAdd(), "Expecting partition to be stored as ADD for CUDD."); + // Clear the caches. signatureCache.clear(); reuseBlocksCache.clear(); nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); // Perform the actual recursive refinement step. - DdNodePtr result = refine(oldPartition.getPartitionAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode()); + DdNodePtr result = refine(oldPartition.asAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode()); // Construct resulting ADD from the obtained node and the meta information. storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, cudd::ADD(internalDdManager.getCuddManager(), result)); - storm::dd::Add newPartitionAdd(oldPartition.getPartitionAdd().getDdManager(), internalNewPartitionAdd, oldPartition.getPartitionAdd().getContainedMetaVariables()); + storm::dd::Add newPartitionAdd(oldPartition.asAdd().getDdManager(), internalNewPartitionAdd, oldPartition.asAdd().getContainedMetaVariables()); return newPartitionAdd; } @@ -67,13 +111,22 @@ namespace storm { DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode) { ::DdManager* ddman = internalDdManager.getCuddManager().getManager(); + // If we arrived at the constant zero node, then this was an illegal state encoding (we require + // all states to be non-deadlock). + if (partitionNode == Cudd_ReadZero(ddman)) { + return partitionNode; + } + // Check the cache whether we have seen the same node before. - auto sigCacheIt = signatureCache.find(std::make_pair(signatureNode, partitionNode)); - if (sigCacheIt != signatureCache.end()) { + std::unique_ptr& sigCacheEntrySmartPtr = signatureCache[std::make_pair(signatureNode, partitionNode)]; + if (sigCacheEntrySmartPtr) { // If so, we return the corresponding result. - return sigCacheIt->second; + return *sigCacheEntrySmartPtr; } + DdNode** newEntryPtr = new DdNode*; + sigCacheEntrySmartPtr.reset(newEntryPtr); + // Determine the levels in the DDs. uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode) - 1; uint64_t signatureVariable = Cudd_NodeReadIndex(signatureNode); @@ -103,43 +156,38 @@ namespace storm { elseResult = refine(Cudd_E(partitionNode), Cudd_E(signatureNode)); Cudd_Ref(elseResult); } - + + DdNode* result; if (thenResult == elseResult) { Cudd_Deref(thenResult); Cudd_Deref(elseResult); - return thenResult; + result = thenResult; + } else { + // Get the node to connect the subresults. + DdNode* var = Cudd_addIthVar(ddman, topVariable + 1); + Cudd_Ref(var); + result = Cudd_addIte(ddman, var, thenResult, elseResult); + Cudd_Ref(result); + Cudd_RecursiveDeref(ddman, var); + Cudd_Deref(thenResult); + Cudd_Deref(elseResult); } - // Get the node to connect the subresults. - DdNode* var = Cudd_addIthVar(ddman, topVariable + 1); - Cudd_Ref(var); - DdNode* result = Cudd_addIte(ddman, var, thenResult, elseResult); - Cudd_Ref(result); - Cudd_RecursiveDeref(ddman, var); - Cudd_Deref(thenResult); - Cudd_Deref(elseResult); - // Store the result in the cache. - signatureCache[std::make_pair(signatureNode, partitionNode)] = result; - + *newEntryPtr = result; Cudd_Deref(result); + return result; } else { // If we are not within the state encoding any more, we hit the signature itself. - // If we arrived at the constant zero node, then this was an illegal state encoding (we require - // all states to be non-deadlock). - if (signatureNode == Cudd_ReadZero(ddman)) { - return signatureNode; - } - // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. - auto reuseCacheIt = reuseBlocksCache.find(partitionNode); - if (reuseCacheIt == reuseBlocksCache.end()) { - reuseBlocksCache.emplace(partitionNode, true); - signatureCache[std::make_pair(signatureNode, partitionNode)] = partitionNode; + auto& reuseEntry = reuseBlocksCache[partitionNode]; + if (!reuseEntry.isReused()) { + reuseEntry.setReused(); + *newEntryPtr = partitionNode; return partitionNode; } else { DdNode* result; @@ -149,7 +197,7 @@ namespace storm { result = blockEncoding.getInternalAdd().getCuddDdNode(); Cudd_Ref(result); } - signatureCache[std::make_pair(signatureNode, partitionNode)] = result; + *newEntryPtr = result; Cudd_Deref(result); return result; } @@ -169,124 +217,191 @@ namespace storm { // The number of completed refinements. uint64_t numberOfRefinements; + // The number of nodes visited in the last refinement operation. + uint64_t lastNumberOfVisitedNodes; + // The cache used to identify states with identical signature. - spp::sparse_hash_map, DdNode*, CuddPointerPairHash> signatureCache; + spp::sparse_hash_map, std::unique_ptr, CuddPointerPairHash> signatureCache; // The cache used to identify which old block numbers have already been reused. - spp::sparse_hash_map reuseBlocksCache; + spp::sparse_hash_map reuseBlocksCache; }; - + template class InternalSignatureRefiner { public: - InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0) { - // Intentionally left empty. + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), numberOfBlockVariables(manager.getMetaVariable(blockVariable).getNumberOfDdVariables()), blockCube(manager.getMetaVariable(blockVariable).getCube()), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0), signatureCache() { + // Perform garbage collection to clean up stuff not needed anymore. + LACE_ME; + sylvan_gc(); } Partition refine(Partition const& oldPartition, Signature const& signature) { - storm::dd::Add newPartitionAdd = refine(oldPartition, signature.getSignatureAdd()); - ++numberOfRefinements; - return oldPartition.replacePartitionAdd(newPartitionAdd, nextFreeBlockIndex); + storm::dd::Bdd newPartitionBdd = refine(oldPartition, signature.getSignatureAdd()); + return oldPartition.replacePartition(newPartitionBdd, nextFreeBlockIndex); } private: - storm::dd::Add refine(Partition const& oldPartition, storm::dd::Add const& signatureAdd) { + storm::dd::Bdd refine(Partition const& oldPartition, storm::dd::Add const& signatureAdd) { + STORM_LOG_ASSERT(oldPartition.storedAsBdd(), "Expecting partition to be stored as BDD for Sylvan."); + + LACE_ME; + + // Set up next refinement. + ++numberOfRefinements; + // Clear the caches. + std::size_t oldSize = signatureCache.size(); signatureCache.clear(); + signatureCache.reserve(3 * oldSize); reuseBlocksCache.clear(); + reuseBlocksCache.reserve(3 * oldPartition.getNumberOfBlocks()); nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); + + // Clear performance counters. +// signatureCacheLookups = 0; +// signatureCacheHits = 0; +// numberOfVisitedNodes = 0; +// totalSignatureCacheLookupTime = std::chrono::high_resolution_clock::duration(0); +// totalSignatureCacheStoreTime = std::chrono::high_resolution_clock::duration(0); +// totalReuseBlocksLookupTime = std::chrono::high_resolution_clock::duration(0); +// totalLevelLookupTime = std::chrono::high_resolution_clock::duration(0); +// totalBlockEncodingTime = std::chrono::high_resolution_clock::duration(0); +// totalMakeNodeTime = std::chrono::high_resolution_clock::duration(0); // Perform the actual recursive refinement step. - MTBDD result = refine(oldPartition.getPartitionAdd().getInternalAdd().getSylvanMtbdd().GetMTBDD(), signatureAdd.getInternalAdd().getSylvanMtbdd().GetMTBDD()); + BDD result = refine(oldPartition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), signatureAdd.getInternalAdd().getSylvanMtbdd().GetMTBDD()); + + // Construct resulting BDD from the obtained node and the meta information. + storm::dd::InternalBdd internalNewPartitionBdd(&internalDdManager, sylvan::Bdd(result)); + storm::dd::Bdd newPartitionBdd(oldPartition.asBdd().getDdManager(), internalNewPartitionBdd, oldPartition.asBdd().getContainedMetaVariables()); - // Construct resulting ADD from the obtained node and the meta information. - storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, sylvan::Mtbdd(result)); - storm::dd::Add newPartitionAdd(oldPartition.getPartitionAdd().getDdManager(), internalNewPartitionAdd, oldPartition.getPartitionAdd().getContainedMetaVariables()); +// // Display some statistics. +// STORM_LOG_TRACE("Refinement visited " << numberOfVisitedNodes << " nodes."); +// STORM_LOG_TRACE("Current #nodes in table: " << llmsset_count_marked(nodes) << " of " << llmsset_get_size(nodes) << ", cache: " << cache_getused() << " of " << cache_getsize() << "."); +// STORM_LOG_TRACE("Signature cache hits: " << signatureCacheHits << ", misses: " << (signatureCacheLookups - signatureCacheHits) << "."); +// STORM_LOG_TRACE("Signature cache lookup time: " << std::chrono::duration_cast(totalSignatureCacheLookupTime).count() << "ms"); +// STORM_LOG_TRACE("Signature cache store time: " << std::chrono::duration_cast(totalSignatureCacheStoreTime).count() << "ms"); +// STORM_LOG_TRACE("Signature cache total time: " << std::chrono::duration_cast(totalSignatureCacheStoreTime + totalSignatureCacheLookupTime).count() << "ms"); +// STORM_LOG_TRACE("Reuse blocks lookup time: " << std::chrono::duration_cast(totalReuseBlocksLookupTime).count() << "ms"); +// STORM_LOG_TRACE("Level lookup time: " << std::chrono::duration_cast(totalLevelLookupTime).count() << "ms"); +// STORM_LOG_TRACE("Block encoding time: " << std::chrono::duration_cast(totalBlockEncodingTime).count() << "ms"); +// STORM_LOG_TRACE("Make node time: " << std::chrono::duration_cast(totalMakeNodeTime).count() << "ms"); - return newPartitionAdd; + return newPartitionBdd; + } + + BDD encodeBlock(uint64_t blockIndex) { + std::vector e(numberOfBlockVariables); + for (uint64_t i = 0; i < numberOfBlockVariables; ++i) { + e[i] = blockIndex & 1 ? 1 : 0; + blockIndex >>= 1; + } + return sylvan_cube(blockCube.getInternalBdd().getSylvanBdd().GetBDD(), e.data()); } - MTBDD refine(MTBDD partitionNode, MTBDD signatureNode) { + BDD refine(BDD partitionNode, MTBDD signatureNode) { LACE_ME; + // If we arrived at the constant zero node, then this was an illegal state encoding (we require + // all states to be non-deadlock). + if (partitionNode == sylvan_false) { + return partitionNode; + } + + STORM_LOG_ASSERT(partitionNode != mtbdd_false, "Expected non-false node."); + +// ++numberOfVisitedNodes; + // Check the cache whether we have seen the same node before. - auto sigCacheIt = signatureCache.find(std::make_pair(signatureNode, partitionNode)); - if (sigCacheIt != signatureCache.end()) { +// ++signatureCacheLookups; +// auto start = std::chrono::high_resolution_clock::now(); + std::unique_ptr& sigCacheEntrySmartPtr = signatureCache[std::make_pair(signatureNode, partitionNode)]; + if (sigCacheEntrySmartPtr) { +// ++signatureCacheHits; // If so, we return the corresponding result. - return sigCacheIt->second; +// auto end = std::chrono::high_resolution_clock::now(); +// totalSignatureCacheLookupTime += end - start; + return *sigCacheEntrySmartPtr; } +// auto end = std::chrono::high_resolution_clock::now(); +// totalSignatureCacheLookupTime += end - start; + + MTBDD* newEntryPtr = new MTBDD; + sigCacheEntrySmartPtr.reset(newEntryPtr); + + sylvan_gc_test(); // Determine levels in the DDs. - BDDVAR signatureVariable = mtbdd_isleaf(signatureNode) ? 0xffffffff : sylvan_var(signatureNode); - BDDVAR partitionVariable = mtbdd_isleaf(signatureNode) ? 0xffffffff : sylvan_var(partitionNode) - 1; +// start = std::chrono::high_resolution_clock::now(); + BDDVAR signatureVariable = sylvan_isconst(signatureNode) ? 0xffffffff : sylvan_var(signatureNode); + BDDVAR partitionVariable = sylvan_var(partitionNode) - 1; BDDVAR topVariable = std::min(signatureVariable, partitionVariable); - +// end = std::chrono::high_resolution_clock::now(); +// totalLevelLookupTime += end - start; + // Check whether the top variable is still within the state encoding. if (topVariable <= lastStateLevel) { // Determine subresults by recursive descent. - MTBDD thenResult; - MTBDD elseResult; + BDD thenResult; + BDD elseResult; if (partitionVariable < signatureVariable) { - thenResult = refine(sylvan_high(partitionNode), signatureNode); - sylvan_protect(&thenResult); elseResult = refine(sylvan_low(partitionNode), signatureNode); - sylvan_protect(&elseResult); + thenResult = refine(sylvan_high(partitionNode), signatureNode); } else if (partitionVariable > signatureVariable) { - thenResult = refine(partitionNode, sylvan_high(signatureNode)); - sylvan_protect(&thenResult); elseResult = refine(partitionNode, sylvan_low(signatureNode)); - sylvan_protect(&elseResult); + thenResult = refine(partitionNode, sylvan_high(signatureNode)); } else { - thenResult = refine(sylvan_high(partitionNode), sylvan_high(signatureNode)); - sylvan_protect(&thenResult); elseResult = refine(sylvan_low(partitionNode), sylvan_low(signatureNode)); - sylvan_protect(&elseResult); + thenResult = refine(sylvan_high(partitionNode), sylvan_high(signatureNode)); } - + + BDD result; if (thenResult == elseResult) { - sylvan_unprotect(&thenResult); - sylvan_unprotect(&elseResult); - return thenResult; + result = thenResult; + } else { + // Get the node to connect the subresults. +// start = std::chrono::high_resolution_clock::now(); + result = sylvan_makenode(topVariable + 1, elseResult, thenResult); +// end = std::chrono::high_resolution_clock::now(); +// totalMakeNodeTime += end - start; } - // Get the node to connect the subresults. - MTBDD result = sylvan_makenode(topVariable + 1, elseResult, thenResult);// mtbdd_ite(sylvan_ithvar(topVariable), thenResult, elseResult); - sylvan_protect(&result); - sylvan_unprotect(&thenResult); - sylvan_unprotect(&elseResult); - // Store the result in the cache. - signatureCache[std::make_pair(signatureNode, partitionNode)] = result; +// start = std::chrono::high_resolution_clock::now(); + *newEntryPtr = result; +// end = std::chrono::high_resolution_clock::now(); +// totalSignatureCacheStoreTime += end - start; - sylvan_unprotect(&result); return result; } else { // If we are not within the state encoding any more, we hit the signature itself. - - // If we arrived at the constant zero node, then this was an illegal state encoding (we require - // all states to be non-deadlock). - if (mtbdd_iszero(signatureNode)) { - return signatureNode; - } // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. - auto reuseCacheIt = reuseBlocksCache.find(partitionNode); - if (reuseCacheIt == reuseBlocksCache.end()) { +// start = std::chrono::high_resolution_clock::now(); + auto& reuseBlockEntry = reuseBlocksCache[partitionNode]; +// end = std::chrono::high_resolution_clock::now(); +// totalReuseBlocksLookupTime += end - start; + if (!reuseBlockEntry.isReused()) { + reuseBlockEntry.setReused(); reuseBlocksCache.emplace(partitionNode, true); - signatureCache[std::make_pair(signatureNode, partitionNode)] = partitionNode; +// start = std::chrono::high_resolution_clock::now(); + *newEntryPtr = partitionNode; +// end = std::chrono::high_resolution_clock::now(); +// totalSignatureCacheStoreTime += end - start; return partitionNode; } else { - MTBDD result; - { - storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); - ++nextFreeBlockIndex; - result = blockEncoding.getInternalAdd().getSylvanMtbdd().GetMTBDD(); - sylvan_protect(&result); - } - signatureCache[std::make_pair(signatureNode, partitionNode)] = result; - sylvan_unprotect(&result); +// start = std::chrono::high_resolution_clock::now(); + BDD result = encodeBlock(nextFreeBlockIndex++); +// end = std::chrono::high_resolution_clock::now(); +// totalBlockEncodingTime += end - start; + +// start = std::chrono::high_resolution_clock::now(); + *newEntryPtr = result; +// end = std::chrono::high_resolution_clock::now(); +// totalSignatureCacheStoreTime += end - start; return result; } } @@ -296,6 +411,10 @@ namespace storm { storm::dd::InternalDdManager const& internalDdManager; storm::expressions::Variable const& blockVariable; + uint64_t numberOfBlockVariables; + + storm::dd::Bdd blockCube; + // The last level that belongs to the state encoding in the DDs. uint64_t lastStateLevel; @@ -306,10 +425,22 @@ namespace storm { uint64_t numberOfRefinements; // The cache used to identify states with identical signature. - spp::sparse_hash_map, MTBDD, SylvanMTBDDPairHash> signatureCache; + spp::sparse_hash_map, std::unique_ptr, SylvanMTBDDPairHash> signatureCache; // The cache used to identify which old block numbers have already been reused. - spp::sparse_hash_map reuseBlocksCache; + spp::sparse_hash_map reuseBlocksCache; + + // Performance counters. +// uint64_t signatureCacheLookups; +// uint64_t signatureCacheHits; +// uint64_t numberOfVisitedNodes; +// std::chrono::high_resolution_clock::duration totalSignatureCacheLookupTime; +// std::chrono::high_resolution_clock::duration totalSignatureCacheStoreTime; +// std::chrono::high_resolution_clock::duration totalReuseBlocksLookupTime; +// std::chrono::high_resolution_clock::duration totalLevelLookupTime; +// std::chrono::high_resolution_clock::duration totalBlockEncodingTime; +// std::chrono::high_resolution_clock::duration totalMakeNodeTime; + }; template @@ -336,7 +467,6 @@ namespace storm { template class SignatureRefiner; template class SignatureRefiner; - } } } diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp index 142381d36..e6a13ab89 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp @@ -209,11 +209,16 @@ namespace storm { summationAdds.push_back(ddVariable.toAdd().getCuddAdd()); } - return InternalAdd(ddManager, this->getCuddAdd().TimesPlus(otherMatrix.getCuddAdd(), summationAdds)); - return InternalAdd(ddManager, this->getCuddAdd().Triangle(otherMatrix.getCuddAdd(), summationAdds)); +// return InternalAdd(ddManager, this->getCuddAdd().TimesPlus(otherMatrix.getCuddAdd(), summationAdds)); +// return InternalAdd(ddManager, this->getCuddAdd().Triangle(otherMatrix.getCuddAdd(), summationAdds)); return InternalAdd(ddManager, this->getCuddAdd().MatrixMultiply(otherMatrix.getCuddAdd(), summationAdds)); } + template + InternalAdd InternalAdd::multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const { + return this->multiplyMatrix(otherMatrix.template toAdd(), summationDdVariables); + } + template InternalBdd InternalAdd::greater(ValueType const& value) const { return InternalBdd(ddManager, this->getCuddAdd().BddStrictThreshold(value)); diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.h b/src/storm/storage/dd/cudd/InternalCuddAdd.h index 2218e3f62..8e7c1a34f 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.h @@ -328,7 +328,17 @@ namespace storm { * @return An ADD representing the result of the matrix-matrix multiplication. */ InternalAdd multiplyMatrix(InternalAdd const& otherMatrix, std::vector> const& summationDdVariables) const; - + + /*! + * Multiplies the current ADD (representing a matrix) with the given matrix by summing over the given meta + * variables. + * + * @param otherMatrix The matrix with which to multiply. + * @param summationDdVariables The DD variables (represented as ADDs) over which to sum. + * @return An ADD representing the result of the matrix-matrix multiplication. + */ + InternalAdd multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const; + /*! * Computes a BDD that represents the function in which all assignments with a function value strictly * larger than the given value are mapped to one and all others to zero. diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index 3f4986393..0585b793e 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -3,6 +3,8 @@ #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/CuddSettings.h" +#include "storm/exceptions/NotSupportedException.h" + namespace storm { namespace dd { @@ -55,7 +57,12 @@ namespace storm { InternalAdd InternalDdManager::getAddZero() const { return InternalAdd(this, cuddManager.addZero()); } - + + template + InternalAdd InternalDdManager::getAddUndefined() const { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Undefined values are not supported by CUDD."); + } + template InternalAdd InternalDdManager::getConstant(ValueType const& value) const { return InternalAdd(this, cuddManager.constant(value)); diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.h b/src/storm/storage/dd/cudd/InternalCuddDdManager.h index 404f577bf..08717f345 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.h +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.h @@ -66,7 +66,15 @@ namespace storm { */ template InternalAdd getAddZero() const; - + + /*! + * Retrieves an ADD representing an undefined value. + * + * @return An ADD representing an undefined value. + */ + template + InternalAdd getAddUndefined() const; + /*! * Retrieves an ADD representing the constant function with the given value. * diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index 052fc2925..a6e3997c1 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -581,6 +581,18 @@ namespace storm { return InternalAdd(ddManager, this->sylvanMtbdd.AndExists(otherMatrix.sylvanMtbdd, summationVariables.getSylvanBdd())); } + +#ifdef STORM_HAVE_CARL + template<> + InternalAdd InternalAdd::multiplyMatrix(InternalAdd const& otherMatrix, std::vector> const& summationDdVariables) const { + InternalBdd summationVariables = ddManager->getBddOne(); + for (auto const& ddVariable : summationDdVariables) { + summationVariables &= ddVariable; + } + + return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRF(otherMatrix.sylvanMtbdd, summationVariables.getSylvanBdd())); + } +#endif template<> InternalAdd InternalAdd::multiplyMatrix(InternalAdd const& otherMatrix, std::vector> const& summationDdVariables) const { @@ -591,19 +603,39 @@ namespace storm { return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRN(otherMatrix.sylvanMtbdd, summationVariables.getSylvanBdd())); } - + + template + InternalAdd InternalAdd::multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const { + InternalBdd summationVariables = ddManager->getBddOne(); + for (auto const& ddVariable : summationDdVariables) { + summationVariables &= ddVariable; + } + + return InternalAdd(ddManager, this->sylvanMtbdd.AndExists(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); + } + #ifdef STORM_HAVE_CARL template<> - InternalAdd InternalAdd::multiplyMatrix(InternalAdd const& otherMatrix, std::vector> const& summationDdVariables) const { + InternalAdd InternalAdd::multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const { InternalBdd summationVariables = ddManager->getBddOne(); for (auto const& ddVariable : summationDdVariables) { summationVariables &= ddVariable; } - return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRF(otherMatrix.sylvanMtbdd, summationVariables.getSylvanBdd())); + return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRF(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); } #endif - + + template<> + InternalAdd InternalAdd::multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const { + InternalBdd summationVariables = ddManager->getBddOne(); + for (auto const& ddVariable : summationDdVariables) { + summationVariables &= ddVariable; + } + + return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRN(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); + } + template InternalBdd InternalAdd::greater(ValueType const& value) const { return InternalBdd(ddManager, this->sylvanMtbdd.BddStrictThreshold(value)); diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h index d719462ea..86f76ed3f 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h @@ -331,7 +331,17 @@ namespace storm { * @return An ADD representing the result of the matrix-matrix multiplication. */ InternalAdd multiplyMatrix(InternalAdd const& otherMatrix, std::vector> const& summationDdVariables) const; - + + /*! + * Multiplies the current ADD (representing a matrix) with the given matrix by summing over the given meta + * variables. + * + * @param otherMatrix The matrix with which to multiply. + * @param summationDdVariables The DD variables (represented as ADDs) over which to sum. + * @return An ADD representing the result of the matrix-matrix multiplication. + */ + InternalAdd multiplyMatrix(InternalBdd const& otherMatrix, std::vector> const& summationDdVariables) const; + /*! * Computes a BDD that represents the function in which all assignments with a function value strictly * larger than the given value are mapped to one and all others to zero. diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h index e44cc10a7..fc0fc2a83 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h @@ -376,6 +376,20 @@ namespace storm { friend struct std::hash>; + /*! + * Retrieves the sylvan BDD. + * + * @return The sylvan BDD. + */ + sylvan::Bdd& getSylvanBdd(); + + /*! + * Retrieves the sylvan BDD. + * + * @return The sylvan BDD. + */ + sylvan::Bdd const& getSylvanBdd() const; + private: /*! * Builds a BDD representing the values that make the given filter function evaluate to true. @@ -474,19 +488,6 @@ namespace storm { */ static storm::expressions::Variable toExpressionRec(BDD dd, storm::expressions::ExpressionManager& manager, std::vector& expressions, std::unordered_map& indexToVariableMap, std::unordered_map, storm::expressions::Variable>& countIndexToVariablePair, std::unordered_map& nodeToCounterMap, std::vector& nextCounterForIndex); - /*! - * Retrieves the sylvan BDD. - * - * @return The sylvan BDD. - */ - sylvan::Bdd& getSylvanBdd(); - - /*! - * Retrieves the sylvan BDD. - * - * @return The sylvan BDD. - */ - sylvan::Bdd const& getSylvanBdd() const; // The internal manager responsible for this BDD. InternalDdManager const* ddManager; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 9d1cac0e8..85f1d2fa4 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -17,6 +17,17 @@ namespace storm { namespace dd { + +#ifndef NDEBUG + VOID_TASK_0(gc_start) { + STORM_LOG_TRACE("Starting sylvan garbage collection..."); + } + + VOID_TASK_0(gc_end) { + STORM_LOG_TRACE("Sylvan garbage collection done."); + } +#endif + uint_fast64_t InternalDdManager::numberOfInstances = 0; // It is important that the variable pairs start at an even offset, because sylvan assumes this to be true for @@ -50,15 +61,27 @@ namespace storm { STORM_LOG_THROW(powerOfTwo >= 16, storm::exceptions::InvalidSettingsException, "Too little memory assigned to sylvan."); - if ((((1ull << powerOfTwo) + (1ull << (powerOfTwo - 1)))) < totalNodesToStore) { - sylvan::Sylvan::initPackage(1ull << powerOfTwo, 1ull << powerOfTwo, 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); - } else { - sylvan::Sylvan::initPackage(1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1), 1ull << (powerOfTwo - 1)); + uint64_t maxTableSize = 1ull << powerOfTwo; + uint64_t maxCacheSize = 1ull << (powerOfTwo - 1); + if (maxTableSize + maxCacheSize > totalNodesToStore) { + maxTableSize >>= 1; } - sylvan::Sylvan::setGranularity(3); + + uint64_t initialTableSize = 1ull << std::max(powerOfTwo - 4, 16ull); + uint64_t initialCacheSize = 1ull << std::max(powerOfTwo - 4, 16ull); + + STORM_LOG_DEBUG("Initializing sylvan. Initial/max table size: " << initialTableSize << "/" << maxTableSize << ", initial/max cache size: " << initialCacheSize << "/" << maxCacheSize << "."); + sylvan::Sylvan::initPackage(initialTableSize, maxTableSize, initialCacheSize, maxCacheSize); + sylvan::Sylvan::initBdd(); sylvan::Sylvan::initMtbdd(); sylvan::Sylvan::initCustomMtbdd(); + +#ifndef NDEBUG + sylvan_gc_hook_pregc(TASK(gc_start)); + sylvan_gc_hook_postgc(TASK(gc_end)); +#endif + } ++numberOfInstances; } @@ -127,7 +150,12 @@ namespace storm { return InternalAdd(this, sylvan::Mtbdd::stormRationalFunctionTerminal(storm::utility::zero())); } #endif - + + template + InternalAdd InternalDdManager::getAddUndefined() const { + return InternalAdd(this, sylvan::Mtbdd(sylvan::Bdd::bddZero())); + } + template<> InternalAdd InternalDdManager::getConstant(double const& value) const { return InternalAdd(this, sylvan::Mtbdd::doubleTerminal(value)); @@ -200,6 +228,15 @@ namespace storm { #ifdef STORM_HAVE_CARL template InternalAdd InternalDdManager::getAddZero() const; #endif + + template InternalAdd InternalDdManager::getAddUndefined() const; + template InternalAdd InternalDdManager::getAddUndefined() const; + + template InternalAdd InternalDdManager::getAddUndefined() const; + +#ifdef STORM_HAVE_CARL + template InternalAdd InternalDdManager::getAddUndefined() const; +#endif template InternalAdd InternalDdManager::getConstant(double const& value) const; template InternalAdd InternalDdManager::getConstant(uint_fast64_t const& value) const; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h index 77846dbe4..0e0a476f4 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h @@ -68,6 +68,14 @@ namespace storm { template InternalAdd getAddZero() const; + /*! + * Retrieves an ADD representing an undefined value. + * + * @return An ADD representing an undefined value. + */ + template + InternalAdd getAddUndefined() const; + /*! * Retrieves an ADD representing the constant function with the given value. * diff --git a/src/storm/storage/geometry/NativePolytope.cpp b/src/storm/storage/geometry/NativePolytope.cpp index a88563b73..b3da29bb3 100644 --- a/src/storm/storage/geometry/NativePolytope.cpp +++ b/src/storm/storage/geometry/NativePolytope.cpp @@ -25,7 +25,7 @@ namespace storm { uint_fast64_t maxCol = halfspaces.front().normalVector().size(); uint_fast64_t maxRow = halfspaces.size(); A = EigenMatrix(maxRow, maxCol); - b = EigenVector(maxRow); + b = EigenVector(static_cast(maxRow)); for (int_fast64_t row = 0; row < A.rows(); ++row ){ assert(halfspaces[row].normalVector().size() == maxCol); b(row) = halfspaces[row].offset(); From 7f346d2f0b8b5624ba335f95eac70945bb5cc796 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 17 May 2017 21:35:48 +0200 Subject: [PATCH 04/95] more work on quotient extraction --- src/storm/abstraction/MenuGame.cpp | 2 +- src/storm/builder/DdJaniModelBuilder.cpp | 17 +- src/storm/builder/DdPrismModelBuilder.cpp | 18 +- src/storm/models/symbolic/Ctmc.cpp | 37 +++- src/storm/models/symbolic/Ctmc.h | 58 ++++++- .../models/symbolic/DeterministicModel.cpp | 19 ++- .../models/symbolic/DeterministicModel.h | 30 +++- src/storm/models/symbolic/Dtmc.cpp | 18 +- src/storm/models/symbolic/Dtmc.h | 28 ++- src/storm/models/symbolic/Mdp.cpp | 19 ++- src/storm/models/symbolic/Mdp.h | 31 +++- src/storm/models/symbolic/Model.cpp | 91 +++++++--- src/storm/models/symbolic/Model.h | 44 +++-- .../models/symbolic/NondeterministicModel.cpp | 30 +++- .../models/symbolic/NondeterministicModel.h | 33 +++- .../symbolic/StochasticTwoPlayerGame.cpp | 33 +++- .../models/symbolic/StochasticTwoPlayerGame.h | 39 ++++- .../settings/modules/BisimulationSettings.cpp | 19 +++ .../settings/modules/BisimulationSettings.h | 16 +- src/storm/storage/dd/Add.cpp | 62 ++++++- src/storm/storage/dd/Add.h | 13 +- src/storm/storage/dd/Bdd.cpp | 52 +++++- src/storm/storage/dd/Bdd.h | 11 ++ .../storage/dd/BisimulationDecomposition.cpp | 20 ++- .../storage/dd/BisimulationDecomposition.h | 9 +- src/storm/storage/dd/DdManager.cpp | 15 ++ src/storm/storage/dd/DdManager.h | 15 +- .../storage/dd/bisimulation/Partition.cpp | 114 ++++++++++--- src/storm/storage/dd/bisimulation/Partition.h | 81 ++++++--- .../bisimulation/PreservationInformation.cpp | 24 +++ .../dd/bisimulation/PreservationInformation.h | 30 ++++ .../dd/bisimulation/QuotientExtractor.cpp | 161 ++++++++++++++++++ .../dd/bisimulation/QuotientExtractor.h | 37 ++++ src/storm/utility/storm.h | 5 +- 34 files changed, 1056 insertions(+), 175 deletions(-) create mode 100644 src/storm/storage/dd/bisimulation/PreservationInformation.cpp create mode 100644 src/storm/storage/dd/bisimulation/PreservationInformation.h create mode 100644 src/storm/storage/dd/bisimulation/QuotientExtractor.cpp create mode 100644 src/storm/storage/dd/bisimulation/QuotientExtractor.h diff --git a/src/storm/abstraction/MenuGame.cpp b/src/storm/abstraction/MenuGame.cpp index 799003820..9272784ec 100644 --- a/src/storm/abstraction/MenuGame.cpp +++ b/src/storm/abstraction/MenuGame.cpp @@ -29,7 +29,7 @@ namespace storm { std::set const& player2Variables, std::set const& allNondeterminismVariables, std::set const& probabilisticBranchingVariables, - std::map> const& expressionToBddMap) : storm::models::symbolic::StochasticTwoPlayerGame(manager, reachableStates, initialStates, deadlockStates, transitionMatrix.sumAbstract(probabilisticBranchingVariables), rowVariables, nullptr, columnVariables, nullptr, rowColumnMetaVariablePairs, player1Variables, player2Variables, allNondeterminismVariables), extendedTransitionMatrix(transitionMatrix), probabilisticBranchingVariables(probabilisticBranchingVariables), expressionToBddMap(expressionToBddMap), bottomStates(bottomStates) { + std::map> const& expressionToBddMap) : storm::models::symbolic::StochasticTwoPlayerGame(manager, reachableStates, initialStates, deadlockStates, transitionMatrix.sumAbstract(probabilisticBranchingVariables), rowVariables, nullptr, columnVariables, rowColumnMetaVariablePairs, player1Variables, player2Variables, allNondeterminismVariables), extendedTransitionMatrix(transitionMatrix), probabilisticBranchingVariables(probabilisticBranchingVariables), expressionToBddMap(expressionToBddMap), bottomStates(bottomStates) { // Intentionally left empty. } diff --git a/src/storm/builder/DdJaniModelBuilder.cpp b/src/storm/builder/DdJaniModelBuilder.cpp index 6ea6e4470..f0ca60f85 100644 --- a/src/storm/builder/DdJaniModelBuilder.cpp +++ b/src/storm/builder/DdJaniModelBuilder.cpp @@ -141,7 +141,7 @@ namespace storm { template class ParameterCreator { public: - void create(storm::jani::Model const& model, storm::adapters::AddExpressionAdapter& rowExpressionAdapter, storm::adapters::AddExpressionAdapter& columnExpressionAdapter) { + void create(storm::jani::Model const& model, storm::adapters::AddExpressionAdapter& rowExpressionAdapter) { // Intentionally left empty: no support for parameters for this data type. } @@ -160,14 +160,13 @@ namespace storm { // Intentionally left empty. } - void create(storm::jani::Model const& model, storm::adapters::AddExpressionAdapter& rowExpressionAdapter, storm::adapters::AddExpressionAdapter& columnExpressionAdapter) { + void create(storm::jani::Model const& model, storm::adapters::AddExpressionAdapter& rowExpressionAdapter) { for (auto const& constant : model.getConstants()) { if (!constant.isDefined()) { carl::Variable carlVariable = carl::freshRealVariable(constant.getExpressionVariable().getName()); parameters.insert(carlVariable); auto rf = convertVariableToPolynomial(carlVariable); rowExpressionAdapter.setValue(constant.getExpressionVariable(), rf); - columnExpressionAdapter.setValue(constant.getExpressionVariable(), rf); } } } @@ -202,8 +201,7 @@ namespace storm { CompositionVariables() : manager(std::make_shared>()), variableToRowMetaVariableMap(std::make_shared>()), rowExpressionAdapter(std::make_shared>(manager, variableToRowMetaVariableMap)), - variableToColumnMetaVariableMap(std::make_shared>()), - columnExpressionAdapter(std::make_shared>(manager, variableToColumnMetaVariableMap)) { + variableToColumnMetaVariableMap(std::make_shared>()) { // Intentionally left empty. } @@ -217,7 +215,6 @@ namespace storm { // The meta variables for the column encoding. std::set columnMetaVariables; std::shared_ptr> variableToColumnMetaVariableMap; - std::shared_ptr> columnExpressionAdapter; // All pairs of row/column meta variables. std::vector> rowColumnMetaVariablePairs; @@ -392,7 +389,7 @@ namespace storm { } ParameterCreator parameterCreator; - parameterCreator.create(model, *result.rowExpressionAdapter, *result.columnExpressionAdapter); + parameterCreator.create(model, *result.rowExpressionAdapter); if (std::is_same::value) { result.parameters = parameterCreator.getParameters(); } @@ -1706,11 +1703,11 @@ namespace storm { std::shared_ptr> createModel(storm::jani::ModelType const& modelType, CompositionVariables const& variables, ModelComponents const& modelComponents) { std::shared_ptr> result; if (modelType == storm::jani::ModelType::DTMC) { - result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.columnExpressionAdapter, variables.rowColumnMetaVariablePairs, modelComponents.labelToExpressionMap, modelComponents.rewardModels); + result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.rowColumnMetaVariablePairs, modelComponents.labelToExpressionMap, modelComponents.rewardModels); } else if (modelType == storm::jani::ModelType::CTMC) { - result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.columnExpressionAdapter, variables.rowColumnMetaVariablePairs, modelComponents.labelToExpressionMap, modelComponents.rewardModels); + result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.rowColumnMetaVariablePairs, modelComponents.labelToExpressionMap, modelComponents.rewardModels); } else if (modelType == storm::jani::ModelType::MDP || modelType == storm::jani::ModelType::LTS) { - result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.columnExpressionAdapter, variables.rowColumnMetaVariablePairs, variables.allNondeterminismVariables, modelComponents.labelToExpressionMap, modelComponents.rewardModels); + result = std::make_shared>(variables.manager, modelComponents.reachableStates, modelComponents.initialStates, modelComponents.deadlockStates, modelComponents.transitionMatrix, variables.rowMetaVariables, variables.rowExpressionAdapter, variables.columnMetaVariables, variables.rowColumnMetaVariablePairs, variables.allNondeterminismVariables, modelComponents.labelToExpressionMap, modelComponents.rewardModels); } else { STORM_LOG_THROW(false, storm::exceptions::WrongFormatException, "Model type '" << modelType << "' not supported."); } diff --git a/src/storm/builder/DdPrismModelBuilder.cpp b/src/storm/builder/DdPrismModelBuilder.cpp index b0749616d..73bf1c1e0 100644 --- a/src/storm/builder/DdPrismModelBuilder.cpp +++ b/src/storm/builder/DdPrismModelBuilder.cpp @@ -34,7 +34,7 @@ namespace storm { template class ParameterCreator { public: - void create(storm::prism::Program const& program, storm::adapters::AddExpressionAdapter& rowExpressionAdapter, storm::adapters::AddExpressionAdapter& columnExpressionAdapter) { + void create(storm::prism::Program const& program, storm::adapters::AddExpressionAdapter& rowExpressionAdapter) { // Intentionally left empty: no support for parameters for this data type. } @@ -53,14 +53,13 @@ namespace storm { // Intentionally left empty. } - void create(storm::prism::Program const& program, storm::adapters::AddExpressionAdapter& rowExpressionAdapter, storm::adapters::AddExpressionAdapter& columnExpressionAdapter) { + void create(storm::prism::Program const& program, storm::adapters::AddExpressionAdapter& rowExpressionAdapter) { for (auto const& constant : program.getConstants()) { if (!constant.isDefined()) { carl::Variable carlVariable = carl::freshRealVariable(constant.getExpressionVariable().getName()); parameters.insert(carlVariable); auto rf = convertVariableToPolynomial(carlVariable); rowExpressionAdapter.setValue(constant.getExpressionVariable(), rf); - columnExpressionAdapter.setValue(constant.getExpressionVariable(), rf); } } } @@ -93,14 +92,14 @@ namespace storm { template class DdPrismModelBuilder::GenerationInformation { public: - GenerationInformation(storm::prism::Program const& program) : program(program), manager(std::make_shared>()), rowMetaVariables(), variableToRowMetaVariableMap(std::make_shared>()), rowExpressionAdapter(std::make_shared>(manager, variableToRowMetaVariableMap)), columnMetaVariables(), variableToColumnMetaVariableMap((std::make_shared>())), columnExpressionAdapter(std::make_shared>(manager, variableToColumnMetaVariableMap)), rowColumnMetaVariablePairs(), nondeterminismMetaVariables(), variableToIdentityMap(), allGlobalVariables(), moduleToIdentityMap(), parameters() { + GenerationInformation(storm::prism::Program const& program) : program(program), manager(std::make_shared>()), rowMetaVariables(), variableToRowMetaVariableMap(std::make_shared>()), rowExpressionAdapter(std::make_shared>(manager, variableToRowMetaVariableMap)), columnMetaVariables(), variableToColumnMetaVariableMap((std::make_shared>())), rowColumnMetaVariablePairs(), nondeterminismMetaVariables(), variableToIdentityMap(), allGlobalVariables(), moduleToIdentityMap(), parameters() { // Initializes variables and identity DDs. createMetaVariablesAndIdentities(); // Initialize the parameters (if any). ParameterCreator parameterCreator; - parameterCreator.create(this->program, *this->rowExpressionAdapter, *this->columnExpressionAdapter); + parameterCreator.create(this->program, *this->rowExpressionAdapter); if (std::is_same::value) { this->parameters = parameterCreator.getParameters(); } @@ -120,7 +119,6 @@ namespace storm { // The meta variables for the column encoding. std::set columnMetaVariables; std::shared_ptr> variableToColumnMetaVariableMap; - std::shared_ptr> columnExpressionAdapter; // All pairs of row/column meta variables. std::vector> rowColumnMetaVariablePairs; @@ -1358,7 +1356,7 @@ namespace storm { } else { STORM_LOG_THROW(labelName == "init" || labelName == "deadlock", storm::exceptions::InvalidArgumentException, "Terminal states refer to illegal label '" << labelName << "'."); } - } + } if (terminalExpression.isInitialized()) { // If the expression refers to constants of the model, we need to substitute them. @@ -1484,11 +1482,11 @@ namespace storm { std::shared_ptr> result; if (program.getModelType() == storm::prism::Program::ModelType::DTMC) { - result = std::shared_ptr>(new storm::models::symbolic::Dtmc(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.columnExpressionAdapter, generationInfo.rowColumnMetaVariablePairs, labelToExpressionMapping, rewardModels)); + result = std::shared_ptr>(new storm::models::symbolic::Dtmc(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.rowColumnMetaVariablePairs, labelToExpressionMapping, rewardModels)); } else if (program.getModelType() == storm::prism::Program::ModelType::CTMC) { - result = std::shared_ptr>(new storm::models::symbolic::Ctmc(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, system.stateActionDd, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.columnExpressionAdapter, generationInfo.rowColumnMetaVariablePairs, labelToExpressionMapping, rewardModels)); + result = std::shared_ptr>(new storm::models::symbolic::Ctmc(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, system.stateActionDd, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.rowColumnMetaVariablePairs, labelToExpressionMapping, rewardModels)); } else if (program.getModelType() == storm::prism::Program::ModelType::MDP) { - result = std::shared_ptr>(new storm::models::symbolic::Mdp(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.columnExpressionAdapter, generationInfo.rowColumnMetaVariablePairs, generationInfo.allNondeterminismVariables, labelToExpressionMapping, rewardModels)); + result = std::shared_ptr>(new storm::models::symbolic::Mdp(generationInfo.manager, reachableStates, initialStates, deadlockStates, transitionMatrix, generationInfo.rowMetaVariables, generationInfo.rowExpressionAdapter, generationInfo.columnMetaVariables, generationInfo.rowColumnMetaVariablePairs, generationInfo.allNondeterminismVariables, labelToExpressionMapping, rewardModels)); } else { STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Invalid model type."); } diff --git a/src/storm/models/symbolic/Ctmc.cpp b/src/storm/models/symbolic/Ctmc.cpp index 543bc7d90..05907bc03 100644 --- a/src/storm/models/symbolic/Ctmc.cpp +++ b/src/storm/models/symbolic/Ctmc.cpp @@ -21,11 +21,10 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { + : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { // Intentionally left empty. } @@ -39,11 +38,41 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels), exitRates(exitRateVector) { + : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels), exitRates(exitRateVector) { + // Intentionally left empty. + } + + template + Ctmc::Ctmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, labelToBddMap, rewardModels) { + // Intentionally left empty. + } + + template + Ctmc::Ctmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + boost::optional> exitRateVector, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : DeterministicModel(storm::models::ModelType::Ctmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, labelToBddMap, rewardModels), exitRates(exitRateVector) { // Intentionally left empty. } diff --git a/src/storm/models/symbolic/Ctmc.h b/src/storm/models/symbolic/Ctmc.h index c0c4054a3..68c4e7b35 100644 --- a/src/storm/models/symbolic/Ctmc.h +++ b/src/storm/models/symbolic/Ctmc.h @@ -36,8 +36,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param labelToExpressionMap A mapping from label names to their defining expressions. * @param rewardModels The reward models associated with the model. @@ -50,7 +48,6 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); @@ -68,8 +65,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param labelToExpressionMap A mapping from label names to their defining expressions. * @param rewardModels The reward models associated with the model. @@ -83,11 +78,62 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + /*! + * Constructs a model from the given data. + * + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + Ctmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + + /*! + * Constructs a model from the given data. + * + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param exitRateVector The vector specifying the exit rates for the states. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + Ctmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + boost::optional> exitRateVector, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + /*! * Retrieves the exit rate vector of the CTMC. * diff --git a/src/storm/models/symbolic/DeterministicModel.cpp b/src/storm/models/symbolic/DeterministicModel.cpp index a9d9c92df..28543fec3 100644 --- a/src/storm/models/symbolic/DeterministicModel.cpp +++ b/src/storm/models/symbolic/DeterministicModel.cpp @@ -22,11 +22,26 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { + : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { + // Intentionally left empty. + } + + template + DeterministicModel::DeterministicModel(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, labelToBddMap, rewardModels) { // Intentionally left empty. } diff --git a/src/storm/models/symbolic/DeterministicModel.h b/src/storm/models/symbolic/DeterministicModel.h index af8bc1fc1..83d25fe0d 100644 --- a/src/storm/models/symbolic/DeterministicModel.h +++ b/src/storm/models/symbolic/DeterministicModel.h @@ -37,8 +37,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param labelToExpressionMap A mapping from label names to their defining expressions. * @param rewardModels The reward models associated with the model. @@ -52,10 +50,36 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + + /*! + * Constructs a model from the given data. + * + * @param modelType The type of the model. + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + DeterministicModel(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); }; } // namespace symbolic diff --git a/src/storm/models/symbolic/Dtmc.cpp b/src/storm/models/symbolic/Dtmc.cpp index 3f7153ead..6278d7052 100644 --- a/src/storm/models/symbolic/Dtmc.cpp +++ b/src/storm/models/symbolic/Dtmc.cpp @@ -21,11 +21,25 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : DeterministicModel(storm::models::ModelType::Dtmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { + : DeterministicModel(storm::models::ModelType::Dtmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels) { + // Intentionally left empty. + } + + template + Dtmc::Dtmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : DeterministicModel(storm::models::ModelType::Dtmc, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, labelToBddMap, rewardModels) { // Intentionally left empty. } diff --git a/src/storm/models/symbolic/Dtmc.h b/src/storm/models/symbolic/Dtmc.h index 538ff4977..ebe837e1c 100644 --- a/src/storm/models/symbolic/Dtmc.h +++ b/src/storm/models/symbolic/Dtmc.h @@ -36,8 +36,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param labelToExpressionMap A mapping from label names to their defining expressions. * @param rewardModels The reward models associated with the model. @@ -50,10 +48,34 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + + /*! + * Constructs a model from the given data. + * + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + Dtmc(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); }; } // namespace symbolic diff --git a/src/storm/models/symbolic/Mdp.cpp b/src/storm/models/symbolic/Mdp.cpp index 20bd9ad2c..1a1644338 100644 --- a/src/storm/models/symbolic/Mdp.cpp +++ b/src/storm/models/symbolic/Mdp.cpp @@ -21,12 +21,27 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& nondeterminismVariables, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : NondeterministicModel(storm::models::ModelType::Mdp, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels) { + : NondeterministicModel(storm::models::ModelType::Mdp, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels) { + // Intentionally left empty. + } + + template + Mdp::Mdp(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& nondeterminismVariables, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : NondeterministicModel(storm::models::ModelType::Mdp, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables, labelToBddMap, rewardModels) { // Intentionally left empty. } diff --git a/src/storm/models/symbolic/Mdp.h b/src/storm/models/symbolic/Mdp.h index ab5b59b99..771f0bd05 100644 --- a/src/storm/models/symbolic/Mdp.h +++ b/src/storm/models/symbolic/Mdp.h @@ -37,8 +37,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param nondeterminismVariables The meta variables used to encode the nondeterminism in the model. * @param labelToExpressionMap A mapping from label names to their defining expressions. @@ -52,12 +50,39 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& nondeterminismVariables, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + /*! + * Constructs a model from the given data. + * + * @param modelType The type of the model. + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param nondeterminismVariables The meta variables used to encode the nondeterminism in the model. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + Mdp(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& nondeterminismVariables, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + }; } // namespace symbolic diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 94b185b15..1ec8ef7d9 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -17,6 +17,7 @@ #include "storm/utility/dd.h" #include "storm/exceptions/NotSupportedException.h" +#include "storm/exceptions/WrongFormatException.h" namespace storm { namespace models { @@ -31,12 +32,31 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : ModelBase(modelType), manager(manager), reachableStates(reachableStates), initialStates(initialStates), deadlockStates(deadlockStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(rowExpressionAdapter), columnVariables(columnVariables), columnExpressionAdapter(columnExpressionAdapter), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToExpressionMap(labelToExpressionMap), rewardModels(rewardModels) { - // Intentionally left empty. + : ModelBase(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(rowExpressionAdapter), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToExpressionMap(labelToExpressionMap), rewardModels(rewardModels) { + this->labelToBddMap.emplace("init", initialStates); + this->labelToBddMap.emplace("deadlock", deadlockStates); + } + + template + Model::Model(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : ModelBase(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(nullptr), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToBddMap(labelToBddMap), rewardModels(rewardModels) { + STORM_LOG_THROW(this->labelToBddMap.find("init") == this->labelToBddMap.end(), storm::exceptions::WrongFormatException, "Illegal custom label 'init'."); + STORM_LOG_THROW(this->labelToBddMap.find("deadlock") == this->labelToBddMap.end(), storm::exceptions::WrongFormatException, "Illegal custom label 'deadlock'."); + this->labelToBddMap.emplace("init", initialStates); + this->labelToBddMap.emplace("deadlock", deadlockStates); } template @@ -53,7 +73,7 @@ namespace storm { storm::dd::DdManager& Model::getManager() const { return *manager; } - + template std::shared_ptr> const& Model::getManagerAsSharedPointer() const { return manager; @@ -66,24 +86,33 @@ namespace storm { template storm::dd::Bdd const& Model::getInitialStates() const { - return initialStates; + return labelToBddMap.at("init"); } - + template storm::dd::Bdd const& Model::getDeadlockStates() const { - return deadlockStates; + return labelToBddMap.at("deadlock"); } template storm::dd::Bdd Model::getStates(std::string const& label) const { - STORM_LOG_THROW(labelToExpressionMap.find(label) != labelToExpressionMap.end(), storm::exceptions::IllegalArgumentException, "The label " << label << " is invalid for the labeling of the model."); - return this->getStates(labelToExpressionMap.at(label)); + // First check whether we have a BDD for this label. + auto bddIt = labelToBddMap.find(label); + if (bddIt != labelToBddMap.end()) { + return bddIt->second; + } else { + // If not, check for an expression we can translate. + auto expressionIt = labelToExpressionMap.find(label); + STORM_LOG_THROW(expressionIt != labelToExpressionMap.end(), storm::exceptions::IllegalArgumentException, "The label " << label << " is invalid for the labeling of the model."); + return this->getStates(expressionIt->second); + } } template storm::expressions::Expression Model::getExpression(std::string const& label) const { - STORM_LOG_THROW(labelToExpressionMap.find(label) != labelToExpressionMap.end(), storm::exceptions::IllegalArgumentException, "The label " << label << " is invalid for the labeling of the model."); - return labelToExpressionMap.at(label); + auto expressionIt = labelToExpressionMap.find(label); + STORM_LOG_THROW(expressionIt != labelToExpressionMap.end(), storm::exceptions::IllegalArgumentException, "Cannot retrieve the expression for the label " << label << "."); + return expressionIt->second; } template @@ -93,17 +122,32 @@ namespace storm { } else if (expression.isFalse()) { return manager->getBddZero(); } + + // Look up the string equivalent of the expression. + std::stringstream stream; + stream << expression; + auto bddIt = labelToBddMap.find(stream.str()); + if (bddIt != labelToBddMap.end()) { + return bddIt->second; + } + + // Finally try to translate the expression with an adapter. STORM_LOG_THROW(rowExpressionAdapter != nullptr, storm::exceptions::InvalidOperationException, "Cannot create BDD for expression without expression adapter."); return rowExpressionAdapter->translateExpression(expression).toBdd() && this->reachableStates; } template bool Model::hasLabel(std::string const& label) const { - auto labelIt = labelToExpressionMap.find(label); - if (labelIt != labelToExpressionMap.end()) { + auto bddIt = labelToBddMap.find(label); + if (bddIt != labelToBddMap.end()) { + return true; + } + + auto expressionIt = labelToExpressionMap.find(label); + if (expressionIt != labelToExpressionMap.end()) { return true; } else { - return label == "init" || label == "deadlock"; + return false; } } @@ -179,13 +223,13 @@ namespace storm { STORM_LOG_THROW(this->hasUniqueRewardModel(), storm::exceptions::InvalidOperationException, "Cannot retrieve unique reward model, because there is no unique one."); return this->rewardModels.cbegin()->second; } - + template typename Model::RewardModelType& Model::getUniqueRewardModel() { STORM_LOG_THROW(this->hasUniqueRewardModel(), storm::exceptions::InvalidOperationException, "Cannot retrieve unique reward model, because there is no unique one."); return this->rewardModels.begin()->second; } - + template bool Model::hasUniqueRewardModel() const { return this->rewardModels.size() == 1; @@ -195,7 +239,7 @@ namespace storm { bool Model::hasRewardModel() const { return !this->rewardModels.empty(); } - + template std::unordered_map::RewardModelType> const& Model::getRewardModels() const { return this->rewardModels; @@ -206,7 +250,7 @@ namespace storm { this->printModelInformationHeaderToStream(out); this->printModelInformationFooterToStream(out); } - + template std::vector Model::getLabels() const { std::vector labels; @@ -229,7 +273,10 @@ namespace storm { this->printRewardModelsInformationToStream(out); this->printDdVariableInformationToStream(out); out << std::endl; - out << "Labels: \t" << this->labelToExpressionMap.size() << std::endl; + out << "Labels: \t" << (this->labelToExpressionMap.size() + this->labelToBddMap.size()) << std::endl; + for (auto const& label : labelToBddMap) { + out << " * " << label.first << " -> " << label.second.getNonZeroCount() << " state(s) (" << label.second.getNodeCount() << " nodes)" << std::endl; + } for (auto const& label : labelToExpressionMap) { out << " * " << label.first << std::endl; } @@ -278,7 +325,7 @@ namespace storm { std::set const& Model::getParameters() const { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "This value type does not support parameters."); } - + template<> void Model::addParameters(std::set const& parameters) { this->parameters.insert(parameters.begin(), parameters.end()); @@ -288,13 +335,13 @@ namespace storm { std::set const& Model::getParameters() const { return parameters; } - + // Explicitly instantiate the template class. template class Model; template class Model; template class Model; - template class Model; + template class Model; } // namespace symbolic } // namespace models } // namespace storm diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index fa7d683ff..cae2e3c85 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -73,8 +73,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param labelToExpressionMap A mapping from label names to their defining expressions. * @param rewardModels The reward models associated with the model. @@ -88,11 +86,37 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + /*! + * Constructs a model from the given data. + * + * @param modelType The type of the model. + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + Model(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + virtual uint_fast64_t getNumberOfStates() const override; virtual uint_fast64_t getNumberOfTransitions() const override; @@ -324,13 +348,7 @@ namespace storm { // A vector representing the reachable states of the model. storm::dd::Bdd reachableStates; - - // A vector representing the initial states of the model. - storm::dd::Bdd initialStates; - - // A vector representing the deadlock states of the model. - storm::dd::Bdd deadlockStates; - + // A matrix representing transition relation. storm::dd::Add transitionMatrix; @@ -343,9 +361,6 @@ namespace storm { // The meta variables used to encode the columns of the transition matrix. std::set columnVariables; - // An adapter that can translate expressions to DDs over the column meta variables. - std::shared_ptr> columnExpressionAdapter; - // A vector holding all pairs of row and column meta variable pairs. This is used to swap the variables // in the DDs from row to column variables and vice versa. std::vector> rowColumnMetaVariablePairs; @@ -353,6 +368,9 @@ namespace storm { // A mapping from labels to expressions defining them. std::map labelToExpressionMap; + // A mapping from labels to BDDs characterizing the labeled states. + std::map> labelToBddMap; + // The reward models associated with the model. std::unordered_map rewardModels; diff --git a/src/storm/models/symbolic/NondeterministicModel.cpp b/src/storm/models/symbolic/NondeterministicModel.cpp index eb8c1a73d..6a42da0d3 100644 --- a/src/storm/models/symbolic/NondeterministicModel.cpp +++ b/src/storm/models/symbolic/NondeterministicModel.cpp @@ -23,15 +23,29 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& nondeterminismVariables, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels), nondeterminismVariables(nondeterminismVariables) { - - // Prepare the mask of illegal nondeterministic choices. - illegalMask = !(transitionMatrix.notZero().existsAbstract(this->getColumnVariables())) && reachableStates; + : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels), nondeterminismVariables(nondeterminismVariables) { + createIllegalMask(); + } + + template + NondeterministicModel::NondeterministicModel(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& nondeterminismVariables, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : Model(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, labelToBddMap, rewardModels), nondeterminismVariables(nondeterminismVariables) { + createIllegalMask(); } template @@ -76,6 +90,12 @@ namespace storm { out << ", nondeterminism: " << this->getNondeterminismVariables().size() << " meta variables (" << nondeterminismVariableCount << " DD variables)"; } + template + void NondeterministicModel::createIllegalMask() { + // Prepare the mask of illegal nondeterministic choices. + illegalMask = !(this->getTransitionMatrix().notZero().existsAbstract(this->getColumnVariables())) && this->getReachableStates(); + } + // Explicitly instantiate the template class. template class NondeterministicModel; template class NondeterministicModel; diff --git a/src/storm/models/symbolic/NondeterministicModel.h b/src/storm/models/symbolic/NondeterministicModel.h index cec5b0cb8..e97347c44 100644 --- a/src/storm/models/symbolic/NondeterministicModel.h +++ b/src/storm/models/symbolic/NondeterministicModel.h @@ -37,8 +37,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param nondeterminismVariables The meta variables used to encode the nondeterminism in the model. * @param labelToExpressionMap A mapping from label names to their defining expressions. @@ -53,12 +51,40 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& nondeterminismVariables, std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + /*! + * Constructs a model from the given data. + * + * @param modelType The type of the model. + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param nondeterminismVariables The meta variables used to encode the nondeterminism in the model. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + NondeterministicModel(storm::models::ModelType const& modelType, + std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& nondeterminismVariables, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + /*! * Retrieves the number of nondeterministic choices in the model. * @@ -97,6 +123,7 @@ namespace storm { storm::dd::Bdd illegalMask; private: + void createIllegalMask(); // The meta variables encoding the nondeterminism in the model. std::set nondeterminismVariables; diff --git a/src/storm/models/symbolic/StochasticTwoPlayerGame.cpp b/src/storm/models/symbolic/StochasticTwoPlayerGame.cpp index fdff99c36..b9ed23107 100644 --- a/src/storm/models/symbolic/StochasticTwoPlayerGame.cpp +++ b/src/storm/models/symbolic/StochasticTwoPlayerGame.cpp @@ -22,23 +22,44 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& player1Variables, std::set const& player2Variables, std::set const& nondeterminismVariables, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : NondeterministicModel(storm::models::ModelType::S2pg, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels), player1Variables(player1Variables), player2Variables(player2Variables) { - + : NondeterministicModel(storm::models::ModelType::S2pg, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels), player1Variables(player1Variables), player2Variables(player2Variables) { + createIllegalMasks(); + } + + template + StochasticTwoPlayerGame::StochasticTwoPlayerGame(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& player1Variables, + std::set const& player2Variables, + std::set const& nondeterminismVariables, + std::map> labelToBddMap, + std::unordered_map const& rewardModels) + : NondeterministicModel(storm::models::ModelType::S2pg, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables, labelToBddMap, rewardModels), player1Variables(player1Variables), player2Variables(player2Variables) { + createIllegalMasks(); + } + + template + void StochasticTwoPlayerGame::createIllegalMasks() { // Compute legal player 1 mask. - illegalPlayer1Mask = transitionMatrix.notZero().existsAbstract(this->getColumnVariables()).existsAbstract(this->getPlayer2Variables()); + this->illegalPlayer1Mask = this->getTransitionMatrix().notZero().existsAbstract(this->getColumnVariables()).existsAbstract(this->getPlayer2Variables()); // Correct the mask for player 2. This is necessary, because it is not yet restricted to the legal choices of player 1. - illegalPlayer2Mask = this->getIllegalMask() && illegalPlayer1Mask; + illegalPlayer2Mask = this->getIllegalMask() && this->illegalPlayer1Mask; // Then set the illegal mask for player 1 correctly. - illegalPlayer1Mask = !illegalPlayer1Mask && reachableStates; + this->illegalPlayer1Mask = !illegalPlayer1Mask && this->getReachableStates(); } template diff --git a/src/storm/models/symbolic/StochasticTwoPlayerGame.h b/src/storm/models/symbolic/StochasticTwoPlayerGame.h index 15383b056..d3f009593 100644 --- a/src/storm/models/symbolic/StochasticTwoPlayerGame.h +++ b/src/storm/models/symbolic/StochasticTwoPlayerGame.h @@ -36,8 +36,6 @@ namespace storm { * @param rowExpressionAdapter An object that can be used to translate expressions in terms of the row * meta variables. * @param columVariables The set of column meta variables used in the DDs. - * @param columnExpressionAdapter An object that can be used to translate expressions in terms of the - * column meta variables. * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. * @param player1Variables The meta variables used to encode the nondeterministic choices of player 1. * @param player2Variables The meta variables used to encode the nondeterministic choices of player 2. @@ -53,7 +51,6 @@ namespace storm { std::set const& rowVariables, std::shared_ptr> rowExpressionAdapter, std::set const& columnVariables, - std::shared_ptr> columnExpressionAdapter, std::vector> const& rowColumnMetaVariablePairs, std::set const& player1Variables, std::set const& player2Variables, @@ -61,6 +58,37 @@ namespace storm { std::map labelToExpressionMap = std::map(), std::unordered_map const& rewardModels = std::unordered_map()); + /*! + * Constructs a model from the given data. + * + * @param manager The manager responsible for the decision diagrams. + * @param reachableStates A DD representing the reachable states. + * @param initialStates A DD representing the initial states of the model. + * @param deadlockStates A DD representing the deadlock states of the model. + * @param transitionMatrix The matrix representing the transitions in the model. + * @param rowVariables The set of row meta variables used in the DDs. + * @param columVariables The set of column meta variables used in the DDs. + * @param rowColumnMetaVariablePairs All pairs of row/column meta variables. + * @param player1Variables The meta variables used to encode the nondeterministic choices of player 1. + * @param player2Variables The meta variables used to encode the nondeterministic choices of player 2. + * @param allNondeterminismVariables The meta variables used to encode the nondeterminism in the model. + * @param labelToBddMap A mapping from label names to their defining BDDs. + * @param rewardModels The reward models associated with the model. + */ + StochasticTwoPlayerGame(std::shared_ptr> manager, + storm::dd::Bdd reachableStates, + storm::dd::Bdd initialStates, + storm::dd::Bdd deadlockStates, + storm::dd::Add transitionMatrix, + std::set const& rowVariables, + std::set const& columnVariables, + std::vector> const& rowColumnMetaVariablePairs, + std::set const& player1Variables, + std::set const& player2Variables, + std::set const& allNondeterminismVariables, + std::map> labelToBddMap = std::map>(), + std::unordered_map const& rewardModels = std::unordered_map()); + /*! * Retrieeves the set of meta variables used to encode the nondeterministic choices of player 1. * @@ -90,6 +118,11 @@ namespace storm { storm::dd::Bdd getIllegalPlayer2Mask() const; private: + /*! + * Prepare all illegal masks. + */ + void createIllegalMasks(); + // A mask that characterizes all illegal player 1 choices. storm::dd::Bdd illegalPlayer1Mask; diff --git a/src/storm/settings/modules/BisimulationSettings.cpp b/src/storm/settings/modules/BisimulationSettings.cpp index a626df55e..fdef27093 100644 --- a/src/storm/settings/modules/BisimulationSettings.cpp +++ b/src/storm/settings/modules/BisimulationSettings.cpp @@ -14,10 +14,17 @@ namespace storm { const std::string BisimulationSettings::moduleName = "bisimulation"; const std::string BisimulationSettings::typeOptionName = "type"; + const std::string BisimulationSettings::representativeOptionName = "repr"; + const std::string BisimulationSettings::quotientFormatOptionName = "quot"; BisimulationSettings::BisimulationSettings() : ModuleSettings(moduleName) { std::vector types = { "strong", "weak" }; this->addOption(storm::settings::OptionBuilder(moduleName, typeOptionName, true, "Sets the kind of bisimulation quotienting used.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the type to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(types)).setDefaultValueString("strong").build()).build()); + + std::vector quotTypes = { "sparse", "dd" }; + this->addOption(storm::settings::OptionBuilder(moduleName, typeOptionName, true, "Sets the format in which the quotient is extracted (only applies to DD-based bisimulation).").addArgument(storm::settings::ArgumentBuilder::createStringArgument("format", "The format of the quotient.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(quotTypes)).setDefaultValueString("dd").build()).build()); + + this->addOption(storm::settings::OptionBuilder(moduleName, representativeOptionName, false, "Sets whether to use representatives in the quotient rather than block numbers.").build()); } bool BisimulationSettings::isStrongBisimulationSet() const { @@ -34,6 +41,18 @@ namespace storm { return false; } + BisimulationSettings::QuotientFormat BisimulationSettings::getQuotientFormat() const { + std::string quotientFormatAsString = this->getOption(typeOptionName).getArgumentByName("format").getValueAsString(); + if (quotientFormatAsString == "sparse") { + return BisimulationSettings::QuotientFormat::Sparse; + } + return BisimulationSettings::QuotientFormat::Dd; + } + + bool BisimulationSettings::isUseRepresentativesSet() const { + return this->getOption(representativeOptionName).getHasOptionBeenSet(); + } + bool BisimulationSettings::check() const { bool optionsSet = this->getOption(typeOptionName).getHasOptionBeenSet(); STORM_LOG_WARN_COND(storm::settings::getModule().isBisimulationSet() || !optionsSet, "Bisimulation minimization is not selected, so setting options for bisimulation has no effect."); diff --git a/src/storm/settings/modules/BisimulationSettings.h b/src/storm/settings/modules/BisimulationSettings.h index cd8dffbe2..ccdea9e5d 100644 --- a/src/storm/settings/modules/BisimulationSettings.h +++ b/src/storm/settings/modules/BisimulationSettings.h @@ -15,7 +15,7 @@ namespace storm { // An enumeration of all available bisimulation types. enum class BisimulationType { Strong, Weak }; - enum class CachingStrategy { FullDirect, FullLate, Granularity, Minimal }; + enum class QuotientFormat { Sparse, Dd }; /*! * Creates a new set of bisimulation settings. @@ -36,6 +36,18 @@ namespace storm { */ bool isWeakBisimulationSet() const; + /*! + * Retrieves the format in which the quotient is to be extracted. + * NOTE: only applies to DD-based bisimulation. + */ + QuotientFormat getQuotientFormat() const; + + /*! + * Retrieves whether representatives for blocks are to be used instead of the block numbers. + * NOTE: only applies to DD-based bisimulation. + */ + bool isUseRepresentativesSet() const; + virtual bool check() const override; // The name of the module. @@ -44,6 +56,8 @@ namespace storm { private: // Define the string names of the options as constants. static const std::string typeOptionName; + static const std::string representativeOptionName; + static const std::string quotientFormatOptionName; }; } // namespace modules } // namespace settings diff --git a/src/storm/storage/dd/Add.cpp b/src/storm/storage/dd/Add.cpp index 23403e843..70e277f3c 100644 --- a/src/storm/storage/dd/Add.cpp +++ b/src/storm/storage/dd/Add.cpp @@ -186,9 +186,37 @@ namespace storm { return internalAdd.equalModuloPrecision(other, precision, relative); } + template + Add Add::renameVariables(std::set const& from, std::set const& to) const { + std::vector> fromBdds; + std::vector> toBdds; + + for (auto const& metaVariable : from) { + STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename variable '" << metaVariable.getName() << "' that is not present."); + DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); + for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { + fromBdds.push_back(ddVariable); + } + } + for (auto const& metaVariable : to) { + STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename to variable '" << metaVariable.getName() << "' that is already present."); + DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); + for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { + toBdds.push_back(ddVariable); + } + } + + std::set newContainedMetaVariables = to; + std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), from.begin(), from.end(), std::inserter(newContainedMetaVariables, newContainedMetaVariables.begin())); + + STORM_LOG_THROW(fromBdds.size() == toBdds.size(), storm::exceptions::InvalidArgumentException, "Unable to rename mismatching meta variables."); + return Add(this->getDdManager(), internalAdd.swapVariables(fromBdds, toBdds), newContainedMetaVariables); + } + template Add Add::swapVariables(std::vector> const& metaVariablePairs) const { std::set newContainedMetaVariables; + std::set deletedMetaVariables; std::vector> from; std::vector> to; for (auto const& metaVariablePair : metaVariablePairs) { @@ -197,12 +225,20 @@ namespace storm { // Keep track of the contained meta variables in the DD. if (this->containsMetaVariable(metaVariablePair.first)) { - newContainedMetaVariables.insert(metaVariablePair.second); - } - if (this->containsMetaVariable(metaVariablePair.second)) { - newContainedMetaVariables.insert(metaVariablePair.first); + if (this->containsMetaVariable(metaVariablePair.second)) { + // Nothing to do here. + } else { + newContainedMetaVariables.insert(metaVariablePair.second); + deletedMetaVariables.insert(metaVariablePair.first); + } + } else { + if (!this->containsMetaVariable(metaVariablePair.second)) { + // Nothing to do here. + } else { + newContainedMetaVariables.insert(metaVariablePair.first); + deletedMetaVariables.insert(metaVariablePair.second); + } } - for (auto const& ddVariable : variable1.getDdVariables()) { from.push_back(ddVariable); } @@ -210,13 +246,19 @@ namespace storm { to.push_back(ddVariable); } } + + std::set tmp; + std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), deletedMetaVariables.begin(), deletedMetaVariables.end(), std::inserter(tmp, tmp.begin())); + std::set containedMetaVariables; + std::set_union(tmp.begin(), tmp.end(), newContainedMetaVariables.begin(), newContainedMetaVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); STORM_LOG_THROW(from.size() == to.size(), storm::exceptions::InvalidArgumentException, "Unable to swap mismatching meta variables."); - return Add(this->getDdManager(), internalAdd.swapVariables(from, to), newContainedMetaVariables); + return Add(this->getDdManager(), internalAdd.swapVariables(from, to), containedMetaVariables); } template Add Add::permuteVariables(std::vector> const& metaVariablePairs) const { std::set newContainedMetaVariables; + std::set deletedMetaVariables; std::vector> from; std::vector> to; for (auto const& metaVariablePair : metaVariablePairs) { @@ -225,6 +267,7 @@ namespace storm { // Keep track of the contained meta variables in the DD. if (this->containsMetaVariable(metaVariablePair.first)) { + deletedMetaVariables.insert(metaVariablePair.first); newContainedMetaVariables.insert(metaVariablePair.second); } @@ -235,8 +278,13 @@ namespace storm { to.push_back(ddVariable); } } + + std::set tmp; + std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), deletedMetaVariables.begin(), deletedMetaVariables.end(), std::inserter(tmp, tmp.begin())); + std::set containedMetaVariables; + std::set_union(tmp.begin(), tmp.end(), newContainedMetaVariables.begin(), newContainedMetaVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); STORM_LOG_THROW(from.size() == to.size(), storm::exceptions::InvalidArgumentException, "Unable to swap mismatching meta variables."); - return Add(this->getDdManager(), internalAdd.permuteVariables(from, to), newContainedMetaVariables); + return Add(this->getDdManager(), internalAdd.permuteVariables(from, to), containedMetaVariables); } template diff --git a/src/storm/storage/dd/Add.h b/src/storm/storage/dd/Add.h index d8466e46d..ad217ecfc 100644 --- a/src/storm/storage/dd/Add.h +++ b/src/storm/storage/dd/Add.h @@ -310,6 +310,17 @@ namespace storm { * values. */ bool equalModuloPrecision(Add const& other, ValueType const& precision, bool relative = true) const; + + /*! + * Renames the given meta variables in the ADD. The number of the underlying DD variables of the both meta + * variable sets needs to agree. + * + * @param from The meta variables to be renamed. The current ADD needs to contain all these meta variables. + * @param to The meta variables that are the target of the renaming process. The current ADD must not contain + * any of these meta variables. + * @return The resulting ADD. + */ + Add renameVariables(std::set const& from, std::set const& to) const; /*! * Swaps the given pairs of meta variables in the ADD. The pairs of meta variables must be guaranteed to have @@ -319,7 +330,7 @@ namespace storm { * @return The resulting ADD. */ Add swapVariables(std::vector> const& metaVariablePairs) const; - + /*! * Permutes the given pairs of meta variables in the ADD. The pairs of meta variables must be guaranteed to have * the same number of underlying ADD variables. The first component of the i-th entry is substituted by the second component. diff --git a/src/storm/storage/dd/Bdd.cpp b/src/storm/storage/dd/Bdd.cpp index 7af94004c..bde9d4a30 100644 --- a/src/storm/storage/dd/Bdd.cpp +++ b/src/storm/storage/dd/Bdd.cpp @@ -253,6 +253,7 @@ namespace storm { template Bdd Bdd::swapVariables(std::vector> const& metaVariablePairs) const { std::set newContainedMetaVariables; + std::set deletedMetaVariables; std::vector> from; std::vector> to; for (auto const& metaVariablePair : metaVariablePairs) { @@ -261,10 +262,19 @@ namespace storm { // Keep track of the contained meta variables in the DD. if (this->containsMetaVariable(metaVariablePair.first)) { - newContainedMetaVariables.insert(metaVariablePair.second); - } - if (this->containsMetaVariable(metaVariablePair.second)) { - newContainedMetaVariables.insert(metaVariablePair.first); + if (this->containsMetaVariable(metaVariablePair.second)) { + // Nothing to do here. + } else { + newContainedMetaVariables.insert(metaVariablePair.second); + deletedMetaVariables.insert(metaVariablePair.first); + } + } else { + if (!this->containsMetaVariable(metaVariablePair.second)) { + // Nothing to do here. + } else { + newContainedMetaVariables.insert(metaVariablePair.first); + deletedMetaVariables.insert(metaVariablePair.second); + } } for (auto const& ddVariable : variable1.getDdVariables()) { @@ -274,7 +284,39 @@ namespace storm { to.push_back(ddVariable); } } - return Bdd(this->getDdManager(), internalBdd.swapVariables(from, to), newContainedMetaVariables); + + std::set tmp; + std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), deletedMetaVariables.begin(), deletedMetaVariables.end(), std::inserter(tmp, tmp.begin())); + std::set containedMetaVariables; + std::set_union(tmp.begin(), tmp.end(), newContainedMetaVariables.begin(), newContainedMetaVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); + return Bdd(this->getDdManager(), internalBdd.swapVariables(from, to), containedMetaVariables); + } + + template + Bdd Bdd::renameVariables(std::set const& from, std::set const& to) const { + std::vector> fromBdds; + std::vector> toBdds; + + for (auto const& metaVariable : from) { + STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename variable '" << metaVariable.getName() << "' that is not present."); + DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); + for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { + fromBdds.push_back(ddVariable); + } + } + for (auto const& metaVariable : to) { + STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename to variable '" << metaVariable.getName() << "' that is already present."); + DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); + for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { + toBdds.push_back(ddVariable); + } + } + + std::set newContainedMetaVariables = to; + std::set_difference(this->getContainedMetaVariables().begin(), this->getContainedMetaVariables().end(), from.begin(), from.end(), std::inserter(newContainedMetaVariables, newContainedMetaVariables.begin())); + + STORM_LOG_THROW(fromBdds.size() == toBdds.size(), storm::exceptions::InvalidArgumentException, "Unable to rename mismatching meta variables."); + return Bdd(this->getDdManager(), internalBdd.swapVariables(fromBdds, toBdds), newContainedMetaVariables); } template diff --git a/src/storm/storage/dd/Bdd.h b/src/storm/storage/dd/Bdd.h index 1250b2632..4a6ae2309 100644 --- a/src/storm/storage/dd/Bdd.h +++ b/src/storm/storage/dd/Bdd.h @@ -274,6 +274,17 @@ namespace storm { */ Bdd swapVariables(std::vector> const& metaVariablePairs) const; + /*! + * Renames the given meta variables in the BDD. The number of the underlying DD variables of the both meta + * variable sets needs to agree. + * + * @param from The meta variables to be renamed. The current BDD needs to contain all these meta variables. + * @param to The meta variables that are the target of the renaming process. The current BDD must not contain + * any of these meta variables. + * @return The resulting BDD. + */ + Bdd renameVariables(std::set const& from, std::set const& to) const; + /*! * Retrieves whether this DD represents the constant one function. * diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index 4893340a6..a1698404a 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -2,9 +2,11 @@ #include "storm/storage/dd/bisimulation/SignatureComputer.h" #include "storm/storage/dd/bisimulation/SignatureRefiner.h" +#include "storm/storage/dd/bisimulation/QuotientExtractor.h" #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" +#include "storm/exceptions/NotSupportedException.h" #include @@ -16,15 +18,20 @@ namespace storm { using namespace bisimulation; template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model) : status(Status::Initialized), model(model), currentPartition(bisimulation::Partition::create(model)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model) : BisimulationDecomposition(model, bisimulation::Partition::create(model)) { // Intentionally left empty. } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), currentPartition(initialPartition) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas) : BisimulationDecomposition(model, bisimulation::Partition::create(model, formulas)) { // Intentionally left empty. } + template + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), currentPartition(initialPartition) { + STORM_LOG_THROW(!model.hasRewardModel(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support preserving rewards."); + } + template void BisimulationDecomposition::compute() { this->status = Status::InComputation; @@ -52,7 +59,6 @@ namespace storm { auto refinementStart = std::chrono::high_resolution_clock::now(); Partition newPartition = refiner.refine(currentPartition, signature); -// newPartition.getPartitionAdd().exportToDot("part" + std::to_string(iterations) + ".dot"); auto refinementEnd = std::chrono::high_resolution_clock::now(); totalRefinementTime += (refinementEnd - refinementStart); @@ -78,7 +84,13 @@ namespace storm { template std::shared_ptr> BisimulationDecomposition::getQuotient() const { STORM_LOG_THROW(this->status == Status::FixedPoint, storm::exceptions::InvalidOperationException, "Cannot extract quotient, because bisimulation decomposition was not completed."); - return nullptr; + + STORM_LOG_TRACE("Starting quotient extraction."); + QuotientExtractor extractor; + std::shared_ptr> quotient = extractor.extract(model, currentPartition); + STORM_LOG_TRACE("Quotient extraction done."); + + return quotient; } template class BisimulationDecomposition; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index 131a672e1..e0ec00d27 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -1,10 +1,15 @@ #pragma once +#include +#include + #include "storm/storage/dd/DdType.h" +#include "storm/storage/dd/bisimulation/Partition.h" + #include "storm/models/symbolic/Model.h" -#include "storm/storage/dd/bisimulation/Partition.h" +#include "storm/logic/Formula.h" namespace storm { namespace dd { @@ -17,7 +22,7 @@ namespace storm { }; BisimulationDecomposition(storm::models::symbolic::Model const& model); - + BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas); BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition); /*! diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index 65a46debf..2d89a82ae 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -21,6 +21,16 @@ namespace storm { // Intentionally left empty. } + template + std::shared_ptr> DdManager::asSharedPointer() { + return this->shared_from_this(); + } + + template + std::shared_ptr const> DdManager::asSharedPointer() const { + return this->shared_from_this(); + } + template Bdd DdManager::getBddOne() const { return Bdd(*this, internalDdManager.getBddOne()); @@ -221,6 +231,11 @@ namespace storm { return result; } + template + std::vector DdManager::addBitVectorMetaVariable(std::string const& variableName, uint64_t bits, uint64_t numberOfLayers, boost::optional> const& position) { + return this->addMetaVariable(variableName, 0, (1ull << bits) - 1, numberOfLayers, position); + } + template std::pair DdManager::addMetaVariable(std::string const& name, boost::optional> const& position) { std::vector result = addMetaVariable(name, 2, position); diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index cade43736..fdee32589 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -21,7 +21,7 @@ namespace storm { namespace dd { // Declare DdManager class so we can then specialize it for the different DD types. template - class DdManager { + class DdManager : public std::enable_shared_from_this> { public: friend class Bdd; @@ -41,6 +41,9 @@ namespace storm { DdManager& operator=(DdManager const& other) = delete; DdManager(DdManager&& other) = default; DdManager& operator=(DdManager&& other) = default; + + std::shared_ptr> asSharedPointer(); + std::shared_ptr const> asSharedPointer() const; /*! * Retrieves a BDD representing the constant one function. @@ -160,7 +163,15 @@ namespace storm { * @param numberOfLayers The number of layers of this variable (must be greater or equal 1). */ std::vector addMetaVariable(std::string const& variableName, int_fast64_t low, int_fast64_t high, uint64_t numberOfLayers, boost::optional> const& position = boost::none); - + + /*! + * Creates a meta variable with the given number of layers. + * + * @param variableName The name of the variable. + * @param numberOfLayers The number of layers of this variable (must be greater or equal 1). + */ + std::vector addBitVectorMetaVariable(std::string const& variableName, uint64_t bits, uint64_t numberOfLayers, boost::optional> const& position = boost::none); + /*! * Adds a boolean meta variable with two layers (a 'normal' and a 'primed' one). * diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index 994db80c7..6e71074eb 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -2,33 +2,42 @@ #include "storm/storage/dd/DdManager.h" +#include "storm/storage/dd/bisimulation/PreservationInformation.h" + +#include "storm/logic/Formula.h" +#include "storm/logic/AtomicExpressionFormula.h" +#include "storm/logic/AtomicLabelFormula.h" + +#include "storm/utility/macros.h" +#include "storm/exceptions/InvalidPropertyException.h" + namespace storm { namespace dd { namespace bisimulation { template - Partition::Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partition(partitionAdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { + Partition::Partition(std::shared_ptr preservationInformation, storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : preservationInformation(preservationInformation), partition(partitionAdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. } template - Partition::Partition(storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex) : partition(partitionBdd), blockVariable(blockVariable), nextFreeBlockIndex(nextFreeBlockIndex) { + Partition::Partition(std::shared_ptr preservationInformation, storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : preservationInformation(preservationInformation), partition(partitionBdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. } template bool Partition::operator==(Partition const& other) { - return this->partition == other.partition && this->blockVariable == other.blockVariable && this->nextFreeBlockIndex == other.nextFreeBlockIndex; + return this->partition == other.partition && this->blockVariables == other.blockVariables && this->nextFreeBlockIndex == other.nextFreeBlockIndex; } template Partition Partition::replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const { - return Partition(newPartitionAdd, blockVariable, nextFreeBlockIndex); + return Partition(preservationInformation, newPartitionAdd, blockVariables, nextFreeBlockIndex); } template Partition Partition::replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const { - return Partition(newPartitionBdd, blockVariable, nextFreeBlockIndex); + return Partition(preservationInformation, newPartitionBdd, blockVariables, nextFreeBlockIndex); } template @@ -38,15 +47,57 @@ namespace storm { template Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& labels) { + std::shared_ptr preservationInformation = std::make_shared(); std::vector expressions; for (auto const& label : labels) { + preservationInformation->addLabel(label); expressions.push_back(model.getExpression(label)); } - return create(model, expressions); + return create(model, expressions, preservationInformation); } template Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions) { + std::shared_ptr preservationInformation = std::make_shared(); + for (auto const& expression : expressions) { + preservationInformation->addExpression(expression); + } + return create(model, expressions, preservationInformation); + } + + template + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector> const& formulas) { + if (formulas.empty()) { + return create(model); + } + + std::shared_ptr preservationInformation = std::make_shared(); + std::set labels; + std::set expressions; + + for (auto const& formula : formulas) { + for (auto const& expressionFormula : formula->getAtomicExpressionFormulas()) { + expressions.insert(expressionFormula->getExpression()); + preservationInformation->addExpression(expressionFormula->getExpression()); + } + for (auto const& labelFormula : formula->getAtomicLabelFormulas()) { + std::string const& label = labelFormula->getLabel(); + STORM_LOG_THROW(model.hasLabel(label), storm::exceptions::InvalidPropertyException, "Property refers to illegal label '" << label << "'."); + preservationInformation->addLabel(label); + expressions.insert(model.getExpression(label)); + } + } + + std::vector expressionVector; + for (auto const& expression : expressions) { + expressionVector.emplace_back(expression); + } + + return create(model, expressionVector, preservationInformation); + } + + template + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation) { storm::dd::DdManager& manager = model.getManager(); std::vector> stateSets; @@ -54,14 +105,20 @@ namespace storm { stateSets.emplace_back(model.getStates(expression)); } - storm::expressions::Variable blockVariable = createBlockVariable(manager, model.getReachableStates().getNonZeroCount()); - std::pair, uint64_t> partitionBddAndBlockCount = createPartitionBdd(manager, model, stateSets, blockVariable); + uint64_t numberOfDdVariables = 0; + for (auto const& metaVariable : model.getRowVariables()) { + auto const& ddMetaVariable = manager.getMetaVariable(metaVariable); + numberOfDdVariables += ddMetaVariable.getNumberOfDdVariables(); + } + + std::pair blockVariables = createBlockVariables(manager, numberOfDdVariables); + std::pair, uint64_t> partitionBddAndBlockCount = createPartitionBdd(manager, model, stateSets, blockVariables.first); // Store the partition as an ADD only in the case of CUDD. if (DdType == storm::dd::DdType::CUDD) { - return Partition(partitionBddAndBlockCount.first.template toAdd(), blockVariable, partitionBddAndBlockCount.second); + return Partition(preservationInformation, partitionBddAndBlockCount.first.template toAdd(), blockVariables, partitionBddAndBlockCount.second); } else { - return Partition(partitionBddAndBlockCount.first, blockVariable, partitionBddAndBlockCount.second); + return Partition(preservationInformation, partitionBddAndBlockCount.first, blockVariables, partitionBddAndBlockCount.second); } } @@ -92,7 +149,12 @@ namespace storm { template storm::expressions::Variable const& Partition::getBlockVariable() const { - return blockVariable; + return blockVariables.first; + } + + template + storm::expressions::Variable const& Partition::getPrimedBlockVariable() const { + return blockVariables.second; } template @@ -109,6 +171,11 @@ namespace storm { } } + template + PreservationInformation const& Partition::getPreservationInformation() const { + return *preservationInformation; + } + template void enumerateBlocksRec(std::vector> const& stateSets, storm::dd::Bdd const& currentStateSet, uint64_t offset, storm::expressions::Variable const& blockVariable, std::function const&)> const& callback) { if (currentStateSet.isZero()) { @@ -125,34 +192,33 @@ namespace storm { template std::pair, uint64_t> Partition::createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable) { uint64_t blockCount = 0; - storm::dd::Bdd partitionAdd = manager.getBddZero(); + storm::dd::Bdd partitionBdd = manager.getBddZero(); // Enumerate all realizable blocks. - enumerateBlocksRec(stateSets, model.getReachableStates(), 0, blockVariable, [&manager, &partitionAdd, &blockVariable, &blockCount](storm::dd::Bdd const& stateSet) { - stateSet.template toAdd().exportToDot("states_" + std::to_string(blockCount) + ".dot"); - partitionAdd |= (stateSet && manager.getEncoding(blockVariable, blockCount, false)); + enumerateBlocksRec(stateSets, model.getReachableStates(), 0, blockVariable, [&manager, &partitionBdd, &blockVariable, &blockCount](storm::dd::Bdd const& stateSet) { + partitionBdd |= (stateSet && manager.getEncoding(blockVariable, blockCount, false)); blockCount++; } ); - + // Move the partition over to the primed variables. - partitionAdd = partitionAdd.swapVariables(model.getRowColumnMetaVariablePairs()); - - return std::make_pair(partitionAdd, blockCount); + partitionBdd = partitionBdd.swapVariables(model.getRowColumnMetaVariablePairs()); + + return std::make_pair(partitionBdd, blockCount); } template - storm::expressions::Variable Partition::createBlockVariable(storm::dd::DdManager& manager, uint64_t numberOfStates) { - storm::expressions::Variable blockVariable; + std::pair Partition::createBlockVariables(storm::dd::DdManager& manager, uint64_t numberOfDdVariables) { + std::vector blockVariables; if (manager.hasMetaVariable("blocks")) { int64_t counter = 0; while (manager.hasMetaVariable("block" + std::to_string(counter))) { ++counter; } - blockVariable = manager.addMetaVariable("blocks" + std::to_string(counter), 0, numberOfStates, 1).front(); + blockVariables = manager.addBitVectorMetaVariable("blocks" + std::to_string(counter), numberOfDdVariables, 2); } else { - blockVariable = manager.addMetaVariable("blocks", 0, numberOfStates, 1).front(); + blockVariables = manager.addBitVectorMetaVariable("blocks", numberOfDdVariables, 2); } - return blockVariable; + return std::make_pair(blockVariables[0], blockVariables[1]); } template class Partition; diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h index a206c33a5..f52c827cb 100644 --- a/src/storm/storage/dd/bisimulation/Partition.h +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -1,5 +1,8 @@ #pragma once +#include +#include + #include #include "storm/storage/dd/DdType.h" @@ -9,38 +12,20 @@ #include "storm/models/symbolic/Model.h" namespace storm { + namespace logic { + class Formula; + } + namespace dd { namespace bisimulation { + class PreservationInformation; + template class Partition { public: Partition() = default; - /*! - * Creates a new partition from the given data. - * - * @param partitionAdd An ADD that maps encoding over the state/row variables and the block variable to - * one iff the state is in the block. - * @param blockVariable The variable to use for the block encoding. Its range must be [0, x] where x is - * the number of states in the partition. - * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices - * between 0 and this number. - */ - Partition(storm::dd::Add const& partitionAdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex); - - /*! - * Creates a new partition from the given data. - * - * @param partitionBdd A BDD that maps encoding over the state/row variables and the block variable to - * true iff the state is in the block. - * @param blockVariable The variable to use for the block encoding. Its range must be [0, x] where x is - * the number of states in the partition. - * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices - * between 0 and this number. - */ - Partition(storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t nextFreeBlockIndex); - bool operator==(Partition const& other); Partition replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; @@ -62,6 +47,11 @@ namespace storm { */ static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions); + /*! + * Creates a partition from the given model that preserves the given formulas. + */ + static Partition create(storm::models::symbolic::Model const& model, std::vector> const& formulas); + uint64_t getNumberOfBlocks() const; bool storedAsAdd() const; @@ -71,21 +61,56 @@ namespace storm { storm::dd::Bdd const& asBdd() const; storm::expressions::Variable const& getBlockVariable() const; + storm::expressions::Variable const& getPrimedBlockVariable() const; uint64_t getNextFreeBlockIndex() const; - uint64_t getNodeCount() const; + + PreservationInformation const& getPreservationInformation() const; private: + /*! + * Creates a new partition from the given data. + * + * @param preservationInformation Informatin about which labels/expressions this partition preserves. + * @param partitionAdd An ADD that maps encoding over the state/row variables and the block variable to + * one iff the state is in the block. + * @param blockVariables The variables to use for the block encoding. Its range must be [0, x] where x is + * greater or equal than the number of states in the partition. + * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices + * between 0 and this number. + */ + Partition(std::shared_ptr preservationInformation, storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); + + /*! + * Creates a new partition from the given data. + * + * @param preservationInformation Informatin about which labels/expressions this partition preserves. + * @param partitionBdd A BDD that maps encoding over the state/row variables and the block variable to + * true iff the state is in the block. + * @param blockVariables The variables to use for the block encoding. Their range must be [0, x] where x is + * greater or equal than the number of states in the partition. + * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices + * between 0 and this number. + */ + Partition(std::shared_ptr preservationInformation, storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); + + /*! + * Creates a partition from the given model that respects the given expressions. + */ + static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation); + static std::pair, uint64_t> createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); - static storm::expressions::Variable createBlockVariable(storm::dd::DdManager& manager, uint64_t numberOfStates); + static std::pair createBlockVariables(storm::dd::DdManager& manager, uint64_t numberOfDdVariables); + + std::shared_ptr preservationInformation; /// The DD representing the partition. The DD is over the row variables of the model and the block variable. boost::variant, storm::dd::Add> partition; - /// The meta variable used to encode the block of each state in this partition. - storm::expressions::Variable blockVariable; + /// The meta variables used to encode the block of each state in this partition. + std::pair blockVariables; /// The next free block index. uint64_t nextFreeBlockIndex; diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp new file mode 100644 index 000000000..f6d25ff4d --- /dev/null +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp @@ -0,0 +1,24 @@ +#include "storm/storage/dd/bisimulation/PreservationInformation.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + void PreservationInformation::addLabel(std::string const& label) { + labels.insert(label); + } + + void PreservationInformation::addExpression(storm::expressions::Expression const& expression) { + expressions.insert(expression); + } + + std::set const& PreservationInformation::getLabels() const { + return labels; + } + + std::set const& PreservationInformation::getExpressions() const { + return expressions; + } + } + } +} diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.h b/src/storm/storage/dd/bisimulation/PreservationInformation.h new file mode 100644 index 000000000..e936d3b0d --- /dev/null +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.h @@ -0,0 +1,30 @@ +#pragma once + +#include +#include + +#include "storm/storage/expressions/Expression.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + class PreservationInformation { + public: + + PreservationInformation() = default; + + void addLabel(std::string const& label); + void addExpression(storm::expressions::Expression const& expression); + + std::set const& getLabels() const; + std::set const& getExpressions() const; + + private: + std::set labels; + std::set expressions; + }; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp new file mode 100644 index 000000000..bef5d3fc3 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -0,0 +1,161 @@ +#include "storm/storage/dd/bisimulation/QuotientExtractor.h" + +#include "storm/storage/dd/DdManager.h" + +#include "storm/models/symbolic/Dtmc.h" +#include "storm/models/symbolic/Ctmc.h" +#include "storm/models/symbolic/StandardRewardModel.h" + +#include "storm/storage/dd/bisimulation/PreservationInformation.h" + +#include "storm/settings/SettingsManager.h" + +#include "storm/utility/macros.h" +#include "storm/exceptions/NotSupportedException.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + QuotientExtractor::QuotientExtractor() : useRepresentatives(false) { + auto const& settings = storm::settings::getModule(); + this->useRepresentatives = settings.isUseRepresentativesSet(); + this->quotientFormat = settings.getQuotientFormat(); + } + + template + std::shared_ptr> QuotientExtractor::extract(storm::models::symbolic::Model const& model, Partition const& partition) { + auto start = std::chrono::high_resolution_clock::now(); + std::shared_ptr> result; + if (quotientFormat == storm::settings::modules::BisimulationSettings::QuotientFormat::Sparse) { + result = extractSparseQuotient(model, partition); + } else { + result = extractDdQuotient(model, partition); + } + auto end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Quotient extraction completed in " << std::chrono::duration_cast(end - start).count() << "ms."); + return result; + } + + template + std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { + return nullptr; + } + + template + std::shared_ptr> QuotientExtractor::extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { + return extractQuotientUsingBlockVariables(model, partition); + } + + template + std::shared_ptr> QuotientExtractor::extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition) { + auto modelType = model.getType(); + + if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { + std::set blockVariableSet = {partition.getBlockVariable()}; + std::set blockPrimeVariableSet = {partition.getPrimedBlockVariable()}; + std::vector> blockMetaVariablePairs = {std::make_pair(partition.getBlockVariable(), partition.getPrimedBlockVariable())}; + + storm::dd::Bdd partitionAsBdd = partition.storedAsBdd() ? partition.asBdd() : partition.asAdd().notZero(); + if (useRepresentatives) { + storm::dd::Bdd partitionAsBddOverPrimedBlockVariable = partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet); + storm::dd::Bdd representativePartition = partitionAsBddOverPrimedBlockVariable.existsAbstractRepresentative(model.getColumnVariables()).renameVariables(model.getColumnVariables(), blockVariableSet); + partitionAsBdd = (representativePartition && partitionAsBddOverPrimedBlockVariable).existsAbstract(blockPrimeVariableSet); + } + + storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); + storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); + + storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()); + storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables()); + storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; + + std::map> preservedLabelBdds; + for (auto const& label : partition.getPreservationInformation().getLabels()) { + preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + } + for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + std::stringstream stream; + stream << expression; + std::string expressionAsString = stream.str(); + + auto it = preservedLabelBdds.find(expressionAsString); + if (it != preservedLabelBdds.end()) { + STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); + } else { + preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + } + } + + if (modelType == storm::models::ModelType::Dtmc) { + return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + } else { + return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + } + } else { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot exctract quotient for this model type."); + } + } + + template + std::shared_ptr> QuotientExtractor::extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition) { + auto modelType = model.getType(); + + if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { + std::set blockVariableSet = {partition.getBlockVariable()}; + std::set blockPrimeVariableSet = {partition.getPrimedBlockVariable()}; + std::vector> blockMetaVariablePairs = {std::make_pair(partition.getBlockVariable(), partition.getPrimedBlockVariable())}; + + storm::dd::Add partitionAsAdd = partition.storedAsBdd() ? partition.asBdd().template toAdd() : partition.asAdd(); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd, model.getColumnVariables()); + quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getColumnVariables()); + quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); + quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getRowVariables()); + storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); + + storm::dd::Bdd partitionAsBdd = partition.storedAsBdd() ? partition.asBdd() : partition.asAdd().notZero(); + storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()).renameVariables(blockVariableSet, model.getRowVariables()); + storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables())).existsAbstract(model.getRowVariables()).renameVariables(blockVariableSet, model.getRowVariables()); + storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(model.getColumnVariables()) && reachableStates; + + std::map> preservedLabelBdds; + for (auto const& label : partition.getPreservationInformation().getLabels()) { + preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + } + for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + std::stringstream stream; + stream << expression; + std::string expressionAsString = stream.str(); + + auto it = preservedLabelBdds.find(expressionAsString); + if (it != preservedLabelBdds.end()) { + STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); + } else { + preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + } + } + + if (modelType == storm::models::ModelType::Dtmc) { + return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, model.getRowVariables(), model.getColumnVariables(), model.getRowColumnMetaVariablePairs(), preservedLabelBdds, {})); + } else { + return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + } + } else { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot exctract quotient for this model type."); + } + } + + template class QuotientExtractor; + + template class QuotientExtractor; + template class QuotientExtractor; + template class QuotientExtractor; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.h b/src/storm/storage/dd/bisimulation/QuotientExtractor.h new file mode 100644 index 000000000..eb6cbef4b --- /dev/null +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.h @@ -0,0 +1,37 @@ +#pragma once + +#include + +#include "storm/storage/dd/DdType.h" + +#include "storm/models/symbolic/Model.h" + +#include "storm/storage/dd/bisimulation/Partition.h" + +#include "storm/settings/modules/BisimulationSettings.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class QuotientExtractor { + public: + QuotientExtractor(); + + std::shared_ptr> extract(storm::models::symbolic::Model const& model, Partition const& partition); + + private: + std::shared_ptr> extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition); + + std::shared_ptr> extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition); + + bool useRepresentatives; + storm::settings::modules::BisimulationSettings::QuotientFormat quotientFormat; + }; + + } + } +} diff --git a/src/storm/utility/storm.h b/src/storm/utility/storm.h index 9dc2d1a60..a913917be 100644 --- a/src/storm/utility/storm.h +++ b/src/storm/utility/storm.h @@ -192,10 +192,9 @@ namespace storm { } if (storm::settings::getModule().isBisimulationSet()) { - storm::dd::BisimulationDecomposition decomposition(*result); + storm::dd::BisimulationDecomposition decomposition(*result, formulas); decomposition.compute(); - - // TODO build quotient and return it. + result = decomposition.getQuotient(); } return result; From f0f4cd73908224e9c644aab438d88f1214d60fdc Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 25 May 2017 09:56:15 +0200 Subject: [PATCH 05/95] first version of sparse quotient extraction for dd bisimulation --- src/storm/cli/cli.cpp | 2 - src/storm/models/sparse/Model.cpp | 4 +- src/storm/models/sparse/Model.h | 4 +- src/storm/models/symbolic/Model.cpp | 4 +- src/storm/models/symbolic/Model.h | 4 +- .../settings/modules/BisimulationSettings.cpp | 4 +- src/storm/storage/SparseMatrix.cpp | 68 +-- .../storage/dd/BisimulationDecomposition.cpp | 4 +- .../storage/dd/BisimulationDecomposition.h | 2 +- src/storm/storage/dd/DdMetaVariable.cpp | 22 + src/storm/storage/dd/DdMetaVariable.h | 10 + .../dd/bisimulation/QuotientExtractor.cpp | 501 +++++++++++++++++- .../dd/bisimulation/QuotientExtractor.h | 5 +- src/storm/storage/dd/cudd/InternalCuddAdd.h | 2 +- src/storm/storage/dd/cudd/InternalCuddBdd.h | 2 +- .../storage/dd/sylvan/InternalSylvanAdd.h | 14 +- .../SymbolicToSparseTransformer.cpp | 1 + src/storm/utility/storm.h | 2 +- 18 files changed, 592 insertions(+), 63 deletions(-) diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index bdba45a30..7618fd9e3 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -277,8 +277,6 @@ namespace storm { model = model.preprocess(constantDefinitions); - - if (ioSettings.isNoBuildModelSet()) { return; } diff --git a/src/storm/models/sparse/Model.cpp b/src/storm/models/sparse/Model.cpp index d75065299..81ecad8a4 100644 --- a/src/storm/models/sparse/Model.cpp +++ b/src/storm/models/sparse/Model.cpp @@ -20,7 +20,7 @@ namespace storm { storm::models::sparse::StateLabeling const& stateLabeling, std::unordered_map const& rewardModels, boost::optional> const& optionalChoiceLabeling) - : ModelBase(modelType), transitionMatrix(transitionMatrix), stateLabeling(stateLabeling), + : storm::models::Model(modelType), transitionMatrix(transitionMatrix), stateLabeling(stateLabeling), rewardModels(rewardModels), choiceLabeling(optionalChoiceLabeling) { for (auto const& rewardModel : this->getRewardModels()) { STORM_LOG_THROW(!rewardModel.second.hasTransitionRewards() || rewardModel.second.getTransitionRewardMatrix().isSubmatrixOf(this->getTransitionMatrix()), storm::exceptions::IllegalArgumentException, "The transition reward matrix is not a submatrix of the transition matrix, i.e. there are rewards for transitions that do not exist."); @@ -33,7 +33,7 @@ namespace storm { storm::models::sparse::StateLabeling&& stateLabeling, std::unordered_map&& rewardModels, boost::optional>&& optionalChoiceLabeling) - : ModelBase(modelType), transitionMatrix(std::move(transitionMatrix)), stateLabeling(std::move(stateLabeling)), + : storm::models::Model(modelType), transitionMatrix(std::move(transitionMatrix)), stateLabeling(std::move(stateLabeling)), rewardModels(std::move(rewardModels)), choiceLabeling(std::move(optionalChoiceLabeling)) { for (auto const& rewardModel : this->getRewardModels()) { STORM_LOG_THROW(!rewardModel.second.hasTransitionRewards() || rewardModel.second.getTransitionRewardMatrix().isSubmatrixOf(this->getTransitionMatrix()), storm::exceptions::IllegalArgumentException, "The transition reward matrix is not a submatrix of the transition matrix, i.e. there are rewards for transitions that do not exist."); diff --git a/src/storm/models/sparse/Model.h b/src/storm/models/sparse/Model.h index a545ae3ce..57382a1c9 100644 --- a/src/storm/models/sparse/Model.h +++ b/src/storm/models/sparse/Model.h @@ -6,7 +6,7 @@ #include #include -#include "storm/models/ModelBase.h" +#include "storm/models/Model.h" #include "storm/models/sparse/StateLabeling.h" #include "storm/storage/sparse/StateType.h" #include "storm/storage/SparseMatrix.h" @@ -35,7 +35,7 @@ namespace storm { * Base class for all sparse models. */ template> - class Model : public storm::models::ModelBase { + class Model : public storm::models::Model { template friend class storm::utility::ModelInstantiator; diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 1ec8ef7d9..2a6804618 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -35,7 +35,7 @@ namespace storm { std::vector> const& rowColumnMetaVariablePairs, std::map labelToExpressionMap, std::unordered_map const& rewardModels) - : ModelBase(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(rowExpressionAdapter), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToExpressionMap(labelToExpressionMap), rewardModels(rewardModels) { + : storm::models::Model(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(rowExpressionAdapter), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToExpressionMap(labelToExpressionMap), rewardModels(rewardModels) { this->labelToBddMap.emplace("init", initialStates); this->labelToBddMap.emplace("deadlock", deadlockStates); } @@ -52,7 +52,7 @@ namespace storm { std::vector> const& rowColumnMetaVariablePairs, std::map> labelToBddMap, std::unordered_map const& rewardModels) - : ModelBase(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(nullptr), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToBddMap(labelToBddMap), rewardModels(rewardModels) { + : storm::models::Model(modelType), manager(manager), reachableStates(reachableStates), transitionMatrix(transitionMatrix), rowVariables(rowVariables), rowExpressionAdapter(nullptr), columnVariables(columnVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), labelToBddMap(labelToBddMap), rewardModels(rewardModels) { STORM_LOG_THROW(this->labelToBddMap.find("init") == this->labelToBddMap.end(), storm::exceptions::WrongFormatException, "Illegal custom label 'init'."); STORM_LOG_THROW(this->labelToBddMap.find("deadlock") == this->labelToBddMap.end(), storm::exceptions::WrongFormatException, "Illegal custom label 'deadlock'."); this->labelToBddMap.emplace("init", initialStates); diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index cae2e3c85..f12a7ad26 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -10,7 +10,7 @@ #include "storm/storage/expressions/Variable.h" #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/Bdd.h" -#include "storm/models/ModelBase.h" +#include "storm/models/Model.h" #include "storm/utility/OsDetection.h" #include "storm-config.h" @@ -45,7 +45,7 @@ namespace storm { * Base class for all symbolic models. */ template - class Model : public storm::models::ModelBase { + class Model : public storm::models::Model { public: typedef CValueType ValueType; diff --git a/src/storm/settings/modules/BisimulationSettings.cpp b/src/storm/settings/modules/BisimulationSettings.cpp index fdef27093..2c1db8a39 100644 --- a/src/storm/settings/modules/BisimulationSettings.cpp +++ b/src/storm/settings/modules/BisimulationSettings.cpp @@ -22,7 +22,7 @@ namespace storm { this->addOption(storm::settings::OptionBuilder(moduleName, typeOptionName, true, "Sets the kind of bisimulation quotienting used.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the type to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(types)).setDefaultValueString("strong").build()).build()); std::vector quotTypes = { "sparse", "dd" }; - this->addOption(storm::settings::OptionBuilder(moduleName, typeOptionName, true, "Sets the format in which the quotient is extracted (only applies to DD-based bisimulation).").addArgument(storm::settings::ArgumentBuilder::createStringArgument("format", "The format of the quotient.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(quotTypes)).setDefaultValueString("dd").build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, quotientFormatOptionName, true, "Sets the format in which the quotient is extracted (only applies to DD-based bisimulation).").addArgument(storm::settings::ArgumentBuilder::createStringArgument("format", "The format of the quotient.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(quotTypes)).setDefaultValueString("dd").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, representativeOptionName, false, "Sets whether to use representatives in the quotient rather than block numbers.").build()); } @@ -42,7 +42,7 @@ namespace storm { } BisimulationSettings::QuotientFormat BisimulationSettings::getQuotientFormat() const { - std::string quotientFormatAsString = this->getOption(typeOptionName).getArgumentByName("format").getValueAsString(); + std::string quotientFormatAsString = this->getOption(quotientFormatOptionName).getArgumentByName("format").getValueAsString(); if (quotientFormatAsString == "sparse") { return BisimulationSettings::QuotientFormat::Sparse; } diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index d71fa7ba4..11878f0d2 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -125,41 +125,47 @@ namespace storm { // the insertion. bool fixCurrentRow = row == lastRow && column < lastColumn; - // If we switched to another row, we have to adjust the missing entries in the row indices vector. - if (row != lastRow) { - // Otherwise, we need to push the correct values to the vectors, which might trigger reallocations. - for (index_type i = lastRow + 1; i <= row; ++i) { - rowIndications.push_back(currentEntryCount); + // If the element is in the same row and column as the previous entry, we add them up. + if (row == lastRow && column == lastColumn) { + columnsAndValues.back().setColumn(column); + columnsAndValues.back().setValue(value); + } else { + // If we switched to another row, we have to adjust the missing entries in the row indices vector. + if (row != lastRow) { + // Otherwise, we need to push the correct values to the vectors, which might trigger reallocations. + for (index_type i = lastRow + 1; i <= row; ++i) { + rowIndications.push_back(currentEntryCount); + } + + lastRow = row; } - lastRow = row; - } - - lastColumn = column; - - // Finally, set the element and increase the current size. - columnsAndValues.emplace_back(column, value); - highestColumn = std::max(highestColumn, column); - ++currentEntryCount; - - // If we need to fix the row, do so now. - if (fixCurrentRow) { - // First, we sort according to columns. - std::sort(columnsAndValues.begin() + rowIndications.back(), columnsAndValues.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { - return a.getColumn() < b.getColumn(); - }); + lastColumn = column; - // Then, we eliminate possible duplicate entries. - auto it = std::unique(columnsAndValues.begin() + rowIndications.back(), columnsAndValues.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { - return a.getColumn() == b.getColumn(); - }); + // Finally, set the element and increase the current size. + columnsAndValues.emplace_back(column, value); + highestColumn = std::max(highestColumn, column); + ++currentEntryCount; - // Finally, remove the superfluous elements. - std::size_t elementsToRemove = std::distance(it, columnsAndValues.end()); - if (elementsToRemove > 0) { - STORM_LOG_WARN("Unordered insertion into matrix builder caused duplicate entries."); - currentEntryCount -= elementsToRemove; - columnsAndValues.resize(columnsAndValues.size() - elementsToRemove); + // If we need to fix the row, do so now. + if (fixCurrentRow) { + // First, we sort according to columns. + std::sort(columnsAndValues.begin() + rowIndications.back(), columnsAndValues.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { + return a.getColumn() < b.getColumn(); + }); + + // Then, we eliminate possible duplicate entries. + auto it = std::unique(columnsAndValues.begin() + rowIndications.back(), columnsAndValues.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { + return a.getColumn() == b.getColumn(); + }); + + // Finally, remove the superfluous elements. + std::size_t elementsToRemove = std::distance(it, columnsAndValues.end()); + if (elementsToRemove > 0) { + STORM_LOG_WARN("Unordered insertion into matrix builder caused duplicate entries."); + currentEntryCount -= elementsToRemove; + columnsAndValues.resize(columnsAndValues.size() - elementsToRemove); + } } } diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index a1698404a..81ad026af 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -82,12 +82,12 @@ namespace storm { } template - std::shared_ptr> BisimulationDecomposition::getQuotient() const { + std::shared_ptr> BisimulationDecomposition::getQuotient() const { STORM_LOG_THROW(this->status == Status::FixedPoint, storm::exceptions::InvalidOperationException, "Cannot extract quotient, because bisimulation decomposition was not completed."); STORM_LOG_TRACE("Starting quotient extraction."); QuotientExtractor extractor; - std::shared_ptr> quotient = extractor.extract(model, currentPartition); + std::shared_ptr> quotient = extractor.extract(model, currentPartition); STORM_LOG_TRACE("Quotient extraction done."); return quotient; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index e0ec00d27..d13d6a114 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -33,7 +33,7 @@ namespace storm { /*! * Retrieves the quotient model after the bisimulation decomposition was computed. */ - std::shared_ptr> getQuotient() const; + std::shared_ptr> getQuotient() const; private: // The status of the computation. diff --git a/src/storm/storage/dd/DdMetaVariable.cpp b/src/storm/storage/dd/DdMetaVariable.cpp index 440612d7c..fda284391 100644 --- a/src/storm/storage/dd/DdMetaVariable.cpp +++ b/src/storm/storage/dd/DdMetaVariable.cpp @@ -49,6 +49,28 @@ namespace storm { return this->cube; } + template + std::vector DdMetaVariable::getIndices() const { + std::vector> indicesAndLevels = this->getIndicesAndLevels(); + std::sort(indicesAndLevels.begin(), indicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; }); + + std::vector indices; + for (auto const& e : indicesAndLevels) { + indices.emplace_back(e.first); + } + + return indices; + } + + template + std::vector> DdMetaVariable::getIndicesAndLevels() const { + std::vector> indicesAndLevels; + for (auto const& v : ddVariables) { + indicesAndLevels.emplace_back(v.getIndex(), v.getLevel()); + } + return indicesAndLevels; + } + template uint64_t DdMetaVariable::getHighestLevel() const { uint64_t result = 0; diff --git a/src/storm/storage/dd/DdMetaVariable.h b/src/storm/storage/dd/DdMetaVariable.h index 9b9b736ed..c18f9fa44 100644 --- a/src/storm/storage/dd/DdMetaVariable.h +++ b/src/storm/storage/dd/DdMetaVariable.h @@ -78,6 +78,16 @@ namespace storm { */ uint64_t getHighestLevel() const; + /*! + * Retrieves the indices of the DD variables associated with this meta variable sorted by level. + */ + std::vector getIndices() const; + + /*! + * Retrieves the indices and levels of the DD variables associated with this meta variable. + */ + std::vector> getIndicesAndLevels() const; + private: /*! * Creates an integer meta variable with the given name and range bounds. diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index bef5d3fc3..a59eed3bd 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -6,6 +6,10 @@ #include "storm/models/symbolic/Ctmc.h" #include "storm/models/symbolic/StandardRewardModel.h" +#include "storm/models/sparse/Dtmc.h" +#include "storm/models/sparse/Ctmc.h" +#include "storm/models/sparse/StandardRewardModel.h" + #include "storm/storage/dd/bisimulation/PreservationInformation.h" #include "storm/settings/SettingsManager.h" @@ -13,10 +17,452 @@ #include "storm/utility/macros.h" #include "storm/exceptions/NotSupportedException.h" +#include "storm/storage/SparseMatrix.h" +#include "storm/storage/BitVector.h" + +#include + namespace storm { namespace dd { namespace bisimulation { + + template + class InternalSparseQuotientExtractor; + + template + class InternalSparseQuotientExtractorBase { + public: + InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& stateVariables) : manager(manager) { + for (auto const& variable : stateVariables) { + auto const& ddMetaVariable = manager.getMetaVariable(variable); + std::vector> indicesAndLevels = ddMetaVariable.getIndicesAndLevels(); + stateVariablesIndicesAndLevels.insert(stateVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); + } + + // Sort the indices by their levels. + std::sort(stateVariablesIndicesAndLevels.begin(), stateVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); + } + + protected: + storm::storage::SparseMatrix createMatrixFromEntries(Partition const& partition) { + for (auto& row : entries) { + std::sort(row.begin(), row.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { return a.getColumn() < b.getColumn(); } ); + } + + storm::storage::SparseMatrixBuilder builder(partition.getNumberOfBlocks(), partition.getNumberOfBlocks()); + uint64_t rowCounter = 0; + for (auto& row : entries) { + for (auto const& entry : row) { + builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); + } + + // Free storage for row. + row.clear(); + row.shrink_to_fit(); + + ++rowCounter; + } + + return builder.build(); + } + + storm::dd::DdManager const& manager; + std::vector> stateVariablesIndicesAndLevels; + std::vector>> entries; + }; + template + class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { + public: + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { + // Intentionally left empty. + } + + storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { + STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); + + // Create the number of rows necessary for the matrix. + this->entries.resize(partition.getNumberOfBlocks()); + + storm::storage::BitVector encoding(this->stateVariablesIndicesAndLevels.size()); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, encoding); + + return this->createMatrixFromEntries(partition); + } + + storm::storage::BitVector extractStates(storm::dd::Bdd const& states, Partition const& partition) { + STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); + + storm::storage::BitVector result(partition.getNumberOfBlocks()); + extractStatesRec(states.getInternalBdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, result); + + return result; + } + + private: + uint64_t decodeBlockIndex(DdNode* blockEncoding) { + std::unique_ptr& blockCacheEntry = blockDecodeCache[blockEncoding]; + if (blockCacheEntry) { + return *blockCacheEntry; + } + + uint64_t result = 0; + uint64_t offset = 0; + while (blockEncoding != Cudd_ReadOne(ddman)) { + if (Cudd_T(blockEncoding) != Cudd_ReadZero(ddman)) { + blockEncoding = Cudd_T(blockEncoding); + result |= 1ull << offset; + } else { + blockEncoding = Cudd_E(blockEncoding); + } + ++offset; + } + + blockCacheEntry.reset(new uint64_t(result)); + + return result; + } + + void extractStatesRec(DdNode* statesNode, DdNode* partitionNode, uint64_t offset, storm::storage::BitVector& result) { + if (statesNode == Cudd_ReadLogicZero(ddman)) { + return; + } + + // Determine the levels in the DDs. + uint64_t statesVariable = Cudd_NodeReadIndex(statesNode); + uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode) - 1; + + // See how many variables we skipped. + while (offset < this->stateVariablesIndicesAndLevels.size() && statesVariable != this->stateVariablesIndicesAndLevels[offset].first && partitionVariable != this->stateVariablesIndicesAndLevels[offset].first) { + ++offset; + } + + if (offset == this->stateVariablesIndicesAndLevels.size()) { + result.set(decodeBlockIndex(partitionNode)); + return; + } + + uint64_t topVariable; + if (statesVariable == this->stateVariablesIndicesAndLevels[offset].first) { + topVariable = statesVariable; + } else { + topVariable = partitionVariable; + } + + DdNode* tStates = statesNode; + DdNode* eStates = statesNode; + bool negate = false; + if (topVariable == statesVariable) { + tStates = Cudd_T(statesNode); + eStates = Cudd_E(statesNode); + negate = Cudd_IsComplement(statesNode); + } + + DdNode* tPartition = partitionNode; + DdNode* ePartition = partitionNode; + if (topVariable == partitionVariable) { + tPartition = Cudd_T(partitionNode); + ePartition = Cudd_E(partitionNode); + } + + extractStatesRec(negate ? Cudd_Not(tStates) : tStates, tPartition, offset, result); + extractStatesRec(negate ? Cudd_Not(eStates) : eStates, ePartition, offset, result); + } + + void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { + // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero + // as all states of the model have to be contained. + if (transitionMatrixNode == Cudd_ReadZero(ddman)) { + return; + } + + // If we have moved through all source variables, we must have arrived at a constant. + if (currentIndex == sourceState.size()) { + // Decode the source block. + uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); + + std::unique_ptr& sourceRepresentative = uniqueSourceRepresentative[sourceBlockIndex]; + if (sourceRepresentative && *sourceRepresentative != sourceState) { + // In this case, we have picked a different representative and must not record any entries now. + return; + } + + // Otherwise, we record the new representative. + sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); + + // Decode the target block. + uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); + + this->entries[sourceBlockIndex].emplace_back(targetBlockIndex, Cudd_V(transitionMatrixNode)); + } else { + // Determine the levels in the DDs. + uint64_t transitionMatrixVariable = Cudd_NodeReadIndex(transitionMatrixNode); + uint64_t sourcePartitionVariable = Cudd_NodeReadIndex(sourcePartitionNode) - 1; + uint64_t targetPartitionVariable = Cudd_NodeReadIndex(targetPartitionNode) - 1; + + // Move through transition matrix. + DdNode* tt = transitionMatrixNode; + DdNode* te = transitionMatrixNode; + DdNode* et = transitionMatrixNode; + DdNode* ee = transitionMatrixNode; + if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + DdNode* t = Cudd_T(transitionMatrixNode); + DdNode* e = Cudd_E(transitionMatrixNode); + + uint64_t tVariable = Cudd_NodeReadIndex(t); + if (tVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + tt = Cudd_T(t); + te = Cudd_E(t); + } else { + tt = te = t; + } + + uint64_t eVariable = Cudd_NodeReadIndex(e); + if (eVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + et = Cudd_T(e); + ee = Cudd_E(e); + } else { + et = ee = e; + } + } else { + if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + tt = Cudd_T(transitionMatrixNode); + te = Cudd_E(transitionMatrixNode); + } else { + tt = te = transitionMatrixNode; + } + } + + // Move through partition (for source state). + DdNode* sourceT; + DdNode* sourceE; + if (sourcePartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + sourceT = Cudd_T(sourcePartitionNode); + sourceE = Cudd_E(sourcePartitionNode); + } else { + sourceT = sourceE = sourcePartitionNode; + } + + // Move through partition (for target state). + DdNode* targetT; + DdNode* targetE; + if (targetPartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + targetT = Cudd_T(targetPartitionNode); + targetE = Cudd_E(targetPartitionNode); + } else { + targetT = targetE = targetPartitionNode; + } + + sourceState.set(currentIndex, true); + extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState); + extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState); + + sourceState.set(currentIndex, false); + extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState); + extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState); + } + } + + ::DdManager* ddman; + + spp::sparse_hash_map> uniqueSourceRepresentative; + spp::sparse_hash_map> blockDecodeCache; + }; + + template + class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { + public: + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables) { + // Intentionally left empty. + } + + storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { + STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); + + // Create the number of rows necessary for the matrix. + this->entries.resize(partition.getNumberOfBlocks()); + + storm::storage::BitVector encoding(this->stateVariablesIndicesAndLevels.size()); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, encoding); + + return this->createMatrixFromEntries(partition); + } + + storm::storage::BitVector extractStates(storm::dd::Bdd const& states, Partition const& partition) { + STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); + + storm::storage::BitVector result(partition.getNumberOfBlocks()); + extractStatesRec(states.getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, result); + + return result; + } + + private: + uint64_t decodeBlockIndex(BDD blockEncoding) { + std::unique_ptr& blockCacheEntry = blockDecodeCache[blockEncoding]; + if (blockCacheEntry) { + return *blockCacheEntry; + } + + uint64_t result = 0; + uint64_t offset = 0; + while (blockEncoding != sylvan_true) { + if (sylvan_high(blockEncoding) != sylvan_false) { + blockEncoding = sylvan_high(blockEncoding); + result |= 1ull << offset; + } else { + blockEncoding = sylvan_low(blockEncoding); + } + ++offset; + } + + blockCacheEntry.reset(new uint64_t(result)); + + return result; + } + + void extractStatesRec(BDD statesNode, BDD partitionNode, uint64_t offset, storm::storage::BitVector& result) { + if (statesNode == sylvan_false) { + return; + } + + // Determine the levels in the DDs. + uint64_t statesVariable = sylvan_isconst(statesNode) ? 0xffffffff : sylvan_var(statesNode); + uint64_t partitionVariable = sylvan_var(partitionNode) - 1; + + // See how many variables we skipped. + while (offset < this->stateVariablesIndicesAndLevels.size() && statesVariable != this->stateVariablesIndicesAndLevels[offset].first && partitionVariable != this->stateVariablesIndicesAndLevels[offset].first) { + ++offset; + } + + if (offset == this->stateVariablesIndicesAndLevels.size()) { + result.set(decodeBlockIndex(partitionNode)); + return; + } + + uint64_t topVariable; + if (statesVariable == this->stateVariablesIndicesAndLevels[offset].first) { + topVariable = statesVariable; + } else { + topVariable = partitionVariable; + } + + BDD tStates = statesNode; + BDD eStates = statesNode; + if (topVariable == statesVariable) { + tStates = sylvan_high(statesNode); + eStates = sylvan_low(statesNode); + } + + BDD tPartition = partitionNode; + BDD ePartition = partitionNode; + if (topVariable == partitionVariable) { + tPartition = sylvan_high(partitionNode); + ePartition = sylvan_low(partitionNode); + } + + extractStatesRec(tStates, tPartition, offset, result); + extractStatesRec(eStates, ePartition, offset, result); + } + + void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { + // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero + // as all states of the model have to be contained. + if (mtbdd_iszero(transitionMatrixNode)) { + return; + } + + // If we have moved through all source variables, we must have arrived at a constant. + if (currentIndex == sourceState.size()) { + // Decode the source block. + uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); + + std::unique_ptr& sourceRepresentative = uniqueSourceRepresentative[sourceBlockIndex]; + if (sourceRepresentative && *sourceRepresentative != sourceState) { + // In this case, we have picked a different representative and must not record any entries now. + return; + } + + // Otherwise, we record the new representative. + sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); + + // Decode the target block. + uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); + + this->entries[sourceBlockIndex].emplace_back(targetBlockIndex, storm::dd::InternalAdd::getValue(transitionMatrixNode)); + } else { + // Determine the levels in the DDs. + uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); + uint64_t sourcePartitionVariable = sylvan_var(sourcePartitionNode) - 1; + uint64_t targetPartitionVariable = sylvan_var(targetPartitionNode) - 1; + + // Move through transition matrix. + MTBDD tt = transitionMatrixNode; + MTBDD te = transitionMatrixNode; + MTBDD et = transitionMatrixNode; + MTBDD ee = transitionMatrixNode; + if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + MTBDD t = sylvan_high(transitionMatrixNode); + MTBDD e = sylvan_low(transitionMatrixNode); + + uint64_t tVariable = sylvan_isconst(t) ? 0xffffffff : sylvan_var(t); + if (tVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + tt = sylvan_high(t); + te = sylvan_low(t); + } else { + tt = te = t; + } + + uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); + if (eVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + et = sylvan_high(e); + ee = sylvan_low(e); + } else { + et = ee = e; + } + } else { + if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + tt = sylvan_high(transitionMatrixNode); + te = sylvan_low(transitionMatrixNode); + } else { + tt = te = transitionMatrixNode; + } + } + + // Move through partition (for source state). + MTBDD sourceT; + MTBDD sourceE; + if (sourcePartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + sourceT = sylvan_high(sourcePartitionNode); + sourceE = sylvan_low(sourcePartitionNode); + } else { + sourceT = sourceE = sourcePartitionNode; + } + + // Move through partition (for target state). + MTBDD targetT; + MTBDD targetE; + if (targetPartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + targetT = sylvan_high(targetPartitionNode); + targetE = sylvan_low(targetPartitionNode); + } else { + targetT = targetE = targetPartitionNode; + } + + sourceState.set(currentIndex, true); + extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState); + extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState); + + sourceState.set(currentIndex, false); + extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState); + extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState); + } + } + + spp::sparse_hash_map> uniqueSourceRepresentative; + spp::sparse_hash_map> blockDecodeCache; + }; + template QuotientExtractor::QuotientExtractor() : useRepresentatives(false) { auto const& settings = storm::settings::getModule(); @@ -25,9 +471,9 @@ namespace storm { } template - std::shared_ptr> QuotientExtractor::extract(storm::models::symbolic::Model const& model, Partition const& partition) { + std::shared_ptr> QuotientExtractor::extract(storm::models::symbolic::Model const& model, Partition const& partition) { auto start = std::chrono::high_resolution_clock::now(); - std::shared_ptr> result; + std::shared_ptr> result; if (quotientFormat == storm::settings::modules::BisimulationSettings::QuotientFormat::Sparse) { result = extractSparseQuotient(model, partition); } else { @@ -35,12 +481,51 @@ namespace storm { } auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient extraction completed in " << std::chrono::duration_cast(end - start).count() << "ms."); + + STORM_LOG_THROW(result, storm::exceptions::NotSupportedException, "Quotient could not be extracted."); + return result; } template - std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { - return nullptr; + std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { + InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables()); + storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); + + std::cout << "Matrix has " << quotientTransitionMatrix.getEntryCount() << " entries" << std::endl; + + storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); + quotientStateLabeling.addLabel("init", sparseExtractor.extractStates(model.getInitialStates(), partition)); + std::cout << "init: " << quotientStateLabeling.getStates("init").getNumberOfSetBits() << std::endl; + quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); + std::cout << "deadlock: " << quotientStateLabeling.getStates("init").getNumberOfSetBits() << std::endl; + + for (auto const& label : partition.getPreservationInformation().getLabels()) { + quotientStateLabeling.addLabel(label, sparseExtractor.extractStates(model.getStates(label), partition)); + std::cout << label << ": " << quotientStateLabeling.getStates(label).getNumberOfSetBits() << std::endl; + } + for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + std::stringstream stream; + stream << expression; + std::string expressionAsString = stream.str(); + + if (quotientStateLabeling.containsLabel(expressionAsString)) { + STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); + } else { + quotientStateLabeling.addLabel(stream.str(), sparseExtractor.extractStates(model.getStates(expression), partition)); + std::cout << stream.str() << ": " << quotientStateLabeling.getStates(stream.str()).getNumberOfSetBits() << std::endl; + } + } + + + std::shared_ptr> result; + if (model.getType() == storm::models::ModelType::Dtmc) { + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + } else if (model.getType() == storm::models::ModelType::Ctmc) { + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + } + + return result; } template @@ -65,10 +550,14 @@ namespace storm { } storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); + auto start = std::chrono::high_resolution_clock::now(); storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); + auto end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); + start = std::chrono::high_resolution_clock::now(); storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()); storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables()); @@ -90,7 +579,9 @@ namespace storm { preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); } } - + end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + if (modelType == storm::models::ModelType::Dtmc) { return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); } else { diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.h b/src/storm/storage/dd/bisimulation/QuotientExtractor.h index eb6cbef4b..14b518016 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.h +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.h @@ -5,6 +5,7 @@ #include "storm/storage/dd/DdType.h" #include "storm/models/symbolic/Model.h" +#include "storm/models/sparse/Model.h" #include "storm/storage/dd/bisimulation/Partition.h" @@ -19,10 +20,10 @@ namespace storm { public: QuotientExtractor(); - std::shared_ptr> extract(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extract(storm::models::symbolic::Model const& model, Partition const& partition); private: - std::shared_ptr> extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition); std::shared_ptr> extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition); std::shared_ptr> extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition); diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.h b/src/storm/storage/dd/cudd/InternalCuddAdd.h index 8e7c1a34f..b37499898 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.h @@ -595,7 +595,6 @@ namespace storm { InternalDdManager const& getInternalDdManager() const; - private: /*! * Retrieves the CUDD ADD object associated with this ADD. * @@ -610,6 +609,7 @@ namespace storm { */ DdNode* getCuddDdNode() const; + private: /*! * Performs a recursive step to perform the given function between the given DD-based vector and the given * explicit vector. diff --git a/src/storm/storage/dd/cudd/InternalCuddBdd.h b/src/storm/storage/dd/cudd/InternalCuddBdd.h index 3ca4f47d7..005404e8e 100644 --- a/src/storm/storage/dd/cudd/InternalCuddBdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddBdd.h @@ -387,7 +387,6 @@ namespace storm { friend struct std::hash>; - private: /*! * Retrieves the CUDD BDD object associated with this DD. * @@ -402,6 +401,7 @@ namespace storm { */ DdNode* getCuddDdNode() const; + private: /*! * Builds a BDD representing the values that make the given filter function evaluate to true. * diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h index 86f76ed3f..8ecc880e5 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h @@ -605,6 +605,13 @@ namespace storm { */ sylvan::Mtbdd getSylvanMtbdd() const; + /*! + * Retrieves the value of the given node (that must be a leaf). + * + * @return The value of the leaf. + */ + static ValueType getValue(MTBDD const& node); + private: /*! * Recursively builds the ODD from an ADD. @@ -733,13 +740,6 @@ namespace storm { static MTBDD getLeaf(storm::RationalFunction const& value); #endif - /*! - * Retrieves the value of the given node (that must be a leaf). - * - * @return The value of the leaf. - */ - static ValueType getValue(MTBDD const& node); - // The manager responsible for this MTBDD. InternalDdManager const* ddManager; diff --git a/src/storm/transformer/SymbolicToSparseTransformer.cpp b/src/storm/transformer/SymbolicToSparseTransformer.cpp index ec026968f..448bbcd39 100644 --- a/src/storm/transformer/SymbolicToSparseTransformer.cpp +++ b/src/storm/transformer/SymbolicToSparseTransformer.cpp @@ -29,6 +29,7 @@ namespace storm { template std::shared_ptr> SymbolicDtmcToSparseDtmcTransformer::translate(storm::models::symbolic::Dtmc const& symbolicDtmc) { + this->odd = symbolicDtmc.getReachableStates().createOdd(); storm::storage::SparseMatrix transitionMatrix = symbolicDtmc.getTransitionMatrix().toMatrix(this->odd, this->odd); std::unordered_map> rewardModels; diff --git a/src/storm/utility/storm.h b/src/storm/utility/storm.h index a913917be..614759395 100644 --- a/src/storm/utility/storm.h +++ b/src/storm/utility/storm.h @@ -194,7 +194,7 @@ namespace storm { if (storm::settings::getModule().isBisimulationSet()) { storm::dd::BisimulationDecomposition decomposition(*result, formulas); decomposition.compute(); - result = decomposition.getQuotient(); + result = std::dynamic_pointer_cast>(decomposition.getQuotient()); } return result; From 8a01765005d5a60a2a91b299976c3463c00f1e56 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 23 Jul 2017 18:43:10 +0200 Subject: [PATCH 06/95] enabling symbolic bisimulation from cli --- src/storm/api/bisimulation.h | 18 ++++++++++++++++++ src/storm/cli/cli.cpp | 19 ++++++++++++++++++- src/storm/storage/SparseMatrix.cpp | 5 ++--- .../dd/bisimulation/QuotientExtractor.cpp | 7 ------- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/storm/api/bisimulation.h b/src/storm/api/bisimulation.h index be95e335d..ac8797fc8 100644 --- a/src/storm/api/bisimulation.h +++ b/src/storm/api/bisimulation.h @@ -3,6 +3,9 @@ #include "storm/storage/bisimulation/DeterministicModelBisimulationDecomposition.h" #include "storm/storage/bisimulation/NondeterministicModelBisimulationDecomposition.h" +#include "storm/storage/dd/DdType.h" +#include "storm/storage/dd/BisimulationDecomposition.h" + #include "storm/utility/macros.h" #include "storm/exceptions/NotSupportedException.h" @@ -51,5 +54,20 @@ namespace storm { } } + template + typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas) { + STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc), storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is currently only available for DTMCs and CTMCs."); + + storm::dd::BisimulationDecomposition decomposition(*model, formulas); + decomposition.compute(); + return decomposition.getQuotient(); + } + + template + typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas) { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is not supported for this combination of DD library and value type."); + return nullptr; + } + } } diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index 343006c6d..7a1ef8066 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -480,9 +480,26 @@ namespace storm { } } + template + std::shared_ptr> preprocessDdModelBisimulation(std::shared_ptr> const& model, SymbolicInput const& input, storm::settings::modules::BisimulationSettings const& bisimulationSettings) { + STORM_LOG_WARN_COND(!bisimulationSettings.isWeakBisimulationSet(), "Weak bisimulation is currently not supported on DDs. Falling back to strong bisimulation."); + + STORM_LOG_INFO("Performing bisimulation minimization..."); + return storm::api::performBisimulationMinimization(model, createFormulasToRespect(input.properties)); + } + template std::pair, bool> preprocessDdModel(std::shared_ptr> const& model, SymbolicInput const& input) { - return std::make_pair(model, false); + auto bisimulationSettings = storm::settings::getModule(); + auto generalSettings = storm::settings::getModule(); + std::pair>, bool> result = std::make_pair(model, false); + + if (generalSettings.isBisimulationSet()) { + result.first = preprocessDdModelBisimulation(model, input, bisimulationSettings); + result.second = true; + } + + return result; } template diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 9e779c108..7e239c14e 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -135,9 +135,8 @@ namespace storm { bool fixCurrentRow = row == lastRow && column < lastColumn; // If the element is in the same row and column as the previous entry, we add them up. - if (row == lastRow && column == lastColumn) { - columnsAndValues.back().setColumn(column); - columnsAndValues.back().setValue(value); + if (row == lastRow && column == lastColumn && !columnsAndValues.empty()) { + columnsAndValues.back().setValue(columnsAndValues.back().getValue() + value); } else { // If we switched to another row, we have to adjust the missing entries in the row indices vector. if (row != lastRow) { diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index a59eed3bd..aee570395 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -492,17 +492,12 @@ namespace storm { InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables()); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); - std::cout << "Matrix has " << quotientTransitionMatrix.getEntryCount() << " entries" << std::endl; - storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); quotientStateLabeling.addLabel("init", sparseExtractor.extractStates(model.getInitialStates(), partition)); - std::cout << "init: " << quotientStateLabeling.getStates("init").getNumberOfSetBits() << std::endl; quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); - std::cout << "deadlock: " << quotientStateLabeling.getStates("init").getNumberOfSetBits() << std::endl; for (auto const& label : partition.getPreservationInformation().getLabels()) { quotientStateLabeling.addLabel(label, sparseExtractor.extractStates(model.getStates(label), partition)); - std::cout << label << ": " << quotientStateLabeling.getStates(label).getNumberOfSetBits() << std::endl; } for (auto const& expression : partition.getPreservationInformation().getExpressions()) { std::stringstream stream; @@ -513,11 +508,9 @@ namespace storm { STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); } else { quotientStateLabeling.addLabel(stream.str(), sparseExtractor.extractStates(model.getStates(expression), partition)); - std::cout << stream.str() << ": " << quotientStateLabeling.getStates(stream.str()).getNumberOfSetBits() << std::endl; } } - std::shared_ptr> result; if (model.getType() == storm::models::ModelType::Dtmc) { result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); From 4c3a409961db152f514af5dd27f3ee8487c96534 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 24 Jul 2017 23:02:43 +0200 Subject: [PATCH 07/95] readd sparsepp in new version --- resources/3rdparty/sparsepp/.gitignore | 47 + resources/3rdparty/sparsepp/.travis.yml | 14 + resources/3rdparty/sparsepp/CHANGELOG.md | 16 + resources/3rdparty/sparsepp/LICENSE | 0 resources/3rdparty/sparsepp/README.md | 14 +- resources/3rdparty/sparsepp/bench.md | 0 resources/3rdparty/sparsepp/docs/.gitignore | 0 .../3rdparty/sparsepp/examples/emplace.cc | 128 + .../3rdparty/sparsepp/examples/hash_std.cc | 47 + resources/3rdparty/sparsepp/examples/makefile | 18 + .../sparsepp/examples/serialize_file.cc | 82 + .../sparsepp/examples/serialize_large.cc | 97 + .../sparsepp/examples/serialize_stream.cc | 64 + .../vsprojects/serialize_stream.vcxproj | 172 + .../serialize_stream.vcxproj.filters | 13 + .../examples/vsprojects/spp_examples.sln | 28 + resources/3rdparty/sparsepp/sparsepp/spp.h | 4347 +++++++++++++++++ .../3rdparty/sparsepp/sparsepp/spp_config.h | 781 +++ .../3rdparty/sparsepp/sparsepp/spp_dlalloc.h | 4023 +++++++++++++++ .../3rdparty/sparsepp/sparsepp/spp_memory.h | 121 + .../3rdparty/sparsepp/sparsepp/spp_smartptr.h | 76 + .../3rdparty/sparsepp/sparsepp/spp_stdint.h | 16 + .../3rdparty/sparsepp/sparsepp/spp_timer.h | 58 + .../3rdparty/sparsepp/sparsepp/spp_traits.h | 122 + .../3rdparty/sparsepp/sparsepp/spp_utils.h | 447 ++ resources/3rdparty/sparsepp/spp.natvis | 41 + resources/3rdparty/sparsepp/tests/makefile | 27 + .../3rdparty/sparsepp/tests/perftest1.cc | 162 + .../3rdparty/sparsepp/tests/spp_alloc_test.cc | 189 + .../sparsepp/tests/spp_bitset_test.cc | 284 ++ resources/3rdparty/sparsepp/tests/spp_test.cc | 2988 +++++++++++ .../sparsepp/tests/vsprojects/spp.sln | 38 + .../tests/vsprojects/spp_alloc_test.vcxproj | 176 + .../vsprojects/spp_alloc_test.vcxproj.filters | 28 + .../tests/vsprojects/spp_test.vcxproj | 175 + .../tests/vsprojects/spp_test.vcxproj.filters | 32 + 36 files changed, 14869 insertions(+), 2 deletions(-) create mode 100755 resources/3rdparty/sparsepp/.gitignore create mode 100755 resources/3rdparty/sparsepp/.travis.yml create mode 100755 resources/3rdparty/sparsepp/CHANGELOG.md mode change 100644 => 100755 resources/3rdparty/sparsepp/LICENSE mode change 100644 => 100755 resources/3rdparty/sparsepp/README.md mode change 100644 => 100755 resources/3rdparty/sparsepp/bench.md mode change 100644 => 100755 resources/3rdparty/sparsepp/docs/.gitignore create mode 100755 resources/3rdparty/sparsepp/examples/emplace.cc create mode 100755 resources/3rdparty/sparsepp/examples/hash_std.cc create mode 100755 resources/3rdparty/sparsepp/examples/makefile create mode 100755 resources/3rdparty/sparsepp/examples/serialize_file.cc create mode 100755 resources/3rdparty/sparsepp/examples/serialize_large.cc create mode 100755 resources/3rdparty/sparsepp/examples/serialize_stream.cc create mode 100755 resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj create mode 100755 resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj.filters create mode 100755 resources/3rdparty/sparsepp/examples/vsprojects/spp_examples.sln create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_config.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_dlalloc.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_memory.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_smartptr.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_stdint.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_timer.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_traits.h create mode 100755 resources/3rdparty/sparsepp/sparsepp/spp_utils.h create mode 100755 resources/3rdparty/sparsepp/spp.natvis create mode 100755 resources/3rdparty/sparsepp/tests/makefile create mode 100755 resources/3rdparty/sparsepp/tests/perftest1.cc create mode 100755 resources/3rdparty/sparsepp/tests/spp_alloc_test.cc create mode 100755 resources/3rdparty/sparsepp/tests/spp_bitset_test.cc create mode 100755 resources/3rdparty/sparsepp/tests/spp_test.cc create mode 100755 resources/3rdparty/sparsepp/tests/vsprojects/spp.sln create mode 100755 resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj create mode 100755 resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj.filters create mode 100755 resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj create mode 100755 resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj.filters diff --git a/resources/3rdparty/sparsepp/.gitignore b/resources/3rdparty/sparsepp/.gitignore new file mode 100755 index 000000000..cd2946ad7 --- /dev/null +++ b/resources/3rdparty/sparsepp/.gitignore @@ -0,0 +1,47 @@ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/resources/3rdparty/sparsepp/.travis.yml b/resources/3rdparty/sparsepp/.travis.yml new file mode 100755 index 000000000..c8d240b98 --- /dev/null +++ b/resources/3rdparty/sparsepp/.travis.yml @@ -0,0 +1,14 @@ +language: cpp + +os: + - linux + - osx + +compiler: + - clang + - gcc + +dist: trusty +sudo: false + +script: cd tests && make && make test diff --git a/resources/3rdparty/sparsepp/CHANGELOG.md b/resources/3rdparty/sparsepp/CHANGELOG.md new file mode 100755 index 000000000..c491ed950 --- /dev/null +++ b/resources/3rdparty/sparsepp/CHANGELOG.md @@ -0,0 +1,16 @@ +# 0.95 + +* not single header anymore (this was just too much of a hassle). +* custom allocator not quite ready yet. Checked in, but still using old allocator (easy to toggle - line 15 of spp_config.h) + + +# 0.90 + +* stable release (single header) +* known issues: + - memory usage can be excessive in Windows + + sparsepp has a very simple default allocator based on the system malloc/realloc/free implementation, + and the default Windows realloc() appears to fragment the memory, causing significantly higher + memory usage than on linux. To solve this issue, I am working on a new allocator which will + remedy the problem. diff --git a/resources/3rdparty/sparsepp/LICENSE b/resources/3rdparty/sparsepp/LICENSE old mode 100644 new mode 100755 diff --git a/resources/3rdparty/sparsepp/README.md b/resources/3rdparty/sparsepp/README.md old mode 100644 new mode 100755 index 224bb5175..7cf36b83e --- a/resources/3rdparty/sparsepp/README.md +++ b/resources/3rdparty/sparsepp/README.md @@ -98,6 +98,16 @@ These classes provide the same interface as std::unordered_map and std::unordere - Since items are not grouped into buckets, Bucket APIs have been adapted: `max_bucket_count` is equivalent to `max_size`, and `bucket_count` returns the sparsetable size, which is normally at least twice the number of items inserted into the hash_map. +## Memory allocator on Windows (when building with Visual Studio) + +When building with the Microsoft compiler, we provide a custom allocator because the default one (from the Visual C++ runtime) fragments memory when reallocating. + +This is desirable *only* when creating large sparsepp hash maps. If you create lots of small hash_maps, memory usage may increase instead of decreasing as expected. The reason is that, for each instance of a hash_map, the custom memory allocator creates a new memory space to allocate from, which is typically 4K, so it may be a big waste if just a few items are allocated. + +In order to use the custom spp allocator, define the following preprocessor variable before including ``: + +`#define SPP_USE_SPP_ALLOC 1` + ## Integer keys, and other hash function considerations. 1. For basic integer types, sparsepp provides a default hash function which does some mixing of the bits of the keys (see [Integer Hashing](http://burtleburtle.net/bob/hash/integer.html)). This prevents a pathological case where inserted keys are sequential (1, 2, 3, 4, ...), and the lookup on non-present keys becomes very slow. @@ -229,7 +239,7 @@ This support is implemented in the following APIs: bool unserialize(Serializer serializer, INPUT *stream); ``` -The following example demontrates how a simple sparse_hash_map can be written to a file, and then read back. The serializer we use read and writes to a file using the stdio APIs, but it would be equally simple to write a serialized using the stream APIS: +The following example demonstrates how a simple sparse_hash_map can be written to a file, and then read back. The serializer we use read and writes to a file using the stdio APIs, but it would be equally simple to write a serialized using the stream APIS: ```c++ #include @@ -319,7 +329,7 @@ int main(int argc, char* argv[]) ## Thread safety -Sparsepp follows the trade safety rules of the Standard C++ library. In Particular: +Sparsepp follows the thread safety rules of the Standard C++ library. In Particular: - A single sparsepp hash table is thread safe for reading from multiple threads. For example, given a hash table A, it is safe to read A from thread 1 and from thread 2 simultaneously. diff --git a/resources/3rdparty/sparsepp/bench.md b/resources/3rdparty/sparsepp/bench.md old mode 100644 new mode 100755 diff --git a/resources/3rdparty/sparsepp/docs/.gitignore b/resources/3rdparty/sparsepp/docs/.gitignore old mode 100644 new mode 100755 diff --git a/resources/3rdparty/sparsepp/examples/emplace.cc b/resources/3rdparty/sparsepp/examples/emplace.cc new file mode 100755 index 000000000..e4c04dcfd --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/emplace.cc @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace patch +{ + template std::string to_string(const T& n) + { + std::ostringstream stm; + stm << n; + return stm.str(); + } +} + +#if defined(SPP_NO_CXX11_RVALUE_REFERENCES) + #warning "problem: we expect spp will detect we have rvalue support" +#endif + +template +using milliseconds = std::chrono::duration; + +class custom_type +{ + std::string one = "one"; + std::string two = "two"; + std::uint32_t three = 3; + std::uint64_t four = 4; + std::uint64_t five = 5; +public: + custom_type() = default; + // Make object movable and non-copyable + custom_type(custom_type &&) = default; + custom_type& operator=(custom_type &&) = default; + // should be automatically deleted per http://www.slideshare.net/ripplelabs/howard-hinnant-accu2014 + //custom_type(custom_type const&) = delete; + //custom_type& operator=(custom_type const&) = delete; +}; + +void test(std::size_t iterations, std::size_t container_size) +{ + std::clog << "bench: iterations: " << iterations << " / container_size: " << container_size << "\n"; + { + std::size_t count = 0; + auto t1 = std::chrono::high_resolution_clock::now(); + for (std::size_t i=0; i m; + m.reserve(container_size); + for (std::size_t j=0; j(t2 - t1).count(); + if (count != iterations*container_size) + std::clog << " invalid count: " << count << "\n"; + std::clog << " std::unordered_map: " << std::fixed << int(elapsed) << " ms\n"; + } + + { + std::size_t count = 0; + auto t1 = std::chrono::high_resolution_clock::now(); + for (std::size_t i=0; i m; + for (std::size_t j=0; j(t2 - t1).count(); + if (count != iterations*container_size) + std::clog << " invalid count: " << count << "\n"; + std::clog << " std::map: " << std::fixed << int(elapsed) << " ms\n"; + } + + { + std::size_t count = 0; + auto t1 = std::chrono::high_resolution_clock::now(); + for (std::size_t i=0; i> m; + m.reserve(container_size); + for (std::size_t j=0; j(t2 - t1).count(); + if (count != iterations*container_size) + std::clog << " invalid count: " << count << "\n"; + std::clog << " std::vector: " << std::fixed << int(elapsed) << " ms\n"; + } + + { + std::size_t count = 0; + auto t1 = std::chrono::high_resolution_clock::now(); + for (std::size_t i=0; i m; + m.reserve(container_size); + for (std::size_t j=0; j(t2 - t1).count(); + if (count != iterations*container_size) + std::clog << " invalid count: " << count << "\n"; + std::clog << " spp::sparse_hash_map: " << std::fixed << int(elapsed) << " ms\n"; + } + +} + +int main() +{ + std::size_t iterations = 100000; + + test(iterations,1); + test(iterations,10); + test(iterations,50); +} diff --git a/resources/3rdparty/sparsepp/examples/hash_std.cc b/resources/3rdparty/sparsepp/examples/hash_std.cc new file mode 100755 index 000000000..e0738df58 --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/hash_std.cc @@ -0,0 +1,47 @@ +#include +#include +#include + +using std::string; + +struct Person +{ + bool operator==(const Person &o) const + { + return _first == o._first && _last == o._last; + } + + string _first; + string _last; +}; + +namespace std +{ +// inject specialization of std::hash for Person into namespace std +// ---------------------------------------------------------------- +template<> +struct hash +{ + std::size_t operator()(Person const &p) const + { + std::size_t seed = 0; + spp::hash_combine(seed, p._first); + spp::hash_combine(seed, p._last); + return seed; + } +}; +} + +int main() +{ + // As we have defined a specialization of std::hash() for Person, + // we can now create sparse_hash_set or sparse_hash_map of Persons + // ---------------------------------------------------------------- + spp::sparse_hash_set persons = + { { "John", "Galt" }, + { "Jane", "Doe" } + }; + + for (auto& p: persons) + std::cout << p._first << ' ' << p._last << '\n'; +} diff --git a/resources/3rdparty/sparsepp/examples/makefile b/resources/3rdparty/sparsepp/examples/makefile new file mode 100755 index 000000000..979a10fb9 --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/makefile @@ -0,0 +1,18 @@ +CXXFLAGS = -O2 -std=c++11 -I.. +CXXFLAGS += -Wall -pedantic -Wextra -D_XOPEN_SOURCE=700 +SPP_DEPS_1 = spp.h spp_utils.h spp_dlalloc.h spp_traits.h spp_config.h +SPP_DEPS = $(addprefix ../sparsepp/,$(SPP_DEPS_1)) +TARGETS = emplace hash_std serialize_file serialize_stream serialize_large + +ifeq ($(OS),Windows_NT) + LDFLAGS = -lpsapi +endif + +all: $(TARGETS) + +clean: + rm -f $(TARGETS) ages.dmp data.dat vsprojects/x64/* vsprojects/x86/* + +%: %.cc $(SPP_DEPS) makefile + $(CXX) $(CXXFLAGS) -DNDEBUG $< -o $@ $(LDFLAGS) + diff --git a/resources/3rdparty/sparsepp/examples/serialize_file.cc b/resources/3rdparty/sparsepp/examples/serialize_file.cc new file mode 100755 index 000000000..b682b6f9e --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/serialize_file.cc @@ -0,0 +1,82 @@ +#include +#include + +using spp::sparse_hash_map; +using namespace std; + +class FileSerializer +{ +public: + // serialize basic types to FILE + // ----------------------------- + template + bool operator()(FILE *fp, const T& value) + { + return fwrite((const void *)&value, sizeof(value), 1, fp) == 1; + } + + template + bool operator()(FILE *fp, T* value) + { + return fread((void *)value, sizeof(*value), 1, fp) == 1; + } + + // serialize std::string to FILE + // ----------------------------- + bool operator()(FILE *fp, const string& value) + { + const size_t size = value.size(); + return (*this)(fp, size) && fwrite(value.c_str(), size, 1, fp) == 1; + } + + bool operator()(FILE *fp, string* value) + { + size_t size; + if (!(*this)(fp, &size)) + return false; + char* buf = new char[size]; + if (fread(buf, size, 1, fp) != 1) + { + delete [] buf; + return false; + } + new (value) string(buf, (size_t)size); + delete[] buf; + return true; + } + + // serialize std::pair to FILE - needed for maps + // --------------------------------------------------------- + template + bool operator()(FILE *fp, const std::pair& value) + { + return (*this)(fp, value.first) && (*this)(fp, value.second); + } + + template + bool operator()(FILE *fp, std::pair *value) + { + return (*this)(fp, (A *)&value->first) && (*this)(fp, &value->second); + } +}; + +int main(int, char* []) +{ + sparse_hash_map age{ { "John", 12 }, {"Jane", 13 }, { "Fred", 8 } }; + + // serialize age hash_map to "ages.dmp" file + FILE *out = fopen("ages.dmp", "wb"); + age.serialize(FileSerializer(), out); + fclose(out); + + sparse_hash_map age_read; + + // read from "ages.dmp" file into age_read hash_map + FILE *input = fopen("ages.dmp", "rb"); + age_read.unserialize(FileSerializer(), input); + fclose(input); + + // print out contents of age_read to verify correct serialization + for (auto& v : age_read) + printf("age_read: %s -> %d\n", v.first.c_str(), v.second); +} diff --git a/resources/3rdparty/sparsepp/examples/serialize_large.cc b/resources/3rdparty/sparsepp/examples/serialize_large.cc new file mode 100755 index 000000000..574d34b13 --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/serialize_large.cc @@ -0,0 +1,97 @@ +#include +#include +#include +#include +#include +#include +#include + +using spp::sparse_hash_map; +using namespace std; + +class FileSerializer +{ +public: + // serialize basic types to FILE + // ----------------------------- + template + bool operator()(FILE *fp, const T& value) + { + return fwrite((const void *)&value, sizeof(value), 1, fp) == 1; + } + + template + bool operator()(FILE *fp, T* value) + { + return fread((void *)value, sizeof(*value), 1, fp) == 1; + } + + // serialize std::string to FILE + // ----------------------------- + bool operator()(FILE *fp, const string& value) + { + const size_t size = value.size(); + return (*this)(fp, size) && fwrite(value.c_str(), size, 1, fp) == 1; + } + + bool operator()(FILE *fp, string* value) + { + size_t size; + if (!(*this)(fp, &size)) + return false; + char* buf = new char[size]; + if (fread(buf, size, 1, fp) != 1) + { + delete [] buf; + return false; + } + new (value) string(buf, (size_t)size); + delete[] buf; + return true; + } + + // serialize std::pair to FILE - needed for maps + // --------------------------------------------------------- + template + bool operator()(FILE *fp, const std::pair& value) + { + return (*this)(fp, value.first) && (*this)(fp, value.second); + } + + template + bool operator()(FILE *fp, std::pair *value) + { + return (*this)(fp, (A *)&value->first) && (*this)(fp, &value->second); + } +}; + +float _to_gb(uint64_t m) { return (float)((double)m / (1024 * 1024 * 1024)); } + +int main(int, char* []) +{ + sparse_hash_map age; + + for (size_t i=0; i<10000000; ++i) + { + char buff[20]; + sprintf(buff, "%zu", i); + age.insert(std::make_pair(std::string(buff), i)); + } + + printf("before serialize(): mem_usage %4.1f GB\n", _to_gb(spp::GetProcessMemoryUsed())); + // serialize age hash_map to "ages.dmp" file + FILE *out = fopen("ages.dmp", "wb"); + age.serialize(FileSerializer(), out); + fclose(out); + + printf("before clear(): mem_usage %4.1f GB\n", _to_gb(spp::GetProcessMemoryUsed())); + age.clear(); + printf("after clear(): mem_usage %4.1f GB\n", _to_gb(spp::GetProcessMemoryUsed())); + + + // read from "ages.dmp" file into age_read hash_map + FILE *input = fopen("ages.dmp", "rb"); + age.unserialize(FileSerializer(), input); + fclose(input); + printf("after unserialize(): mem_usage %4.1f GB\n", _to_gb(spp::GetProcessMemoryUsed())); +} diff --git a/resources/3rdparty/sparsepp/examples/serialize_stream.cc b/resources/3rdparty/sparsepp/examples/serialize_stream.cc new file mode 100755 index 000000000..db65e456e --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/serialize_stream.cc @@ -0,0 +1,64 @@ +#include +#include +#include + +#include +using spp::sparse_hash_map; + +using namespace std; + +struct StringToIntSerializer +{ + bool operator()(std::ofstream* stream, const std::pair& value) const + { + size_t sizeSecond = sizeof(value.second); + size_t sizeFirst = value.first.size(); + stream->write((char*)&sizeFirst, sizeof(sizeFirst)); + stream->write(value.first.c_str(), sizeFirst); + stream->write((char*)&value.second, sizeSecond); + return true; + } + + bool operator()(std::ifstream* istream, std::pair* value) const + { + // Read key + size_t size = 0; + istream->read((char*)&size, sizeof(size)); + char * first = new char[size]; + istream->read(first, size); + new (const_cast(&value->first)) string(first, size); + + // Read value + istream->read((char *)&value->second, sizeof(value->second)); + return true; + } +}; + +int main(int , char* []) +{ + sparse_hash_map users; + + users["John"] = 12345; + users["Bob"] = 553; + users["Alice"] = 82200; + + // Write users to file "data.dat" + // ------------------------------ + std::ofstream* stream = new std::ofstream("data.dat", + std::ios::out | std::ios::trunc | std::ios::binary); + users.serialize(StringToIntSerializer(), stream); + stream->close(); + delete stream; + + // Read from file "data.dat" into users2 + // ------------------------------------- + sparse_hash_map users2; + std::ifstream* istream = new std::ifstream("data.dat"); + users2.unserialize(StringToIntSerializer(), istream); + istream->close(); + delete istream; + + for (sparse_hash_map::iterator it = users2.begin(); it != users2.end(); ++it) + printf("users2: %s -> %d\n", it->first.c_str(), it->second); + +} diff --git a/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj b/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj new file mode 100755 index 000000000..63b159bcb --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj @@ -0,0 +1,172 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + {19BC4240-15ED-4C76-BC57-34BB70FE163B} + Win32Proj + 8.1 + serialize_stream + + + + Application + v140 + MultiByte + + + Application + MultiByte + v140 + + + Application + v140 + MultiByte + + + Application + v140 + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>14.0.23107.0 + + + None + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + $(OutDir)spp_alloc_test.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + $(OutDir)spp_alloc_test.pdb + Console + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + Console + true + true + MachineX86 + true + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj.filters b/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj.filters new file mode 100755 index 000000000..39ecd7689 --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/vsprojects/serialize_stream.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {ba5fa1b8-1783-4b3b-9a41-31d363b52841} + + + + + Header Files + + + \ No newline at end of file diff --git a/resources/3rdparty/sparsepp/examples/vsprojects/spp_examples.sln b/resources/3rdparty/sparsepp/examples/vsprojects/spp_examples.sln new file mode 100755 index 000000000..a37d41277 --- /dev/null +++ b/resources/3rdparty/sparsepp/examples/vsprojects/spp_examples.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serialize_stream", "serialize_stream.vcxproj", "{19BC4240-15ED-4C76-BC57-34BB70FE163B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x64.ActiveCfg = Debug|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x64.Build.0 = Debug|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x86.ActiveCfg = Debug|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x86.Build.0 = Debug|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x64.ActiveCfg = Release|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x64.Build.0 = Release|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x86.ActiveCfg = Release|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/resources/3rdparty/sparsepp/sparsepp/spp.h b/resources/3rdparty/sparsepp/sparsepp/spp.h new file mode 100755 index 000000000..abd4295e9 --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp.h @@ -0,0 +1,4347 @@ +#if !defined(sparsepp_h_guard_) +#define sparsepp_h_guard_ + + +// ---------------------------------------------------------------------- +// Copyright (c) 2016, Gregory Popovitch - greg7mdp@gmail.com +// All rights reserved. +// +// This work is derived from Google's sparsehash library +// +// Copyright (c) 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// ---------------------------------------------------------------------- + + +// some macros for portability +// --------------------------- +// includes +// -------- +#include +#include +#include +#include // for numeric_limits +#include // For swap(), eg +#include // for iterator tags +#include // for equal_to<>, select1st<>, std::unary_function, etc +#include // for alloc, uninitialized_copy, uninitialized_fill +#include // for malloc/realloc/free +#include // for ptrdiff_t +#include // for placement new +#include // For length_error +#include // for pair<> +#include +#include +#include + +#include // includes spp_config.h +#include +#include + +#ifdef SPP_INCLUDE_SPP_ALLOC + #include +#endif + +#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) + #include +#endif + +#if (SPP_GROUP_SIZE == 32) + #define SPP_SHIFT_ 5 + #define SPP_MASK_ 0x1F + typedef uint32_t group_bm_type; +#elif (SPP_GROUP_SIZE == 64) + #define SPP_SHIFT_ 6 + #define SPP_MASK_ 0x3F + typedef uint64_t group_bm_type; +#else + #error "SPP_GROUP_SIZE must be either 32 or 64" +#endif + +namespace spp_ { + +// ---------------------------------------------------------------------- +// U T I L F U N C T I O N S +// ---------------------------------------------------------------------- +template +inline void throw_exception(const E& exception) +{ +#if !defined(SPP_NO_EXCEPTIONS) + throw exception; +#else + assert(0); + abort(); +#endif +} + +// ---------------------------------------------------------------------- +// M U T A B L E P A I R H A C K +// turn std::pair into mutable std::pair +// ---------------------------------------------------------------------- +template +struct cvt +{ + typedef T type; +}; + +template +struct cvt > +{ + typedef std::pair type; +}; + +template +struct cvt > +{ + typedef const std::pair type; +}; + +// ---------------------------------------------------------------------- +// M O V E I T E R A T O R +// ---------------------------------------------------------------------- +#ifdef SPP_NO_CXX11_RVALUE_REFERENCES + #define MK_MOVE_IT(p) (p) +#else + #define MK_MOVE_IT(p) std::make_move_iterator(p) +#endif + + +// ---------------------------------------------------------------------- +// I N T E R N A L S T U F F +// ---------------------------------------------------------------------- +#ifdef SPP_NO_CXX11_STATIC_ASSERT + template struct SppCompileAssert { }; + #define SPP_COMPILE_ASSERT(expr, msg) \ + SPP_ATTRIBUTE_UNUSED typedef SppCompileAssert<(bool(expr))> spp_bogus_[bool(expr) ? 1 : -1] +#else + #define SPP_COMPILE_ASSERT static_assert +#endif + +namespace sparsehash_internal +{ + +// Adaptor methods for reading/writing data from an INPUT or OUPTUT +// variable passed to serialize() or unserialize(). For now we +// have implemented INPUT/OUTPUT for FILE*, istream*/ostream* (note +// they are pointers, unlike typical use), or else a pointer to +// something that supports a Read()/Write() method. +// +// For technical reasons, we implement read_data/write_data in two +// stages. The actual work is done in *_data_internal, which takes +// the stream argument twice: once as a template type, and once with +// normal type information. (We only use the second version.) We do +// this because of how C++ picks what function overload to use. If we +// implemented this the naive way: +// bool read_data(istream* is, const void* data, size_t length); +// template read_data(T* fp, const void* data, size_t length); +// C++ would prefer the second version for every stream type except +// istream. However, we want C++ to prefer the first version for +// streams that are *subclasses* of istream, such as istringstream. +// This is not possible given the way template types are resolved. So +// we split the stream argument in two, one of which is templated and +// one of which is not. The specialized functions (like the istream +// version above) ignore the template arg and use the second, 'type' +// arg, getting subclass matching as normal. The 'catch-all' +// functions (the second version above) use the template arg to deduce +// the type, and use a second, void* arg to achieve the desired +// 'catch-all' semantics. + + // ----- low-level I/O for FILE* ---- + + template + inline bool read_data_internal(Ignored* /*unused*/, FILE* fp, + void* data, size_t length) + { + return fread(data, length, 1, fp) == 1; + } + + template + inline bool write_data_internal(Ignored* /*unused*/, FILE* fp, + const void* data, size_t length) + { + return fwrite(data, length, 1, fp) == 1; + } + + // ----- low-level I/O for iostream ---- + + // We want the caller to be responsible for #including , not + // us, because iostream is a big header! According to the standard, + // it's only legal to delay the instantiation the way we want to if + // the istream/ostream is a template type. So we jump through hoops. + template + inline bool read_data_internal_for_istream(ISTREAM* fp, + void* data, size_t length) + { + return fp->read(reinterpret_cast(data), + static_cast(length)).good(); + } + template + inline bool read_data_internal(Ignored* /*unused*/, std::istream* fp, + void* data, size_t length) + { + return read_data_internal_for_istream(fp, data, length); + } + + template + inline bool write_data_internal_for_ostream(OSTREAM* fp, + const void* data, size_t length) + { + return fp->write(reinterpret_cast(data), + static_cast(length)).good(); + } + template + inline bool write_data_internal(Ignored* /*unused*/, std::ostream* fp, + const void* data, size_t length) + { + return write_data_internal_for_ostream(fp, data, length); + } + + // ----- low-level I/O for custom streams ---- + + // The INPUT type needs to support a Read() method that takes a + // buffer and a length and returns the number of bytes read. + template + inline bool read_data_internal(INPUT* fp, void* /*unused*/, + void* data, size_t length) + { + return static_cast(fp->Read(data, length)) == length; + } + + // The OUTPUT type needs to support a Write() operation that takes + // a buffer and a length and returns the number of bytes written. + template + inline bool write_data_internal(OUTPUT* fp, void* /*unused*/, + const void* data, size_t length) + { + return static_cast(fp->Write(data, length)) == length; + } + + // ----- low-level I/O: the public API ---- + + template + inline bool read_data(INPUT* fp, void* data, size_t length) + { + return read_data_internal(fp, fp, data, length); + } + + template + inline bool write_data(OUTPUT* fp, const void* data, size_t length) + { + return write_data_internal(fp, fp, data, length); + } + + // Uses read_data() and write_data() to read/write an integer. + // length is the number of bytes to read/write (which may differ + // from sizeof(IntType), allowing us to save on a 32-bit system + // and load on a 64-bit system). Excess bytes are taken to be 0. + // INPUT and OUTPUT must match legal inputs to read/write_data (above). + // -------------------------------------------------------------------- + template + bool read_bigendian_number(INPUT* fp, IntType* value, size_t length) + { + *value = 0; + unsigned char byte; + // We require IntType to be unsigned or else the shifting gets all screwy. + SPP_COMPILE_ASSERT(static_cast(-1) > static_cast(0), "serializing_int_requires_an_unsigned_type"); + for (size_t i = 0; i < length; ++i) + { + if (!read_data(fp, &byte, sizeof(byte))) + return false; + *value |= static_cast(byte) << ((length - 1 - i) * 8); + } + return true; + } + + template + bool write_bigendian_number(OUTPUT* fp, IntType value, size_t length) + { + unsigned char byte; + // We require IntType to be unsigned or else the shifting gets all screwy. + SPP_COMPILE_ASSERT(static_cast(-1) > static_cast(0), "serializing_int_requires_an_unsigned_type"); + for (size_t i = 0; i < length; ++i) + { + byte = (sizeof(value) <= length-1 - i) + ? static_cast(0) : static_cast((value >> ((length-1 - i) * 8)) & 255); + if (!write_data(fp, &byte, sizeof(byte))) return false; + } + return true; + } + + // If your keys and values are simple enough, you can pass this + // serializer to serialize()/unserialize(). "Simple enough" means + // value_type is a POD type that contains no pointers. Note, + // however, we don't try to normalize endianness. + // This is the type used for NopointerSerializer. + // --------------------------------------------------------------- + template struct pod_serializer + { + template + bool operator()(INPUT* fp, value_type* value) const + { + return read_data(fp, value, sizeof(*value)); + } + + template + bool operator()(OUTPUT* fp, const value_type& value) const + { + return write_data(fp, &value, sizeof(value)); + } + }; + + + // Settings contains parameters for growing and shrinking the table. + // It also packages zero-size functor (ie. hasher). + // + // It does some munging of the hash value for the cases where + // the original hash function is not be very good. + // --------------------------------------------------------------- + template + class sh_hashtable_settings : public HashFunc + { + private: +#ifndef SPP_MIX_HASH + template struct Mixer + { + inline T operator()(T h) const { return h; } + }; +#else + template struct Mixer + { + inline T operator()(T h) const; + }; + + template struct Mixer + { + inline T operator()(T h) const + { + // from Thomas Wang - https://gist.github.com/badboy/6267743 + // --------------------------------------------------------- + h = (h ^ 61) ^ (h >> 16); + h = h + (h << 3); + h = h ^ (h >> 4); + h = h * 0x27d4eb2d; + h = h ^ (h >> 15); + return h; + } + }; + + template struct Mixer + { + inline T operator()(T h) const + { + // from Thomas Wang - https://gist.github.com/badboy/6267743 + // --------------------------------------------------------- + h = (~h) + (h << 21); // h = (h << 21) - h - 1; + h = h ^ (h >> 24); + h = (h + (h << 3)) + (h << 8); // h * 265 + h = h ^ (h >> 14); + h = (h + (h << 2)) + (h << 4); // h * 21 + h = h ^ (h >> 28); + h = h + (h << 31); + return h; + } + }; +#endif + + public: + typedef Key key_type; + typedef HashFunc hasher; + typedef SizeType size_type; + + public: + sh_hashtable_settings(const hasher& hf, + const float ht_occupancy_flt, + const float ht_empty_flt) + : hasher(hf), + enlarge_threshold_(0), + shrink_threshold_(0), + consider_shrink_(false), + num_ht_copies_(0) + { + set_enlarge_factor(ht_occupancy_flt); + set_shrink_factor(ht_empty_flt); + } + + size_t hash(const key_type& v) const + { + size_t h = hasher::operator()(v); + Mixer mixer; + + return mixer(h); + } + + float enlarge_factor() const { return enlarge_factor_; } + void set_enlarge_factor(float f) { enlarge_factor_ = f; } + float shrink_factor() const { return shrink_factor_; } + void set_shrink_factor(float f) { shrink_factor_ = f; } + + size_type enlarge_threshold() const { return enlarge_threshold_; } + void set_enlarge_threshold(size_type t) { enlarge_threshold_ = t; } + size_type shrink_threshold() const { return shrink_threshold_; } + void set_shrink_threshold(size_type t) { shrink_threshold_ = t; } + + size_type enlarge_size(size_type x) const { return static_cast(x * enlarge_factor_); } + size_type shrink_size(size_type x) const { return static_cast(x * shrink_factor_); } + + bool consider_shrink() const { return consider_shrink_; } + void set_consider_shrink(bool t) { consider_shrink_ = t; } + + unsigned int num_ht_copies() const { return num_ht_copies_; } + void inc_num_ht_copies() { ++num_ht_copies_; } + + // Reset the enlarge and shrink thresholds + void reset_thresholds(size_type num_buckets) + { + set_enlarge_threshold(enlarge_size(num_buckets)); + set_shrink_threshold(shrink_size(num_buckets)); + // whatever caused us to reset already considered + set_consider_shrink(false); + } + + // Caller is resposible for calling reset_threshold right after + // set_resizing_parameters. + // ------------------------------------------------------------ + void set_resizing_parameters(float shrink, float grow) + { + assert(shrink >= 0); + assert(grow <= 1); + if (shrink > grow/2.0f) + shrink = grow / 2.0f; // otherwise we thrash hashtable size + set_shrink_factor(shrink); + set_enlarge_factor(grow); + } + + // This is the smallest size a hashtable can be without being too crowded + // If you like, you can give a min #buckets as well as a min #elts + // ---------------------------------------------------------------------- + size_type min_buckets(size_type num_elts, size_type min_buckets_wanted) + { + float enlarge = enlarge_factor(); + size_type sz = HT_MIN_BUCKETS; // min buckets allowed + while (sz < min_buckets_wanted || + num_elts >= static_cast(sz * enlarge)) + { + // This just prevents overflowing size_type, since sz can exceed + // max_size() here. + // ------------------------------------------------------------- + if (static_cast(sz * 2) < sz) + throw_exception(std::length_error("resize overflow")); // protect against overflow + sz *= 2; + } + return sz; + } + + private: + size_type enlarge_threshold_; // table.size() * enlarge_factor + size_type shrink_threshold_; // table.size() * shrink_factor + float enlarge_factor_; // how full before resize + float shrink_factor_; // how empty before resize + bool consider_shrink_; // if we should try to shrink before next insert + + unsigned int num_ht_copies_; // num_ht_copies is a counter incremented every Copy/Move + }; + +} // namespace sparsehash_internal + +#undef SPP_COMPILE_ASSERT + +// ---------------------------------------------------------------------- +// S P A R S E T A B L E +// ---------------------------------------------------------------------- +// +// A sparsetable is a random container that implements a sparse array, +// that is, an array that uses very little memory to store unassigned +// indices (in this case, between 1-2 bits per unassigned index). For +// instance, if you allocate an array of size 5 and assign a[2] = , then a[2] will take up a lot of memory but a[0], a[1], +// a[3], and a[4] will not. Array elements that have a value are +// called "assigned". Array elements that have no value yet, or have +// had their value cleared using erase() or clear(), are called +// "unassigned". +// +// Unassigned values seem to have the default value of T (see below). +// Nevertheless, there is a difference between an unassigned index and +// one explicitly assigned the value of T(). The latter is considered +// assigned. +// +// Access to an array element is constant time, as is insertion and +// deletion. Insertion and deletion may be fairly slow, however: +// because of this container's memory economy, each insert and delete +// causes a memory reallocation. +// +// NOTE: You should not test(), get(), or set() any index that is +// greater than sparsetable.size(). If you need to do that, call +// resize() first. +// +// --- Template parameters +// PARAMETER DESCRIPTION DEFAULT +// T The value of the array: the type of -- +// object that is stored in the array. +// +// Alloc: Allocator to use to allocate memory. +// +// --- Model of +// Random Access Container +// +// --- Type requirements +// T must be Copy Constructible. It need not be Assignable. +// +// --- Public base classes +// None. +// +// --- Members +// +// [*] All iterators are const in a sparsetable (though nonempty_iterators +// may not be). Use get() and set() to assign values, not iterators. +// +// [+] iterators are random-access iterators. nonempty_iterators are +// bidirectional iterators. + +// [*] If you shrink a sparsetable using resize(), assigned elements +// past the end of the table are removed using erase(). If you grow +// a sparsetable, new unassigned indices are created. +// +// [+] Note that operator[] returns a const reference. You must use +// set() to change the value of a table element. +// +// [!] Unassignment also calls the destructor. +// +// Iterators are invalidated whenever an item is inserted or +// deleted (ie set() or erase() is used) or when the size of +// the table changes (ie resize() or clear() is used). + + + +// --------------------------------------------------------------------------- +// Our iterator as simple as iterators can be: basically it's just +// the index into our table. Dereference, the only complicated +// thing, we punt to the table class. This just goes to show how +// much machinery STL requires to do even the most trivial tasks. +// +// A NOTE ON ASSIGNING: +// A sparse table does not actually allocate memory for entries +// that are not filled. Because of this, it becomes complicated +// to have a non-const iterator: we don't know, if the iterator points +// to a not-filled bucket, whether you plan to fill it with something +// or whether you plan to read its value (in which case you'll get +// the default bucket value). Therefore, while we can define const +// operations in a pretty 'normal' way, for non-const operations, we +// define something that returns a helper object with operator= and +// operator& that allocate a bucket lazily. We use this for table[] +// and also for regular table iterators. + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// Our iterator as simple as iterators can be: basically it's just +// the index into our table. Dereference, the only complicated +// thing, we punt to the table class. This just goes to show how +// much machinery STL requires to do even the most trivial tasks. +// +// By templatizing over tabletype, we have one iterator type which +// we can use for both sparsetables and sparsebins. In fact it +// works on any class that allows size() and operator[] (eg vector), +// as long as it does the standard STL typedefs too (eg value_type). + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +template +class table_iterator +{ +public: + typedef table_iterator iterator; + + typedef std::random_access_iterator_tag iterator_category; + typedef typename tabletype::value_type value_type; + typedef typename tabletype::difference_type difference_type; + typedef typename tabletype::size_type size_type; + + explicit table_iterator(tabletype *tbl = 0, size_type p = 0) : + table(tbl), pos(p) + { } + + // Helper function to assert things are ok; eg pos is still in range + void check() const + { + assert(table); + assert(pos <= table->size()); + } + + // Arithmetic: we just do arithmetic on pos. We don't even need to + // do bounds checking, since STL doesn't consider that its job. :-) + iterator& operator+=(size_type t) { pos += t; check(); return *this; } + iterator& operator-=(size_type t) { pos -= t; check(); return *this; } + iterator& operator++() { ++pos; check(); return *this; } + iterator& operator--() { --pos; check(); return *this; } + iterator operator++(int) + { + iterator tmp(*this); // for x++ + ++pos; check(); return tmp; + } + + iterator operator--(int) + { + iterator tmp(*this); // for x-- + --pos; check(); return tmp; + } + + iterator operator+(difference_type i) const + { + iterator tmp(*this); + tmp += i; return tmp; + } + + iterator operator-(difference_type i) const + { + iterator tmp(*this); + tmp -= i; return tmp; + } + + difference_type operator-(iterator it) const + { + // for "x = it2 - it" + assert(table == it.table); + return pos - it.pos; + } + + // Comparisons. + bool operator==(const iterator& it) const + { + return table == it.table && pos == it.pos; + } + + bool operator<(const iterator& it) const + { + assert(table == it.table); // life is bad bad bad otherwise + return pos < it.pos; + } + + bool operator!=(const iterator& it) const { return !(*this == it); } + bool operator<=(const iterator& it) const { return !(it < *this); } + bool operator>(const iterator& it) const { return it < *this; } + bool operator>=(const iterator& it) const { return !(*this < it); } + + // Here's the info we actually need to be an iterator + tabletype *table; // so we can dereference and bounds-check + size_type pos; // index into the table +}; + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +template +class const_table_iterator +{ +public: + typedef table_iterator iterator; + typedef const_table_iterator const_iterator; + + typedef std::random_access_iterator_tag iterator_category; + typedef typename tabletype::value_type value_type; + typedef typename tabletype::difference_type difference_type; + typedef typename tabletype::size_type size_type; + typedef typename tabletype::const_reference reference; // we're const-only + typedef typename tabletype::const_pointer pointer; + + // The "real" constructor + const_table_iterator(const tabletype *tbl, size_type p) + : table(tbl), pos(p) { } + + // The default constructor, used when I define vars of type table::iterator + const_table_iterator() : table(NULL), pos(0) { } + + // The copy constructor, for when I say table::iterator foo = tbl.begin() + // Also converts normal iterators to const iterators // not explicit on purpose + const_table_iterator(const iterator &from) + : table(from.table), pos(from.pos) { } + + // The default destructor is fine; we don't define one + // The default operator= is fine; we don't define one + + // The main thing our iterator does is dereference. If the table entry + // we point to is empty, we return the default value type. + reference operator*() const { return (*table)[pos]; } + pointer operator->() const { return &(operator*()); } + + // Helper function to assert things are ok; eg pos is still in range + void check() const + { + assert(table); + assert(pos <= table->size()); + } + + // Arithmetic: we just do arithmetic on pos. We don't even need to + // do bounds checking, since STL doesn't consider that its job. :-) + const_iterator& operator+=(size_type t) { pos += t; check(); return *this; } + const_iterator& operator-=(size_type t) { pos -= t; check(); return *this; } + const_iterator& operator++() { ++pos; check(); return *this; } + const_iterator& operator--() { --pos; check(); return *this; } + const_iterator operator++(int) + { + const_iterator tmp(*this); // for x++ + ++pos; check(); + return tmp; + } + const_iterator operator--(int) + { + const_iterator tmp(*this); // for x-- + --pos; check(); + return tmp; + } + const_iterator operator+(difference_type i) const + { + const_iterator tmp(*this); + tmp += i; + return tmp; + } + const_iterator operator-(difference_type i) const + { + const_iterator tmp(*this); + tmp -= i; + return tmp; + } + difference_type operator-(const_iterator it) const + { + // for "x = it2 - it" + assert(table == it.table); + return pos - it.pos; + } + reference operator[](difference_type n) const + { + return *(*this + n); // simple though not totally efficient + } + + // Comparisons. + bool operator==(const const_iterator& it) const + { + return table == it.table && pos == it.pos; + } + + bool operator<(const const_iterator& it) const + { + assert(table == it.table); // life is bad bad bad otherwise + return pos < it.pos; + } + bool operator!=(const const_iterator& it) const { return !(*this == it); } + bool operator<=(const const_iterator& it) const { return !(it < *this); } + bool operator>(const const_iterator& it) const { return it < *this; } + bool operator>=(const const_iterator& it) const { return !(*this < it); } + + // Here's the info we actually need to be an iterator + const tabletype *table; // so we can dereference and bounds-check + size_type pos; // index into the table +}; + +// --------------------------------------------------------------------------- +// This is a 2-D iterator. You specify a begin and end over a list +// of *containers*. We iterate over each container by iterating over +// it. It's actually simple: +// VECTOR.begin() VECTOR[0].begin() --------> VECTOR[0].end() ---, +// | ________________________________________________/ +// | \_> VECTOR[1].begin() --------> VECTOR[1].end() -, +// | ___________________________________________________/ +// v \_> ...... +// VECTOR.end() +// +// It's impossible to do random access on one of these things in constant +// time, so it's just a bidirectional iterator. +// +// Unfortunately, because we need to use this for a non-empty iterator, +// we use ne_begin() and ne_end() instead of begin() and end() +// (though only going across, not down). +// --------------------------------------------------------------------------- + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +template +class Two_d_iterator : public std::iterator +{ +public: + typedef Two_d_iterator iterator; + typedef T value_type; + + explicit Two_d_iterator(row_it curr) : row_current(curr), col_current(0) + { + if (row_current && !row_current->is_marked()) + { + col_current = row_current->ne_begin(); + advance_past_end(); // in case cur->begin() == cur->end() + } + } + + explicit Two_d_iterator(row_it curr, col_it col) : row_current(curr), col_current(col) + { + assert(col); + } + + // The default constructor + Two_d_iterator() : row_current(0), col_current(0) { } + + // Need this explicitly so we can convert normal iterators <=> const iterators + // not explicit on purpose + // --------------------------------------------------------------------------- + template + Two_d_iterator(const Two_d_iterator& it) : + row_current (*(row_it *)&it.row_current), + col_current (*(col_it *)&it.col_current) + { } + + // The default destructor is fine; we don't define one + // The default operator= is fine; we don't define one + + value_type& operator*() const { return *(col_current); } + value_type* operator->() const { return &(operator*()); } + + // Arithmetic: we just do arithmetic on pos. We don't even need to + // do bounds checking, since STL doesn't consider that its job. :-) + // NOTE: this is not amortized constant time! What do we do about it? + // ------------------------------------------------------------------ + void advance_past_end() + { + // used when col_current points to end() + while (col_current == row_current->ne_end()) + { + // end of current row + // ------------------ + ++row_current; // go to beginning of next + if (!row_current->is_marked()) // col is irrelevant at end + col_current = row_current->ne_begin(); + else + break; // don't go past row_end + } + } + + friend size_t operator-(iterator l, iterator f) + { + if (f.row_current->is_marked()) + return 0; + + size_t diff(0); + while (f != l) + { + ++diff; + ++f; + } + return diff; + } + + iterator& operator++() + { + // assert(!row_current->is_marked()); // how to ++ from there? + ++col_current; + advance_past_end(); // in case col_current is at end() + return *this; + } + + iterator& operator--() + { + while (row_current->is_marked() || + col_current == row_current->ne_begin()) + { + --row_current; + col_current = row_current->ne_end(); // this is 1 too far + } + --col_current; + return *this; + } + iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; } + iterator operator--(int) { iterator tmp(*this); --*this; return tmp; } + + + // Comparisons. + bool operator==(const iterator& it) const + { + return (row_current == it.row_current && + (!row_current || row_current->is_marked() || col_current == it.col_current)); + } + + bool operator!=(const iterator& it) const { return !(*this == it); } + + // Here's the info we actually need to be an iterator + // These need to be public so we convert from iterator to const_iterator + // --------------------------------------------------------------------- + row_it row_current; + col_it col_current; +}; + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +template +class Two_d_destructive_iterator : public Two_d_iterator +{ +public: + typedef Two_d_destructive_iterator iterator; + + Two_d_destructive_iterator(Alloc &alloc, row_it curr) : + _alloc(alloc) + { + this->row_current = curr; + this->col_current = 0; + if (this->row_current && !this->row_current->is_marked()) + { + this->col_current = this->row_current->ne_begin(); + advance_past_end(); // in case cur->begin() == cur->end() + } + } + + // Arithmetic: we just do arithmetic on pos. We don't even need to + // do bounds checking, since STL doesn't consider that its job. :-) + // NOTE: this is not amortized constant time! What do we do about it? + // ------------------------------------------------------------------ + void advance_past_end() + { + // used when col_current points to end() + while (this->col_current == this->row_current->ne_end()) + { + this->row_current->clear(_alloc, true); // This is what differs from non-destructive iterators above + + // end of current row + // ------------------ + ++this->row_current; // go to beginning of next + if (!this->row_current->is_marked()) // col is irrelevant at end + this->col_current = this->row_current->ne_begin(); + else + break; // don't go past row_end + } + } + + iterator& operator++() + { + // assert(!this->row_current->is_marked()); // how to ++ from there? + ++this->col_current; + advance_past_end(); // in case col_current is at end() + return *this; + } + +private: + Two_d_destructive_iterator& operator=(const Two_d_destructive_iterator &o); + + Alloc &_alloc; +}; + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +#if defined(SPP_POPCNT_CHECK) +static inline bool spp_popcount_check() +{ + int cpuInfo[4] = { -1 }; + spp_cpuid(cpuInfo, 1); + if (cpuInfo[2] & (1 << 23)) + return true; // means SPP_POPCNT supported + return false; +} +#endif + +#if defined(SPP_POPCNT_CHECK) && defined(SPP_POPCNT) + +static inline uint32_t spp_popcount(uint32_t i) +{ + static const bool s_ok = spp_popcount_check(); + return s_ok ? SPP_POPCNT(i) : s_spp_popcount_default(i); +} + +#else + +static inline uint32_t spp_popcount(uint32_t i) +{ +#if defined(SPP_POPCNT) + return static_cast(SPP_POPCNT(i)); +#else + return s_spp_popcount_default(i); +#endif +} + +#endif + +#if defined(SPP_POPCNT_CHECK) && defined(SPP_POPCNT64) + +static inline uint32_t spp_popcount(uint64_t i) +{ + static const bool s_ok = spp_popcount_check(); + return s_ok ? (uint32_t)SPP_POPCNT64(i) : s_spp_popcount_default(i); +} + +#else + +static inline uint32_t spp_popcount(uint64_t i) +{ +#if defined(SPP_POPCNT64) + return static_cast(SPP_POPCNT64(i)); +#elif 1 + return s_spp_popcount_default(i); +#endif +} + +#endif + +// --------------------------------------------------------------------------- +// SPARSE-TABLE +// ------------ +// The idea is that a table with (logically) t buckets is divided +// into t/M *groups* of M buckets each. (M is a constant, typically +// 32) Each group is stored sparsely. +// Thus, inserting into the table causes some array to grow, which is +// slow but still constant time. Lookup involves doing a +// logical-position-to-sparse-position lookup, which is also slow but +// constant time. The larger M is, the slower these operations are +// but the less overhead (slightly). +// +// To store the sparse array, we store a bitmap B, where B[i] = 1 iff +// bucket i is non-empty. Then to look up bucket i we really look up +// array[# of 1s before i in B]. This is constant time for fixed M. +// +// Terminology: the position of an item in the overall table (from +// 1 .. t) is called its "location." The logical position in a group +// (from 1 .. M) is called its "position." The actual location in +// the array (from 1 .. # of non-empty buckets in the group) is +// called its "offset." +// --------------------------------------------------------------------------- + +template +class sparsegroup +{ +public: + // Basic types + typedef T value_type; + typedef Alloc allocator_type; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const value_type* const_pointer; + + typedef uint8_t size_type; // max # of buckets + + // These are our special iterators, that go over non-empty buckets in a + // group. These aren't const-only because you can change non-empty bcks. + // --------------------------------------------------------------------- + typedef pointer ne_iterator; + typedef const_pointer const_ne_iterator; + typedef std::reverse_iterator reverse_ne_iterator; + typedef std::reverse_iterator const_reverse_ne_iterator; + + // We'll have versions for our special non-empty iterator too + // ---------------------------------------------------------- + ne_iterator ne_begin() { return reinterpret_cast(_group); } + const_ne_iterator ne_begin() const { return reinterpret_cast(_group); } + const_ne_iterator ne_cbegin() const { return reinterpret_cast(_group); } + ne_iterator ne_end() { return reinterpret_cast(_group + _num_items()); } + const_ne_iterator ne_end() const { return reinterpret_cast(_group + _num_items()); } + const_ne_iterator ne_cend() const { return reinterpret_cast(_group + _num_items()); } + reverse_ne_iterator ne_rbegin() { return reverse_ne_iterator(ne_end()); } + const_reverse_ne_iterator ne_rbegin() const { return const_reverse_ne_iterator(ne_cend()); } + const_reverse_ne_iterator ne_crbegin() const { return const_reverse_ne_iterator(ne_cend()); } + reverse_ne_iterator ne_rend() { return reverse_ne_iterator(ne_begin()); } + const_reverse_ne_iterator ne_rend() const { return const_reverse_ne_iterator(ne_cbegin()); } + const_reverse_ne_iterator ne_crend() const { return const_reverse_ne_iterator(ne_cbegin()); } + +private: + // T can be std::pair, but sometime we need to cast to a mutable type + // ------------------------------------------------------------------------------ + typedef typename spp_::cvt::type mutable_value_type; + typedef mutable_value_type * mutable_pointer; + typedef const mutable_value_type * const_mutable_pointer; + + bool _bmtest(size_type i) const { return !!(_bitmap & (static_cast(1) << i)); } + void _bmset(size_type i) { _bitmap |= static_cast(1) << i; } + void _bmclear(size_type i) { _bitmap &= ~(static_cast(1) << i); } + + bool _bme_test(size_type i) const { return !!(_bm_erased & (static_cast(1) << i)); } + void _bme_set(size_type i) { _bm_erased |= static_cast(1) << i; } + void _bme_clear(size_type i) { _bm_erased &= ~(static_cast(1) << i); } + + bool _bmtest_strict(size_type i) const + { return !!((_bitmap | _bm_erased) & (static_cast(1) << i)); } + + + static uint32_t _sizing(uint32_t n) + { +#if !defined(SPP_ALLOC_SZ) || (SPP_ALLOC_SZ == 0) + // aggressive allocation first, then decreasing as sparsegroups fill up + // -------------------------------------------------------------------- + static uint8_t s_alloc_batch_sz[SPP_GROUP_SIZE] = { 0 }; + if (!s_alloc_batch_sz[0]) + { + // 32 bit bitmap + // ........ .... .... .. .. .. .. . . . . . . . . + // 8 12 16 18 20 22 24 25 26 ... 32 + // ------------------------------------------------------ + uint8_t group_sz = SPP_GROUP_SIZE / 4; + uint8_t group_start_alloc = SPP_GROUP_SIZE / 8; //4; + uint8_t alloc_sz = group_start_alloc; + for (int i=0; i<4; ++i) + { + for (int j=0; j 2) + group_start_alloc /= 2; + alloc_sz += group_start_alloc; + } + } + + return n ? static_cast(s_alloc_batch_sz[n-1]) : 0; // more aggressive alloc at the beginning + +#elif (SPP_ALLOC_SZ == 1) + // use as little memory as possible - slowest insert/delete in table + // ----------------------------------------------------------------- + return n; +#else + // decent compromise when SPP_ALLOC_SZ == 2 + // ---------------------------------------- + static size_type sz_minus_1 = SPP_ALLOC_SZ - 1; + return (n + sz_minus_1) & ~sz_minus_1; +#endif + } + + pointer _allocate_group(allocator_type &alloc, uint32_t n /* , bool tight = false */) + { + // ignore tight since we don't store num_alloc + // num_alloc = (uint8_t)(tight ? n : _sizing(n)); + + uint32_t num_alloc = (uint8_t)_sizing(n); + _set_num_alloc(num_alloc); + pointer retval = alloc.allocate(static_cast(num_alloc)); + if (retval == NULL) + { + // the allocator is supposed to throw an exception if the allocation fails. + fprintf(stderr, "sparsehash FATAL ERROR: failed to allocate %d groups\n", num_alloc); + exit(1); + } + return retval; + } + + void _free_group(allocator_type &alloc, uint32_t num_alloc) + { + if (_group) + { + uint32_t num_buckets = _num_items(); + if (num_buckets) + { + mutable_pointer end_it = (mutable_pointer)(_group + num_buckets); + for (mutable_pointer p = (mutable_pointer)_group; p != end_it; ++p) + p->~mutable_value_type(); + } + alloc.deallocate(_group, (typename allocator_type::size_type)num_alloc); + _group = NULL; + } + } + + // private because should not be called - no allocator! + sparsegroup &operator=(const sparsegroup& x); + + static size_type _pos_to_offset(group_bm_type bm, size_type pos) + { + //return (size_type)((uint32_t)~((int32_t(-1) + pos) >> 31) & spp_popcount(bm << (SPP_GROUP_SIZE - pos))); + //return (size_type)(pos ? spp_popcount(bm << (SPP_GROUP_SIZE - pos)) : 0); + return static_cast(spp_popcount(bm & ((static_cast(1) << pos) - 1))); + } + +public: + + // get_iter() in sparsetable needs it + size_type pos_to_offset(size_type pos) const + { + return _pos_to_offset(_bitmap, pos); + } + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + // Returns the (logical) position in the bm[] array, i, such that + // bm[i] is the offset-th set bit in the array. It is the inverse + // of pos_to_offset. get_pos() uses this function to find the index + // of an ne_iterator in the table. Bit-twiddling from + // http://hackersdelight.org/basics.pdf + // ----------------------------------------------------------------- + static size_type offset_to_pos(group_bm_type bm, size_type offset) + { + for (; offset > 0; offset--) + bm &= (bm-1); // remove right-most set bit + + // Clear all bits to the left of the rightmost bit (the &), + // and then clear the rightmost bit but set all bits to the + // right of it (the -1). + // -------------------------------------------------------- + bm = (bm & -bm) - 1; + return static_cast(spp_popcount(bm)); + } + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + + size_type offset_to_pos(size_type offset) const + { + return offset_to_pos(_bitmap, offset); + } + +public: + // Constructors -- default and copy -- and destructor + explicit sparsegroup() : + _group(0), _bitmap(0), _bm_erased(0) + { + _set_num_items(0); + _set_num_alloc(0); + } + + sparsegroup(const sparsegroup& x) : + _group(0), _bitmap(x._bitmap), _bm_erased(x._bm_erased) + { + _set_num_items(0); + _set_num_alloc(0); + assert(_group == 0); if (_group) exit(1); + } + + sparsegroup(const sparsegroup& x, allocator_type& a) : + _group(0), _bitmap(x._bitmap), _bm_erased(x._bm_erased) + { + _set_num_items(0); + _set_num_alloc(0); + + uint32_t num_items = x._num_items(); + if (num_items) + { + _group = _allocate_group(a, num_items /* , true */); + _set_num_items(num_items); + std::uninitialized_copy(x._group, x._group + num_items, _group); + } + } + + ~sparsegroup() { assert(_group == 0); if (_group) exit(1); } + + void destruct(allocator_type& a) { _free_group(a, _num_alloc()); } + + // Many STL algorithms use swap instead of copy constructors + void swap(sparsegroup& x) + { + using std::swap; + + swap(_group, x._group); + swap(_bitmap, x._bitmap); + swap(_bm_erased, x._bm_erased); +#ifdef SPP_STORE_NUM_ITEMS + swap(_num_buckets, x._num_buckets); + swap(_num_allocated, x._num_allocated); +#endif + } + + // It's always nice to be able to clear a table without deallocating it + void clear(allocator_type &alloc, bool erased) + { + _free_group(alloc, _num_alloc()); + _bitmap = 0; + if (erased) + _bm_erased = 0; + _set_num_items(0); + _set_num_alloc(0); + } + + // Functions that tell you about size. Alas, these aren't so useful + // because our table is always fixed size. + size_type size() const { return static_cast(SPP_GROUP_SIZE); } + size_type max_size() const { return static_cast(SPP_GROUP_SIZE); } + + bool empty() const { return false; } + + // We also may want to know how many *used* buckets there are + size_type num_nonempty() const { return (size_type)_num_items(); } + + // TODO(csilvers): make protected + friend + // This is used by sparse_hashtable to get an element from the table + // when we know it exists. + reference unsafe_get(size_type i) const + { + // assert(_bmtest(i)); + return (reference)_group[pos_to_offset(i)]; + } + + typedef std::pair SetResult; + +private: + //typedef spp_::integral_constant::value> check_relocatable; + typedef spp_::true_type realloc_ok_type; + typedef spp_::false_type realloc_not_ok_type; + + //typedef spp_::zero_type libc_reloc_type; + //typedef spp_::one_type spp_reloc_type; + //typedef spp_::two_type spp_not_reloc_type; + //typedef spp_::three_type generic_alloc_type; + +#if 1 + typedef typename if_<((spp_::is_same >::value || + spp_::is_same >::value) && + spp_::is_relocatable::value), realloc_ok_type, realloc_not_ok_type>::type + check_alloc_type; +#else + typedef typename if_ >::value, + typename if_::value, spp_reloc_type, spp_not_reloc_type>::type, + typename if_<(spp_::is_same >::value && + spp_::is_relocatable::value), libc_reloc_type, generic_alloc_type>::type >::type + check_alloc_type; +#endif + + + //typedef if_ >::value, + // libc_alloc_type, + // if_ >::value, + // spp_alloc_type, user_alloc_type> > check_alloc_type; + + //typedef spp_::integral_constant::value && + // (spp_::is_same >::value || + // spp_::is_same >::value)) > + // realloc_and_memmove_ok; + + // ------------------------- memory at *p is uninitialized => need to construct + void _init_val(mutable_value_type *p, reference val) + { +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + ::new (p) value_type(std::move(val)); +#else + ::new (p) value_type(val); +#endif + } + + // ------------------------- memory at *p is uninitialized => need to construct + void _init_val(mutable_value_type *p, const_reference val) + { + ::new (p) value_type(val); + } + + // ------------------------------------------------ memory at *p is initialized + void _set_val(value_type *p, reference val) + { +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + *(mutable_pointer)p = std::move(val); +#else + using std::swap; + swap(*(mutable_pointer)p, *(mutable_pointer)&val); +#endif + } + + // ------------------------------------------------ memory at *p is initialized + void _set_val(value_type *p, const_reference val) + { + *(mutable_pointer)p = *(const_mutable_pointer)&val; + } + + // Create space at _group[offset], assuming value_type is relocatable, and the + // allocator_type is the spp allocator. + // return true if the slot was constructed (i.e. contains a valid value_type + // --------------------------------------------------------------------------------- + template + void _set_aux(allocator_type &alloc, size_type offset, Val &val, realloc_ok_type) + { + //static int x=0; if (++x < 10) printf("x\n"); // check we are getting here + + uint32_t num_items = _num_items(); + uint32_t num_alloc = _sizing(num_items); + + if (num_items == num_alloc) + { + num_alloc = _sizing(num_items + 1); + _group = alloc.reallocate(_group, num_alloc); + _set_num_alloc(num_alloc); + } + + for (uint32_t i = num_items; i > offset; --i) + memcpy(_group + i, _group + i-1, sizeof(*_group)); + + _init_val((mutable_pointer)(_group + offset), val); + } + + // Create space at _group[offset], assuming value_type is *not* relocatable, and the + // allocator_type is the spp allocator. + // return true if the slot was constructed (i.e. contains a valid value_type + // --------------------------------------------------------------------------------- + template + void _set_aux(allocator_type &alloc, size_type offset, Val &val, realloc_not_ok_type) + { + uint32_t num_items = _num_items(); + uint32_t num_alloc = _sizing(num_items); + + //assert(num_alloc == (uint32_t)_num_allocated); + if (num_items < num_alloc) + { + // create new object at end and rotate it to position + _init_val((mutable_pointer)&_group[num_items], val); + std::rotate((mutable_pointer)(_group + offset), + (mutable_pointer)(_group + num_items), + (mutable_pointer)(_group + num_items + 1)); + return; + } + + // This is valid because 0 <= offset <= num_items + pointer p = _allocate_group(alloc, _sizing(num_items + 1)); + if (offset) + std::uninitialized_copy(MK_MOVE_IT((mutable_pointer)_group), + MK_MOVE_IT((mutable_pointer)(_group + offset)), + (mutable_pointer)p); + if (num_items > offset) + std::uninitialized_copy(MK_MOVE_IT((mutable_pointer)(_group + offset)), + MK_MOVE_IT((mutable_pointer)(_group + num_items)), + (mutable_pointer)(p + offset + 1)); + _init_val((mutable_pointer)(p + offset), val); + _free_group(alloc, num_alloc); + _group = p; + } + + // ---------------------------------------------------------------------------------- + template + void _set(allocator_type &alloc, size_type i, size_type offset, Val &val) + { + if (!_bmtest(i)) + { + _set_aux(alloc, offset, val, check_alloc_type()); + _incr_num_items(); + _bmset(i); + } + else + _set_val(&_group[offset], val); + } + +public: + + // This returns the pointer to the inserted item + // --------------------------------------------- + template + pointer set(allocator_type &alloc, size_type i, Val &val) + { + _bme_clear(i); // in case this was an "erased" location + + size_type offset = pos_to_offset(i); + _set(alloc, i, offset, val); // may change _group pointer + return (pointer)(_group + offset); + } + + // We let you see if a bucket is non-empty without retrieving it + // ------------------------------------------------------------- + bool test(size_type i) const + { + return _bmtest(i); + } + + // also tests for erased values + // ---------------------------- + bool test_strict(size_type i) const + { + return _bmtest_strict(i); + } + +private: + // Shrink the array, assuming value_type is relocatable, and the + // allocator_type is the libc allocator (supporting reallocate). + // ------------------------------------------------------------- + void _group_erase_aux(allocator_type &alloc, size_type offset, realloc_ok_type) + { + // static int x=0; if (++x < 10) printf("Y\n"); // check we are getting here + uint32_t num_items = _num_items(); + uint32_t num_alloc = _sizing(num_items); + + if (num_items == 1) + { + assert(offset == 0); + _free_group(alloc, num_alloc); + _set_num_alloc(0); + return; + } + + _group[offset].~value_type(); + + for (size_type i = offset; i < num_items - 1; ++i) + memcpy(_group + i, _group + i + 1, sizeof(*_group)); + + if (_sizing(num_items - 1) != num_alloc) + { + num_alloc = _sizing(num_items - 1); + assert(num_alloc); // because we have at least 1 item left + _set_num_alloc(num_alloc); + _group = alloc.reallocate(_group, num_alloc); + } + } + + // Shrink the array, without any special assumptions about value_type and + // allocator_type. + // -------------------------------------------------------------------------- + void _group_erase_aux(allocator_type &alloc, size_type offset, realloc_not_ok_type) + { + uint32_t num_items = _num_items(); + uint32_t num_alloc = _sizing(num_items); + + if (_sizing(num_items - 1) != num_alloc) + { + pointer p = 0; + if (num_items > 1) + { + p = _allocate_group(alloc, num_items - 1); + if (offset) + std::uninitialized_copy(MK_MOVE_IT((mutable_pointer)(_group)), + MK_MOVE_IT((mutable_pointer)(_group + offset)), + (mutable_pointer)(p)); + if (static_cast(offset + 1) < num_items) + std::uninitialized_copy(MK_MOVE_IT((mutable_pointer)(_group + offset + 1)), + MK_MOVE_IT((mutable_pointer)(_group + num_items)), + (mutable_pointer)(p + offset)); + } + else + { + assert(offset == 0); + _set_num_alloc(0); + } + _free_group(alloc, num_alloc); + _group = p; + } + else + { + std::rotate((mutable_pointer)(_group + offset), + (mutable_pointer)(_group + offset + 1), + (mutable_pointer)(_group + num_items)); + ((mutable_pointer)(_group + num_items - 1))->~mutable_value_type(); + } + } + + void _group_erase(allocator_type &alloc, size_type offset) + { + _group_erase_aux(alloc, offset, check_alloc_type()); + } + +public: + template + bool erase_ne(allocator_type &alloc, twod_iter &it) + { + assert(_group && it.col_current != ne_end()); + size_type offset = (size_type)(it.col_current - ne_begin()); + size_type pos = offset_to_pos(offset); + + if (_num_items() <= 1) + { + clear(alloc, false); + it.col_current = 0; + } + else + { + _group_erase(alloc, offset); + _decr_num_items(); + _bmclear(pos); + + // in case _group_erase reallocated the buffer + it.col_current = reinterpret_cast(_group) + offset; + } + _bme_set(pos); // remember that this position has been erased + it.advance_past_end(); + return true; + } + + + // This takes the specified elements out of the group. This is + // "undefining", rather than "clearing". + // TODO(austern): Make this exception safe: handle exceptions from + // value_type's copy constructor. + // --------------------------------------------------------------- + void erase(allocator_type &alloc, size_type i) + { + if (_bmtest(i)) + { + // trivial to erase empty bucket + if (_num_items() == 1) + clear(alloc, false); + else + { + _group_erase(alloc, pos_to_offset(i)); + _decr_num_items(); + _bmclear(i); + } + _bme_set(i); // remember that this position has been erased + } + } + + // I/O + // We support reading and writing groups to disk. We don't store + // the actual array contents (which we don't know how to store), + // just the bitmap and size. Meant to be used with table I/O. + // -------------------------------------------------------------- + template bool write_metadata(OUTPUT *fp) const + { + // warning: we write 4 or 8 bytes for the bitmap, instead of 6 in the + // original google sparsehash + // ------------------------------------------------------------------ + if (!sparsehash_internal::write_data(fp, &_bitmap, sizeof(_bitmap))) + return false; + + return true; + } + + // Reading destroys the old group contents! Returns true if all was ok. + template bool read_metadata(allocator_type &alloc, INPUT *fp) + { + clear(alloc, true); + + if (!sparsehash_internal::read_data(fp, &_bitmap, sizeof(_bitmap))) + return false; + + // We'll allocate the space, but we won't fill it: it will be + // left as uninitialized raw memory. + uint32_t num_items = spp_popcount(_bitmap); // yes, _num_buckets not set + _set_num_items(num_items); + _group = num_items ? _allocate_group(alloc, num_items/* , true */) : 0; + return true; + } + + // Again, only meaningful if value_type is a POD. + template bool read_nopointer_data(INPUT *fp) + { + for (ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!sparsehash_internal::read_data(fp, &(*it), sizeof(*it))) + return false; + return true; + } + + // If your keys and values are simple enough, we can write them + // to disk for you. "simple enough" means POD and no pointers. + // However, we don't try to normalize endianness. + // ------------------------------------------------------------ + template bool write_nopointer_data(OUTPUT *fp) const + { + for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!sparsehash_internal::write_data(fp, &(*it), sizeof(*it))) + return false; + return true; + } + + + // Comparisons. We only need to define == and < -- we get + // != > <= >= via relops.h (which we happily included above). + // Note the comparisons are pretty arbitrary: we compare + // values of the first index that isn't equal (using default + // value for empty buckets). + // --------------------------------------------------------- + bool operator==(const sparsegroup& x) const + { + return (_bitmap == x._bitmap && + _bm_erased == x._bm_erased && + std::equal(_group, _group + _num_items(), x._group)); + } + + bool operator<(const sparsegroup& x) const + { + // also from + return std::lexicographical_compare(_group, _group + _num_items(), + x._group, x._group + x._num_items()); + } + + bool operator!=(const sparsegroup& x) const { return !(*this == x); } + bool operator<=(const sparsegroup& x) const { return !(x < *this); } + bool operator> (const sparsegroup& x) const { return x < *this; } + bool operator>=(const sparsegroup& x) const { return !(*this < x); } + + void mark() { _group = (value_type *)static_cast(-1); } + bool is_marked() const { return _group == (value_type *)static_cast(-1); } + +private: + // --------------------------------------------------------------------------- + template + class alloc_impl : public A + { + public: + typedef typename A::pointer pointer; + typedef typename A::size_type size_type; + + // Convert a normal allocator to one that has realloc_or_die() + explicit alloc_impl(const A& a) : A(a) { } + + // realloc_or_die should only be used when using the default + // allocator (spp::spp_allocator). + pointer realloc_or_die(pointer /*ptr*/, size_type /*n*/) + { + fprintf(stderr, "realloc_or_die is only supported for " + "spp::spp_allocator\n"); + exit(1); + return NULL; + } + }; + + // A template specialization of alloc_impl for + // spp::libc_allocator that can handle realloc_or_die. + // ----------------------------------------------------------- + template + class alloc_impl > : public spp_::libc_allocator + { + public: + typedef typename spp_::libc_allocator::pointer pointer; + typedef typename spp_::libc_allocator::size_type size_type; + + explicit alloc_impl(const spp_::libc_allocator& a) + : spp_::libc_allocator(a) + { } + + pointer realloc_or_die(pointer ptr, size_type n) + { + pointer retval = this->reallocate(ptr, n); + if (retval == NULL) + { + fprintf(stderr, "sparsehash: FATAL ERROR: failed to reallocate " + "%lu elements for ptr %p", static_cast(n), ptr); + exit(1); + } + return retval; + } + }; + + // A template specialization of alloc_impl for + // spp::spp_allocator that can handle realloc_or_die. + // ----------------------------------------------------------- + template + class alloc_impl > : public spp_::spp_allocator + { + public: + typedef typename spp_::spp_allocator::pointer pointer; + typedef typename spp_::spp_allocator::size_type size_type; + + explicit alloc_impl(const spp_::spp_allocator& a) + : spp_::spp_allocator(a) + { } + + pointer realloc_or_die(pointer ptr, size_type n) + { + pointer retval = this->reallocate(ptr, n); + if (retval == NULL) + { + fprintf(stderr, "sparsehash: FATAL ERROR: failed to reallocate " + "%lu elements for ptr %p", static_cast(n), ptr); + exit(1); + } + return retval; + } + }; + + +#ifdef SPP_STORE_NUM_ITEMS + uint32_t _num_items() const { return (uint32_t)_num_buckets; } + void _set_num_items(uint32_t val) { _num_buckets = static_cast(val); } + void _incr_num_items() { ++_num_buckets; } + void _decr_num_items() { --_num_buckets; } + uint32_t _num_alloc() const { return (uint32_t)_num_allocated; } + void _set_num_alloc(uint32_t val) { _num_allocated = static_cast(val); } +#else + uint32_t _num_items() const { return spp_popcount(_bitmap); } + void _set_num_items(uint32_t ) { } + void _incr_num_items() { } + void _decr_num_items() { } + uint32_t _num_alloc() const { return _sizing(_num_items()); } + void _set_num_alloc(uint32_t val) { } +#endif + + // The actual data + // --------------- + value_type * _group; // (small) array of T's + group_bm_type _bitmap; + group_bm_type _bm_erased; // ones where items have been erased + +#ifdef SPP_STORE_NUM_ITEMS + size_type _num_buckets; + size_type _num_allocated; +#endif +}; + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +template +class sparsetable +{ +public: + typedef T value_type; + typedef Alloc allocator_type; + typedef sparsegroup group_type; + +private: + typedef typename Alloc::template rebind::other group_alloc_type; + typedef typename group_alloc_type::size_type group_size_type; + +public: + // Basic types + // ----------- + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const value_type* const_pointer; + + typedef group_type& GroupsReference; + typedef const group_type& GroupsConstReference; + + typedef typename group_type::ne_iterator ColIterator; + typedef typename group_type::const_ne_iterator ColConstIterator; + + typedef table_iterator > iterator; // defined with index + typedef const_table_iterator > const_iterator; // defined with index + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + // These are our special iterators, that go over non-empty buckets in a + // table. These aren't const only because you can change non-empty bcks. + // ---------------------------------------------------------------------- + typedef Two_d_iterator ne_iterator; + + typedef Two_d_iterator const_ne_iterator; + + // Another special iterator: it frees memory as it iterates (used to resize). + // Obviously, you can only iterate over it once, which is why it's an input iterator + // --------------------------------------------------------------------------------- + typedef Two_d_destructive_iterator destructive_iterator; + + typedef std::reverse_iterator reverse_ne_iterator; + typedef std::reverse_iterator const_reverse_ne_iterator; + + + // Iterator functions + // ------------------ + iterator begin() { return iterator(this, 0); } + const_iterator begin() const { return const_iterator(this, 0); } + const_iterator cbegin() const { return const_iterator(this, 0); } + iterator end() { return iterator(this, size()); } + const_iterator end() const { return const_iterator(this, size()); } + const_iterator cend() const { return const_iterator(this, size()); } + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { return const_reverse_iterator(cend()); } + const_reverse_iterator crbegin() const { return const_reverse_iterator(cend()); } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { return const_reverse_iterator(cbegin()); } + const_reverse_iterator crend() const { return const_reverse_iterator(cbegin()); } + + // Versions for our special non-empty iterator + // ------------------------------------------ + ne_iterator ne_begin() { return ne_iterator (_first_group); } + const_ne_iterator ne_begin() const { return const_ne_iterator(_first_group); } + const_ne_iterator ne_cbegin() const { return const_ne_iterator(_first_group); } + ne_iterator ne_end() { return ne_iterator (_last_group); } + const_ne_iterator ne_end() const { return const_ne_iterator(_last_group); } + const_ne_iterator ne_cend() const { return const_ne_iterator(_last_group); } + + reverse_ne_iterator ne_rbegin() { return reverse_ne_iterator(ne_end()); } + const_reverse_ne_iterator ne_rbegin() const { return const_reverse_ne_iterator(ne_end()); } + const_reverse_ne_iterator ne_crbegin() const { return const_reverse_ne_iterator(ne_end()); } + reverse_ne_iterator ne_rend() { return reverse_ne_iterator(ne_begin()); } + const_reverse_ne_iterator ne_rend() const { return const_reverse_ne_iterator(ne_begin()); } + const_reverse_ne_iterator ne_crend() const { return const_reverse_ne_iterator(ne_begin()); } + + destructive_iterator destructive_begin() + { + return destructive_iterator(_alloc, _first_group); + } + + destructive_iterator destructive_end() + { + return destructive_iterator(_alloc, _last_group); + } + + // How to deal with the proper group + static group_size_type num_groups(size_type num) + { + // how many to hold num buckets + return num == 0 ? (group_size_type)0 : + (group_size_type)(((num-1) / SPP_GROUP_SIZE) + 1); + } + + typename group_type::size_type pos_in_group(size_type i) const + { + return static_cast(i & SPP_MASK_); + } + + size_type group_num(size_type i) const + { + return (size_type)(i >> SPP_SHIFT_); + } + + GroupsReference which_group(size_type i) + { + return _first_group[group_num(i)]; + } + + GroupsConstReference which_group(size_type i) const + { + return _first_group[group_num(i)]; + } + + void _alloc_group_array(group_size_type sz, group_type *&first, group_type *&last) + { + if (sz) + { + first = _group_alloc.allocate((size_type)(sz + 1)); // + 1 for end marker + first[sz].mark(); // for the ne_iterator + last = first + sz; + } + } + + void _free_group_array(group_type *&first, group_type *&last) + { + if (first) + { + _group_alloc.deallocate(first, (group_size_type)(last - first + 1)); // + 1 for end marker + first = last = 0; + } + } + + void _allocate_groups(size_type sz) + { + if (sz) + { + _alloc_group_array(sz, _first_group, _last_group); + std::uninitialized_fill(_first_group, _last_group, group_type()); + } + } + + void _free_groups() + { + if (_first_group) + { + for (group_type *g = _first_group; g != _last_group; ++g) + g->destruct(_alloc); + _free_group_array(_first_group, _last_group); + } + } + + void _cleanup() + { + _free_groups(); // sets _first_group = _last_group = 0 + _table_size = 0; + _num_buckets = 0; + } + + void _init() + { + _first_group = 0; + _last_group = 0; + _table_size = 0; + _num_buckets = 0; + } + + void _copy(const sparsetable &o) + { + _table_size = o._table_size; + _num_buckets = o._num_buckets; + _alloc = o._alloc; // todo - copy or move allocator according to... + _group_alloc = o._group_alloc; // http://en.cppreference.com/w/cpp/container/unordered_map/unordered_map + + group_size_type sz = (group_size_type)(o._last_group - o._first_group); + if (sz) + { + _alloc_group_array(sz, _first_group, _last_group); + for (group_size_type i=0; iswap(o); + } + + sparsetable(sparsetable&& o, const allocator_type &alloc) + { + _init(); + this->swap(o); + _alloc = alloc; // [gp todo] is this correct? + } + + sparsetable& operator=(sparsetable&& o) + { + _cleanup(); + this->swap(o); + return *this; + } +#endif + + // Many STL algorithms use swap instead of copy constructors + void swap(sparsetable& o) + { + using std::swap; + + swap(_first_group, o._first_group); + swap(_last_group, o._last_group); + swap(_table_size, o._table_size); + swap(_num_buckets, o._num_buckets); + if (_alloc != o._alloc) + swap(_alloc, o._alloc); + if (_group_alloc != o._group_alloc) + swap(_group_alloc, o._group_alloc); + } + + // It's always nice to be able to clear a table without deallocating it + void clear() + { + _free_groups(); + _num_buckets = 0; + _table_size = 0; + } + + inline allocator_type get_allocator() const + { + return _alloc; + } + + + // Functions that tell you about size. + // NOTE: empty() is non-intuitive! It does not tell you the number + // of not-empty buckets (use num_nonempty() for that). Instead + // it says whether you've allocated any buckets or not. + // ---------------------------------------------------------------- + size_type size() const { return _table_size; } + size_type max_size() const { return _alloc.max_size(); } + bool empty() const { return _table_size == 0; } + size_type num_nonempty() const { return _num_buckets; } + + // OK, we'll let you resize one of these puppies + void resize(size_type new_size) + { + group_size_type sz = num_groups(new_size); + group_size_type old_sz = (group_size_type)(_last_group - _first_group); + + if (sz != old_sz) + { + // resize group array + // ------------------ + group_type *first = 0, *last = 0; + if (sz) + { + _alloc_group_array(sz, first, last); + memcpy(first, _first_group, sizeof(*first) * (std::min)(sz, old_sz)); + } + + if (sz < old_sz) + { + for (group_type *g = _first_group + sz; g != _last_group; ++g) + g->destruct(_alloc); + } + else + std::uninitialized_fill(first + old_sz, last, group_type()); + + _free_group_array(_first_group, _last_group); + _first_group = first; + _last_group = last; + } +#if 0 + // used only in test program + // todo: fix if sparsetable to be used directly + // -------------------------------------------- + if (new_size < _table_size) + { + // lower num_buckets, clear last group + if (pos_in_group(new_size) > 0) // need to clear inside last group + groups.back().erase(_alloc, groups.back().begin() + pos_in_group(new_size), + groups.back().end()); + _num_buckets = 0; // refigure # of used buckets + for (const group_type *group = _first_group; group != _last_group; ++group) + _num_buckets += group->num_nonempty(); + } +#endif + _table_size = new_size; + } + + // We let you see if a bucket is non-empty without retrieving it + // ------------------------------------------------------------- + bool test(size_type i) const + { + // assert(i < _table_size); + return which_group(i).test(pos_in_group(i)); + } + + // also tests for erased values + // ---------------------------- + bool test_strict(size_type i) const + { + // assert(i < _table_size); + return which_group(i).test_strict(pos_in_group(i)); + } + + friend struct GrpPos; + + struct GrpPos + { + typedef typename sparsetable::ne_iterator ne_iter; + GrpPos(const sparsetable &table, size_type i) : + grp(table.which_group(i)), pos(table.pos_in_group(i)) {} + + bool test_strict() const { return grp.test_strict(pos); } + bool test() const { return grp.test(pos); } + typename sparsetable::reference unsafe_get() const { return grp.unsafe_get(pos); } + ne_iter get_iter(typename sparsetable::reference ref) + { + return ne_iter((group_type *)&grp, &ref); + } + + void erase(sparsetable &table) // item *must* be present + { + assert(table._num_buckets); + ((group_type &)grp).erase(table._alloc, pos); + --table._num_buckets; + } + + private: + GrpPos* operator=(const GrpPos&); + + const group_type &grp; + typename group_type::size_type pos; + }; + + bool test(iterator pos) const + { + return which_group(pos.pos).test(pos_in_group(pos.pos)); + } + + bool test(const_iterator pos) const + { + return which_group(pos.pos).test(pos_in_group(pos.pos)); + } + + // TODO(csilvers): make protected + friend + // This is used by sparse_hashtable to get an element from the table + // when we know it exists (because the caller has called test(i)). + // ----------------------------------------------------------------- + reference unsafe_get(size_type i) const + { + assert(i < _table_size); + // assert(test(i)); + return which_group(i).unsafe_get(pos_in_group(i)); + } + + // Needed for hashtables, gets as a ne_iterator. Crashes for empty bcks + const_ne_iterator get_iter(size_type i) const + { + //assert(test(i)); // how can a ne_iterator point to an empty bucket? + + size_type grp_idx = group_num(i); + + return const_ne_iterator(_first_group + grp_idx, + (_first_group[grp_idx].ne_begin() + + _first_group[grp_idx].pos_to_offset(pos_in_group(i)))); + } + + const_ne_iterator get_iter(size_type i, ColIterator col_it) const + { + return const_ne_iterator(_first_group + group_num(i), col_it); + } + + // For nonempty we can return a non-const version + ne_iterator get_iter(size_type i) + { + //assert(test(i)); // how can a nonempty_iterator point to an empty bucket? + + size_type grp_idx = group_num(i); + + return ne_iterator(_first_group + grp_idx, + (_first_group[grp_idx].ne_begin() + + _first_group[grp_idx].pos_to_offset(pos_in_group(i)))); + } + + ne_iterator get_iter(size_type i, ColIterator col_it) + { + return ne_iterator(_first_group + group_num(i), col_it); + } + + // And the reverse transformation. + size_type get_pos(const const_ne_iterator& it) const + { + difference_type current_row = it.row_current - _first_group; + difference_type current_col = (it.col_current - _first_group[current_row].ne_begin()); + return ((current_row * SPP_GROUP_SIZE) + + _first_group[current_row].offset_to_pos(current_col)); + } + + // Val can be reference or const_reference + // --------------------------------------- + template + reference set(size_type i, Val &val) + { + assert(i < _table_size); + group_type &group = which_group(i); + typename group_type::size_type old_numbuckets = group.num_nonempty(); + pointer p(group.set(_alloc, pos_in_group(i), val)); + _num_buckets += group.num_nonempty() - old_numbuckets; + return *p; + } + + // used in _move_from (where we can move the old value instead of copying it + void move(size_type i, reference val) + { + assert(i < _table_size); + which_group(i).set(_alloc, pos_in_group(i), val); + ++_num_buckets; + } + + // This takes the specified elements out of the table. + // -------------------------------------------------- + void erase(size_type i) + { + assert(i < _table_size); + + GroupsReference grp(which_group(i)); + typename group_type::size_type old_numbuckets = grp.num_nonempty(); + grp.erase(_alloc, pos_in_group(i)); + _num_buckets += grp.num_nonempty() - old_numbuckets; + } + + void erase(iterator pos) + { + erase(pos.pos); + } + + void erase(iterator start_it, iterator end_it) + { + // This could be more efficient, but then we'd need to figure + // out if we spanned groups or not. Doesn't seem worth it. + for (; start_it != end_it; ++start_it) + erase(start_it); + } + + const_ne_iterator erase(const_ne_iterator it) + { + ne_iterator res(it); + if (res.row_current->erase_ne(_alloc, res)) + _num_buckets--; + return res; + } + + const_ne_iterator erase(const_ne_iterator f, const_ne_iterator l) + { + size_t diff = l - f; + while (diff--) + f = erase(f); + return f; + } + + // We support reading and writing tables to disk. We don't store + // the actual array contents (which we don't know how to store), + // just the groups and sizes. Returns true if all went ok. + +private: + // Every time the disk format changes, this should probably change too + typedef unsigned long MagicNumberType; + static const MagicNumberType MAGIC_NUMBER = 0x24687531; + + // Old versions of this code write all data in 32 bits. We need to + // support these files as well as having support for 64-bit systems. + // So we use the following encoding scheme: for values < 2^32-1, we + // store in 4 bytes in big-endian order. For values > 2^32, we + // store 0xFFFFFFF followed by 8 bytes in big-endian order. This + // causes us to mis-read old-version code that stores exactly + // 0xFFFFFFF, but I don't think that is likely to have happened for + // these particular values. + template + static bool write_32_or_64(OUTPUT* fp, IntType value) + { + if (value < 0xFFFFFFFFULL) // fits in 4 bytes + { + if (!sparsehash_internal::write_bigendian_number(fp, value, 4)) + return false; + } + else + { + if (!sparsehash_internal::write_bigendian_number(fp, 0xFFFFFFFFUL, 4)) + return false; + if (!sparsehash_internal::write_bigendian_number(fp, value, 8)) + return false; + } + return true; + } + + template + static bool read_32_or_64(INPUT* fp, IntType *value) + { + // reads into value + MagicNumberType first4 = 0; // a convenient 32-bit unsigned type + if (!sparsehash_internal::read_bigendian_number(fp, &first4, 4)) + return false; + + if (first4 < 0xFFFFFFFFULL) + { + *value = first4; + } + else + { + if (!sparsehash_internal::read_bigendian_number(fp, value, 8)) + return false; + } + return true; + } + +public: + // read/write_metadata() and read_write/nopointer_data() are DEPRECATED. + // Use serialize() and unserialize(), below, for new code. + + template + bool write_metadata(OUTPUT *fp) const + { + if (!write_32_or_64(fp, MAGIC_NUMBER)) return false; + if (!write_32_or_64(fp, _table_size)) return false; + if (!write_32_or_64(fp, _num_buckets)) return false; + + for (const group_type *group = _first_group; group != _last_group; ++group) + if (group->write_metadata(fp) == false) + return false; + return true; + } + + // Reading destroys the old table contents! Returns true if read ok. + template + bool read_metadata(INPUT *fp) + { + size_type magic_read = 0; + if (!read_32_or_64(fp, &magic_read)) return false; + if (magic_read != MAGIC_NUMBER) + { + clear(); // just to be consistent + return false; + } + + if (!read_32_or_64(fp, &_table_size)) return false; + if (!read_32_or_64(fp, &_num_buckets)) return false; + + resize(_table_size); // so the vector's sized ok + for (group_type *group = _first_group; group != _last_group; ++group) + if (group->read_metadata(_alloc, fp) == false) + return false; + return true; + } + + // This code is identical to that for SparseGroup + // If your keys and values are simple enough, we can write them + // to disk for you. "simple enough" means no pointers. + // However, we don't try to normalize endianness + bool write_nopointer_data(FILE *fp) const + { + for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!fwrite(&*it, sizeof(*it), 1, fp)) + return false; + return true; + } + + // When reading, we have to override the potential const-ness of *it + bool read_nopointer_data(FILE *fp) + { + for (ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!fread(reinterpret_cast(&(*it)), sizeof(*it), 1, fp)) + return false; + return true; + } + + // INPUT and OUTPUT must be either a FILE, *or* a C++ stream + // (istream, ostream, etc) *or* a class providing + // Read(void*, size_t) and Write(const void*, size_t) + // (respectively), which writes a buffer into a stream + // (which the INPUT/OUTPUT instance presumably owns). + + typedef sparsehash_internal::pod_serializer NopointerSerializer; + + // ValueSerializer: a functor. operator()(OUTPUT*, const value_type&) + template + bool serialize(ValueSerializer serializer, OUTPUT *fp) + { + if (!write_metadata(fp)) + return false; + for (const_ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!serializer(fp, *it)) + return false; + return true; + } + + // ValueSerializer: a functor. operator()(INPUT*, value_type*) + template + bool unserialize(ValueSerializer serializer, INPUT *fp) + { + clear(); + if (!read_metadata(fp)) + return false; + for (ne_iterator it = ne_begin(); it != ne_end(); ++it) + if (!serializer(fp, &*it)) + return false; + return true; + } + + // Comparisons. Note the comparisons are pretty arbitrary: we + // compare values of the first index that isn't equal (using default + // value for empty buckets). + bool operator==(const sparsetable& x) const + { + return (_table_size == x._table_size && + _num_buckets == x._num_buckets && + _first_group == x._first_group); + } + + bool operator<(const sparsetable& x) const + { + return std::lexicographical_compare(begin(), end(), x.begin(), x.end()); + } + bool operator!=(const sparsetable& x) const { return !(*this == x); } + bool operator<=(const sparsetable& x) const { return !(x < *this); } + bool operator>(const sparsetable& x) const { return x < *this; } + bool operator>=(const sparsetable& x) const { return !(*this < x); } + + +private: + // The actual data + // --------------- + group_type * _first_group; + group_type * _last_group; + size_type _table_size; // how many buckets they want + size_type _num_buckets; // number of non-empty buckets + group_alloc_type _group_alloc; + allocator_type _alloc; +}; + +// ---------------------------------------------------------------------- +// S P A R S E _ H A S H T A B L E +// ---------------------------------------------------------------------- +// Hashtable class, used to implement the hashed associative containers +// hash_set and hash_map. +// +// Value: what is stored in the table (each bucket is a Value). +// Key: something in a 1-to-1 correspondence to a Value, that can be used +// to search for a Value in the table (find() takes a Key). +// HashFcn: Takes a Key and returns an integer, the more unique the better. +// ExtractKey: given a Value, returns the unique Key associated with it. +// Must inherit from unary_function, or at least have a +// result_type enum indicating the return type of operator(). +// EqualKey: Given two Keys, says whether they are the same (that is, +// if they are both associated with the same Value). +// Alloc: STL allocator to use to allocate memory. +// +// ---------------------------------------------------------------------- + +// The probing method +// ------------------ +// Linear probing +// #define JUMP_(key, num_probes) ( 1 ) +// Quadratic probing +#define JUMP_(key, num_probes) ( num_probes ) + + +// ------------------------------------------------------------------- +// ------------------------------------------------------------------- +template +class sparse_hashtable +{ +public: + typedef Key key_type; + typedef Value value_type; + typedef HashFcn hasher; // user provided or spp_hash + typedef EqualKey key_equal; + typedef Alloc allocator_type; + + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const value_type* const_pointer; + + // Table is the main storage class. + typedef sparsetable Table; + typedef typename Table::ne_iterator ne_it; + typedef typename Table::const_ne_iterator cne_it; + typedef typename Table::destructive_iterator dest_it; + typedef typename Table::ColIterator ColIterator; + + typedef ne_it iterator; + typedef cne_it const_iterator; + typedef dest_it destructive_iterator; + + // These come from tr1. For us they're the same as regular iterators. + // ------------------------------------------------------------------- + typedef iterator local_iterator; + typedef const_iterator const_local_iterator; + + // How full we let the table get before we resize + // ---------------------------------------------- + static const int HT_OCCUPANCY_PCT; // = 80 (out of 100); + + // How empty we let the table get before we resize lower, by default. + // (0.0 means never resize lower.) + // It should be less than OCCUPANCY_PCT / 2 or we thrash resizing + // ------------------------------------------------------------------ + static const int HT_EMPTY_PCT; // = 0.4 * HT_OCCUPANCY_PCT; + + // Minimum size we're willing to let hashtables be. + // Must be a power of two, and at least 4. + // Note, however, that for a given hashtable, the initial size is a + // function of the first constructor arg, and may be >HT_MIN_BUCKETS. + // ------------------------------------------------------------------ + static const size_type HT_MIN_BUCKETS = 4; + + // By default, if you don't specify a hashtable size at + // construction-time, we use this size. Must be a power of two, and + // at least HT_MIN_BUCKETS. + // ----------------------------------------------------------------- + static const size_type HT_DEFAULT_STARTING_BUCKETS = 32; + + // iterators + // --------- + iterator begin() { return _mk_iterator(table.ne_begin()); } + iterator end() { return _mk_iterator(table.ne_end()); } + const_iterator begin() const { return _mk_const_iterator(table.ne_cbegin()); } + const_iterator end() const { return _mk_const_iterator(table.ne_cend()); } + const_iterator cbegin() const { return _mk_const_iterator(table.ne_cbegin()); } + const_iterator cend() const { return _mk_const_iterator(table.ne_cend()); } + + // These come from tr1 unordered_map. They iterate over 'bucket' n. + // For sparsehashtable, we could consider each 'group' to be a bucket, + // I guess, but I don't really see the point. We'll just consider + // bucket n to be the n-th element of the sparsetable, if it's occupied, + // or some empty element, otherwise. + // --------------------------------------------------------------------- + local_iterator begin(size_type i) + { + return _mk_iterator(table.test(i) ? table.get_iter(i) : table.ne_end()); + } + + local_iterator end(size_type i) + { + local_iterator it = begin(i); + if (table.test(i)) + ++it; + return _mk_iterator(it); + } + + const_local_iterator begin(size_type i) const + { + return _mk_const_iterator(table.test(i) ? table.get_iter(i) : table.ne_cend()); + } + + const_local_iterator end(size_type i) const + { + const_local_iterator it = begin(i); + if (table.test(i)) + ++it; + return _mk_const_iterator(it); + } + + const_local_iterator cbegin(size_type i) const { return begin(i); } + const_local_iterator cend(size_type i) const { return end(i); } + + // This is used when resizing + // -------------------------- + destructive_iterator destructive_begin() { return _mk_destructive_iterator(table.destructive_begin()); } + destructive_iterator destructive_end() { return _mk_destructive_iterator(table.destructive_end()); } + + + // accessor functions for the things we templatize on, basically + // ------------------------------------------------------------- + hasher hash_funct() const { return settings; } + key_equal key_eq() const { return key_info; } + allocator_type get_allocator() const { return table.get_allocator(); } + + // Accessor function for statistics gathering. + unsigned int num_table_copies() const { return settings.num_ht_copies(); } + +private: + // This is used as a tag for the copy constructor, saying to destroy its + // arg We have two ways of destructively copying: with potentially growing + // the hashtable as we copy, and without. To make sure the outside world + // can't do a destructive copy, we make the typename private. + // ----------------------------------------------------------------------- + enum MoveDontCopyT {MoveDontCopy, MoveDontGrow}; + + void _squash_deleted() + { + // gets rid of any deleted entries we have + // --------------------------------------- + if (num_deleted) + { + // get rid of deleted before writing + sparse_hashtable tmp(MoveDontGrow, *this); + swap(tmp); // now we are tmp + } + assert(num_deleted == 0); + } + + // creating iterators from sparsetable::ne_iterators + // ------------------------------------------------- + iterator _mk_iterator(ne_it it) const { return it; } + const_iterator _mk_const_iterator(cne_it it) const { return it; } + destructive_iterator _mk_destructive_iterator(dest_it it) const { return it; } + +public: + size_type size() const { return table.num_nonempty(); } + size_type max_size() const { return table.max_size(); } + bool empty() const { return size() == 0; } + size_type bucket_count() const { return table.size(); } + size_type max_bucket_count() const { return max_size(); } + // These are tr1 methods. Their idea of 'bucket' doesn't map well to + // what we do. We just say every bucket has 0 or 1 items in it. + size_type bucket_size(size_type i) const + { + return (size_type)(begin(i) == end(i) ? 0 : 1); + } + +private: + // Because of the above, size_type(-1) is never legal; use it for errors + // --------------------------------------------------------------------- + static const size_type ILLEGAL_BUCKET = size_type(-1); + + // Used after a string of deletes. Returns true if we actually shrunk. + // TODO(csilvers): take a delta so we can take into account inserts + // done after shrinking. Maybe make part of the Settings class? + // -------------------------------------------------------------------- + bool _maybe_shrink() + { + assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two + assert(bucket_count() >= HT_MIN_BUCKETS); + bool retval = false; + + // If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS, + // we'll never shrink until you get relatively big, and we'll never + // shrink below HT_DEFAULT_STARTING_BUCKETS. Otherwise, something + // like "dense_hash_set x; x.insert(4); x.erase(4);" will + // shrink us down to HT_MIN_BUCKETS buckets, which is too small. + // --------------------------------------------------------------- + const size_type num_remain = table.num_nonempty(); + const size_type shrink_threshold = settings.shrink_threshold(); + if (shrink_threshold > 0 && num_remain < shrink_threshold && + bucket_count() > HT_DEFAULT_STARTING_BUCKETS) + { + const float shrink_factor = settings.shrink_factor(); + size_type sz = (size_type)(bucket_count() / 2); // find how much we should shrink + while (sz > HT_DEFAULT_STARTING_BUCKETS && + num_remain < static_cast(sz * shrink_factor)) + { + sz /= 2; // stay a power of 2 + } + sparse_hashtable tmp(MoveDontCopy, *this, sz); + swap(tmp); // now we are tmp + retval = true; + } + settings.set_consider_shrink(false); // because we just considered it + return retval; + } + + // We'll let you resize a hashtable -- though this makes us copy all! + // When you resize, you say, "make it big enough for this many more elements" + // Returns true if we actually resized, false if size was already ok. + // -------------------------------------------------------------------------- + bool _resize_delta(size_type delta) + { + bool did_resize = false; + if (settings.consider_shrink()) + { + // see if lots of deletes happened + if (_maybe_shrink()) + did_resize = true; + } + if (table.num_nonempty() >= + (std::numeric_limits::max)() - delta) + { + throw_exception(std::length_error("resize overflow")); + } + + size_type num_occupied = (size_type)(table.num_nonempty() + num_deleted); + + if (bucket_count() >= HT_MIN_BUCKETS && + (num_occupied + delta) <= settings.enlarge_threshold()) + return did_resize; // we're ok as we are + + // Sometimes, we need to resize just to get rid of all the + // "deleted" buckets that are clogging up the hashtable. So when + // deciding whether to resize, count the deleted buckets (which + // are currently taking up room). + // ------------------------------------------------------------- + const size_type needed_size = + settings.min_buckets((size_type)(num_occupied + delta), (size_type)0); + + if (needed_size <= bucket_count()) // we have enough buckets + return did_resize; + + size_type resize_to = settings.min_buckets((size_type)(num_occupied + delta), bucket_count()); + + if (resize_to < needed_size && // may double resize_to + resize_to < (std::numeric_limits::max)() / 2) + { + // This situation means that we have enough deleted elements, + // that once we purge them, we won't actually have needed to + // grow. But we may want to grow anyway: if we just purge one + // element, say, we'll have to grow anyway next time we + // insert. Might as well grow now, since we're already going + // through the trouble of copying (in order to purge the + // deleted elements). + const size_type target = + static_cast(settings.shrink_size((size_type)(resize_to*2))); + if (table.num_nonempty() + delta >= target) + { + // Good, we won't be below the shrink threshhold even if we double. + resize_to *= 2; + } + } + + sparse_hashtable tmp(MoveDontCopy, *this, resize_to); + swap(tmp); // now we are tmp + return true; + } + + // Used to actually do the rehashing when we grow/shrink a hashtable + // ----------------------------------------------------------------- + void _copy_from(const sparse_hashtable &ht, size_type min_buckets_wanted) + { + clear(); // clear table, set num_deleted to 0 + + // If we need to change the size of our table, do it now + const size_type resize_to = settings.min_buckets(ht.size(), min_buckets_wanted); + + if (resize_to > bucket_count()) + { + // we don't have enough buckets + table.resize(resize_to); // sets the number of buckets + settings.reset_thresholds(bucket_count()); + } + + // We use a normal iterator to get bcks from ht + // We could use insert() here, but since we know there are + // no duplicates, we can be more efficient + assert((bucket_count() & (bucket_count()-1)) == 0); // a power of two + for (const_iterator it = ht.begin(); it != ht.end(); ++it) + { + size_type num_probes = 0; // how many times we've probed + size_type bucknum; + const size_type bucket_count_minus_one = bucket_count() - 1; + for (bucknum = hash(get_key(*it)) & bucket_count_minus_one; + table.test(bucknum); // table.test() OK since no erase() + bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) + { + ++num_probes; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + table.set(bucknum, *it); // copies the value to here + } + settings.inc_num_ht_copies(); + } + + // Implementation is like _copy_from, but it destroys the table of the + // "from" guy by freeing sparsetable memory as we iterate. This is + // useful in resizing, since we're throwing away the "from" guy anyway. + // -------------------------------------------------------------------- + void _move_from(MoveDontCopyT mover, sparse_hashtable &ht, + size_type min_buckets_wanted) + { + clear(); + + // If we need to change the size of our table, do it now + size_type resize_to; + if (mover == MoveDontGrow) + resize_to = ht.bucket_count(); // keep same size as old ht + else // MoveDontCopy + resize_to = settings.min_buckets(ht.size(), min_buckets_wanted); + if (resize_to > bucket_count()) + { + // we don't have enough buckets + table.resize(resize_to); // sets the number of buckets + settings.reset_thresholds(bucket_count()); + } + + // We use a normal iterator to get bcks from ht + // We could use insert() here, but since we know there are + // no duplicates, we can be more efficient + assert((bucket_count() & (bucket_count()-1)) == 0); // a power of two + const size_type bucket_count_minus_one = (const size_type)(bucket_count() - 1); + + // THIS IS THE MAJOR LINE THAT DIFFERS FROM COPY_FROM(): + for (destructive_iterator it = ht.destructive_begin(); + it != ht.destructive_end(); ++it) + { + size_type num_probes = 0; + size_type bucknum; + for (bucknum = hash(get_key(*it)) & bucket_count_minus_one; + table.test(bucknum); // table.test() OK since no erase() + bucknum = (size_type)((bucknum + JUMP_(key, num_probes)) & (bucket_count()-1))) + { + ++num_probes; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + table.move(bucknum, *it); // moves the value to here + } + settings.inc_num_ht_copies(); + } + + + // Required by the spec for hashed associative container +public: + // Though the docs say this should be num_buckets, I think it's much + // more useful as num_elements. As a special feature, calling with + // req_elements==0 will cause us to shrink if we can, saving space. + // ----------------------------------------------------------------- + void resize(size_type req_elements) + { + // resize to this or larger + if (settings.consider_shrink() || req_elements == 0) + _maybe_shrink(); + if (req_elements > table.num_nonempty()) // we only grow + _resize_delta((size_type)(req_elements - table.num_nonempty())); + } + + // Get and change the value of shrink_factor and enlarge_factor. The + // description at the beginning of this file explains how to choose + // the values. Setting the shrink parameter to 0.0 ensures that the + // table never shrinks. + // ------------------------------------------------------------------ + void get_resizing_parameters(float* shrink, float* grow) const + { + *shrink = settings.shrink_factor(); + *grow = settings.enlarge_factor(); + } + + float get_shrink_factor() const { return settings.shrink_factor(); } + float get_enlarge_factor() const { return settings.enlarge_factor(); } + + void set_resizing_parameters(float shrink, float grow) + { + settings.set_resizing_parameters(shrink, grow); + settings.reset_thresholds(bucket_count()); + } + + void set_shrink_factor(float shrink) + { + set_resizing_parameters(shrink, get_enlarge_factor()); + } + + void set_enlarge_factor(float grow) + { + set_resizing_parameters(get_shrink_factor(), grow); + } + + // CONSTRUCTORS -- as required by the specs, we take a size, + // but also let you specify a hashfunction, key comparator, + // and key extractor. We also define a copy constructor and =. + // DESTRUCTOR -- the default is fine, surprisingly. + // ------------------------------------------------------------ + explicit sparse_hashtable(size_type expected_max_items_in_table = 0, + const HashFcn& hf = HashFcn(), + const EqualKey& eql = EqualKey(), + const ExtractKey& ext = ExtractKey(), + const SetKey& set = SetKey(), + const allocator_type& alloc = allocator_type()) + : settings(hf), + key_info(ext, set, eql), + num_deleted(0), + table((expected_max_items_in_table == 0 + ? HT_DEFAULT_STARTING_BUCKETS + : settings.min_buckets(expected_max_items_in_table, 0)), + alloc) + { + settings.reset_thresholds(bucket_count()); + } + + // As a convenience for resize(), we allow an optional second argument + // which lets you make this new hashtable a different size than ht. + // We also provide a mechanism of saying you want to "move" the ht argument + // into us instead of copying. + // ------------------------------------------------------------------------ + sparse_hashtable(const sparse_hashtable& ht, + size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS) + : settings(ht.settings), + key_info(ht.key_info), + num_deleted(0), + table(0) + { + settings.reset_thresholds(bucket_count()); + _copy_from(ht, min_buckets_wanted); + } + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + + sparse_hashtable(sparse_hashtable&& o) : + settings(std::move(o.settings)), + key_info(std::move(o.key_info)), + num_deleted(o.num_deleted), + table(std::move(o.table)) + { + } + + sparse_hashtable(sparse_hashtable&& o, const allocator_type& alloc) : + settings(std::move(o.settings)), + key_info(std::move(o.key_info)), + num_deleted(o.num_deleted), + table(std::move(o.table), alloc) + { + } + + sparse_hashtable& operator=(sparse_hashtable&& o) + { + using std::swap; + + sparse_hashtable tmp(std::move(o)); + swap(tmp, *this); + return *this; + } +#endif + + sparse_hashtable(MoveDontCopyT mover, + sparse_hashtable& ht, + size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS) + : settings(ht.settings), + key_info(ht.key_info), + num_deleted(0), + table(min_buckets_wanted, ht.table.get_allocator()) + //table(min_buckets_wanted) + { + settings.reset_thresholds(bucket_count()); + _move_from(mover, ht, min_buckets_wanted); + } + + sparse_hashtable& operator=(const sparse_hashtable& ht) + { + if (&ht == this) + return *this; // don't copy onto ourselves + settings = ht.settings; + key_info = ht.key_info; + num_deleted = ht.num_deleted; + + // _copy_from() calls clear and sets num_deleted to 0 too + _copy_from(ht, HT_MIN_BUCKETS); + + // we purposefully don't copy the allocator, which may not be copyable + return *this; + } + + // Many STL algorithms use swap instead of copy constructors + void swap(sparse_hashtable& ht) + { + using std::swap; + + swap(settings, ht.settings); + swap(key_info, ht.key_info); + swap(num_deleted, ht.num_deleted); + table.swap(ht.table); + settings.reset_thresholds(bucket_count()); // also resets consider_shrink + ht.settings.reset_thresholds(ht.bucket_count()); + // we purposefully don't swap the allocator, which may not be swap-able + } + + // It's always nice to be able to clear a table without deallocating it + void clear() + { + if (!empty() || num_deleted != 0) + { + table.clear(); + table = Table(HT_DEFAULT_STARTING_BUCKETS); + } + settings.reset_thresholds(bucket_count()); + num_deleted = 0; + } + + // LOOKUP ROUTINES +private: + + enum pos_type { pt_empty = 0, pt_erased, pt_full }; + // ------------------------------------------------------------------- + class Position + { + public: + + Position() : _t(pt_empty) {} + Position(pos_type t, size_type idx) : _t(t), _idx(idx) {} + + pos_type _t; + size_type _idx; + }; + + // Returns a pair: + // - 'first' is a code, 2 if key already present, 0 or 1 otherwise. + // - 'second' is a position, where the key should go + // Note: because of deletions where-to-insert is not trivial: it's the + // first deleted bucket we see, as long as we don't find the key later + // ------------------------------------------------------------------- + Position _find_position(const key_type &key) const + { + size_type num_probes = 0; // how many times we've probed + const size_type bucket_count_minus_one = (const size_type)(bucket_count() - 1); + size_type bucknum = hash(key) & bucket_count_minus_one; + Position pos; + + while (1) + { + // probe until something happens + // ----------------------------- + typename Table::GrpPos grp_pos(table, bucknum); + + if (!grp_pos.test_strict()) + { + // bucket is empty => key not present + return pos._t ? pos : Position(pt_empty, bucknum); + } + else if (grp_pos.test()) + { + reference ref(grp_pos.unsafe_get()); + + if (equals(key, get_key(ref))) + return Position(pt_full, bucknum); + } + else if (pos._t == pt_empty) + { + // first erased position + pos._t = pt_erased; + pos._idx = bucknum; + } + + ++num_probes; // we're doing another probe + bucknum = (size_type)((bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one); + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + } + +public: + // I hate to duplicate find() like that, but it is + // significantly faster to not have the intermediate pair + // ------------------------------------------------------------------ + iterator find(const key_type& key) + { + size_type num_probes = 0; // how many times we've probed + const size_type bucket_count_minus_one = bucket_count() - 1; + size_type bucknum = hash(key) & bucket_count_minus_one; + + while (1) // probe until something happens + { + typename Table::GrpPos grp_pos(table, bucknum); + + if (!grp_pos.test_strict()) + return end(); // bucket is empty + if (grp_pos.test()) + { + reference ref(grp_pos.unsafe_get()); + + if (equals(key, get_key(ref))) + return grp_pos.get_iter(ref); + } + ++num_probes; // we're doing another probe + bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + } + + // Wish I could avoid the duplicate find() const and non-const. + // ------------------------------------------------------------ + const_iterator find(const key_type& key) const + { + size_type num_probes = 0; // how many times we've probed + const size_type bucket_count_minus_one = bucket_count() - 1; + size_type bucknum = hash(key) & bucket_count_minus_one; + + while (1) // probe until something happens + { + typename Table::GrpPos grp_pos(table, bucknum); + + if (!grp_pos.test_strict()) + return end(); // bucket is empty + else if (grp_pos.test()) + { + reference ref(grp_pos.unsafe_get()); + + if (equals(key, get_key(ref))) + return _mk_const_iterator(table.get_iter(bucknum, &ref)); + } + ++num_probes; // we're doing another probe + bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + } + + // This is a tr1 method: the bucket a given key is in, or what bucket + // it would be put in, if it were to be inserted. Shrug. + // ------------------------------------------------------------------ + size_type bucket(const key_type& key) const + { + Position pos = _find_position(key); + return pos._idx; + } + + // Counts how many elements have key key. For maps, it's either 0 or 1. + // --------------------------------------------------------------------- + size_type count(const key_type &key) const + { + Position pos = _find_position(key); + return (size_type)(pos._t == pt_full ? 1 : 0); + } + + // Likewise, equal_range doesn't really make sense for us. Oh well. + // ----------------------------------------------------------------- + std::pair equal_range(const key_type& key) + { + iterator pos = find(key); // either an iterator or end + if (pos == end()) + return std::pair(pos, pos); + else + { + const iterator startpos = pos++; + return std::pair(startpos, pos); + } + } + + std::pair equal_range(const key_type& key) const + { + const_iterator pos = find(key); // either an iterator or end + if (pos == end()) + return std::pair(pos, pos); + else + { + const const_iterator startpos = pos++; + return std::pair(startpos, pos); + } + } + + + // INSERTION ROUTINES +private: + // Private method used by insert_noresize and find_or_insert. + template + reference _insert_at(T& obj, size_type pos, bool erased) + { + if (size() >= max_size()) + { + throw_exception(std::length_error("insert overflow")); + } + if (erased) + { + assert(num_deleted); + --num_deleted; + } + return table.set(pos, obj); + } + + // If you know *this is big enough to hold obj, use this routine + template + std::pair _insert_noresize(T& obj) + { + Position pos = _find_position(get_key(obj)); + bool already_there = (pos._t == pt_full); + + if (!already_there) + { + reference ref(_insert_at(obj, pos._idx, pos._t == pt_erased)); + return std::pair(_mk_iterator(table.get_iter(pos._idx, &ref)), true); + } + return std::pair(_mk_iterator(table.get_iter(pos._idx)), false); + } + + // Specializations of insert(it, it) depending on the power of the iterator: + // (1) Iterator supports operator-, resize before inserting + template + void _insert(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag /*unused*/) + { + int64_t dist = std::distance(f, l); + if (dist < 0 || static_cast(dist) >= (std::numeric_limits::max)()) + throw_exception(std::length_error("insert-range overflow")); + + _resize_delta(static_cast(dist)); + + for (; dist > 0; --dist, ++f) + _insert_noresize(*f); + } + + // (2) Arbitrary iterator, can't tell how much to resize + template + void _insert(InputIterator f, InputIterator l, std::input_iterator_tag /*unused*/) + { + for (; f != l; ++f) + _insert(*f); + } + +public: + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) + template + std::pair emplace(Args&&... args) + { + _resize_delta(1); + value_type obj(std::forward(args)...); + return _insert_noresize(obj); + } +#endif + + // This is the normal insert routine, used by the outside world + std::pair insert(const_reference obj) + { + _resize_delta(1); // adding an object, grow if need be + return _insert_noresize(obj); + } + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + template< class P > + std::pair insert(P &&obj) + { + _resize_delta(1); // adding an object, grow if need be + value_type val(std::forward(obj)); + return _insert_noresize(val); + } +#endif + + // When inserting a lot at a time, we specialize on the type of iterator + template + void insert(InputIterator f, InputIterator l) + { + // specializes on iterator type + _insert(f, l, + typename std::iterator_traits::iterator_category()); + } + + // DefaultValue is a functor that takes a key and returns a value_type + // representing the default value to be inserted if none is found. + template + value_type& find_or_insert(const key_type& key) + { + size_type num_probes = 0; // how many times we've probed + const size_type bucket_count_minus_one = bucket_count() - 1; + size_type bucknum = hash(key) & bucket_count_minus_one; + DefaultValue default_value; + size_type erased_pos = 0; + bool erased = false; + + while (1) // probe until something happens + { + typename Table::GrpPos grp_pos(table, bucknum); + + if (!grp_pos.test_strict()) + { + // not found + if (_resize_delta(1)) + { + // needed to rehash to make room + // Since we resized, we can't use pos, so recalculate where to insert. + value_type def(default_value(key)); + return *(_insert_noresize(def).first); + } + else + { + // no need to rehash, insert right here + value_type def(default_value(key)); + return _insert_at(def, erased ? erased_pos : bucknum, erased); + } + } + if (grp_pos.test()) + { + reference ref(grp_pos.unsafe_get()); + + if (equals(key, get_key(ref))) + return ref; + } + else if (!erased) + { + // first erased position + erased_pos = bucknum; + erased = true; + } + + ++num_probes; // we're doing another probe + bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + } + + size_type erase(const key_type& key) + { + size_type num_probes = 0; // how many times we've probed + const size_type bucket_count_minus_one = bucket_count() - 1; + size_type bucknum = hash(key) & bucket_count_minus_one; + + while (1) // probe until something happens + { + typename Table::GrpPos grp_pos(table, bucknum); + + if (!grp_pos.test_strict()) + return 0; // bucket is empty, we deleted nothing + if (grp_pos.test()) + { + reference ref(grp_pos.unsafe_get()); + + if (equals(key, get_key(ref))) + { + grp_pos.erase(table); + ++num_deleted; + settings.set_consider_shrink(true); // will think about shrink after next insert + return 1; // because we deleted one thing + } + } + ++num_probes; // we're doing another probe + bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one; + assert(num_probes < bucket_count() + && "Hashtable is full: an error in key_equal<> or hash<>"); + } + } + + const_iterator erase(const_iterator pos) + { + if (pos == cend()) + return cend(); // sanity check + + const_iterator nextpos = table.erase(pos); + ++num_deleted; + settings.set_consider_shrink(true); + return nextpos; + } + + const_iterator erase(const_iterator f, const_iterator l) + { + if (f == cend()) + return cend(); // sanity check + + size_type num_before = table.num_nonempty(); + const_iterator nextpos = table.erase(f, l); + num_deleted += num_before - table.num_nonempty(); + settings.set_consider_shrink(true); + return nextpos; + } + + // Deleted key routines - just to keep google test framework happy + // we don't actually use the deleted key + // --------------------------------------------------------------- + void set_deleted_key(const key_type&) + { + } + + void clear_deleted_key() + { + } + + bool operator==(const sparse_hashtable& ht) const + { + if (this == &ht) + return true; + + if (size() != ht.size()) + return false; + + for (const_iterator it = begin(); it != end(); ++it) + { + const_iterator it2 = ht.find(get_key(*it)); + if ((it2 == ht.end()) || (*it != *it2)) + return false; + } + + return true; + } + + bool operator!=(const sparse_hashtable& ht) const + { + return !(*this == ht); + } + + + // I/O + // We support reading and writing hashtables to disk. NOTE that + // this only stores the hashtable metadata, not the stuff you've + // actually put in the hashtable! Alas, since I don't know how to + // write a hasher or key_equal, you have to make sure everything + // but the table is the same. We compact before writing. + // + // The OUTPUT type needs to support a Write() operation. File and + // OutputBuffer are appropriate types to pass in. + // + // The INPUT type needs to support a Read() operation. File and + // InputBuffer are appropriate types to pass in. + // ------------------------------------------------------------- + template + bool write_metadata(OUTPUT *fp) + { + return table.write_metadata(fp); + } + + template + bool read_metadata(INPUT *fp) + { + num_deleted = 0; // since we got rid before writing + const bool result = table.read_metadata(fp); + settings.reset_thresholds(bucket_count()); + return result; + } + + // Only meaningful if value_type is a POD. + template + bool write_nopointer_data(OUTPUT *fp) + { + return table.write_nopointer_data(fp); + } + + // Only meaningful if value_type is a POD. + template + bool read_nopointer_data(INPUT *fp) + { + return table.read_nopointer_data(fp); + } + + // INPUT and OUTPUT must be either a FILE, *or* a C++ stream + // (istream, ostream, etc) *or* a class providing + // Read(void*, size_t) and Write(const void*, size_t) + // (respectively), which writes a buffer into a stream + // (which the INPUT/OUTPUT instance presumably owns). + + typedef sparsehash_internal::pod_serializer NopointerSerializer; + + // ValueSerializer: a functor. operator()(OUTPUT*, const value_type&) + template + bool serialize(ValueSerializer serializer, OUTPUT *fp) + { + return table.serialize(serializer, fp); + } + + // ValueSerializer: a functor. operator()(INPUT*, value_type*) + template + bool unserialize(ValueSerializer serializer, INPUT *fp) + { + num_deleted = 0; // since we got rid before writing + const bool result = table.unserialize(serializer, fp); + settings.reset_thresholds(bucket_count()); + return result; + } + +private: + + // Package templated functors with the other types to eliminate memory + // needed for storing these zero-size operators. Since ExtractKey and + // hasher's operator() might have the same function signature, they + // must be packaged in different classes. + // ------------------------------------------------------------------------- + struct Settings : + sparsehash_internal::sh_hashtable_settings + { + explicit Settings(const hasher& hf) + : sparsehash_internal::sh_hashtable_settings + (hf, HT_OCCUPANCY_PCT / 100.0f, HT_EMPTY_PCT / 100.0f) {} + }; + + // KeyInfo stores delete key and packages zero-size functors: + // ExtractKey and SetKey. + // --------------------------------------------------------- + class KeyInfo : public ExtractKey, public SetKey, public EqualKey + { + public: + KeyInfo(const ExtractKey& ek, const SetKey& sk, const EqualKey& eq) + : ExtractKey(ek), SetKey(sk), EqualKey(eq) + { + } + + // We want to return the exact same type as ExtractKey: Key or const Key& + typename ExtractKey::result_type get_key(const_reference v) const + { + return ExtractKey::operator()(v); + } + + bool equals(const key_type& a, const key_type& b) const + { + return EqualKey::operator()(a, b); + } + }; + + // Utility functions to access the templated operators + size_t hash(const key_type& v) const + { + return settings.hash(v); + } + + bool equals(const key_type& a, const key_type& b) const + { + return key_info.equals(a, b); + } + + typename ExtractKey::result_type get_key(const_reference v) const + { + return key_info.get_key(v); + } + +private: + // Actual data + // ----------- + Settings settings; + KeyInfo key_info; + size_type num_deleted; + Table table; // holds num_buckets and num_elements too +}; + +#undef JUMP_ + +// ----------------------------------------------------------------------------- +template +const typename sparse_hashtable::size_type +sparse_hashtable::ILLEGAL_BUCKET; + +// How full we let the table get before we resize. Knuth says .8 is +// good -- higher causes us to probe too much, though saves memory +// ----------------------------------------------------------------------------- +template +const int sparse_hashtable::HT_OCCUPANCY_PCT = 50; + +// How empty we let the table get before we resize lower. +// It should be less than OCCUPANCY_PCT / 2 or we thrash resizing +// ----------------------------------------------------------------------------- +template +const int sparse_hashtable::HT_EMPTY_PCT += static_cast(0.4 * + sparse_hashtable::HT_OCCUPANCY_PCT); + + +// ---------------------------------------------------------------------- +// S P A R S E _ H A S H _ M A P +// ---------------------------------------------------------------------- +template , + class EqualKey = std::equal_to, + class Alloc = SPP_DEFAULT_ALLOCATOR > > +class sparse_hash_map +{ +public: + typedef typename std::pair value_type; + +private: + // Apparently select1st is not stl-standard, so we define our own + struct SelectKey + { + typedef const Key& result_type; + + inline const Key& operator()(const value_type& p) const + { + return p.first; + } + }; + + struct SetKey + { + inline void operator()(value_type* value, const Key& new_key) const + { + *const_cast(&value->first) = new_key; + } + }; + + // For operator[]. + struct DefaultValue + { + inline value_type operator()(const Key& key) const + { + return std::make_pair(key, T()); + } + }; + + // The actual data + typedef sparse_hashtable ht; + +public: + typedef typename ht::key_type key_type; + typedef T data_type; + typedef T mapped_type; + typedef typename ht::hasher hasher; + typedef typename ht::key_equal key_equal; + typedef Alloc allocator_type; + + typedef typename ht::size_type size_type; + typedef typename ht::difference_type difference_type; + typedef typename ht::pointer pointer; + typedef typename ht::const_pointer const_pointer; + typedef typename ht::reference reference; + typedef typename ht::const_reference const_reference; + + typedef typename ht::iterator iterator; + typedef typename ht::const_iterator const_iterator; + typedef typename ht::local_iterator local_iterator; + typedef typename ht::const_local_iterator const_local_iterator; + + // Iterator functions + iterator begin() { return rep.begin(); } + iterator end() { return rep.end(); } + const_iterator begin() const { return rep.cbegin(); } + const_iterator end() const { return rep.cend(); } + const_iterator cbegin() const { return rep.cbegin(); } + const_iterator cend() const { return rep.cend(); } + + // These come from tr1's unordered_map. For us, a bucket has 0 or 1 elements. + local_iterator begin(size_type i) { return rep.begin(i); } + local_iterator end(size_type i) { return rep.end(i); } + const_local_iterator begin(size_type i) const { return rep.begin(i); } + const_local_iterator end(size_type i) const { return rep.end(i); } + const_local_iterator cbegin(size_type i) const { return rep.cbegin(i); } + const_local_iterator cend(size_type i) const { return rep.cend(i); } + + // Accessor functions + // ------------------ + allocator_type get_allocator() const { return rep.get_allocator(); } + hasher hash_funct() const { return rep.hash_funct(); } + hasher hash_function() const { return hash_funct(); } + key_equal key_eq() const { return rep.key_eq(); } + + + // Constructors + // ------------ + explicit sparse_hash_map(size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) + : rep(n, hf, eql, SelectKey(), SetKey(), alloc) + { + } + + explicit sparse_hash_map(const allocator_type& alloc) : + rep(0, hasher(), key_equal(), SelectKey(), SetKey(), alloc) + { + } + + sparse_hash_map(size_type n, const allocator_type& alloc) : + rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) + { + } + + sparse_hash_map(size_type n, const hasher& hf, const allocator_type& alloc) : + rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) + { + } + + template + sparse_hash_map(InputIterator f, InputIterator l, + size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) + : rep(n, hf, eql, SelectKey(), SetKey(), alloc) + { + rep.insert(f, l); + } + + template + sparse_hash_map(InputIterator f, InputIterator l, + size_type n, const allocator_type& alloc) + : rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) + { + rep.insert(f, l); + } + + template + sparse_hash_map(InputIterator f, InputIterator l, + size_type n, const hasher& hf, const allocator_type& alloc) + : rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) + { + rep.insert(f, l); + } + + sparse_hash_map(const sparse_hash_map &o) : + rep(o.rep) + {} + + sparse_hash_map(const sparse_hash_map &o, + const allocator_type& alloc) : + rep(o.rep, alloc) + {} + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + sparse_hash_map(sparse_hash_map &&o) : + rep(std::move(o.rep)) + {} + + sparse_hash_map(sparse_hash_map &&o, + const allocator_type& alloc) : + rep(std::move(o.rep), alloc) + {} +#endif + +#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) + sparse_hash_map(std::initializer_list init, + size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) + : rep(n, hf, eql, SelectKey(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_map(std::initializer_list init, + size_type n, const allocator_type& alloc) : + rep(n, hasher(), key_equal(), SelectKey(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_map(std::initializer_list init, + size_type n, const hasher& hf, const allocator_type& alloc) : + rep(n, hf, key_equal(), SelectKey(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_map& operator=(std::initializer_list init) + { + rep.clear(); + rep.insert(init.begin(), init.end()); + return *this; + } + + void insert(std::initializer_list init) + { + rep.insert(init.begin(), init.end()); + } +#endif + + sparse_hash_map& operator=(const sparse_hash_map &o) + { + rep = o.rep; + return *this; + } + + void clear() { rep.clear(); } + void swap(sparse_hash_map& hs) { rep.swap(hs.rep); } + + // Functions concerning size + // ------------------------- + size_type size() const { return rep.size(); } + size_type max_size() const { return rep.max_size(); } + bool empty() const { return rep.empty(); } + size_type bucket_count() const { return rep.bucket_count(); } + size_type max_bucket_count() const { return rep.max_bucket_count(); } + + size_type bucket_size(size_type i) const { return rep.bucket_size(i); } + size_type bucket(const key_type& key) const { return rep.bucket(key); } + float load_factor() const { return size() * 1.0f / bucket_count(); } + + float max_load_factor() const { return rep.get_enlarge_factor(); } + void max_load_factor(float grow) { rep.set_enlarge_factor(grow); } + + float min_load_factor() const { return rep.get_shrink_factor(); } + void min_load_factor(float shrink){ rep.set_shrink_factor(shrink); } + + void set_resizing_parameters(float shrink, float grow) + { + rep.set_resizing_parameters(shrink, grow); + } + + void resize(size_type cnt) { rep.resize(cnt); } + void rehash(size_type cnt) { resize(cnt); } // c++11 name + void reserve(size_type cnt) { resize(cnt); } // c++11 + + // Lookup + // ------ + iterator find(const key_type& key) { return rep.find(key); } + const_iterator find(const key_type& key) const { return rep.find(key); } + bool contains(const key_type& key) const { return rep.find(key) != rep.end(); } + + mapped_type& operator[](const key_type& key) + { + return rep.template find_or_insert(key).second; + } + + size_type count(const key_type& key) const { return rep.count(key); } + + std::pair + equal_range(const key_type& key) { return rep.equal_range(key); } + + std::pair + equal_range(const key_type& key) const { return rep.equal_range(key); } + + mapped_type& at(const key_type& key) + { + iterator it = rep.find(key); + if (it == rep.end()) + throw_exception(std::out_of_range("at: key not present")); + return it->second; + } + + const mapped_type& at(const key_type& key) const + { + const_iterator it = rep.find(key); + if (it == rep.cend()) + throw_exception(std::out_of_range("at: key not present")); + return it->second; + } + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) + template + std::pair emplace(Args&&... args) + { + return rep.emplace(std::forward(args)...); + } + + template + iterator emplace_hint(const_iterator , Args&&... args) + { + return rep.emplace(std::forward(args)...).first; + } +#endif + + // Insert + // ------ + std::pair + insert(const value_type& obj) { return rep.insert(obj); } + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + template< class P > + std::pair insert(P&& obj) { return rep.insert(std::forward

(obj)); } +#endif + + template + void insert(InputIterator f, InputIterator l) { rep.insert(f, l); } + + void insert(const_iterator f, const_iterator l) { rep.insert(f, l); } + + iterator insert(iterator /*unused*/, const value_type& obj) { return insert(obj).first; } + iterator insert(const_iterator /*unused*/, const value_type& obj) { return insert(obj).first; } + + // Deleted key routines - just to keep google test framework happy + // we don't actually use the deleted key + // --------------------------------------------------------------- + void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); } + void clear_deleted_key() { rep.clear_deleted_key(); } + key_type deleted_key() const { return rep.deleted_key(); } + + // Erase + // ----- + size_type erase(const key_type& key) { return rep.erase(key); } + iterator erase(iterator it) { return rep.erase(it); } + iterator erase(iterator f, iterator l) { return rep.erase(f, l); } + iterator erase(const_iterator it) { return rep.erase(it); } + iterator erase(const_iterator f, const_iterator l){ return rep.erase(f, l); } + + // Comparison + // ---------- + bool operator==(const sparse_hash_map& hs) const { return rep == hs.rep; } + bool operator!=(const sparse_hash_map& hs) const { return rep != hs.rep; } + + + // I/O -- this is an add-on for writing metainformation to disk + // + // For maximum flexibility, this does not assume a particular + // file type (though it will probably be a FILE *). We just pass + // the fp through to rep. + + // If your keys and values are simple enough, you can pass this + // serializer to serialize()/unserialize(). "Simple enough" means + // value_type is a POD type that contains no pointers. Note, + // however, we don't try to normalize endianness. + // --------------------------------------------------------------- + typedef typename ht::NopointerSerializer NopointerSerializer; + + // serializer: a class providing operator()(OUTPUT*, const value_type&) + // (writing value_type to OUTPUT). You can specify a + // NopointerSerializer object if appropriate (see above). + // fp: either a FILE*, OR an ostream*/subclass_of_ostream*, OR a + // pointer to a class providing size_t Write(const void*, size_t), + // which writes a buffer into a stream (which fp presumably + // owns) and returns the number of bytes successfully written. + // Note basic_ostream is not currently supported. + // --------------------------------------------------------------- + template + bool serialize(ValueSerializer serializer, OUTPUT* fp) + { + return rep.serialize(serializer, fp); + } + + // serializer: a functor providing operator()(INPUT*, value_type*) + // (reading from INPUT and into value_type). You can specify a + // NopointerSerializer object if appropriate (see above). + // fp: either a FILE*, OR an istream*/subclass_of_istream*, OR a + // pointer to a class providing size_t Read(void*, size_t), + // which reads into a buffer from a stream (which fp presumably + // owns) and returns the number of bytes successfully read. + // Note basic_istream is not currently supported. + // NOTE: Since value_type is std::pair, ValueSerializer + // may need to do a const cast in order to fill in the key. + // NOTE: if Key or T are not POD types, the serializer MUST use + // placement-new to initialize their values, rather than a normal + // equals-assignment or similar. (The value_type* passed into the + // serializer points to garbage memory.) + // --------------------------------------------------------------- + template + bool unserialize(ValueSerializer serializer, INPUT* fp) + { + return rep.unserialize(serializer, fp); + } + + // The four methods below are DEPRECATED. + // Use serialize() and unserialize() for new code. + // ----------------------------------------------- + template + bool write_metadata(OUTPUT *fp) { return rep.write_metadata(fp); } + + template + bool read_metadata(INPUT *fp) { return rep.read_metadata(fp); } + + template + bool write_nopointer_data(OUTPUT *fp) { return rep.write_nopointer_data(fp); } + + template + bool read_nopointer_data(INPUT *fp) { return rep.read_nopointer_data(fp); } + + +private: + // The actual data + // --------------- + ht rep; +}; + +// ---------------------------------------------------------------------- +// S P A R S E _ H A S H _ S E T +// ---------------------------------------------------------------------- + +template , + class EqualKey = std::equal_to, + class Alloc = SPP_DEFAULT_ALLOCATOR > +class sparse_hash_set +{ +private: + // Apparently identity is not stl-standard, so we define our own + struct Identity + { + typedef const Value& result_type; + inline const Value& operator()(const Value& v) const { return v; } + }; + + struct SetKey + { + inline void operator()(Value* value, const Value& new_key) const + { + *value = new_key; + } + }; + + typedef sparse_hashtable ht; + +public: + typedef typename ht::key_type key_type; + typedef typename ht::value_type value_type; + typedef typename ht::hasher hasher; + typedef typename ht::key_equal key_equal; + typedef Alloc allocator_type; + + typedef typename ht::size_type size_type; + typedef typename ht::difference_type difference_type; + typedef typename ht::const_pointer pointer; + typedef typename ht::const_pointer const_pointer; + typedef typename ht::const_reference reference; + typedef typename ht::const_reference const_reference; + + typedef typename ht::const_iterator iterator; + typedef typename ht::const_iterator const_iterator; + typedef typename ht::const_local_iterator local_iterator; + typedef typename ht::const_local_iterator const_local_iterator; + + + // Iterator functions -- recall all iterators are const + iterator begin() const { return rep.begin(); } + iterator end() const { return rep.end(); } + const_iterator cbegin() const { return rep.cbegin(); } + const_iterator cend() const { return rep.cend(); } + + // These come from tr1's unordered_set. For us, a bucket has 0 or 1 elements. + local_iterator begin(size_type i) const { return rep.begin(i); } + local_iterator end(size_type i) const { return rep.end(i); } + local_iterator cbegin(size_type i) const { return rep.cbegin(i); } + local_iterator cend(size_type i) const { return rep.cend(i); } + + + // Accessor functions + // ------------------ + allocator_type get_allocator() const { return rep.get_allocator(); } + hasher hash_funct() const { return rep.hash_funct(); } + hasher hash_function() const { return hash_funct(); } // tr1 name + key_equal key_eq() const { return rep.key_eq(); } + + + // Constructors + // ------------ + explicit sparse_hash_set(size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) : + rep(n, hf, eql, Identity(), SetKey(), alloc) + { + } + + explicit sparse_hash_set(const allocator_type& alloc) : + rep(0, hasher(), key_equal(), Identity(), SetKey(), alloc) + { + } + + sparse_hash_set(size_type n, const allocator_type& alloc) : + rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) + { + } + + sparse_hash_set(size_type n, const hasher& hf, + const allocator_type& alloc) : + rep(n, hf, key_equal(), Identity(), SetKey(), alloc) + { + } + + template + sparse_hash_set(InputIterator f, InputIterator l, + size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) + : rep(n, hf, eql, Identity(), SetKey(), alloc) + { + rep.insert(f, l); + } + + template + sparse_hash_set(InputIterator f, InputIterator l, + size_type n, const allocator_type& alloc) + : rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) + { + rep.insert(f, l); + } + + template + sparse_hash_set(InputIterator f, InputIterator l, + size_type n, const hasher& hf, const allocator_type& alloc) + : rep(n, hf, key_equal(), Identity(), SetKey(), alloc) + { + rep.insert(f, l); + } + + sparse_hash_set(const sparse_hash_set &o) : + rep(o.rep) + {} + + sparse_hash_set(const sparse_hash_set &o, + const allocator_type& alloc) : + rep(o.rep, alloc) + {} + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + sparse_hash_set(sparse_hash_set &&o) : + rep(std::move(o.rep)) + {} + + sparse_hash_set(sparse_hash_set &&o, + const allocator_type& alloc) : + rep(std::move(o.rep), alloc) + {} +#endif + +#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) + sparse_hash_set(std::initializer_list init, + size_type n = 0, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& alloc = allocator_type()) : + rep(n, hf, eql, Identity(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_set(std::initializer_list init, + size_type n, const allocator_type& alloc) : + rep(n, hasher(), key_equal(), Identity(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_set(std::initializer_list init, + size_type n, const hasher& hf, + const allocator_type& alloc) : + rep(n, hf, key_equal(), Identity(), SetKey(), alloc) + { + rep.insert(init.begin(), init.end()); + } + + sparse_hash_set& operator=(std::initializer_list init) + { + rep.clear(); + rep.insert(init.begin(), init.end()); + return *this; + } + + void insert(std::initializer_list init) + { + rep.insert(init.begin(), init.end()); + } + +#endif + + sparse_hash_set& operator=(const sparse_hash_set &o) + { + rep = o.rep; + return *this; + } + + void clear() { rep.clear(); } + void swap(sparse_hash_set& hs) { rep.swap(hs.rep); } + + + // Functions concerning size + // ------------------------- + size_type size() const { return rep.size(); } + size_type max_size() const { return rep.max_size(); } + bool empty() const { return rep.empty(); } + size_type bucket_count() const { return rep.bucket_count(); } + size_type max_bucket_count() const { return rep.max_bucket_count(); } + + size_type bucket_size(size_type i) const { return rep.bucket_size(i); } + size_type bucket(const key_type& key) const { return rep.bucket(key); } + + float load_factor() const { return size() * 1.0f / bucket_count(); } + + float max_load_factor() const { return rep.get_enlarge_factor(); } + void max_load_factor(float grow) { rep.set_enlarge_factor(grow); } + + float min_load_factor() const { return rep.get_shrink_factor(); } + void min_load_factor(float shrink){ rep.set_shrink_factor(shrink); } + + void set_resizing_parameters(float shrink, float grow) + { + rep.set_resizing_parameters(shrink, grow); + } + + void resize(size_type cnt) { rep.resize(cnt); } + void rehash(size_type cnt) { resize(cnt); } // c++11 name + void reserve(size_type cnt) { resize(cnt); } // c++11 + + // Lookup + // ------ + iterator find(const key_type& key) const { return rep.find(key); } + bool contains(const key_type& key) const { return rep.find(key) != rep.end(); } + + size_type count(const key_type& key) const { return rep.count(key); } + + std::pair + equal_range(const key_type& key) const { return rep.equal_range(key); } + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) + template + std::pair emplace(Args&&... args) + { + return rep.emplace(std::forward(args)...); + } + + template + iterator emplace_hint(const_iterator , Args&&... args) + { + return rep.emplace(std::forward(args)...).first; + } +#endif + + // Insert + // ------ + std::pair insert(const value_type& obj) + { + std::pair p = rep.insert(obj); + return std::pair(p.first, p.second); // const to non-const + } + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) + template + std::pair insert(P&& obj) { return rep.insert(std::forward

(obj)); } +#endif + + template + void insert(InputIterator f, InputIterator l) { rep.insert(f, l); } + + void insert(const_iterator f, const_iterator l) { rep.insert(f, l); } + + iterator insert(iterator /*unused*/, const value_type& obj) { return insert(obj).first; } + + // Deleted key - do nothing - just to keep google test framework happy + // ------------------------------------------------------------------- + void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); } + void clear_deleted_key() { rep.clear_deleted_key(); } + key_type deleted_key() const { return rep.deleted_key(); } + + // Erase + // ----- + size_type erase(const key_type& key) { return rep.erase(key); } + iterator erase(iterator it) { return rep.erase(it); } + iterator erase(iterator f, iterator l) { return rep.erase(f, l); } + + // Comparison + // ---------- + bool operator==(const sparse_hash_set& hs) const { return rep == hs.rep; } + bool operator!=(const sparse_hash_set& hs) const { return rep != hs.rep; } + + + // I/O -- this is an add-on for writing metainformation to disk + // + // For maximum flexibility, this does not assume a particular + // file type (though it will probably be a FILE *). We just pass + // the fp through to rep. + + // If your keys and values are simple enough, you can pass this + // serializer to serialize()/unserialize(). "Simple enough" means + // value_type is a POD type that contains no pointers. Note, + // however, we don't try to normalize endianness. + // --------------------------------------------------------------- + typedef typename ht::NopointerSerializer NopointerSerializer; + + // serializer: a class providing operator()(OUTPUT*, const value_type&) + // (writing value_type to OUTPUT). You can specify a + // NopointerSerializer object if appropriate (see above). + // fp: either a FILE*, OR an ostream*/subclass_of_ostream*, OR a + // pointer to a class providing size_t Write(const void*, size_t), + // which writes a buffer into a stream (which fp presumably + // owns) and returns the number of bytes successfully written. + // Note basic_ostream is not currently supported. + // --------------------------------------------------------------- + template + bool serialize(ValueSerializer serializer, OUTPUT* fp) + { + return rep.serialize(serializer, fp); + } + + // serializer: a functor providing operator()(INPUT*, value_type*) + // (reading from INPUT and into value_type). You can specify a + // NopointerSerializer object if appropriate (see above). + // fp: either a FILE*, OR an istream*/subclass_of_istream*, OR a + // pointer to a class providing size_t Read(void*, size_t), + // which reads into a buffer from a stream (which fp presumably + // owns) and returns the number of bytes successfully read. + // Note basic_istream is not currently supported. + // NOTE: Since value_type is const Key, ValueSerializer + // may need to do a const cast in order to fill in the key. + // NOTE: if Key is not a POD type, the serializer MUST use + // placement-new to initialize its value, rather than a normal + // equals-assignment or similar. (The value_type* passed into + // the serializer points to garbage memory.) + // --------------------------------------------------------------- + template + bool unserialize(ValueSerializer serializer, INPUT* fp) + { + return rep.unserialize(serializer, fp); + } + + // The four methods below are DEPRECATED. + // Use serialize() and unserialize() for new code. + // ----------------------------------------------- + template + bool write_metadata(OUTPUT *fp) { return rep.write_metadata(fp); } + + template + bool read_metadata(INPUT *fp) { return rep.read_metadata(fp); } + + template + bool write_nopointer_data(OUTPUT *fp) { return rep.write_nopointer_data(fp); } + + template + bool read_nopointer_data(INPUT *fp) { return rep.read_nopointer_data(fp); } + +private: + // The actual data + // --------------- + ht rep; +}; + +} // spp_ namespace + + +// We need a global swap for all our classes as well +// ------------------------------------------------- + +template +inline void swap(spp_::sparsegroup &x, spp_::sparsegroup &y) +{ + x.swap(y); +} + +template +inline void swap(spp_::sparsetable &x, spp_::sparsetable &y) +{ + x.swap(y); +} + +template +inline void swap(spp_::sparse_hashtable &x, + spp_::sparse_hashtable &y) +{ + x.swap(y); +} + +template +inline void swap(spp_::sparse_hash_map& hm1, + spp_::sparse_hash_map& hm2) +{ + hm1.swap(hm2); +} + +template +inline void swap(spp_::sparse_hash_set& hs1, + spp_::sparse_hash_set& hs2) +{ + hs1.swap(hs2); +} + +#endif // sparsepp_h_guard_ diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_config.h b/resources/3rdparty/sparsepp/sparsepp/spp_config.h new file mode 100755 index 000000000..46eeee5c2 --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_config.h @@ -0,0 +1,781 @@ +#if !defined(spp_config_h_guard) +#define spp_config_h_guard + +// -------------------------------------------------- +// Sparsepp config macros +// some can be overriden on the command line +// -------------------------------------------------- +#ifndef SPP_NAMESPACE + #define SPP_NAMESPACE spp +#endif + +#ifndef spp_ + #define spp_ SPP_NAMESPACE +#endif + +#ifndef SPP_DEFAULT_ALLOCATOR + #if (defined(SPP_USE_SPP_ALLOC) && SPP_USE_SPP_ALLOC) && defined(_MSC_VER) + // ----------------------------------------------------------------------------- + // When building with the Microsoft compiler, we use a custom allocator because + // the default one fragments memory when reallocating. This is desirable only + // when creating large sparsepp hash maps. If you create lots of small hash_maps, + // define the following before including spp.h: + // #define SPP_DEFAULT_ALLOCATOR spp::libc_allocator + // ----------------------------------------------------------------------------- + #define SPP_DEFAULT_ALLOCATOR spp_::spp_allocator + #define SPP_INCLUDE_SPP_ALLOC + #else + #define SPP_DEFAULT_ALLOCATOR spp_::libc_allocator + #endif +#endif + +#ifndef SPP_GROUP_SIZE + // must be 32 or 64 + #define SPP_GROUP_SIZE 32 +#endif + +#ifndef SPP_ALLOC_SZ + // must be power of 2 (0 = agressive alloc, 1 = smallest memory usage, 2 = good compromise) + #define SPP_ALLOC_SZ 0 +#endif + +#ifndef SPP_STORE_NUM_ITEMS + // 1 uses a little bit more memory, but faster!! + #define SPP_STORE_NUM_ITEMS 1 +#endif + + +// --------------------------------------------------------------------------- +// Compiler detection code (SPP_ proprocessor macros) derived from Boost +// libraries. Therefore Boost software licence reproduced below. +// --------------------------------------------------------------------------- +// Boost Software License - Version 1.0 - August 17th, 2003 +// +// Permission is hereby granted, free of charge, to any person or organization +// obtaining a copy of the software and accompanying documentation covered by +// this license (the "Software") to use, reproduce, display, distribute, +// execute, and transmit the Software, and to prepare derivative works of the +// Software, and to permit third-parties to whom the Software is furnished to +// do so, all subject to the following: +// +// The copyright notices in the Software and this entire statement, including +// the above license grant, this restriction and the following disclaimer, +// must be included in all copies of the Software, in whole or in part, and +// all derivative works of the Software, unless such copies or derivative +// works are solely in the form of machine-executable object code generated by +// a source language processor. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// --------------------------------------------------------------------------- + +// Boost like configuration +// ------------------------ +#if defined __clang__ + + #if defined(i386) + #include + inline void spp_cpuid(int info[4], int InfoType) { + __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); + } + #endif + + #define SPP_POPCNT __builtin_popcount + #define SPP_POPCNT64 __builtin_popcountll + + #define SPP_HAS_CSTDINT + + #ifndef __has_extension + #define __has_extension __has_feature + #endif + + #if !__has_feature(cxx_exceptions) && !defined(SPP_NO_EXCEPTIONS) + #define SPP_NO_EXCEPTIONS + #endif + + #if !__has_feature(cxx_rtti) && !defined(SPP_NO_RTTI) + #define SPP_NO_RTTI + #endif + + #if !__has_feature(cxx_rtti) && !defined(SPP_NO_TYPEID) + #define SPP_NO_TYPEID + #endif + + #if defined(__int64) && !defined(__GNUC__) + #define SPP_HAS_MS_INT64 + #endif + + #define SPP_HAS_NRVO + + // Branch prediction hints + #if defined(__has_builtin) + #if __has_builtin(__builtin_expect) + #define SPP_LIKELY(x) __builtin_expect(x, 1) + #define SPP_UNLIKELY(x) __builtin_expect(x, 0) + #endif + #endif + + // Clang supports "long long" in all compilation modes. + #define SPP_HAS_LONG_LONG + + #if !__has_feature(cxx_constexpr) + #define SPP_NO_CXX11_CONSTEXPR + #endif + + #if !__has_feature(cxx_decltype) + #define SPP_NO_CXX11_DECLTYPE + #endif + + #if !__has_feature(cxx_decltype_incomplete_return_types) + #define SPP_NO_CXX11_DECLTYPE_N3276 + #endif + + #if !__has_feature(cxx_defaulted_functions) + #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS + #endif + + #if !__has_feature(cxx_deleted_functions) + #define SPP_NO_CXX11_DELETED_FUNCTIONS + #endif + + #if !__has_feature(cxx_explicit_conversions) + #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + #endif + + #if !__has_feature(cxx_default_function_template_args) + #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS + #endif + + #if !__has_feature(cxx_generalized_initializers) + #define SPP_NO_CXX11_HDR_INITIALIZER_LIST + #endif + + #if !__has_feature(cxx_lambdas) + #define SPP_NO_CXX11_LAMBDAS + #endif + + #if !__has_feature(cxx_local_type_template_args) + #define SPP_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS + #endif + + #if !__has_feature(cxx_raw_string_literals) + #define SPP_NO_CXX11_RAW_LITERALS + #endif + + #if !__has_feature(cxx_reference_qualified_functions) + #define SPP_NO_CXX11_REF_QUALIFIERS + #endif + + #if !__has_feature(cxx_generalized_initializers) + #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + #endif + + #if !__has_feature(cxx_rvalue_references) + #define SPP_NO_CXX11_RVALUE_REFERENCES + #endif + + #if !__has_feature(cxx_static_assert) + #define SPP_NO_CXX11_STATIC_ASSERT + #endif + + #if !__has_feature(cxx_alias_templates) + #define SPP_NO_CXX11_TEMPLATE_ALIASES + #endif + + #if !__has_feature(cxx_variadic_templates) + #define SPP_NO_CXX11_VARIADIC_TEMPLATES + #endif + + #if !__has_feature(cxx_user_literals) + #define SPP_NO_CXX11_USER_DEFINED_LITERALS + #endif + + #if !__has_feature(cxx_alignas) + #define SPP_NO_CXX11_ALIGNAS + #endif + + #if !__has_feature(cxx_trailing_return) + #define SPP_NO_CXX11_TRAILING_RESULT_TYPES + #endif + + #if !__has_feature(cxx_inline_namespaces) + #define SPP_NO_CXX11_INLINE_NAMESPACES + #endif + + #if !__has_feature(cxx_override_control) + #define SPP_NO_CXX11_FINAL + #endif + + #if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) + #define SPP_NO_CXX14_BINARY_LITERALS + #endif + + #if !__has_feature(__cxx_decltype_auto__) + #define SPP_NO_CXX14_DECLTYPE_AUTO + #endif + + #if !__has_feature(__cxx_init_captures__) + #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES + #endif + + #if !__has_feature(__cxx_generic_lambdas__) + #define SPP_NO_CXX14_GENERIC_LAMBDAS + #endif + + + #if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) + #define SPP_NO_CXX14_CONSTEXPR + #endif + + #if !__has_feature(__cxx_return_type_deduction__) + #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION + #endif + + #if !__has_feature(__cxx_variable_templates__) + #define SPP_NO_CXX14_VARIABLE_TEMPLATES + #endif + + #if __cplusplus < 201400 + #define SPP_NO_CXX14_DIGIT_SEPARATORS + #endif + + #if defined(__has_builtin) && __has_builtin(__builtin_unreachable) + #define SPP_UNREACHABLE_RETURN(x) __builtin_unreachable(); + #endif + + #define SPP_ATTRIBUTE_UNUSED __attribute__((__unused__)) + + #ifndef SPP_COMPILER + #define SPP_COMPILER "Clang version " __clang_version__ + #endif + + #define SPP_CLANG 1 + + +#elif defined __GNUC__ + + #define SPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) + + // definition to expand macro then apply to pragma message + // #define VALUE_TO_STRING(x) #x + // #define VALUE(x) VALUE_TO_STRING(x) + // #define VAR_NAME_VALUE(var) #var "=" VALUE(var) + // #pragma message(VAR_NAME_VALUE(SPP_GCC_VERSION)) + + #if defined(i386) + #include + inline void spp_cpuid(int info[4], int InfoType) { + __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); + } + #endif + + // __POPCNT__ defined when the compiled with popcount support + // (-mpopcnt compiler option is given for example) + #ifdef __POPCNT__ + // slower unless compiled iwith -mpopcnt + #define SPP_POPCNT __builtin_popcount + #define SPP_POPCNT64 __builtin_popcountll + #endif + + #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) + #define SPP_GCC_CXX11 + #endif + + #if __GNUC__ == 3 + #if defined (__PATHSCALE__) + #define SPP_NO_TWO_PHASE_NAME_LOOKUP + #define SPP_NO_IS_ABSTRACT + #endif + + #if __GNUC_MINOR__ < 4 + #define SPP_NO_IS_ABSTRACT + #endif + + #define SPP_NO_CXX11_EXTERN_TEMPLATE + #endif + + #if __GNUC__ < 4 + // + // All problems to gcc-3.x and earlier here: + // + #define SPP_NO_TWO_PHASE_NAME_LOOKUP + #ifdef __OPEN64__ + #define SPP_NO_IS_ABSTRACT + #endif + #endif + + // GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links + #if SPP_GCC_VERSION >= 30400 + #define SPP_HAS_PRAGMA_ONCE + #endif + + #if SPP_GCC_VERSION < 40400 + // Previous versions of GCC did not completely implement value-initialization: + // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize + // members", reported by Jonathan Wakely in 2006, + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) + // GCC Bug 33916, "Default constructor fails to initialize array members", + // reported by Michael Elizabeth Chastain in 2007, + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) + // See also: http://www.boost.org/libs/utility/value_init.htm #compiler_issues + #define SPP_NO_COMPLETE_VALUE_INITIALIZATION + #endif + + #if !defined(__EXCEPTIONS) && !defined(SPP_NO_EXCEPTIONS) + #define SPP_NO_EXCEPTIONS + #endif + + // + // Threading support: Turn this on unconditionally here (except for + // those platforms where we can know for sure). It will get turned off again + // later if no threading API is detected. + // + #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) + #define SPP_HAS_THREADS + #endif + + // + // gcc has "long long" + // Except on Darwin with standard compliance enabled (-pedantic) + // Apple gcc helpfully defines this macro we can query + // + #if !defined(__DARWIN_NO_LONG_LONG) + #define SPP_HAS_LONG_LONG + #endif + + // + // gcc implements the named return value optimization since version 3.1 + // + #define SPP_HAS_NRVO + + // Branch prediction hints + #define SPP_LIKELY(x) __builtin_expect(x, 1) + #define SPP_UNLIKELY(x) __builtin_expect(x, 0) + + // + // Dynamic shared object (DSO) and dynamic-link library (DLL) support + // + #if __GNUC__ >= 4 + #if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) + // All Win32 development environments, including 64-bit Windows and MinGW, define + // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, + // so does not define _WIN32 or its variants. + #define SPP_HAS_DECLSPEC + #define SPP_SYMBOL_EXPORT __attribute__((__dllexport__)) + #define SPP_SYMBOL_IMPORT __attribute__((__dllimport__)) + #else + #define SPP_SYMBOL_EXPORT __attribute__((__visibility__("default"))) + #define SPP_SYMBOL_IMPORT + #endif + + #define SPP_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) + #else + // config/platform/win32.hpp will define SPP_SYMBOL_EXPORT, etc., unless already defined + #define SPP_SYMBOL_EXPORT + #endif + + // + // RTTI and typeinfo detection is possible post gcc-4.3: + // + #if SPP_GCC_VERSION > 40300 + #ifndef __GXX_RTTI + #ifndef SPP_NO_TYPEID + #define SPP_NO_TYPEID + #endif + #ifndef SPP_NO_RTTI + #define SPP_NO_RTTI + #endif + #endif + #endif + + // + // Recent GCC versions have __int128 when in 64-bit mode. + // + // We disable this if the compiler is really nvcc with C++03 as it + // doesn't actually support __int128 as of CUDA_VERSION=7500 + // even though it defines __SIZEOF_INT128__. + // See https://svn.boost.org/trac/boost/ticket/8048 + // https://svn.boost.org/trac/boost/ticket/11852 + // Only re-enable this for nvcc if you're absolutely sure + // of the circumstances under which it's supported: + // + #if defined(__CUDACC__) + #if defined(SPP_GCC_CXX11) + #define SPP_NVCC_CXX11 + #else + #define SPP_NVCC_CXX03 + #endif + #endif + + #if defined(__SIZEOF_INT128__) && !defined(SPP_NVCC_CXX03) + #define SPP_HAS_INT128 + #endif + // + // Recent GCC versions have a __float128 native type, we need to + // include a std lib header to detect this - not ideal, but we'll + // be including later anyway when we select the std lib. + // + // Nevertheless, as of CUDA 7.5, using __float128 with the host + // compiler in pre-C++11 mode is still not supported. + // See https://svn.boost.org/trac/boost/ticket/11852 + // + #ifdef __cplusplus + #include + #else + #include + #endif + + #if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(SPP_NVCC_CXX03) + #define SPP_HAS_FLOAT128 + #endif + + // C++0x features in 4.3.n and later + // + #if (SPP_GCC_VERSION >= 40300) && defined(SPP_GCC_CXX11) + // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are + // passed on the command line, which in turn defines + // __GXX_EXPERIMENTAL_CXX0X__. + #define SPP_HAS_DECLTYPE + #define SPP_HAS_RVALUE_REFS + #define SPP_HAS_STATIC_ASSERT + #define SPP_HAS_VARIADIC_TMPL + #define SPP_HAS_CSTDINT + #else + #define SPP_NO_CXX11_DECLTYPE + #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS + #define SPP_NO_CXX11_RVALUE_REFERENCES + #define SPP_NO_CXX11_STATIC_ASSERT + #endif + + // C++0x features in 4.4.n and later + // + #if (SPP_GCC_VERSION < 40400) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_AUTO_DECLARATIONS + #define SPP_NO_CXX11_AUTO_MULTIDECLARATIONS + #define SPP_NO_CXX11_CHAR16_T + #define SPP_NO_CXX11_CHAR32_T + #define SPP_NO_CXX11_HDR_INITIALIZER_LIST + #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS + #define SPP_NO_CXX11_DELETED_FUNCTIONS + #define SPP_NO_CXX11_TRAILING_RESULT_TYPES + #define SPP_NO_CXX11_INLINE_NAMESPACES + #define SPP_NO_CXX11_VARIADIC_TEMPLATES + #endif + + #if SPP_GCC_VERSION < 40500 + #define SPP_NO_SFINAE_EXPR + #endif + + // GCC 4.5 forbids declaration of defaulted functions in private or protected sections + #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS + #endif + + // C++0x features in 4.5.0 and later + // + #if (SPP_GCC_VERSION < 40500) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + #define SPP_NO_CXX11_LAMBDAS + #define SPP_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS + #define SPP_NO_CXX11_RAW_LITERALS + #endif + + // C++0x features in 4.6.n and later + // + #if (SPP_GCC_VERSION < 40600) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_CONSTEXPR + #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + #endif + + // C++0x features in 4.7.n and later + // + #if (SPP_GCC_VERSION < 40700) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_FINAL + #define SPP_NO_CXX11_TEMPLATE_ALIASES + #define SPP_NO_CXX11_USER_DEFINED_LITERALS + #define SPP_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS + #endif + + // C++0x features in 4.8.n and later + // + #if (SPP_GCC_VERSION < 40800) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_ALIGNAS + #endif + + // C++0x features in 4.8.1 and later + // + #if (SPP_GCC_VERSION < 40801) || !defined(SPP_GCC_CXX11) + #define SPP_NO_CXX11_DECLTYPE_N3276 + #define SPP_NO_CXX11_REF_QUALIFIERS + #define SPP_NO_CXX14_BINARY_LITERALS + #endif + + // C++14 features in 4.9.0 and later + // + #if (SPP_GCC_VERSION < 40900) || (__cplusplus < 201300) + #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION + #define SPP_NO_CXX14_GENERIC_LAMBDAS + #define SPP_NO_CXX14_DIGIT_SEPARATORS + #define SPP_NO_CXX14_DECLTYPE_AUTO + #if !((SPP_GCC_VERSION >= 40801) && (SPP_GCC_VERSION < 40900) && defined(SPP_GCC_CXX11)) + #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES + #endif + #endif + + + // C++ 14: + #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) + #define SPP_NO_CXX14_CONSTEXPR + #endif + #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) + #define SPP_NO_CXX14_VARIABLE_TEMPLATES + #endif + + // + // Unused attribute: + #if __GNUC__ >= 4 + #define SPP_ATTRIBUTE_UNUSED __attribute__((__unused__)) + #endif + // + // __builtin_unreachable: + #if SPP_GCC_VERSION >= 40800 + #define SPP_UNREACHABLE_RETURN(x) __builtin_unreachable(); + #endif + + #ifndef SPP_COMPILER + #define SPP_COMPILER "GNU C++ version " __VERSION__ + #endif + + // ConceptGCC compiler: + // http://www.generic-programming.org/software/ConceptGCC/ + #ifdef __GXX_CONCEPTS__ + #define SPP_HAS_CONCEPTS + #define SPP_COMPILER "ConceptGCC version " __VERSION__ + #endif + +#elif defined _MSC_VER + + #include // for __popcnt() + + #define SPP_POPCNT_CHECK // slower when defined, but we have to check! + #define spp_cpuid(info, x) __cpuid(info, x) + + #define SPP_POPCNT __popcnt + #if (SPP_GROUP_SIZE == 64 && INTPTR_MAX == INT64_MAX) + #define SPP_POPCNT64 __popcnt64 + #endif + + // Attempt to suppress VC6 warnings about the length of decorated names (obsolete): + #pragma warning( disable : 4503 ) // warning: decorated name length exceeded + + #define SPP_HAS_PRAGMA_ONCE + #define SPP_HAS_CSTDINT + + // + // versions check: + // we don't support Visual C++ prior to version 7.1: + #if _MSC_VER < 1310 + #error "Antique compiler not supported" + #endif + + #if _MSC_FULL_VER < 180020827 + #define SPP_NO_FENV_H + #endif + + #if _MSC_VER < 1400 + // although a conforming signature for swprint exists in VC7.1 + // it appears not to actually work: + #define SPP_NO_SWPRINTF + + // Our extern template tests also fail for this compiler: + #define SPP_NO_CXX11_EXTERN_TEMPLATE + + // Variadic macros do not exist for VC7.1 and lower + #define SPP_NO_CXX11_VARIADIC_MACROS + #endif + + #if _MSC_VER < 1500 // 140X == VC++ 8.0 + #undef SPP_HAS_CSTDINT + #define SPP_NO_MEMBER_TEMPLATE_FRIENDS + #endif + + #if _MSC_VER < 1600 // 150X == VC++ 9.0 + // A bug in VC9: + #define SPP_NO_ADL_BARRIER + #endif + + + // MSVC (including the latest checked version) has not yet completely + // implemented value-initialization, as is reported: + // "VC++ does not value-initialize members of derived classes without + // user-declared constructor", reported in 2009 by Sylvester Hesp: + // https: //connect.microsoft.com/VisualStudio/feedback/details/484295 + // "Presence of copy constructor breaks member class initialization", + // reported in 2009 by Alex Vakulenko: + // https: //connect.microsoft.com/VisualStudio/feedback/details/499606 + // "Value-initialization in new-expression", reported in 2005 by + // Pavel Kuznetsov (MetaCommunications Engineering): + // https: //connect.microsoft.com/VisualStudio/feedback/details/100744 + // See also: http: //www.boost.org/libs/utility/value_init.htm #compiler_issues + // (Niels Dekker, LKEB, May 2010) + #define SPP_NO_COMPLETE_VALUE_INITIALIZATION + + #ifndef _NATIVE_WCHAR_T_DEFINED + #define SPP_NO_INTRINSIC_WCHAR_T + #endif + + // + // check for exception handling support: + #if !defined(_CPPUNWIND) && !defined(SPP_NO_EXCEPTIONS) + #define SPP_NO_EXCEPTIONS + #endif + + // + // __int64 support: + // + #define SPP_HAS_MS_INT64 + #if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) + #define SPP_HAS_LONG_LONG + #else + #define SPP_NO_LONG_LONG + #endif + + #if (_MSC_VER >= 1400) && !defined(_DEBUG) + #define SPP_HAS_NRVO + #endif + + #if _MSC_VER >= 1500 // 150X == VC++ 9.0 + #define SPP_HAS_PRAGMA_DETECT_MISMATCH + #endif + + // + // disable Win32 API's if compiler extensions are + // turned off: + // + #if !defined(_MSC_EXTENSIONS) && !defined(SPP_DISABLE_WIN32) + #define SPP_DISABLE_WIN32 + #endif + + #if !defined(_CPPRTTI) && !defined(SPP_NO_RTTI) + #define SPP_NO_RTTI + #endif + + // + // TR1 features: + // + #if _MSC_VER >= 1700 + // #define SPP_HAS_TR1_HASH // don't know if this is true yet. + // #define SPP_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. + #define SPP_HAS_TR1_UNORDERED_MAP + #define SPP_HAS_TR1_UNORDERED_SET + #endif + + // + // C++0x features + // + // See above for SPP_NO_LONG_LONG + + // C++ features supported by VC++ 10 (aka 2010) + // + #if _MSC_VER < 1600 + #define SPP_NO_CXX11_AUTO_DECLARATIONS + #define SPP_NO_CXX11_AUTO_MULTIDECLARATIONS + #define SPP_NO_CXX11_LAMBDAS + #define SPP_NO_CXX11_RVALUE_REFERENCES + #define SPP_NO_CXX11_STATIC_ASSERT + #define SPP_NO_CXX11_DECLTYPE + #endif // _MSC_VER < 1600 + + #if _MSC_VER >= 1600 + #define SPP_HAS_STDINT_H + #endif + + // C++11 features supported by VC++ 11 (aka 2012) + // + #if _MSC_VER < 1700 + #define SPP_NO_CXX11_FINAL + #endif // _MSC_VER < 1700 + + // C++11 features supported by VC++ 12 (aka 2013). + // + #if _MSC_FULL_VER < 180020827 + #define SPP_NO_CXX11_DEFAULTED_FUNCTIONS + #define SPP_NO_CXX11_DELETED_FUNCTIONS + #define SPP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + #define SPP_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS + #define SPP_NO_CXX11_RAW_LITERALS + #define SPP_NO_CXX11_TEMPLATE_ALIASES + #define SPP_NO_CXX11_TRAILING_RESULT_TYPES + #define SPP_NO_CXX11_VARIADIC_TEMPLATES + #define SPP_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + #define SPP_NO_CXX11_DECLTYPE_N3276 + #endif + + // C++11 features supported by VC++ 14 (aka 2014) CTP1 + #if (_MSC_FULL_VER < 190021730) + #define SPP_NO_CXX11_REF_QUALIFIERS + #define SPP_NO_CXX11_USER_DEFINED_LITERALS + #define SPP_NO_CXX11_ALIGNAS + #define SPP_NO_CXX11_INLINE_NAMESPACES + #define SPP_NO_CXX14_DECLTYPE_AUTO + #define SPP_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES + #define SPP_NO_CXX14_RETURN_TYPE_DEDUCTION + #define SPP_NO_CXX11_HDR_INITIALIZER_LIST + #endif + + // C++11 features not supported by any versions + #define SPP_NO_CXX11_CHAR16_T + #define SPP_NO_CXX11_CHAR32_T + #define SPP_NO_CXX11_CONSTEXPR + #define SPP_NO_SFINAE_EXPR + #define SPP_NO_TWO_PHASE_NAME_LOOKUP + + // C++ 14: + #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) + #define SPP_NO_CXX14_BINARY_LITERALS + #endif + + #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) + #define SPP_NO_CXX14_CONSTEXPR + #endif + + #if (__cplusplus < 201304) // There's no SD6 check for this.... + #define SPP_NO_CXX14_DIGIT_SEPARATORS + #endif + + #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) + #define SPP_NO_CXX14_GENERIC_LAMBDAS + #endif + + #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) + #define SPP_NO_CXX14_VARIABLE_TEMPLATES + #endif + +#endif + +// from boost/config/suffix.hpp +// ---------------------------- +#ifndef SPP_ATTRIBUTE_UNUSED + #define SPP_ATTRIBUTE_UNUSED +#endif + +/* + Try to persuade compilers to inline. +*/ +#ifndef SPP_FORCEINLINE + #if defined(__GNUC__) + #define SPP_FORCEINLINE __inline __attribute__ ((always_inline)) + #elif defined(_MSC_VER) + #define SPP_FORCEINLINE __forceinline + #else + #define SPP_FORCEINLINE inline + #endif +#endif + + +#endif // spp_config_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_dlalloc.h b/resources/3rdparty/sparsepp/sparsepp/spp_dlalloc.h new file mode 100755 index 000000000..8e063fbab --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_dlalloc.h @@ -0,0 +1,4023 @@ +#ifndef spp_dlalloc__h_ +#define spp_dlalloc__h_ + +/* This is a C++ allocator created from Doug Lea's dlmalloc + (Version 2.8.6 Wed Aug 29 06:57:58 2012) + see: http://g.oswego.edu/dl/html/malloc.html +*/ + +#include +#include + + +#ifndef SPP_FORCEINLINE + #if defined(__GNUC__) + #define SPP_FORCEINLINE __inline __attribute__ ((always_inline)) + #elif defined(_MSC_VER) + #define SPP_FORCEINLINE __forceinline + #else + #define SPP_FORCEINLINE inline + #endif +#endif + + +#ifndef SPP_IMPL + #define SPP_IMPL SPP_FORCEINLINE +#endif + +#ifndef SPP_API + #define SPP_API static +#endif + + +namespace spp +{ + // ---------------------- allocator internal API ----------------------- + typedef void* mspace; + + /* + create_mspace creates and returns a new independent space with the + given initial capacity, or, if 0, the default granularity size. It + returns null if there is no system memory available to create the + space. If argument locked is non-zero, the space uses a separate + lock to control access. The capacity of the space will grow + dynamically as needed to service mspace_malloc requests. You can + control the sizes of incremental increases of this space by + compiling with a different SPP_DEFAULT_GRANULARITY or dynamically + setting with mallopt(M_GRANULARITY, value). + */ + SPP_API mspace create_mspace(size_t capacity, int locked); + SPP_API size_t destroy_mspace(mspace msp); + SPP_API void* mspace_malloc(mspace msp, size_t bytes); + SPP_API void mspace_free(mspace msp, void* mem); + SPP_API void* mspace_realloc(mspace msp, void* mem, size_t newsize); + +#if 0 + SPP_API mspace create_mspace_with_base(void* base, size_t capacity, int locked); + SPP_API int mspace_track_large_chunks(mspace msp, int enable); + SPP_API void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size); + SPP_API void* mspace_memalign(mspace msp, size_t alignment, size_t bytes); + SPP_API void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]); + SPP_API void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]); + SPP_API size_t mspace_footprint(mspace msp); + SPP_API size_t mspace_max_footprint(mspace msp); + SPP_API size_t mspace_usable_size(const void* mem); + SPP_API int mspace_trim(mspace msp, size_t pad); + SPP_API int mspace_mallopt(int, int); +#endif + + // ----------------------------------------------------------- + // ----------------------------------------------------------- + template + class spp_allocator + { + public: + typedef T value_type; + typedef T* pointer; + typedef ptrdiff_t difference_type; + typedef const T* const_pointer; + typedef size_t size_type; + + spp_allocator() : _space(new MSpace) {} + + void swap(spp_allocator &o) + { + std::swap(_space, o._space); + } + + pointer allocate(size_t n, const_pointer /* unused */ = 0) + { + pointer res = static_cast(mspace_malloc(_space->_sp, n * sizeof(T))); + if (!res) + throw std::bad_alloc(); + return res; + } + + void deallocate(pointer p, size_t /* unused */) + { + mspace_free(_space->_sp, p); + } + + pointer reallocate(pointer p, size_t new_size) + { + pointer res = static_cast(mspace_realloc(_space->_sp, p, new_size * sizeof(T))); + if (!res) + throw std::bad_alloc(); + return res; + } + + size_type max_size() const + { + return static_cast(-1) / sizeof(value_type); + } + + void construct(pointer p, const value_type& val) + { + new (p) value_type(val); + } + + void destroy(pointer p) { p->~value_type(); } + + template + struct rebind + { + // rebind to libc_allocator because we want to use malloc_inspect_all in destructive_iterator + // to reduce peak memory usage (we don't want mixed with value_type when + // we traverse the allocated memory). + typedef spp::spp_allocator other; + }; + + mspace space() const { return _space->_sp; } + + // check if we can clear the whole allocator memory at once => works only if the allocator + // is not be shared. If can_clear() returns true, we expect that the next allocator call + // will be clear() - not allocate() or deallocate() + bool can_clear() + { + assert(!_space_to_clear); + _space_to_clear.reset(); + _space_to_clear.swap(_space); + if (_space_to_clear->count() == 1) + return true; + else + _space_to_clear.swap(_space); + return false; + } + + void clear() + { + assert(!_space && _space_to_clear); + _space_to_clear.reset(); + _space = new MSpace; + } + + private: + struct MSpace : public spp_rc + { + MSpace() : + _sp(create_mspace(0, 0)) + {} + + ~MSpace() + { + destroy_mspace(_sp); + } + + mspace _sp; + }; + + spp_sptr _space; + spp_sptr _space_to_clear; + }; +} + + +// allocators are "equal" whenever memory allocated with one can be deallocated with the other +template +inline bool operator==(const spp_::spp_allocator &a, const spp_::spp_allocator &b) +{ + return a.space() == b.space(); +} + +template +inline bool operator!=(const spp_::spp_allocator &a, const spp_::spp_allocator &b) +{ + return !(a == b); +} + +namespace std +{ + template + inline void swap(spp_::spp_allocator &a, spp_::spp_allocator &b) + { + a.swap(b); + } +} + +#if !defined(SPP_EXCLUDE_IMPLEMENTATION) + +#ifndef WIN32 + #ifdef _WIN32 + #define WIN32 1 + #endif + #ifdef _WIN32_WCE + #define SPP_LACKS_FCNTL_H + #define WIN32 1 + #endif +#endif + +#ifdef WIN32 + #define WIN32_LEAN_AND_MEAN + #include + #include + #define SPP_HAVE_MMAP 1 + #define SPP_LACKS_UNISTD_H + #define SPP_LACKS_SYS_PARAM_H + #define SPP_LACKS_SYS_MMAN_H + #define SPP_LACKS_STRING_H + #define SPP_LACKS_STRINGS_H + #define SPP_LACKS_SYS_TYPES_H + #define SPP_LACKS_ERRNO_H + #define SPP_LACKS_SCHED_H + #ifndef SPP_MALLOC_FAILURE_ACTION + #define SPP_MALLOC_FAILURE_ACTION + #endif + #ifndef SPP_MMAP_CLEARS + #ifdef _WIN32_WCE /* WINCE reportedly does not clear */ + #define SPP_MMAP_CLEARS 0 + #else + #define SPP_MMAP_CLEARS 1 + #endif + #endif +#endif + +#if defined(DARWIN) || defined(_DARWIN) + #define SPP_HAVE_MMAP 1 + /* OSX allocators provide 16 byte alignment */ + #ifndef SPP_MALLOC_ALIGNMENT + #define SPP_MALLOC_ALIGNMENT ((size_t)16U) + #endif +#endif + +#ifndef SPP_LACKS_SYS_TYPES_H + #include /* For size_t */ +#endif + +#ifndef SPP_MALLOC_ALIGNMENT + #define SPP_MALLOC_ALIGNMENT ((size_t)(2 * sizeof(void *))) +#endif + +/* ------------------- size_t and alignment properties -------------------- */ +static const size_t spp_max_size_t = ~(size_t)0; +static const size_t spp_size_t_bitsize = sizeof(size_t) << 3; +static const size_t spp_half_max_size_t = spp_max_size_t / 2U; +static const size_t spp_chunk_align_mask = SPP_MALLOC_ALIGNMENT - 1; + +#if defined(SPP_DEBUG) || !defined(NDEBUG) +static bool spp_is_aligned(void *p) { return ((size_t)p & spp_chunk_align_mask) == 0; } +#endif + +// the number of bytes to offset an address to align it +static size_t align_offset(void *p) +{ + return (((size_t)p & spp_chunk_align_mask) == 0) ? 0 : + ((SPP_MALLOC_ALIGNMENT - ((size_t)p & spp_chunk_align_mask)) & spp_chunk_align_mask); +} + + +#ifndef SPP_FOOTERS + #define SPP_FOOTERS 0 +#endif + +#ifndef SPP_ABORT + #define SPP_ABORT abort() +#endif + +#ifndef SPP_ABORT_ON_ASSERT_FAILURE + #define SPP_ABORT_ON_ASSERT_FAILURE 1 +#endif + +#ifndef SPP_PROCEED_ON_ERROR + #define SPP_PROCEED_ON_ERROR 0 +#endif + +#ifndef SPP_INSECURE + #define SPP_INSECURE 0 +#endif + +#ifndef SPP_MALLOC_INSPECT_ALL + #define SPP_MALLOC_INSPECT_ALL 0 +#endif + +#ifndef SPP_HAVE_MMAP + #define SPP_HAVE_MMAP 1 +#endif + +#ifndef SPP_MMAP_CLEARS + #define SPP_MMAP_CLEARS 1 +#endif + +#ifndef SPP_HAVE_MREMAP + #ifdef linux + #define SPP_HAVE_MREMAP 1 + #ifndef _GNU_SOURCE + #define _GNU_SOURCE /* Turns on mremap() definition */ + #endif + #else + #define SPP_HAVE_MREMAP 0 + #endif +#endif + +#ifndef SPP_MALLOC_FAILURE_ACTION + #define SPP_MALLOC_FAILURE_ACTION errno = ENOMEM +#endif + + +#ifndef SPP_DEFAULT_GRANULARITY + #if defined(WIN32) + #define SPP_DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ + #else + #define SPP_DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U) + #endif +#endif + +#ifndef SPP_DEFAULT_TRIM_THRESHOLD + #define SPP_DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) +#endif + +#ifndef SPP_DEFAULT_MMAP_THRESHOLD + #if SPP_HAVE_MMAP + #define SPP_DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) + #else + #define SPP_DEFAULT_MMAP_THRESHOLD spp_max_size_t + #endif +#endif + +#ifndef SPP_MAX_RELEASE_CHECK_RATE + #if SPP_HAVE_MMAP + #define SPP_MAX_RELEASE_CHECK_RATE 4095 + #else + #define SPP_MAX_RELEASE_CHECK_RATE spp_max_size_t + #endif +#endif + +#ifndef SPP_USE_BUILTIN_FFS + #define SPP_USE_BUILTIN_FFS 0 +#endif + +#ifndef SPP_USE_DEV_RANDOM + #define SPP_USE_DEV_RANDOM 0 +#endif + +#ifndef SPP_NO_SEGMENT_TRAVERSAL + #define SPP_NO_SEGMENT_TRAVERSAL 0 +#endif + + + +/*------------------------------ internal #includes ---------------------- */ + +#ifdef _MSC_VER + #pragma warning( disable : 4146 ) /* no "unsigned" warnings */ +#endif +#ifndef SPP_LACKS_ERRNO_H + #include /* for SPP_MALLOC_FAILURE_ACTION */ +#endif + +#ifdef SPP_DEBUG + #if SPP_ABORT_ON_ASSERT_FAILURE + #undef assert + #define assert(x) if(!(x)) SPP_ABORT + #else + #include + #endif +#else + #ifndef assert + #define assert(x) + #endif + #define SPP_DEBUG 0 +#endif + +#if !defined(WIN32) && !defined(SPP_LACKS_TIME_H) + #include /* for magic initialization */ +#endif + +#ifndef SPP_LACKS_STDLIB_H + #include /* for abort() */ +#endif + +#ifndef SPP_LACKS_STRING_H + #include /* for memset etc */ +#endif + +#if SPP_USE_BUILTIN_FFS + #ifndef SPP_LACKS_STRINGS_H + #include /* for ffs */ + #endif +#endif + +#if SPP_HAVE_MMAP + #ifndef SPP_LACKS_SYS_MMAN_H + /* On some versions of linux, mremap decl in mman.h needs __USE_GNU set */ + #if (defined(linux) && !defined(__USE_GNU)) + #define __USE_GNU 1 + #include /* for mmap */ + #undef __USE_GNU + #else + #include /* for mmap */ + #endif + #endif + #ifndef SPP_LACKS_FCNTL_H + #include + #endif +#endif + +#ifndef SPP_LACKS_UNISTD_H + #include /* for sbrk, sysconf */ +#else + #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) + extern void* sbrk(ptrdiff_t); + #endif +#endif + +#include + +namespace spp +{ + +/* Declarations for bit scanning on win32 */ +#if defined(_MSC_VER) && _MSC_VER>=1300 + #ifndef BitScanForward /* Try to avoid pulling in WinNT.h */ + extern "C" { + unsigned char _BitScanForward(unsigned long *index, unsigned long mask); + unsigned char _BitScanReverse(unsigned long *index, unsigned long mask); + } + + #define BitScanForward _BitScanForward + #define BitScanReverse _BitScanReverse + #pragma intrinsic(_BitScanForward) + #pragma intrinsic(_BitScanReverse) + #endif /* BitScanForward */ +#endif /* defined(_MSC_VER) && _MSC_VER>=1300 */ + +#ifndef WIN32 + #ifndef malloc_getpagesize + #ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ + #ifndef _SC_PAGE_SIZE + #define _SC_PAGE_SIZE _SC_PAGESIZE + #endif + #endif + #ifdef _SC_PAGE_SIZE + #define malloc_getpagesize sysconf(_SC_PAGE_SIZE) + #else + #if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE) + extern size_t getpagesize(); + #define malloc_getpagesize getpagesize() + #else + #ifdef WIN32 /* use supplied emulation of getpagesize */ + #define malloc_getpagesize getpagesize() + #else + #ifndef SPP_LACKS_SYS_PARAM_H + #include + #endif + #ifdef EXEC_PAGESIZE + #define malloc_getpagesize EXEC_PAGESIZE + #else + #ifdef NBPG + #ifndef CLSIZE + #define malloc_getpagesize NBPG + #else + #define malloc_getpagesize (NBPG * CLSIZE) + #endif + #else + #ifdef NBPC + #define malloc_getpagesize NBPC + #else + #ifdef PAGESIZE + #define malloc_getpagesize PAGESIZE + #else /* just guess */ + #define malloc_getpagesize ((size_t)4096U) + #endif + #endif + #endif + #endif + #endif + #endif + #endif + #endif +#endif + +/* -------------------------- MMAP preliminaries ------------------------- */ + +/* + If SPP_HAVE_MORECORE or SPP_HAVE_MMAP are false, we just define calls and + checks to fail so compiler optimizer can delete code rather than + using so many "#if"s. +*/ + + +/* MMAP must return mfail on failure */ +static void *mfail = (void*)spp_max_size_t; +static char *cmfail = (char*)mfail; + +#if SPP_HAVE_MMAP + +#ifndef WIN32 + #define SPP_MUNMAP_DEFAULT(a, s) munmap((a), (s)) + #define SPP_MMAP_PROT (PROT_READ | PROT_WRITE) + #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) + #define MAP_ANONYMOUS MAP_ANON + #endif + + #ifdef MAP_ANONYMOUS + #define SPP_MMAP_FLAGS (MAP_PRIVATE | MAP_ANONYMOUS) + #define SPP_MMAP_DEFAULT(s) mmap(0, (s), SPP_MMAP_PROT, SPP_MMAP_FLAGS, -1, 0) + #else /* MAP_ANONYMOUS */ + /* + Nearly all versions of mmap support MAP_ANONYMOUS, so the following + is unlikely to be needed, but is supplied just in case. + */ + #define SPP_MMAP_FLAGS (MAP_PRIVATE) + static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */ + void SPP_MMAP_DEFAULT(size_t s) + { + if (dev_zero_fd < 0) + dev_zero_fd = open("/dev/zero", O_RDWR); + mmap(0, s, SPP_MMAP_PROT, SPP_MMAP_FLAGS, dev_zero_fd, 0); + } + #endif /* MAP_ANONYMOUS */ + + #define SPP_DIRECT_MMAP_DEFAULT(s) SPP_MMAP_DEFAULT(s) + +#else /* WIN32 */ + + /* Win32 MMAP via VirtualAlloc */ + static SPP_FORCEINLINE void* win32mmap(size_t size) + { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); + return (ptr != 0) ? ptr : mfail; + } + + /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ + static SPP_FORCEINLINE void* win32direct_mmap(size_t size) + { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, + PAGE_READWRITE); + return (ptr != 0) ? ptr : mfail; + } + + /* This function supports releasing coalesed segments */ + static SPP_FORCEINLINE int win32munmap(void* ptr, size_t size) + { + MEMORY_BASIC_INFORMATION minfo; + char* cptr = (char*)ptr; + while (size) + { + if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) + return -1; + if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || + minfo.State != MEM_COMMIT || minfo.RegionSize > size) + return -1; + if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) + return -1; + cptr += minfo.RegionSize; + size -= minfo.RegionSize; + } + return 0; + } + + #define SPP_MMAP_DEFAULT(s) win32mmap(s) + #define SPP_MUNMAP_DEFAULT(a, s) win32munmap((a), (s)) + #define SPP_DIRECT_MMAP_DEFAULT(s) win32direct_mmap(s) +#endif /* WIN32 */ +#endif /* SPP_HAVE_MMAP */ + +#if SPP_HAVE_MREMAP + #ifndef WIN32 + #define SPP_MREMAP_DEFAULT(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv)) + #endif +#endif + +/** + * Define SPP_CALL_MMAP/SPP_CALL_MUNMAP/SPP_CALL_DIRECT_MMAP + */ +#if SPP_HAVE_MMAP + #define USE_MMAP_BIT 1 + + #ifdef SPP_MMAP + #define SPP_CALL_MMAP(s) SPP_MMAP(s) + #else + #define SPP_CALL_MMAP(s) SPP_MMAP_DEFAULT(s) + #endif + + #ifdef SPP_MUNMAP + #define SPP_CALL_MUNMAP(a, s) SPP_MUNMAP((a), (s)) + #else + #define SPP_CALL_MUNMAP(a, s) SPP_MUNMAP_DEFAULT((a), (s)) + #endif + + #ifdef SPP_DIRECT_MMAP + #define SPP_CALL_DIRECT_MMAP(s) SPP_DIRECT_MMAP(s) + #else + #define SPP_CALL_DIRECT_MMAP(s) SPP_DIRECT_MMAP_DEFAULT(s) + #endif + +#else /* SPP_HAVE_MMAP */ + #define USE_MMAP_BIT 0 + + #define SPP_MMAP(s) mfail + #define SPP_MUNMAP(a, s) (-1) + #define SPP_DIRECT_MMAP(s) mfail + #define SPP_CALL_DIRECT_MMAP(s) SPP_DIRECT_MMAP(s) + #define SPP_CALL_MMAP(s) SPP_MMAP(s) + #define SPP_CALL_MUNMAP(a, s) SPP_MUNMAP((a), (s)) +#endif + +/** + * Define SPP_CALL_MREMAP + */ +#if SPP_HAVE_MMAP && SPP_HAVE_MREMAP + #ifdef MREMAP + #define SPP_CALL_MREMAP(addr, osz, nsz, mv) MREMAP((addr), (osz), (nsz), (mv)) + #else + #define SPP_CALL_MREMAP(addr, osz, nsz, mv) SPP_MREMAP_DEFAULT((addr), (osz), (nsz), (mv)) + #endif +#else + #define SPP_CALL_MREMAP(addr, osz, nsz, mv) mfail +#endif + +/* mstate bit set if continguous morecore disabled or failed */ +static const unsigned USE_NONCONTIGUOUS_BIT = 4U; + +/* segment bit set in create_mspace_with_base */ +static const unsigned EXTERN_BIT = 8U; + + +/* --------------------------- flags ------------------------ */ + +static const unsigned PINUSE_BIT = 1; +static const unsigned CINUSE_BIT = 2; +static const unsigned FLAG4_BIT = 4; +static const unsigned INUSE_BITS = (PINUSE_BIT | CINUSE_BIT); +static const unsigned FLAG_BITS = (PINUSE_BIT | CINUSE_BIT | FLAG4_BIT); + +/* ------------------- Chunks sizes and alignments ----------------------- */ + +#if SPP_FOOTERS + static const unsigned CHUNK_OVERHEAD = 2 * sizeof(size_t); +#else + static const unsigned CHUNK_OVERHEAD = sizeof(size_t); +#endif + +/* MMapped chunks need a second word of overhead ... */ +static const unsigned SPP_MMAP_CHUNK_OVERHEAD = 2 * sizeof(size_t); + +/* ... and additional padding for fake next-chunk at foot */ +static const unsigned SPP_MMAP_FOOT_PAD = 4 * sizeof(size_t); + +// =============================================================================== +struct malloc_chunk_header +{ + void set_size_and_pinuse_of_free_chunk(size_t s) + { + _head = s | PINUSE_BIT; + set_foot(s); + } + + void set_foot(size_t s) + { + ((malloc_chunk_header *)((char*)this + s))->_prev_foot = s; + } + + // extraction of fields from head words + bool cinuse() const { return !!(_head & CINUSE_BIT); } + bool pinuse() const { return !!(_head & PINUSE_BIT); } + bool flag4inuse() const { return !!(_head & FLAG4_BIT); } + bool is_inuse() const { return (_head & INUSE_BITS) != PINUSE_BIT; } + bool is_mmapped() const { return (_head & INUSE_BITS) == 0; } + + size_t chunksize() const { return _head & ~(FLAG_BITS); } + + void clear_pinuse() { _head &= ~PINUSE_BIT; } + void set_flag4() { _head |= FLAG4_BIT; } + void clear_flag4() { _head &= ~FLAG4_BIT; } + + // Treat space at ptr +/- offset as a chunk + malloc_chunk_header * chunk_plus_offset(size_t s) + { + return (malloc_chunk_header *)((char*)this + s); + } + malloc_chunk_header * chunk_minus_offset(size_t s) + { + return (malloc_chunk_header *)((char*)this - s); + } + + // Ptr to next or previous physical malloc_chunk. + malloc_chunk_header * next_chunk() + { + return (malloc_chunk_header *)((char*)this + (_head & ~FLAG_BITS)); + } + malloc_chunk_header * prev_chunk() + { + return (malloc_chunk_header *)((char*)this - (_prev_foot)); + } + + // extract next chunk's pinuse bit + size_t next_pinuse() { return next_chunk()->_head & PINUSE_BIT; } + + size_t _prev_foot; // Size of previous chunk (if free). + size_t _head; // Size and inuse bits. +}; + +// =============================================================================== +struct malloc_chunk : public malloc_chunk_header +{ + // Set size, pinuse bit, foot, and clear next pinuse + void set_free_with_pinuse(size_t s, malloc_chunk* n) + { + n->clear_pinuse(); + set_size_and_pinuse_of_free_chunk(s); + } + + // Get the internal overhead associated with chunk p + size_t overhead_for() { return is_mmapped() ? SPP_MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD; } + + // Return true if malloced space is not necessarily cleared + bool calloc_must_clear() + { +#if SPP_MMAP_CLEARS + return !is_mmapped(); +#else + return true; +#endif + } + + struct malloc_chunk* _fd; // double links -- used only if free. + struct malloc_chunk* _bk; +}; + +static const unsigned MCHUNK_SIZE = sizeof(malloc_chunk); + +/* The smallest size we can malloc is an aligned minimal chunk */ +static const unsigned MIN_CHUNK_SIZE = (MCHUNK_SIZE + spp_chunk_align_mask) & ~spp_chunk_align_mask; + +typedef malloc_chunk mchunk; +typedef malloc_chunk* mchunkptr; +typedef malloc_chunk_header *hchunkptr; +typedef malloc_chunk* sbinptr; // The type of bins of chunks +typedef unsigned int bindex_t; // Described below +typedef unsigned int binmap_t; // Described below +typedef unsigned int flag_t; // The type of various bit flag sets + +// conversion from malloc headers to user pointers, and back +static SPP_FORCEINLINE void *chunk2mem(const void *p) { return (void *)((char *)p + 2 * sizeof(size_t)); } +static SPP_FORCEINLINE mchunkptr mem2chunk(const void *mem) { return (mchunkptr)((char *)mem - 2 * sizeof(size_t)); } + +// chunk associated with aligned address A +static SPP_FORCEINLINE mchunkptr align_as_chunk(char *A) { return (mchunkptr)(A + align_offset(chunk2mem(A))); } + +// Bounds on request (not chunk) sizes. +static const unsigned MAX_REQUEST = (-MIN_CHUNK_SIZE) << 2; +static const unsigned MIN_REQUEST = MIN_CHUNK_SIZE - CHUNK_OVERHEAD - 1; + +// pad request bytes into a usable size +static SPP_FORCEINLINE size_t pad_request(size_t req) +{ + return (req + CHUNK_OVERHEAD + spp_chunk_align_mask) & ~spp_chunk_align_mask; +} + +// pad request, checking for minimum (but not maximum) +static SPP_FORCEINLINE size_t request2size(size_t req) +{ + return req < MIN_REQUEST ? MIN_CHUNK_SIZE : pad_request(req); +} + + +/* ------------------ Operations on head and foot fields ----------------- */ + +/* + The head field of a chunk is or'ed with PINUSE_BIT when previous + adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in + use, unless mmapped, in which case both bits are cleared. + + FLAG4_BIT is not used by this malloc, but might be useful in extensions. +*/ + +// Head value for fenceposts +static const unsigned FENCEPOST_HEAD = INUSE_BITS | sizeof(size_t); + + +/* ---------------------- Overlaid data structures ----------------------- */ + +/* + When chunks are not in use, they are treated as nodes of either + lists or trees. + + "Small" chunks are stored in circular doubly-linked lists, and look + like this: + + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of previous chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `head:' | Size of chunk, in bytes |P| + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Forward pointer to next chunk in list | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Back pointer to previous chunk in list | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Unused space (may be 0 bytes long) . + . . + . | +nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `foot:' | Size of chunk, in bytes | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + Larger chunks are kept in a form of bitwise digital trees (aka + tries) keyed on chunksizes. Because malloc_tree_chunks are only for + free chunks greater than 256 bytes, their size doesn't impose any + constraints on user chunk sizes. Each node looks like: + + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of previous chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `head:' | Size of chunk, in bytes |P| + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Forward pointer to next chunk of same size | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Back pointer to previous chunk of same size | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to left child (child[0]) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to right child (child[1]) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to parent | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | bin index of this chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Unused space . + . | +nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `foot:' | Size of chunk, in bytes | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + Each tree holding treenodes is a tree of unique chunk sizes. Chunks + of the same size are arranged in a circularly-linked list, with only + the oldest chunk (the next to be used, in our FIFO ordering) + actually in the tree. (Tree members are distinguished by a non-null + parent pointer.) If a chunk with the same size an an existing node + is inserted, it is linked off the existing node using pointers that + work in the same way as fd/bk pointers of small chunks. + + Each tree contains a power of 2 sized range of chunk sizes (the + smallest is 0x100 <= x < 0x180), which is is divided in half at each + tree level, with the chunks in the smaller half of the range (0x100 + <= x < 0x140 for the top nose) in the left subtree and the larger + half (0x140 <= x < 0x180) in the right subtree. This is, of course, + done by inspecting individual bits. + + Using these rules, each node's left subtree contains all smaller + sizes than its right subtree. However, the node at the root of each + subtree has no particular ordering relationship to either. (The + dividing line between the subtree sizes is based on trie relation.) + If we remove the last chunk of a given size from the interior of the + tree, we need to replace it with a leaf node. The tree ordering + rules permit a node to be replaced by any leaf below it. + + The smallest chunk in a tree (a common operation in a best-fit + allocator) can be found by walking a path to the leftmost leaf in + the tree. Unlike a usual binary tree, where we follow left child + pointers until we reach a null, here we follow the right child + pointer any time the left one is null, until we reach a leaf with + both child pointers null. The smallest chunk in the tree will be + somewhere along that path. + + The worst case number of steps to add, find, or remove a node is + bounded by the number of bits differentiating chunks within + bins. Under current bin calculations, this ranges from 6 up to 21 + (for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case + is of course much better. +*/ + +// =============================================================================== +struct malloc_tree_chunk : public malloc_chunk_header +{ + malloc_tree_chunk *leftmost_child() + { + return _child[0] ? _child[0] : _child[1]; + } + + + malloc_tree_chunk* _fd; + malloc_tree_chunk* _bk; + + malloc_tree_chunk* _child[2]; + malloc_tree_chunk* _parent; + bindex_t _index; +}; + +typedef malloc_tree_chunk tchunk; +typedef malloc_tree_chunk* tchunkptr; +typedef malloc_tree_chunk* tbinptr; // The type of bins of trees + +/* ----------------------------- Segments -------------------------------- */ + +/* + Each malloc space may include non-contiguous segments, held in a + list headed by an embedded malloc_segment record representing the + top-most space. Segments also include flags holding properties of + the space. Large chunks that are directly allocated by mmap are not + included in this list. They are instead independently created and + destroyed without otherwise keeping track of them. + + Segment management mainly comes into play for spaces allocated by + MMAP. Any call to MMAP might or might not return memory that is + adjacent to an existing segment. MORECORE normally contiguously + extends the current space, so this space is almost always adjacent, + which is simpler and faster to deal with. (This is why MORECORE is + used preferentially to MMAP when both are available -- see + sys_alloc.) When allocating using MMAP, we don't use any of the + hinting mechanisms (inconsistently) supported in various + implementations of unix mmap, or distinguish reserving from + committing memory. Instead, we just ask for space, and exploit + contiguity when we get it. It is probably possible to do + better than this on some systems, but no general scheme seems + to be significantly better. + + Management entails a simpler variant of the consolidation scheme + used for chunks to reduce fragmentation -- new adjacent memory is + normally prepended or appended to an existing segment. However, + there are limitations compared to chunk consolidation that mostly + reflect the fact that segment processing is relatively infrequent + (occurring only when getting memory from system) and that we + don't expect to have huge numbers of segments: + + * Segments are not indexed, so traversal requires linear scans. (It + would be possible to index these, but is not worth the extra + overhead and complexity for most programs on most platforms.) + * New segments are only appended to old ones when holding top-most + memory; if they cannot be prepended to others, they are held in + different segments. + + Except for the top-most segment of an mstate, each segment record + is kept at the tail of its segment. Segments are added by pushing + segment records onto the list headed by &mstate.seg for the + containing mstate. + + Segment flags control allocation/merge/deallocation policies: + * If EXTERN_BIT set, then we did not allocate this segment, + and so should not try to deallocate or merge with others. + (This currently holds only for the initial segment passed + into create_mspace_with_base.) + * If USE_MMAP_BIT set, the segment may be merged with + other surrounding mmapped segments and trimmed/de-allocated + using munmap. + * If neither bit is set, then the segment was obtained using + MORECORE so can be merged with surrounding MORECORE'd segments + and deallocated/trimmed using MORECORE with negative arguments. +*/ + +// =============================================================================== +struct malloc_segment +{ + bool is_mmapped_segment() { return !!(_sflags & USE_MMAP_BIT); } + bool is_extern_segment() { return !!(_sflags & EXTERN_BIT); } + + char* _base; // base address + size_t _size; // allocated size + malloc_segment* _next; // ptr to next segment + flag_t _sflags; // mmap and extern flag +}; + +typedef malloc_segment msegment; +typedef malloc_segment* msegmentptr; + +/* ------------- Malloc_params ------------------- */ + +/* + malloc_params holds global properties, including those that can be + dynamically set using mallopt. There is a single instance, mparams, + initialized in init_mparams. Note that the non-zeroness of "magic" + also serves as an initialization flag. +*/ + +// =============================================================================== +struct malloc_params +{ + malloc_params() : _magic(0) {} + + void ensure_initialization() + { + if (!_magic) + _init(); + } + + SPP_IMPL int change(int param_number, int value); + + size_t page_align(size_t sz) + { + return (sz + (_page_size - 1)) & ~(_page_size - 1); + } + + size_t granularity_align(size_t sz) + { + return (sz + (_granularity - 1)) & ~(_granularity - 1); + } + + bool is_page_aligned(char *S) + { + return ((size_t)S & (_page_size - 1)) == 0; + } + + SPP_IMPL int _init(); + + size_t _magic; + size_t _page_size; + size_t _granularity; + size_t _mmap_threshold; + size_t _trim_threshold; + flag_t _default_mflags; +}; + +static malloc_params mparams; + +/* ---------------------------- malloc_state ----------------------------- */ + +/* + A malloc_state holds all of the bookkeeping for a space. + The main fields are: + + Top + The topmost chunk of the currently active segment. Its size is + cached in topsize. The actual size of topmost space is + topsize+TOP_FOOT_SIZE, which includes space reserved for adding + fenceposts and segment records if necessary when getting more + space from the system. The size at which to autotrim top is + cached from mparams in trim_check, except that it is disabled if + an autotrim fails. + + Designated victim (dv) + This is the preferred chunk for servicing small requests that + don't have exact fits. It is normally the chunk split off most + recently to service another small request. Its size is cached in + dvsize. The link fields of this chunk are not maintained since it + is not kept in a bin. + + SmallBins + An array of bin headers for free chunks. These bins hold chunks + with sizes less than MIN_LARGE_SIZE bytes. Each bin contains + chunks of all the same size, spaced 8 bytes apart. To simplify + use in double-linked lists, each bin header acts as a malloc_chunk + pointing to the real first node, if it exists (else pointing to + itself). This avoids special-casing for headers. But to avoid + waste, we allocate only the fd/bk pointers of bins, and then use + repositioning tricks to treat these as the fields of a chunk. + + TreeBins + Treebins are pointers to the roots of trees holding a range of + sizes. There are 2 equally spaced treebins for each power of two + from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything + larger. + + Bin maps + There is one bit map for small bins ("smallmap") and one for + treebins ("treemap). Each bin sets its bit when non-empty, and + clears the bit when empty. Bit operations are then used to avoid + bin-by-bin searching -- nearly all "search" is done without ever + looking at bins that won't be selected. The bit maps + conservatively use 32 bits per map word, even if on 64bit system. + For a good description of some of the bit-based techniques used + here, see Henry S. Warren Jr's book "Hacker's Delight" (and + supplement at http://hackersdelight.org/). Many of these are + intended to reduce the branchiness of paths through malloc etc, as + well as to reduce the number of memory locations read or written. + + Segments + A list of segments headed by an embedded malloc_segment record + representing the initial space. + + Address check support + The least_addr field is the least address ever obtained from + MORECORE or MMAP. Attempted frees and reallocs of any address less + than this are trapped (unless SPP_INSECURE is defined). + + Magic tag + A cross-check field that should always hold same value as mparams._magic. + + Max allowed footprint + The maximum allowed bytes to allocate from system (zero means no limit) + + Flags + Bits recording whether to use MMAP, locks, or contiguous MORECORE + + Statistics + Each space keeps track of current and maximum system memory + obtained via MORECORE or MMAP. + + Trim support + Fields holding the amount of unused topmost memory that should trigger + trimming, and a counter to force periodic scanning to release unused + non-topmost segments. + + Extension support + A void* pointer and a size_t field that can be used to help implement + extensions to this malloc. +*/ + + +// ================================================================================ +class malloc_state +{ +public: + /* ----------------------- _malloc, _free, etc... --- */ + SPP_FORCEINLINE void* _malloc(size_t bytes); + SPP_FORCEINLINE void _free(mchunkptr p); + + + /* ------------------------ Relays to internal calls to malloc/free from realloc, memalign etc */ + void *internal_malloc(size_t b) { return mspace_malloc(this, b); } + void internal_free(void *mem) { mspace_free(this, mem); } + + /* ------------------------ ----------------------- */ + + SPP_IMPL void init_top(mchunkptr p, size_t psize); + SPP_IMPL void init_bins(); + SPP_IMPL void init(char* tbase, size_t tsize); + + /* ------------------------ System alloc/dealloc -------------------------- */ + SPP_IMPL void* sys_alloc(size_t nb); + SPP_IMPL size_t release_unused_segments(); + SPP_IMPL int sys_trim(size_t pad); + SPP_IMPL void dispose_chunk(mchunkptr p, size_t psize); + + /* ----------------------- Internal support for realloc, memalign, etc --- */ + SPP_IMPL mchunkptr try_realloc_chunk(mchunkptr p, size_t nb, int can_move); + SPP_IMPL void* internal_memalign(size_t alignment, size_t bytes); + SPP_IMPL void** ialloc(size_t n_elements, size_t* sizes, int opts, void* chunks[]); + SPP_IMPL size_t internal_bulk_free(void* array[], size_t nelem); + SPP_IMPL void internal_inspect_all(void(*handler)(void *start, void *end, + size_t used_bytes, void* callback_arg), + void* arg); + + /* -------------------------- system alloc setup (Operations on mflags) ----- */ + bool use_lock() const { return false; } + void enable_lock() {} + void set_lock(int) {} + void disable_lock() {} + + bool use_mmap() const { return !!(_mflags & USE_MMAP_BIT); } + void enable_mmap() { _mflags |= USE_MMAP_BIT; } + +#if SPP_HAVE_MMAP + void disable_mmap() { _mflags &= ~USE_MMAP_BIT; } +#else + void disable_mmap() {} +#endif + + /* ----------------------- Runtime Check Support ------------------------- */ + + /* + For security, the main invariant is that malloc/free/etc never + writes to a static address other than malloc_state, unless static + malloc_state itself has been corrupted, which cannot occur via + malloc (because of these checks). In essence this means that we + believe all pointers, sizes, maps etc held in malloc_state, but + check all of those linked or offsetted from other embedded data + structures. These checks are interspersed with main code in a way + that tends to minimize their run-time cost. + + When SPP_FOOTERS is defined, in addition to range checking, we also + verify footer fields of inuse chunks, which can be used guarantee + that the mstate controlling malloc/free is intact. This is a + streamlined version of the approach described by William Robertson + et al in "Run-time Detection of Heap-based Overflows" LISA'03 + http://www.usenix.org/events/lisa03/tech/robertson.html The footer + of an inuse chunk holds the xor of its mstate and a random seed, + that is checked upon calls to free() and realloc(). This is + (probabalistically) unguessable from outside the program, but can be + computed by any code successfully malloc'ing any chunk, so does not + itself provide protection against code that has already broken + security through some other means. Unlike Robertson et al, we + always dynamically check addresses of all offset chunks (previous, + next, etc). This turns out to be cheaper than relying on hashes. + */ + + +#if !SPP_INSECURE + // Check if address a is at least as high as any from MORECORE or MMAP + bool ok_address(void *a) const { return (char *)a >= _least_addr; } + + // Check if address of next chunk n is higher than base chunk p + static bool ok_next(void *p, void *n) { return p < n; } + + // Check if p has inuse status + static bool ok_inuse(mchunkptr p) { return p->is_inuse(); } + + // Check if p has its pinuse bit on + static bool ok_pinuse(mchunkptr p) { return p->pinuse(); } + + // Check if (alleged) mstate m has expected magic field + bool ok_magic() const { return _magic == mparams._magic; } + + // In gcc, use __builtin_expect to minimize impact of checks + #if defined(__GNUC__) && __GNUC__ >= 3 + static bool rtcheck(bool e) { return __builtin_expect(e, 1); } + #else + static bool rtcheck(bool e) { return e; } + #endif +#else + static bool ok_address(void *) { return true; } + static bool ok_next(void *, void *) { return true; } + static bool ok_inuse(mchunkptr) { return true; } + static bool ok_pinuse(mchunkptr) { return true; } + static bool ok_magic() { return true; } + static bool rtcheck(bool) { return true; } +#endif + + bool is_initialized() const { return _top != 0; } + + bool use_noncontiguous() const { return !!(_mflags & USE_NONCONTIGUOUS_BIT); } + void disable_contiguous() { _mflags |= USE_NONCONTIGUOUS_BIT; } + + // Return segment holding given address + msegmentptr segment_holding(char* addr) const + { + msegmentptr sp = (msegmentptr)&_seg; + for (;;) + { + if (addr >= sp->_base && addr < sp->_base + sp->_size) + return sp; + if ((sp = sp->_next) == 0) + return 0; + } + } + + // Return true if segment contains a segment link + int has_segment_link(msegmentptr ss) const + { + msegmentptr sp = (msegmentptr)&_seg; + for (;;) + { + if ((char*)sp >= ss->_base && (char*)sp < ss->_base + ss->_size) + return 1; + if ((sp = sp->_next) == 0) + return 0; + } + } + + bool should_trim(size_t s) const { return s > _trim_check; } + + /* -------------------------- Debugging setup ---------------------------- */ + +#if ! SPP_DEBUG + void check_free_chunk(mchunkptr) {} + void check_inuse_chunk(mchunkptr) {} + void check_malloced_chunk(void*, size_t) {} + void check_mmapped_chunk(mchunkptr) {} + void check_malloc_state() {} + void check_top_chunk(mchunkptr) {} +#else /* SPP_DEBUG */ + void check_free_chunk(mchunkptr p) { do_check_free_chunk(p); } + void check_inuse_chunk(mchunkptr p) { do_check_inuse_chunk(p); } + void check_malloced_chunk(void* p, size_t s) { do_check_malloced_chunk(p, s); } + void check_mmapped_chunk(mchunkptr p) { do_check_mmapped_chunk(p); } + void check_malloc_state() { do_check_malloc_state(); } + void check_top_chunk(mchunkptr p) { do_check_top_chunk(p); } + + void do_check_any_chunk(mchunkptr p) const; + void do_check_top_chunk(mchunkptr p) const; + void do_check_mmapped_chunk(mchunkptr p) const; + void do_check_inuse_chunk(mchunkptr p) const; + void do_check_free_chunk(mchunkptr p) const; + void do_check_malloced_chunk(void* mem, size_t s) const; + void do_check_tree(tchunkptr t); + void do_check_treebin(bindex_t i); + void do_check_smallbin(bindex_t i); + void do_check_malloc_state(); + int bin_find(mchunkptr x); + size_t traverse_and_check(); +#endif + +private: + + /* ---------------------------- Indexing Bins ---------------------------- */ + + static bool is_small(size_t s) { return (s >> SMALLBIN_SHIFT) < NSMALLBINS; } + static bindex_t small_index(size_t s) { return (bindex_t)(s >> SMALLBIN_SHIFT); } + static size_t small_index2size(size_t i) { return i << SMALLBIN_SHIFT; } + static bindex_t MIN_SMALL_INDEX() { return small_index(MIN_CHUNK_SIZE); } + + // assign tree index for size S to variable I. Use x86 asm if possible +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + SPP_FORCEINLINE static bindex_t compute_tree_index(size_t S) + { + unsigned int X = S >> TREEBIN_SHIFT; + if (X == 0) + return 0; + else if (X > 0xFFFF) + return NTREEBINS - 1; + + unsigned int K = (unsigned) sizeof(X) * __CHAR_BIT__ - 1 - (unsigned) __builtin_clz(X); + return (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT - 1)) & 1))); + } + +#elif defined (__INTEL_COMPILER) + SPP_FORCEINLINE static bindex_t compute_tree_index(size_t S) + { + size_t X = S >> TREEBIN_SHIFT; + if (X == 0) + return 0; + else if (X > 0xFFFF) + return NTREEBINS - 1; + + unsigned int K = _bit_scan_reverse(X); + return (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT - 1)) & 1))); + } + +#elif defined(_MSC_VER) && _MSC_VER>=1300 + SPP_FORCEINLINE static bindex_t compute_tree_index(size_t S) + { + size_t X = S >> TREEBIN_SHIFT; + if (X == 0) + return 0; + else if (X > 0xFFFF) + return NTREEBINS - 1; + + unsigned int K; + _BitScanReverse((DWORD *) &K, (DWORD) X); + return (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT - 1)) & 1))); + } + +#else // GNUC + SPP_FORCEINLINE static bindex_t compute_tree_index(size_t S) + { + size_t X = S >> TREEBIN_SHIFT; + if (X == 0) + return 0; + else if (X > 0xFFFF) + return NTREEBINS - 1; + + unsigned int Y = (unsigned int)X; + unsigned int N = ((Y - 0x100) >> 16) & 8; + unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4; + N += K; + N += K = (((Y <<= K) - 0x4000) >> 16) & 2; + K = 14 - N + ((Y <<= K) >> 15); + return (K << 1) + ((S >> (K + (TREEBIN_SHIFT - 1)) & 1)); + } +#endif + + // Shift placing maximum resolved bit in a treebin at i as sign bit + static bindex_t leftshift_for_tree_index(bindex_t i) + { + return (i == NTREEBINS - 1) ? 0 : + ((spp_size_t_bitsize - 1) - ((i >> 1) + TREEBIN_SHIFT - 2)); + } + + // The size of the smallest chunk held in bin with index i + static bindex_t minsize_for_tree_index(bindex_t i) + { + return ((size_t)1 << ((i >> 1) + TREEBIN_SHIFT)) | + (((size_t)(i & 1)) << ((i >> 1) + TREEBIN_SHIFT - 1)); + } + + + // ----------- isolate the least set bit of a bitmap + static binmap_t least_bit(binmap_t x) { return x & -x; } + + // ----------- mask with all bits to left of least bit of x on + static binmap_t left_bits(binmap_t x) { return (x << 1) | -(x << 1); } + + // index corresponding to given bit. Use x86 asm if possible +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + static bindex_t compute_bit2idx(binmap_t X) + { + unsigned int J; + J = __builtin_ctz(X); + return (bindex_t)J; + } + +#elif defined (__INTEL_COMPILER) + static bindex_t compute_bit2idx(binmap_t X) + { + unsigned int J; + J = _bit_scan_forward(X); + return (bindex_t)J; + } + +#elif defined(_MSC_VER) && _MSC_VER>=1300 + static bindex_t compute_bit2idx(binmap_t X) + { + unsigned int J; + _BitScanForward((DWORD *) &J, X); + return (bindex_t)J; + } + +#elif SPP_USE_BUILTIN_FFS + static bindex_t compute_bit2idx(binmap_t X) { return ffs(X) - 1; } + +#else + static bindex_t compute_bit2idx(binmap_t X) + { + unsigned int Y = X - 1; + unsigned int K = Y >> (16 - 4) & 16; + unsigned int N = K; Y >>= K; + N += K = Y >> (8 - 3) & 8; Y >>= K; + N += K = Y >> (4 - 2) & 4; Y >>= K; + N += K = Y >> (2 - 1) & 2; Y >>= K; + N += K = Y >> (1 - 0) & 1; Y >>= K; + return (bindex_t)(N + Y); + } +#endif + + /* ------------------------ Set up inuse chunks with or without footers ---*/ +#if !SPP_FOOTERS + void mark_inuse_foot(malloc_chunk_header *, size_t) {} +#else + //Set foot of inuse chunk to be xor of mstate and seed + void mark_inuse_foot(malloc_chunk_header *p, size_t s) + { + (((mchunkptr)((char*)p + s))->prev_foot = (size_t)this ^ mparams._magic); + } +#endif + + void set_inuse(malloc_chunk_header *p, size_t s) + { + p->_head = (p->_head & PINUSE_BIT) | s | CINUSE_BIT; + ((mchunkptr)(((char*)p) + s))->_head |= PINUSE_BIT; + mark_inuse_foot(p, s); + } + + void set_inuse_and_pinuse(malloc_chunk_header *p, size_t s) + { + p->_head = s | PINUSE_BIT | CINUSE_BIT; + ((mchunkptr)(((char*)p) + s))->_head |= PINUSE_BIT; + mark_inuse_foot(p, s); + } + + void set_size_and_pinuse_of_inuse_chunk(malloc_chunk_header *p, size_t s) + { + p->_head = s | PINUSE_BIT | CINUSE_BIT; + mark_inuse_foot(p, s); + } + + /* ------------------------ Addressing by index. See about smallbin repositioning --- */ + sbinptr smallbin_at(bindex_t i) const { return (sbinptr)((char*)&_smallbins[i << 1]); } + tbinptr* treebin_at(bindex_t i) { return &_treebins[i]; } + + /* ----------------------- bit corresponding to given index ---------*/ + static binmap_t idx2bit(bindex_t i) { return ((binmap_t)1 << i); } + + // --------------- Mark/Clear bits with given index + void mark_smallmap(bindex_t i) { _smallmap |= idx2bit(i); } + void clear_smallmap(bindex_t i) { _smallmap &= ~idx2bit(i); } + binmap_t smallmap_is_marked(bindex_t i) const { return _smallmap & idx2bit(i); } + + void mark_treemap(bindex_t i) { _treemap |= idx2bit(i); } + void clear_treemap(bindex_t i) { _treemap &= ~idx2bit(i); } + binmap_t treemap_is_marked(bindex_t i) const { return _treemap & idx2bit(i); } + + /* ------------------------ ----------------------- */ + SPP_FORCEINLINE void insert_small_chunk(mchunkptr P, size_t S); + SPP_FORCEINLINE void unlink_small_chunk(mchunkptr P, size_t S); + SPP_FORCEINLINE void unlink_first_small_chunk(mchunkptr B, mchunkptr P, bindex_t I); + SPP_FORCEINLINE void replace_dv(mchunkptr P, size_t S); + + /* ------------------------- Operations on trees ------------------------- */ + SPP_FORCEINLINE void insert_large_chunk(tchunkptr X, size_t S); + SPP_FORCEINLINE void unlink_large_chunk(tchunkptr X); + + /* ------------------------ Relays to large vs small bin operations */ + SPP_FORCEINLINE void insert_chunk(mchunkptr P, size_t S); + SPP_FORCEINLINE void unlink_chunk(mchunkptr P, size_t S); + + /* ----------------------- Direct-mmapping chunks ----------------------- */ + SPP_IMPL void* mmap_alloc(size_t nb); + SPP_IMPL mchunkptr mmap_resize(mchunkptr oldp, size_t nb, int flags); + + SPP_IMPL void reset_on_error(); + SPP_IMPL void* prepend_alloc(char* newbase, char* oldbase, size_t nb); + SPP_IMPL void add_segment(char* tbase, size_t tsize, flag_t mmapped); + + /* ------------------------ malloc --------------------------- */ + SPP_IMPL void* tmalloc_large(size_t nb); + SPP_IMPL void* tmalloc_small(size_t nb); + + /* ------------------------Bin types, widths and sizes -------- */ + static const size_t NSMALLBINS = 32; + static const size_t NTREEBINS = 32; + static const size_t SMALLBIN_SHIFT = 3; + static const size_t SMALLBIN_WIDTH = 1 << SMALLBIN_SHIFT; + static const size_t TREEBIN_SHIFT = 8; + static const size_t MIN_LARGE_SIZE = 1 << TREEBIN_SHIFT; + static const size_t MAX_SMALL_SIZE = (MIN_LARGE_SIZE - 1); + static const size_t MAX_SMALL_REQUEST = (MAX_SMALL_SIZE - spp_chunk_align_mask - CHUNK_OVERHEAD); + + /* ------------------------ data members --------------------------- */ + binmap_t _smallmap; + binmap_t _treemap; + size_t _dvsize; + size_t _topsize; + char* _least_addr; + mchunkptr _dv; + mchunkptr _top; + size_t _trim_check; + size_t _release_checks; + size_t _magic; + mchunkptr _smallbins[(NSMALLBINS + 1) * 2]; + tbinptr _treebins[NTREEBINS]; +public: + size_t _footprint; + size_t _max_footprint; + size_t _footprint_limit; // zero means no limit + flag_t _mflags; + + msegment _seg; + +private: + void* _extp; // Unused but available for extensions + size_t _exts; +}; + +typedef malloc_state* mstate; + +/* ------------- end malloc_state ------------------- */ + +#if SPP_FOOTERS +static malloc_state* get_mstate_for(malloc_chunk_header *p) +{ + return (malloc_state*)(((mchunkptr)((char*)(p) + + (p->chunksize())))->prev_foot ^ mparams._magic); +} +#endif + +/* -------------------------- system alloc setup ------------------------- */ + + + +// For mmap, use granularity alignment on windows, else page-align +#ifdef WIN32 + #define mmap_align(S) mparams.granularity_align(S) +#else + #define mmap_align(S) mparams.page_align(S) +#endif + +// True if segment S holds address A +static bool segment_holds(msegmentptr S, mchunkptr A) +{ + return (char*)A >= S->_base && (char*)A < S->_base + S->_size; +} + +/* + top_foot_size is padding at the end of a segment, including space + that may be needed to place segment records and fenceposts when new + noncontiguous segments are added. +*/ +static SPP_FORCEINLINE size_t top_foot_size() +{ + return align_offset(chunk2mem((void *)0)) + + pad_request(sizeof(struct malloc_segment)) + + MIN_CHUNK_SIZE; +} + + +// For sys_alloc, enough padding to ensure can malloc request on success +static SPP_FORCEINLINE size_t sys_alloc_padding() +{ + return top_foot_size() + SPP_MALLOC_ALIGNMENT; +} + + +#define SPP_USAGE_ERROR_ACTION(m,p) SPP_ABORT + +/* ---------------------------- setting mparams -------------------------- */ + +// Initialize mparams +int malloc_params::_init() +{ +#ifdef NEED_GLOBAL_LOCK_INIT + if (malloc_global_mutex_status <= 0) + init_malloc_global_mutex(); +#endif + + if (_magic == 0) + { + size_t magic; + size_t psize; + size_t gsize; + +#ifndef WIN32 + psize = malloc_getpagesize; + gsize = ((SPP_DEFAULT_GRANULARITY != 0) ? SPP_DEFAULT_GRANULARITY : psize); +#else + { + SYSTEM_INFO system_info; + GetSystemInfo(&system_info); + psize = system_info.dwPageSize; + gsize = ((SPP_DEFAULT_GRANULARITY != 0) ? + SPP_DEFAULT_GRANULARITY : system_info.dwAllocationGranularity); + } +#endif + + /* Sanity-check configuration: + size_t must be unsigned and as wide as pointer type. + ints must be at least 4 bytes. + alignment must be at least 8. + Alignment, min chunk size, and page size must all be powers of 2. + */ + if ((sizeof(size_t) != sizeof(char*)) || + (spp_max_size_t < MIN_CHUNK_SIZE) || + (sizeof(int) < 4) || + (SPP_MALLOC_ALIGNMENT < (size_t)8U) || + ((SPP_MALLOC_ALIGNMENT & (SPP_MALLOC_ALIGNMENT - 1)) != 0) || + ((MCHUNK_SIZE & (MCHUNK_SIZE - 1)) != 0) || + ((gsize & (gsize - 1)) != 0) || + ((psize & (psize - 1)) != 0)) + SPP_ABORT; + _granularity = gsize; + _page_size = psize; + _mmap_threshold = SPP_DEFAULT_MMAP_THRESHOLD; + _trim_threshold = SPP_DEFAULT_TRIM_THRESHOLD; + _default_mflags = USE_MMAP_BIT | USE_NONCONTIGUOUS_BIT; + + { +#if SPP_USE_DEV_RANDOM + int fd; + unsigned char buf[sizeof(size_t)]; + // Try to use /dev/urandom, else fall back on using time + if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 && + read(fd, buf, sizeof(buf)) == sizeof(buf)) + { + magic = *((size_t *) buf); + close(fd); + } + else +#endif + { +#ifdef WIN32 + magic = (size_t)(GetTickCount() ^ (size_t)0x55555555U); +#elif defined(SPP_LACKS_TIME_H) + magic = (size_t)&magic ^ (size_t)0x55555555U; +#else + magic = (size_t)(time(0) ^ (size_t)0x55555555U); +#endif + } + magic |= (size_t)8U; // ensure nonzero + magic &= ~(size_t)7U; // improve chances of fault for bad values + // Until memory modes commonly available, use volatile-write + (*(volatile size_t *)(&(_magic))) = magic; + } + } + + return 1; +} + +/* + mallopt tuning options. SVID/XPG defines four standard parameter + numbers for mallopt, normally defined in malloc.h. None of these + are used in this malloc, so setting them has no effect. But this + malloc does support the following options. +*/ +static const int m_trim_threshold = -1; +static const int m_granularity = -2; +static const int m_mmap_threshold = -3; + +// support for mallopt +int malloc_params::change(int param_number, int value) +{ + size_t val; + ensure_initialization(); + val = (value == -1) ? spp_max_size_t : (size_t)value; + + switch (param_number) + { + case m_trim_threshold: + _trim_threshold = val; + return 1; + + case m_granularity: + if (val >= _page_size && ((val & (val - 1)) == 0)) + { + _granularity = val; + return 1; + } + else + return 0; + + case m_mmap_threshold: + _mmap_threshold = val; + return 1; + + default: + return 0; + } +} + +#if SPP_DEBUG +/* ------------------------- Debugging Support --------------------------- */ + +// Check properties of any chunk, whether free, inuse, mmapped etc +void malloc_state::do_check_any_chunk(mchunkptr p) const +{ + assert((spp_is_aligned(chunk2mem(p))) || (p->_head == FENCEPOST_HEAD)); + assert(ok_address(p)); +} + +// Check properties of top chunk +void malloc_state::do_check_top_chunk(mchunkptr p) const +{ + msegmentptr sp = segment_holding((char*)p); + size_t sz = p->_head & ~INUSE_BITS; // third-lowest bit can be set! + assert(sp != 0); + assert((spp_is_aligned(chunk2mem(p))) || (p->_head == FENCEPOST_HEAD)); + assert(ok_address(p)); + assert(sz == _topsize); + assert(sz > 0); + assert(sz == ((sp->_base + sp->_size) - (char*)p) - top_foot_size()); + assert(p->pinuse()); + assert(!p->chunk_plus_offset(sz)->pinuse()); +} + +// Check properties of (inuse) mmapped chunks +void malloc_state::do_check_mmapped_chunk(mchunkptr p) const +{ + size_t sz = p->chunksize(); + size_t len = (sz + (p->_prev_foot) + SPP_MMAP_FOOT_PAD); + assert(p->is_mmapped()); + assert(use_mmap()); + assert((spp_is_aligned(chunk2mem(p))) || (p->_head == FENCEPOST_HEAD)); + assert(ok_address(p)); + assert(!is_small(sz)); + assert((len & (mparams._page_size - 1)) == 0); + assert(p->chunk_plus_offset(sz)->_head == FENCEPOST_HEAD); + assert(p->chunk_plus_offset(sz + sizeof(size_t))->_head == 0); +} + +// Check properties of inuse chunks +void malloc_state::do_check_inuse_chunk(mchunkptr p) const +{ + do_check_any_chunk(p); + assert(p->is_inuse()); + assert(p->next_pinuse()); + // If not pinuse and not mmapped, previous chunk has OK offset + assert(p->is_mmapped() || p->pinuse() || (mchunkptr)p->prev_chunk()->next_chunk() == p); + if (p->is_mmapped()) + do_check_mmapped_chunk(p); +} + +// Check properties of free chunks +void malloc_state::do_check_free_chunk(mchunkptr p) const +{ + size_t sz = p->chunksize(); + mchunkptr next = (mchunkptr)p->chunk_plus_offset(sz); + do_check_any_chunk(p); + assert(!p->is_inuse()); + assert(!p->next_pinuse()); + assert(!p->is_mmapped()); + if (p != _dv && p != _top) + { + if (sz >= MIN_CHUNK_SIZE) + { + assert((sz & spp_chunk_align_mask) == 0); + assert(spp_is_aligned(chunk2mem(p))); + assert(next->_prev_foot == sz); + assert(p->pinuse()); + assert(next == _top || next->is_inuse()); + assert(p->_fd->_bk == p); + assert(p->_bk->_fd == p); + } + else // markers are always of size sizeof(size_t) + assert(sz == sizeof(size_t)); + } +} + +// Check properties of malloced chunks at the point they are malloced +void malloc_state::do_check_malloced_chunk(void* mem, size_t s) const +{ + if (mem != 0) + { + mchunkptr p = mem2chunk(mem); + size_t sz = p->_head & ~INUSE_BITS; + do_check_inuse_chunk(p); + assert((sz & spp_chunk_align_mask) == 0); + assert(sz >= MIN_CHUNK_SIZE); + assert(sz >= s); + // unless mmapped, size is less than MIN_CHUNK_SIZE more than request + assert(p->is_mmapped() || sz < (s + MIN_CHUNK_SIZE)); + } +} + +// Check a tree and its subtrees. +void malloc_state::do_check_tree(tchunkptr t) +{ + tchunkptr head = 0; + tchunkptr u = t; + bindex_t tindex = t->_index; + size_t tsize = t->chunksize(); + bindex_t idx = compute_tree_index(tsize); + assert(tindex == idx); + assert(tsize >= MIN_LARGE_SIZE); + assert(tsize >= minsize_for_tree_index(idx)); + assert((idx == NTREEBINS - 1) || (tsize < minsize_for_tree_index((idx + 1)))); + + do + { + // traverse through chain of same-sized nodes + do_check_any_chunk((mchunkptr)u); + assert(u->_index == tindex); + assert(u->chunksize() == tsize); + assert(!u->is_inuse()); + assert(!u->next_pinuse()); + assert(u->_fd->_bk == u); + assert(u->_bk->_fd == u); + if (u->_parent == 0) + { + assert(u->_child[0] == 0); + assert(u->_child[1] == 0); + } + else + { + assert(head == 0); // only one node on chain has parent + head = u; + assert(u->_parent != u); + assert(u->_parent->_child[0] == u || + u->_parent->_child[1] == u || + *((tbinptr*)(u->_parent)) == u); + if (u->_child[0] != 0) + { + assert(u->_child[0]->_parent == u); + assert(u->_child[0] != u); + do_check_tree(u->_child[0]); + } + if (u->_child[1] != 0) + { + assert(u->_child[1]->_parent == u); + assert(u->_child[1] != u); + do_check_tree(u->_child[1]); + } + if (u->_child[0] != 0 && u->_child[1] != 0) + assert(u->_child[0]->chunksize() < u->_child[1]->chunksize()); + } + u = u->_fd; + } + while (u != t); + assert(head != 0); +} + +// Check all the chunks in a treebin. +void malloc_state::do_check_treebin(bindex_t i) +{ + tbinptr* tb = (tbinptr*)treebin_at(i); + tchunkptr t = *tb; + int empty = (_treemap & (1U << i)) == 0; + if (t == 0) + assert(empty); + if (!empty) + do_check_tree(t); +} + +// Check all the chunks in a smallbin. +void malloc_state::do_check_smallbin(bindex_t i) +{ + sbinptr b = smallbin_at(i); + mchunkptr p = b->_bk; + unsigned int empty = (_smallmap & (1U << i)) == 0; + if (p == b) + assert(empty); + if (!empty) + { + for (; p != b; p = p->_bk) + { + size_t size = p->chunksize(); + mchunkptr q; + // each chunk claims to be free + do_check_free_chunk(p); + // chunk belongs in bin + assert(small_index(size) == i); + assert(p->_bk == b || p->_bk->chunksize() == p->chunksize()); + // chunk is followed by an inuse chunk + q = (mchunkptr)p->next_chunk(); + if (q->_head != FENCEPOST_HEAD) + do_check_inuse_chunk(q); + } + } +} + +// Find x in a bin. Used in other check functions. +int malloc_state::bin_find(mchunkptr x) +{ + size_t size = x->chunksize(); + if (is_small(size)) + { + bindex_t sidx = small_index(size); + sbinptr b = smallbin_at(sidx); + if (smallmap_is_marked(sidx)) + { + mchunkptr p = b; + do + { + if (p == x) + return 1; + } + while ((p = p->_fd) != b); + } + } + else + { + bindex_t tidx = compute_tree_index(size); + if (treemap_is_marked(tidx)) + { + tchunkptr t = *treebin_at(tidx); + size_t sizebits = size << leftshift_for_tree_index(tidx); + while (t != 0 && t->chunksize() != size) + { + t = t->_child[(sizebits >> (spp_size_t_bitsize - 1)) & 1]; + sizebits <<= 1; + } + if (t != 0) + { + tchunkptr u = t; + do + { + if (u == (tchunkptr)x) + return 1; + } + while ((u = u->_fd) != t); + } + } + } + return 0; +} + +// Traverse each chunk and check it; return total +size_t malloc_state::traverse_and_check() +{ + size_t sum = 0; + if (is_initialized()) + { + msegmentptr s = (msegmentptr)&_seg; + sum += _topsize + top_foot_size(); + while (s != 0) + { + mchunkptr q = align_as_chunk(s->_base); + mchunkptr lastq = 0; + assert(q->pinuse()); + while (segment_holds(s, q) && + q != _top && q->_head != FENCEPOST_HEAD) + { + sum += q->chunksize(); + if (q->is_inuse()) + { + assert(!bin_find(q)); + do_check_inuse_chunk(q); + } + else + { + assert(q == _dv || bin_find(q)); + assert(lastq == 0 || lastq->is_inuse()); // Not 2 consecutive free + do_check_free_chunk(q); + } + lastq = q; + q = (mchunkptr)q->next_chunk(); + } + s = s->_next; + } + } + return sum; +} + + +// Check all properties of malloc_state. +void malloc_state::do_check_malloc_state() +{ + bindex_t i; + size_t total; + // check bins + for (i = 0; i < NSMALLBINS; ++i) + do_check_smallbin(i); + for (i = 0; i < NTREEBINS; ++i) + do_check_treebin(i); + + if (_dvsize != 0) + { + // check dv chunk + do_check_any_chunk(_dv); + assert(_dvsize == _dv->chunksize()); + assert(_dvsize >= MIN_CHUNK_SIZE); + assert(bin_find(_dv) == 0); + } + + if (_top != 0) + { + // check top chunk + do_check_top_chunk(_top); + //assert(topsize == top->chunksize()); redundant + assert(_topsize > 0); + assert(bin_find(_top) == 0); + } + + total = traverse_and_check(); + assert(total <= _footprint); + assert(_footprint <= _max_footprint); +} +#endif // SPP_DEBUG + +/* ----------------------- Operations on smallbins ----------------------- */ + +/* + Various forms of linking and unlinking are defined as macros. Even + the ones for trees, which are very long but have very short typical + paths. This is ugly but reduces reliance on inlining support of + compilers. +*/ + +// Link a free chunk into a smallbin +void malloc_state::insert_small_chunk(mchunkptr p, size_t s) +{ + bindex_t I = small_index(s); + mchunkptr B = smallbin_at(I); + mchunkptr F = B; + assert(s >= MIN_CHUNK_SIZE); + if (!smallmap_is_marked(I)) + mark_smallmap(I); + else if (rtcheck(ok_address(B->_fd))) + F = B->_fd; + else + SPP_ABORT; + B->_fd = p; + F->_bk = p; + p->_fd = F; + p->_bk = B; +} + +// Unlink a chunk from a smallbin +void malloc_state::unlink_small_chunk(mchunkptr p, size_t s) +{ + mchunkptr F = p->_fd; + mchunkptr B = p->_bk; + bindex_t I = small_index(s); + assert(p != B); + assert(p != F); + assert(p->chunksize() == small_index2size(I)); + if (rtcheck(F == smallbin_at(I) || (ok_address(F) && F->_bk == p))) + { + if (B == F) + clear_smallmap(I); + else if (rtcheck(B == smallbin_at(I) || + (ok_address(B) && B->_fd == p))) + { + F->_bk = B; + B->_fd = F; + } + else + SPP_ABORT; + } + else + SPP_ABORT; +} + +// Unlink the first chunk from a smallbin +void malloc_state::unlink_first_small_chunk(mchunkptr B, mchunkptr p, bindex_t I) +{ + mchunkptr F = p->_fd; + assert(p != B); + assert(p != F); + assert(p->chunksize() == small_index2size(I)); + if (B == F) + clear_smallmap(I); + else if (rtcheck(ok_address(F) && F->_bk == p)) + { + F->_bk = B; + B->_fd = F; + } + else + SPP_ABORT; +} + +// Replace dv node, binning the old one +// Used only when dvsize known to be small +void malloc_state::replace_dv(mchunkptr p, size_t s) +{ + size_t DVS = _dvsize; + assert(is_small(DVS)); + if (DVS != 0) + { + mchunkptr DV = _dv; + insert_small_chunk(DV, DVS); + } + _dvsize = s; + _dv = p; +} + +/* ------------------------- Operations on trees ------------------------- */ + +// Insert chunk into tree +void malloc_state::insert_large_chunk(tchunkptr X, size_t s) +{ + tbinptr* H; + bindex_t I = compute_tree_index(s); + H = treebin_at(I); + X->_index = I; + X->_child[0] = X->_child[1] = 0; + if (!treemap_is_marked(I)) + { + mark_treemap(I); + *H = X; + X->_parent = (tchunkptr)H; + X->_fd = X->_bk = X; + } + else + { + tchunkptr T = *H; + size_t K = s << leftshift_for_tree_index(I); + for (;;) + { + if (T->chunksize() != s) + { + tchunkptr* C = &(T->_child[(K >> (spp_size_t_bitsize - 1)) & 1]); + K <<= 1; + if (*C != 0) + T = *C; + else if (rtcheck(ok_address(C))) + { + *C = X; + X->_parent = T; + X->_fd = X->_bk = X; + break; + } + else + { + SPP_ABORT; + break; + } + } + else + { + tchunkptr F = T->_fd; + if (rtcheck(ok_address(T) && ok_address(F))) + { + T->_fd = F->_bk = X; + X->_fd = F; + X->_bk = T; + X->_parent = 0; + break; + } + else + { + SPP_ABORT; + break; + } + } + } + } +} + +/* + Unlink steps: + + 1. If x is a chained node, unlink it from its same-sized fd/bk links + and choose its bk node as its replacement. + 2. If x was the last node of its size, but not a leaf node, it must + be replaced with a leaf node (not merely one with an open left or + right), to make sure that lefts and rights of descendents + correspond properly to bit masks. We use the rightmost descendent + of x. We could use any other leaf, but this is easy to locate and + tends to counteract removal of leftmosts elsewhere, and so keeps + paths shorter than minimally guaranteed. This doesn't loop much + because on average a node in a tree is near the bottom. + 3. If x is the base of a chain (i.e., has parent links) relink + x's parent and children to x's replacement (or null if none). +*/ + +void malloc_state::unlink_large_chunk(tchunkptr X) +{ + tchunkptr XP = X->_parent; + tchunkptr R; + if (X->_bk != X) + { + tchunkptr F = X->_fd; + R = X->_bk; + if (rtcheck(ok_address(F) && F->_bk == X && R->_fd == X)) + { + F->_bk = R; + R->_fd = F; + } + else + SPP_ABORT; + } + else + { + tchunkptr* RP; + if (((R = *(RP = &(X->_child[1]))) != 0) || + ((R = *(RP = &(X->_child[0]))) != 0)) + { + tchunkptr* CP; + while ((*(CP = &(R->_child[1])) != 0) || + (*(CP = &(R->_child[0])) != 0)) + R = *(RP = CP); + if (rtcheck(ok_address(RP))) + *RP = 0; + else + SPP_ABORT; + } + } + if (XP != 0) + { + tbinptr* H = treebin_at(X->_index); + if (X == *H) + { + if ((*H = R) == 0) + clear_treemap(X->_index); + } + else if (rtcheck(ok_address(XP))) + { + if (XP->_child[0] == X) + XP->_child[0] = R; + else + XP->_child[1] = R; + } + else + SPP_ABORT; + if (R != 0) + { + if (rtcheck(ok_address(R))) + { + tchunkptr C0, C1; + R->_parent = XP; + if ((C0 = X->_child[0]) != 0) + { + if (rtcheck(ok_address(C0))) + { + R->_child[0] = C0; + C0->_parent = R; + } + else + SPP_ABORT; + } + if ((C1 = X->_child[1]) != 0) + { + if (rtcheck(ok_address(C1))) + { + R->_child[1] = C1; + C1->_parent = R; + } + else + SPP_ABORT; + } + } + else + SPP_ABORT; + } + } +} + +// Relays to large vs small bin operations + +void malloc_state::insert_chunk(mchunkptr p, size_t s) +{ + if (is_small(s)) + insert_small_chunk(p, s); + else + { + tchunkptr tp = (tchunkptr)(p); + insert_large_chunk(tp, s); + } +} + +void malloc_state::unlink_chunk(mchunkptr p, size_t s) +{ + if (is_small(s)) + unlink_small_chunk(p, s); + else + { + tchunkptr tp = (tchunkptr)(p); + unlink_large_chunk(tp); + } +} + + +/* ----------------------- Direct-mmapping chunks ----------------------- */ + +/* + Directly mmapped chunks are set up with an offset to the start of + the mmapped region stored in the prev_foot field of the chunk. This + allows reconstruction of the required argument to MUNMAP when freed, + and also allows adjustment of the returned chunk to meet alignment + requirements (especially in memalign). +*/ + +// Malloc using mmap +void* malloc_state::mmap_alloc(size_t nb) +{ + size_t mmsize = mmap_align(nb + 6 * sizeof(size_t) + spp_chunk_align_mask); + if (_footprint_limit != 0) + { + size_t fp = _footprint + mmsize; + if (fp <= _footprint || fp > _footprint_limit) + return 0; + } + if (mmsize > nb) + { + // Check for wrap around 0 + char* mm = (char*)(SPP_CALL_DIRECT_MMAP(mmsize)); + if (mm != cmfail) + { + size_t offset = align_offset(chunk2mem(mm)); + size_t psize = mmsize - offset - SPP_MMAP_FOOT_PAD; + mchunkptr p = (mchunkptr)(mm + offset); + p->_prev_foot = offset; + p->_head = psize; + mark_inuse_foot(p, psize); + p->chunk_plus_offset(psize)->_head = FENCEPOST_HEAD; + p->chunk_plus_offset(psize + sizeof(size_t))->_head = 0; + + if (_least_addr == 0 || mm < _least_addr) + _least_addr = mm; + if ((_footprint += mmsize) > _max_footprint) + _max_footprint = _footprint; + assert(spp_is_aligned(chunk2mem(p))); + check_mmapped_chunk(p); + return chunk2mem(p); + } + } + return 0; +} + +// Realloc using mmap +mchunkptr malloc_state::mmap_resize(mchunkptr oldp, size_t nb, int flags) +{ + size_t oldsize = oldp->chunksize(); + (void)flags; // placate people compiling -Wunused + if (is_small(nb)) // Can't shrink mmap regions below small size + return 0; + + // Keep old chunk if big enough but not too big + if (oldsize >= nb + sizeof(size_t) && + (oldsize - nb) <= (mparams._granularity << 1)) + return oldp; + else + { + size_t offset = oldp->_prev_foot; + size_t oldmmsize = oldsize + offset + SPP_MMAP_FOOT_PAD; + size_t newmmsize = mmap_align(nb + 6 * sizeof(size_t) + spp_chunk_align_mask); + char* cp = (char*)SPP_CALL_MREMAP((char*)oldp - offset, + oldmmsize, newmmsize, flags); + if (cp != cmfail) + { + mchunkptr newp = (mchunkptr)(cp + offset); + size_t psize = newmmsize - offset - SPP_MMAP_FOOT_PAD; + newp->_head = psize; + mark_inuse_foot(newp, psize); + newp->chunk_plus_offset(psize)->_head = FENCEPOST_HEAD; + newp->chunk_plus_offset(psize + sizeof(size_t))->_head = 0; + + if (cp < _least_addr) + _least_addr = cp; + if ((_footprint += newmmsize - oldmmsize) > _max_footprint) + _max_footprint = _footprint; + check_mmapped_chunk(newp); + return newp; + } + } + return 0; +} + + +/* -------------------------- mspace management -------------------------- */ + +// Initialize top chunk and its size +void malloc_state::init_top(mchunkptr p, size_t psize) +{ + // Ensure alignment + size_t offset = align_offset(chunk2mem(p)); + p = (mchunkptr)((char*)p + offset); + psize -= offset; + + _top = p; + _topsize = psize; + p->_head = psize | PINUSE_BIT; + // set size of fake trailing chunk holding overhead space only once + p->chunk_plus_offset(psize)->_head = top_foot_size(); + _trim_check = mparams._trim_threshold; // reset on each update +} + +// Initialize bins for a new mstate that is otherwise zeroed out +void malloc_state::init_bins() +{ + // Establish circular links for smallbins + bindex_t i; + for (i = 0; i < NSMALLBINS; ++i) + { + sbinptr bin = smallbin_at(i); + bin->_fd = bin->_bk = bin; + } +} + +#if SPP_PROCEED_ON_ERROR + +// default corruption action +void malloc_state::reset_on_error() +{ + int i; + ++malloc_corruption_error_count; + // Reinitialize fields to forget about all memory + _smallmap = _treemap = 0; + _dvsize = _topsize = 0; + _seg._base = 0; + _seg._size = 0; + _seg._next = 0; + _top = _dv = 0; + for (i = 0; i < NTREEBINS; ++i) + *treebin_at(i) = 0; + init_bins(); +} +#endif + +/* Allocate chunk and prepend remainder with chunk in successor base. */ +void* malloc_state::prepend_alloc(char* newbase, char* oldbase, size_t nb) +{ + mchunkptr p = align_as_chunk(newbase); + mchunkptr oldfirst = align_as_chunk(oldbase); + size_t psize = (char*)oldfirst - (char*)p; + mchunkptr q = (mchunkptr)p->chunk_plus_offset(nb); + size_t qsize = psize - nb; + set_size_and_pinuse_of_inuse_chunk(p, nb); + + assert((char*)oldfirst > (char*)q); + assert(oldfirst->pinuse()); + assert(qsize >= MIN_CHUNK_SIZE); + + // consolidate remainder with first chunk of old base + if (oldfirst == _top) + { + size_t tsize = _topsize += qsize; + _top = q; + q->_head = tsize | PINUSE_BIT; + check_top_chunk(q); + } + else if (oldfirst == _dv) + { + size_t dsize = _dvsize += qsize; + _dv = q; + q->set_size_and_pinuse_of_free_chunk(dsize); + } + else + { + if (!oldfirst->is_inuse()) + { + size_t nsize = oldfirst->chunksize(); + unlink_chunk(oldfirst, nsize); + oldfirst = (mchunkptr)oldfirst->chunk_plus_offset(nsize); + qsize += nsize; + } + q->set_free_with_pinuse(qsize, oldfirst); + insert_chunk(q, qsize); + check_free_chunk(q); + } + + check_malloced_chunk(chunk2mem(p), nb); + return chunk2mem(p); +} + +// Add a segment to hold a new noncontiguous region +void malloc_state::add_segment(char* tbase, size_t tsize, flag_t mmapped) +{ + // Determine locations and sizes of segment, fenceposts, old top + char* old_top = (char*)_top; + msegmentptr oldsp = segment_holding(old_top); + char* old_end = oldsp->_base + oldsp->_size; + size_t ssize = pad_request(sizeof(struct malloc_segment)); + char* rawsp = old_end - (ssize + 4 * sizeof(size_t) + spp_chunk_align_mask); + size_t offset = align_offset(chunk2mem(rawsp)); + char* asp = rawsp + offset; + char* csp = (asp < (old_top + MIN_CHUNK_SIZE)) ? old_top : asp; + mchunkptr sp = (mchunkptr)csp; + msegmentptr ss = (msegmentptr)(chunk2mem(sp)); + mchunkptr tnext = (mchunkptr)sp->chunk_plus_offset(ssize); + mchunkptr p = tnext; + int nfences = 0; + + // reset top to new space + init_top((mchunkptr)tbase, tsize - top_foot_size()); + + // Set up segment record + assert(spp_is_aligned(ss)); + set_size_and_pinuse_of_inuse_chunk(sp, ssize); + *ss = _seg; // Push current record + _seg._base = tbase; + _seg._size = tsize; + _seg._sflags = mmapped; + _seg._next = ss; + + // Insert trailing fenceposts + for (;;) + { + mchunkptr nextp = (mchunkptr)p->chunk_plus_offset(sizeof(size_t)); + p->_head = FENCEPOST_HEAD; + ++nfences; + if ((char*)(&(nextp->_head)) < old_end) + p = nextp; + else + break; + } + assert(nfences >= 2); + + // Insert the rest of old top into a bin as an ordinary free chunk + if (csp != old_top) + { + mchunkptr q = (mchunkptr)old_top; + size_t psize = csp - old_top; + mchunkptr tn = (mchunkptr)q->chunk_plus_offset(psize); + q->set_free_with_pinuse(psize, tn); + insert_chunk(q, psize); + } + + check_top_chunk(_top); +} + +/* -------------------------- System allocation -------------------------- */ + +// Get memory from system using MMAP +void* malloc_state::sys_alloc(size_t nb) +{ + char* tbase = cmfail; + size_t tsize = 0; + flag_t mmap_flag = 0; + size_t asize; // allocation size + + mparams.ensure_initialization(); + + // Directly map large chunks, but only if already initialized + if (use_mmap() && nb >= mparams._mmap_threshold && _topsize != 0) + { + void* mem = mmap_alloc(nb); + if (mem != 0) + return mem; + } + + asize = mparams.granularity_align(nb + sys_alloc_padding()); + if (asize <= nb) + return 0; // wraparound + if (_footprint_limit != 0) + { + size_t fp = _footprint + asize; + if (fp <= _footprint || fp > _footprint_limit) + return 0; + } + + /* + Try getting memory with a call to MMAP new space (disabled if not SPP_HAVE_MMAP). + We need to request enough bytes from system to ensure + we can malloc nb bytes upon success, so pad with enough space for + top_foot, plus alignment-pad to make sure we don't lose bytes if + not on boundary, and round this up to a granularity unit. + */ + + if (SPP_HAVE_MMAP && tbase == cmfail) + { + // Try MMAP + char* mp = (char*)(SPP_CALL_MMAP(asize)); + if (mp != cmfail) + { + tbase = mp; + tsize = asize; + mmap_flag = USE_MMAP_BIT; + } + } + + if (tbase != cmfail) + { + + if ((_footprint += tsize) > _max_footprint) + _max_footprint = _footprint; + + if (!is_initialized()) + { + // first-time initialization + if (_least_addr == 0 || tbase < _least_addr) + _least_addr = tbase; + _seg._base = tbase; + _seg._size = tsize; + _seg._sflags = mmap_flag; + _magic = mparams._magic; + _release_checks = SPP_MAX_RELEASE_CHECK_RATE; + init_bins(); + + // Offset top by embedded malloc_state + mchunkptr mn = (mchunkptr)mem2chunk(this)->next_chunk(); + init_top(mn, (size_t)((tbase + tsize) - (char*)mn) - top_foot_size()); + } + + else + { + // Try to merge with an existing segment + msegmentptr sp = &_seg; + // Only consider most recent segment if traversal suppressed + while (sp != 0 && tbase != sp->_base + sp->_size) + sp = (SPP_NO_SEGMENT_TRAVERSAL) ? 0 : sp->_next; + if (sp != 0 && + !sp->is_extern_segment() && + (sp->_sflags & USE_MMAP_BIT) == mmap_flag && + segment_holds(sp, _top)) + { + // append + sp->_size += tsize; + init_top(_top, _topsize + tsize); + } + else + { + if (tbase < _least_addr) + _least_addr = tbase; + sp = &_seg; + while (sp != 0 && sp->_base != tbase + tsize) + sp = (SPP_NO_SEGMENT_TRAVERSAL) ? 0 : sp->_next; + if (sp != 0 && + !sp->is_extern_segment() && + (sp->_sflags & USE_MMAP_BIT) == mmap_flag) + { + char* oldbase = sp->_base; + sp->_base = tbase; + sp->_size += tsize; + return prepend_alloc(tbase, oldbase, nb); + } + else + add_segment(tbase, tsize, mmap_flag); + } + } + + if (nb < _topsize) + { + // Allocate from new or extended top space + size_t rsize = _topsize -= nb; + mchunkptr p = _top; + mchunkptr r = _top = (mchunkptr)p->chunk_plus_offset(nb); + r->_head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(p, nb); + check_top_chunk(_top); + check_malloced_chunk(chunk2mem(p), nb); + return chunk2mem(p); + } + } + + SPP_MALLOC_FAILURE_ACTION; + return 0; +} + +/* ----------------------- system deallocation -------------------------- */ + +// Unmap and unlink any mmapped segments that don't contain used chunks +size_t malloc_state::release_unused_segments() +{ + size_t released = 0; + int nsegs = 0; + msegmentptr pred = &_seg; + msegmentptr sp = pred->_next; + while (sp != 0) + { + char* base = sp->_base; + size_t size = sp->_size; + msegmentptr next = sp->_next; + ++nsegs; + if (sp->is_mmapped_segment() && !sp->is_extern_segment()) + { + mchunkptr p = align_as_chunk(base); + size_t psize = p->chunksize(); + // Can unmap if first chunk holds entire segment and not pinned + if (!p->is_inuse() && (char*)p + psize >= base + size - top_foot_size()) + { + tchunkptr tp = (tchunkptr)p; + assert(segment_holds(sp, p)); + if (p == _dv) + { + _dv = 0; + _dvsize = 0; + } + else + unlink_large_chunk(tp); + if (SPP_CALL_MUNMAP(base, size) == 0) + { + released += size; + _footprint -= size; + // unlink obsoleted record + sp = pred; + sp->_next = next; + } + else + { + // back out if cannot unmap + insert_large_chunk(tp, psize); + } + } + } + if (SPP_NO_SEGMENT_TRAVERSAL) // scan only first segment + break; + pred = sp; + sp = next; + } + // Reset check counter + _release_checks = (((size_t) nsegs > (size_t) SPP_MAX_RELEASE_CHECK_RATE) ? + (size_t) nsegs : (size_t) SPP_MAX_RELEASE_CHECK_RATE); + return released; +} + +int malloc_state::sys_trim(size_t pad) +{ + size_t released = 0; + mparams.ensure_initialization(); + if (pad < MAX_REQUEST && is_initialized()) + { + pad += top_foot_size(); // ensure enough room for segment overhead + + if (_topsize > pad) + { + // Shrink top space in _granularity - size units, keeping at least one + size_t unit = mparams._granularity; + size_t extra = ((_topsize - pad + (unit - 1)) / unit - + 1) * unit; + msegmentptr sp = segment_holding((char*)_top); + + if (!sp->is_extern_segment()) + { + if (sp->is_mmapped_segment()) + { + if (SPP_HAVE_MMAP && + sp->_size >= extra && + !has_segment_link(sp)) + { + // can't shrink if pinned + size_t newsize = sp->_size - extra; + (void)newsize; // placate people compiling -Wunused-variable + // Prefer mremap, fall back to munmap + if ((SPP_CALL_MREMAP(sp->_base, sp->_size, newsize, 0) != mfail) || + (SPP_CALL_MUNMAP(sp->_base + newsize, extra) == 0)) + released = extra; + } + } + } + + if (released != 0) + { + sp->_size -= released; + _footprint -= released; + init_top(_top, _topsize - released); + check_top_chunk(_top); + } + } + + // Unmap any unused mmapped segments + if (SPP_HAVE_MMAP) + released += release_unused_segments(); + + // On failure, disable autotrim to avoid repeated failed future calls + if (released == 0 && _topsize > _trim_check) + _trim_check = spp_max_size_t; + } + + return (released != 0) ? 1 : 0; +} + +/* Consolidate and bin a chunk. Differs from exported versions + of free mainly in that the chunk need not be marked as inuse. +*/ +void malloc_state::dispose_chunk(mchunkptr p, size_t psize) +{ + mchunkptr next = (mchunkptr)p->chunk_plus_offset(psize); + if (!p->pinuse()) + { + mchunkptr prev; + size_t prevsize = p->_prev_foot; + if (p->is_mmapped()) + { + psize += prevsize + SPP_MMAP_FOOT_PAD; + if (SPP_CALL_MUNMAP((char*)p - prevsize, psize) == 0) + _footprint -= psize; + return; + } + prev = (mchunkptr)p->chunk_minus_offset(prevsize); + psize += prevsize; + p = prev; + if (rtcheck(ok_address(prev))) + { + // consolidate backward + if (p != _dv) + unlink_chunk(p, prevsize); + else if ((next->_head & INUSE_BITS) == INUSE_BITS) + { + _dvsize = psize; + p->set_free_with_pinuse(psize, next); + return; + } + } + else + { + SPP_ABORT; + return; + } + } + if (rtcheck(ok_address(next))) + { + if (!next->cinuse()) + { + // consolidate forward + if (next == _top) + { + size_t tsize = _topsize += psize; + _top = p; + p->_head = tsize | PINUSE_BIT; + if (p == _dv) + { + _dv = 0; + _dvsize = 0; + } + return; + } + else if (next == _dv) + { + size_t dsize = _dvsize += psize; + _dv = p; + p->set_size_and_pinuse_of_free_chunk(dsize); + return; + } + else + { + size_t nsize = next->chunksize(); + psize += nsize; + unlink_chunk(next, nsize); + p->set_size_and_pinuse_of_free_chunk(psize); + if (p == _dv) + { + _dvsize = psize; + return; + } + } + } + else + p->set_free_with_pinuse(psize, next); + insert_chunk(p, psize); + } + else + SPP_ABORT; +} + +/* ---------------------------- malloc --------------------------- */ + +// allocate a large request from the best fitting chunk in a treebin +void* malloc_state::tmalloc_large(size_t nb) +{ + tchunkptr v = 0; + size_t rsize = -nb; // Unsigned negation + tchunkptr t; + bindex_t idx = compute_tree_index(nb); + if ((t = *treebin_at(idx)) != 0) + { + // Traverse tree for this bin looking for node with size == nb + size_t sizebits = nb << leftshift_for_tree_index(idx); + tchunkptr rst = 0; // The deepest untaken right subtree + for (;;) + { + tchunkptr rt; + size_t trem = t->chunksize() - nb; + if (trem < rsize) + { + v = t; + if ((rsize = trem) == 0) + break; + } + rt = t->_child[1]; + t = t->_child[(sizebits >> (spp_size_t_bitsize - 1)) & 1]; + if (rt != 0 && rt != t) + rst = rt; + if (t == 0) + { + t = rst; // set t to least subtree holding sizes > nb + break; + } + sizebits <<= 1; + } + } + if (t == 0 && v == 0) + { + // set t to root of next non-empty treebin + binmap_t leftbits = left_bits(idx2bit(idx)) & _treemap; + if (leftbits != 0) + { + binmap_t leastbit = least_bit(leftbits); + bindex_t i = compute_bit2idx(leastbit); + t = *treebin_at(i); + } + } + + while (t != 0) + { + // find smallest of tree or subtree + size_t trem = t->chunksize() - nb; + if (trem < rsize) + { + rsize = trem; + v = t; + } + t = t->leftmost_child(); + } + + // If dv is a better fit, return 0 so malloc will use it + if (v != 0 && rsize < (size_t)(_dvsize - nb)) + { + if (rtcheck(ok_address(v))) + { + // split + mchunkptr r = (mchunkptr)v->chunk_plus_offset(nb); + assert(v->chunksize() == rsize + nb); + if (rtcheck(ok_next(v, r))) + { + unlink_large_chunk(v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(v, (rsize + nb)); + else + { + set_size_and_pinuse_of_inuse_chunk(v, nb); + r->set_size_and_pinuse_of_free_chunk(rsize); + insert_chunk(r, rsize); + } + return chunk2mem(v); + } + } + SPP_ABORT; + } + return 0; +} + +// allocate a small request from the best fitting chunk in a treebin +void* malloc_state::tmalloc_small(size_t nb) +{ + tchunkptr t, v; + size_t rsize; + binmap_t leastbit = least_bit(_treemap); + bindex_t i = compute_bit2idx(leastbit); + v = t = *treebin_at(i); + rsize = t->chunksize() - nb; + + while ((t = t->leftmost_child()) != 0) + { + size_t trem = t->chunksize() - nb; + if (trem < rsize) + { + rsize = trem; + v = t; + } + } + + if (rtcheck(ok_address(v))) + { + mchunkptr r = (mchunkptr)v->chunk_plus_offset(nb); + assert(v->chunksize() == rsize + nb); + if (rtcheck(ok_next(v, r))) + { + unlink_large_chunk(v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(v, (rsize + nb)); + else + { + set_size_and_pinuse_of_inuse_chunk(v, nb); + r->set_size_and_pinuse_of_free_chunk(rsize); + replace_dv(r, rsize); + } + return chunk2mem(v); + } + } + + SPP_ABORT; + return 0; +} + +/* ---------------------------- malloc --------------------------- */ + +void* malloc_state::_malloc(size_t bytes) +{ + if (1) + { + void* mem; + size_t nb; + if (bytes <= MAX_SMALL_REQUEST) + { + bindex_t idx; + binmap_t smallbits; + nb = (bytes < MIN_REQUEST) ? MIN_CHUNK_SIZE : pad_request(bytes); + idx = small_index(nb); + smallbits = _smallmap >> idx; + + if ((smallbits & 0x3U) != 0) + { + // Remainderless fit to a smallbin. + mchunkptr b, p; + idx += ~smallbits & 1; // Uses next bin if idx empty + b = smallbin_at(idx); + p = b->_fd; + assert(p->chunksize() == small_index2size(idx)); + unlink_first_small_chunk(b, p, idx); + set_inuse_and_pinuse(p, small_index2size(idx)); + mem = chunk2mem(p); + check_malloced_chunk(mem, nb); + goto postaction; + } + + else if (nb > _dvsize) + { + if (smallbits != 0) + { + // Use chunk in next nonempty smallbin + mchunkptr b, p, r; + size_t rsize; + binmap_t leftbits = (smallbits << idx) & left_bits(malloc_state::idx2bit(idx)); + binmap_t leastbit = least_bit(leftbits); + bindex_t i = compute_bit2idx(leastbit); + b = smallbin_at(i); + p = b->_fd; + assert(p->chunksize() == small_index2size(i)); + unlink_first_small_chunk(b, p, i); + rsize = small_index2size(i) - nb; + // Fit here cannot be remainderless if 4byte sizes + if (sizeof(size_t) != 4 && rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(p, small_index2size(i)); + else + { + set_size_and_pinuse_of_inuse_chunk(p, nb); + r = (mchunkptr)p->chunk_plus_offset(nb); + r->set_size_and_pinuse_of_free_chunk(rsize); + replace_dv(r, rsize); + } + mem = chunk2mem(p); + check_malloced_chunk(mem, nb); + goto postaction; + } + + else if (_treemap != 0 && (mem = tmalloc_small(nb)) != 0) + { + check_malloced_chunk(mem, nb); + goto postaction; + } + } + } + else if (bytes >= MAX_REQUEST) + nb = spp_max_size_t; // Too big to allocate. Force failure (in sys alloc) + else + { + nb = pad_request(bytes); + if (_treemap != 0 && (mem = tmalloc_large(nb)) != 0) + { + check_malloced_chunk(mem, nb); + goto postaction; + } + } + + if (nb <= _dvsize) + { + size_t rsize = _dvsize - nb; + mchunkptr p = _dv; + if (rsize >= MIN_CHUNK_SIZE) + { + // split dv + mchunkptr r = _dv = (mchunkptr)p->chunk_plus_offset(nb); + _dvsize = rsize; + r->set_size_and_pinuse_of_free_chunk(rsize); + set_size_and_pinuse_of_inuse_chunk(p, nb); + } + else // exhaust dv + { + size_t dvs = _dvsize; + _dvsize = 0; + _dv = 0; + set_inuse_and_pinuse(p, dvs); + } + mem = chunk2mem(p); + check_malloced_chunk(mem, nb); + goto postaction; + } + + else if (nb < _topsize) + { + // Split top + size_t rsize = _topsize -= nb; + mchunkptr p = _top; + mchunkptr r = _top = (mchunkptr)p->chunk_plus_offset(nb); + r->_head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(p, nb); + mem = chunk2mem(p); + check_top_chunk(_top); + check_malloced_chunk(mem, nb); + goto postaction; + } + + mem = sys_alloc(nb); + +postaction: + return mem; + } + + return 0; +} + +/* ---------------------------- free --------------------------- */ + +void malloc_state::_free(mchunkptr p) +{ + if (1) + { + check_inuse_chunk(p); + if (rtcheck(ok_address(p) && ok_inuse(p))) + { + size_t psize = p->chunksize(); + mchunkptr next = (mchunkptr)p->chunk_plus_offset(psize); + if (!p->pinuse()) + { + size_t prevsize = p->_prev_foot; + if (p->is_mmapped()) + { + psize += prevsize + SPP_MMAP_FOOT_PAD; + if (SPP_CALL_MUNMAP((char*)p - prevsize, psize) == 0) + _footprint -= psize; + goto postaction; + } + else + { + mchunkptr prev = (mchunkptr)p->chunk_minus_offset(prevsize); + psize += prevsize; + p = prev; + if (rtcheck(ok_address(prev))) + { + // consolidate backward + if (p != _dv) + unlink_chunk(p, prevsize); + else if ((next->_head & INUSE_BITS) == INUSE_BITS) + { + _dvsize = psize; + p->set_free_with_pinuse(psize, next); + goto postaction; + } + } + else + goto erroraction; + } + } + + if (rtcheck(ok_next(p, next) && ok_pinuse(next))) + { + if (!next->cinuse()) + { + // consolidate forward + if (next == _top) + { + size_t tsize = _topsize += psize; + _top = p; + p->_head = tsize | PINUSE_BIT; + if (p == _dv) + { + _dv = 0; + _dvsize = 0; + } + if (should_trim(tsize)) + sys_trim(0); + goto postaction; + } + else if (next == _dv) + { + size_t dsize = _dvsize += psize; + _dv = p; + p->set_size_and_pinuse_of_free_chunk(dsize); + goto postaction; + } + else + { + size_t nsize = next->chunksize(); + psize += nsize; + unlink_chunk(next, nsize); + p->set_size_and_pinuse_of_free_chunk(psize); + if (p == _dv) + { + _dvsize = psize; + goto postaction; + } + } + } + else + p->set_free_with_pinuse(psize, next); + + if (is_small(psize)) + { + insert_small_chunk(p, psize); + check_free_chunk(p); + } + else + { + tchunkptr tp = (tchunkptr)p; + insert_large_chunk(tp, psize); + check_free_chunk(p); + if (--_release_checks == 0) + release_unused_segments(); + } + goto postaction; + } + } +erroraction: + SPP_USAGE_ERROR_ACTION(this, p); +postaction: + ; + } +} + +/* ------------ Internal support for realloc, memalign, etc -------------- */ + +// Try to realloc; only in-place unless can_move true +mchunkptr malloc_state::try_realloc_chunk(mchunkptr p, size_t nb, int can_move) +{ + mchunkptr newp = 0; + size_t oldsize = p->chunksize(); + mchunkptr next = (mchunkptr)p->chunk_plus_offset(oldsize); + if (rtcheck(ok_address(p) && ok_inuse(p) && + ok_next(p, next) && ok_pinuse(next))) + { + if (p->is_mmapped()) + newp = mmap_resize(p, nb, can_move); + else if (oldsize >= nb) + { + // already big enough + size_t rsize = oldsize - nb; + if (rsize >= MIN_CHUNK_SIZE) + { + // split off remainder + mchunkptr r = (mchunkptr)p->chunk_plus_offset(nb); + set_inuse(p, nb); + set_inuse(r, rsize); + dispose_chunk(r, rsize); + } + newp = p; + } + else if (next == _top) + { + // extend into top + if (oldsize + _topsize > nb) + { + size_t newsize = oldsize + _topsize; + size_t newtopsize = newsize - nb; + mchunkptr newtop = (mchunkptr)p->chunk_plus_offset(nb); + set_inuse(p, nb); + newtop->_head = newtopsize | PINUSE_BIT; + _top = newtop; + _topsize = newtopsize; + newp = p; + } + } + else if (next == _dv) + { + // extend into dv + size_t dvs = _dvsize; + if (oldsize + dvs >= nb) + { + size_t dsize = oldsize + dvs - nb; + if (dsize >= MIN_CHUNK_SIZE) + { + mchunkptr r = (mchunkptr)p->chunk_plus_offset(nb); + mchunkptr n = (mchunkptr)r->chunk_plus_offset(dsize); + set_inuse(p, nb); + r->set_size_and_pinuse_of_free_chunk(dsize); + n->clear_pinuse(); + _dvsize = dsize; + _dv = r; + } + else + { + // exhaust dv + size_t newsize = oldsize + dvs; + set_inuse(p, newsize); + _dvsize = 0; + _dv = 0; + } + newp = p; + } + } + else if (!next->cinuse()) + { + // extend into next free chunk + size_t nextsize = next->chunksize(); + if (oldsize + nextsize >= nb) + { + size_t rsize = oldsize + nextsize - nb; + unlink_chunk(next, nextsize); + if (rsize < MIN_CHUNK_SIZE) + { + size_t newsize = oldsize + nextsize; + set_inuse(p, newsize); + } + else + { + mchunkptr r = (mchunkptr)p->chunk_plus_offset(nb); + set_inuse(p, nb); + set_inuse(r, rsize); + dispose_chunk(r, rsize); + } + newp = p; + } + } + } + else + SPP_USAGE_ERROR_ACTION(m, chunk2mem(p)); + return newp; +} + +void* malloc_state::internal_memalign(size_t alignment, size_t bytes) +{ + void* mem = 0; + if (alignment < MIN_CHUNK_SIZE) // must be at least a minimum chunk size + alignment = MIN_CHUNK_SIZE; + if ((alignment & (alignment - 1)) != 0) + { + // Ensure a power of 2 + size_t a = SPP_MALLOC_ALIGNMENT << 1; + while (a < alignment) + a <<= 1; + alignment = a; + } + if (bytes >= MAX_REQUEST - alignment) + SPP_MALLOC_FAILURE_ACTION; + else + { + size_t nb = request2size(bytes); + size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; + mem = internal_malloc(req); + if (mem != 0) + { + mchunkptr p = mem2chunk(mem); + if ((((size_t)(mem)) & (alignment - 1)) != 0) + { + // misaligned + /* + Find an aligned spot inside chunk. Since we need to give + back leading space in a chunk of at least MIN_CHUNK_SIZE, if + the first calculation places us at a spot with less than + MIN_CHUNK_SIZE leader, we can move to the next aligned spot. + We've allocated enough total room so that this is always + possible. + */ + char* br = (char*)mem2chunk((void *)(((size_t)((char*)mem + alignment - 1)) & + -alignment)); + char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE) ? + br : br + alignment; + mchunkptr newp = (mchunkptr)pos; + size_t leadsize = pos - (char*)(p); + size_t newsize = p->chunksize() - leadsize; + + if (p->is_mmapped()) + { + // For mmapped chunks, just adjust offset + newp->_prev_foot = p->_prev_foot + leadsize; + newp->_head = newsize; + } + else + { + // Otherwise, give back leader, use the rest + set_inuse(newp, newsize); + set_inuse(p, leadsize); + dispose_chunk(p, leadsize); + } + p = newp; + } + + // Give back spare room at the end + if (!p->is_mmapped()) + { + size_t size = p->chunksize(); + if (size > nb + MIN_CHUNK_SIZE) + { + size_t remainder_size = size - nb; + mchunkptr remainder = (mchunkptr)p->chunk_plus_offset(nb); + set_inuse(p, nb); + set_inuse(remainder, remainder_size); + dispose_chunk(remainder, remainder_size); + } + } + + mem = chunk2mem(p); + assert(p->chunksize() >= nb); + assert(((size_t)mem & (alignment - 1)) == 0); + check_inuse_chunk(p); + } + } + return mem; +} + +/* + Common support for independent_X routines, handling + all of the combinations that can result. + The opts arg has: + bit 0 set if all elements are same size (using sizes[0]) + bit 1 set if elements should be zeroed +*/ +void** malloc_state::ialloc(size_t n_elements, size_t* sizes, int opts, + void* chunks[]) +{ + + size_t element_size; // chunksize of each element, if all same + size_t contents_size; // total size of elements + size_t array_size; // request size of pointer array + void* mem; // malloced aggregate space + mchunkptr p; // corresponding chunk + size_t remainder_size; // remaining bytes while splitting + void** marray; // either "chunks" or malloced ptr array + mchunkptr array_chunk; // chunk for malloced ptr array + flag_t was_enabled; // to disable mmap + size_t size; + size_t i; + + mparams.ensure_initialization(); + // compute array length, if needed + if (chunks != 0) + { + if (n_elements == 0) + return chunks; // nothing to do + marray = chunks; + array_size = 0; + } + else + { + // if empty req, must still return chunk representing empty array + if (n_elements == 0) + return (void**)internal_malloc(0); + marray = 0; + array_size = request2size(n_elements * (sizeof(void*))); + } + + // compute total element size + if (opts & 0x1) + { + // all-same-size + element_size = request2size(*sizes); + contents_size = n_elements * element_size; + } + else + { + // add up all the sizes + element_size = 0; + contents_size = 0; + for (i = 0; i != n_elements; ++i) + contents_size += request2size(sizes[i]); + } + + size = contents_size + array_size; + + /* + Allocate the aggregate chunk. First disable direct-mmapping so + malloc won't use it, since we would not be able to later + free/realloc space internal to a segregated mmap region. + */ + was_enabled = use_mmap(); + disable_mmap(); + mem = internal_malloc(size - CHUNK_OVERHEAD); + if (was_enabled) + enable_mmap(); + if (mem == 0) + return 0; + + p = mem2chunk(mem); + remainder_size = p->chunksize(); + + assert(!p->is_mmapped()); + + if (opts & 0x2) + { + // optionally clear the elements + memset((size_t*)mem, 0, remainder_size - sizeof(size_t) - array_size); + } + + // If not provided, allocate the pointer array as final part of chunk + if (marray == 0) + { + size_t array_chunk_size; + array_chunk = (mchunkptr)p->chunk_plus_offset(contents_size); + array_chunk_size = remainder_size - contents_size; + marray = (void**)(chunk2mem(array_chunk)); + set_size_and_pinuse_of_inuse_chunk(array_chunk, array_chunk_size); + remainder_size = contents_size; + } + + // split out elements + for (i = 0; ; ++i) + { + marray[i] = chunk2mem(p); + if (i != n_elements - 1) + { + if (element_size != 0) + size = element_size; + else + size = request2size(sizes[i]); + remainder_size -= size; + set_size_and_pinuse_of_inuse_chunk(p, size); + p = (mchunkptr)p->chunk_plus_offset(size); + } + else + { + // the final element absorbs any overallocation slop + set_size_and_pinuse_of_inuse_chunk(p, remainder_size); + break; + } + } + +#if SPP_DEBUG + if (marray != chunks) + { + // final element must have exactly exhausted chunk + if (element_size != 0) + assert(remainder_size == element_size); + else + assert(remainder_size == request2size(sizes[i])); + check_inuse_chunk(mem2chunk(marray)); + } + for (i = 0; i != n_elements; ++i) + check_inuse_chunk(mem2chunk(marray[i])); + +#endif + + return marray; +} + +/* Try to free all pointers in the given array. + Note: this could be made faster, by delaying consolidation, + at the price of disabling some user integrity checks, We + still optimize some consolidations by combining adjacent + chunks before freeing, which will occur often if allocated + with ialloc or the array is sorted. +*/ +size_t malloc_state::internal_bulk_free(void* array[], size_t nelem) +{ + size_t unfreed = 0; + if (1) + { + void** a; + void** fence = &(array[nelem]); + for (a = array; a != fence; ++a) + { + void* mem = *a; + if (mem != 0) + { + mchunkptr p = mem2chunk(mem); + size_t psize = p->chunksize(); +#if SPP_FOOTERS + if (get_mstate_for(p) != m) + { + ++unfreed; + continue; + } +#endif + check_inuse_chunk(p); + *a = 0; + if (rtcheck(ok_address(p) && ok_inuse(p))) + { + void ** b = a + 1; // try to merge with next chunk + mchunkptr next = (mchunkptr)p->next_chunk(); + if (b != fence && *b == chunk2mem(next)) + { + size_t newsize = next->chunksize() + psize; + set_inuse(p, newsize); + *b = chunk2mem(p); + } + else + dispose_chunk(p, psize); + } + else + { + SPP_ABORT; + break; + } + } + } + if (should_trim(_topsize)) + sys_trim(0); + } + return unfreed; +} + +void malloc_state::init(char* tbase, size_t tsize) +{ + _seg._base = _least_addr = tbase; + _seg._size = _footprint = _max_footprint = tsize; + _magic = mparams._magic; + _release_checks = SPP_MAX_RELEASE_CHECK_RATE; + _mflags = mparams._default_mflags; + _extp = 0; + _exts = 0; + disable_contiguous(); + init_bins(); + mchunkptr mn = (mchunkptr)mem2chunk(this)->next_chunk(); + init_top(mn, (size_t)((tbase + tsize) - (char*)mn) - top_foot_size()); + check_top_chunk(_top); +} + +/* Traversal */ +#if SPP_MALLOC_INSPECT_ALL +void malloc_state::internal_inspect_all(void(*handler)(void *start, void *end, + size_t used_bytes, + void* callback_arg), + void* arg) +{ + if (is_initialized()) + { + mchunkptr top = top; + msegmentptr s; + for (s = &seg; s != 0; s = s->next) + { + mchunkptr q = align_as_chunk(s->base); + while (segment_holds(s, q) && q->head != FENCEPOST_HEAD) + { + mchunkptr next = (mchunkptr)q->next_chunk(); + size_t sz = q->chunksize(); + size_t used; + void* start; + if (q->is_inuse()) + { + used = sz - CHUNK_OVERHEAD; // must not be mmapped + start = chunk2mem(q); + } + else + { + used = 0; + if (is_small(sz)) + { + // offset by possible bookkeeping + start = (void*)((char*)q + sizeof(struct malloc_chunk)); + } + else + start = (void*)((char*)q + sizeof(struct malloc_tree_chunk)); + } + if (start < (void*)next) // skip if all space is bookkeeping + handler(start, next, used, arg); + if (q == top) + break; + q = next; + } + } + } +} +#endif // SPP_MALLOC_INSPECT_ALL + + + +/* ----------------------------- user mspaces ---------------------------- */ + +static mstate init_user_mstate(char* tbase, size_t tsize) +{ + size_t msize = pad_request(sizeof(malloc_state)); + mchunkptr msp = align_as_chunk(tbase); + mstate m = (mstate)(chunk2mem(msp)); + memset(m, 0, msize); + msp->_head = (msize | INUSE_BITS); + m->init(tbase, tsize); + return m; +} + +SPP_API mspace create_mspace(size_t capacity, int locked) +{ + mstate m = 0; + size_t msize; + mparams.ensure_initialization(); + msize = pad_request(sizeof(malloc_state)); + if (capacity < (size_t) - (msize + top_foot_size() + mparams._page_size)) + { + size_t rs = ((capacity == 0) ? mparams._granularity : + (capacity + top_foot_size() + msize)); + size_t tsize = mparams.granularity_align(rs); + char* tbase = (char*)(SPP_CALL_MMAP(tsize)); + if (tbase != cmfail) + { + m = init_user_mstate(tbase, tsize); + m->_seg._sflags = USE_MMAP_BIT; + m->set_lock(locked); + } + } + return (mspace)m; +} + +SPP_API size_t destroy_mspace(mspace msp) +{ + size_t freed = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + { + msegmentptr sp = &ms->_seg; + while (sp != 0) + { + char* base = sp->_base; + size_t size = sp->_size; + flag_t flag = sp->_sflags; + (void)base; // placate people compiling -Wunused-variable + sp = sp->_next; + if ((flag & USE_MMAP_BIT) && !(flag & EXTERN_BIT) && + SPP_CALL_MUNMAP(base, size) == 0) + freed += size; + } + } + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return freed; +} + +/* ---------------------------- mspace versions of malloc/calloc/free routines -------------------- */ +SPP_API void* mspace_malloc(mspace msp, size_t bytes) +{ + mstate ms = (mstate)msp; + if (!ms->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(ms, ms); + return 0; + } + return ms->_malloc(bytes); +} + +SPP_API void mspace_free(mspace msp, void* mem) +{ + if (mem != 0) + { + mchunkptr p = mem2chunk(mem); +#if SPP_FOOTERS + mstate fm = get_mstate_for(p); + (void)msp; // placate people compiling -Wunused +#else + mstate fm = (mstate)msp; +#endif + if (!fm->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(fm, p); + return; + } + fm->_free(p); + } +} + +SPP_API void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) +{ + void* mem; + size_t req = 0; + mstate ms = (mstate)msp; + if (!ms->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(ms, ms); + return 0; + } + if (n_elements != 0) + { + req = n_elements * elem_size; + if (((n_elements | elem_size) & ~(size_t)0xffff) && + (req / n_elements != elem_size)) + req = spp_max_size_t; // force downstream failure on overflow + } + mem = ms->internal_malloc(req); + if (mem != 0 && mem2chunk(mem)->calloc_must_clear()) + memset(mem, 0, req); + return mem; +} + +SPP_API void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) +{ + void* mem = 0; + if (oldmem == 0) + mem = mspace_malloc(msp, bytes); + else if (bytes >= MAX_REQUEST) + SPP_MALLOC_FAILURE_ACTION; +#ifdef REALLOC_ZERO_BYTES_FREES + else if (bytes == 0) + mspace_free(msp, oldmem); +#endif + else + { + size_t nb = request2size(bytes); + mchunkptr oldp = mem2chunk(oldmem); +#if ! SPP_FOOTERS + mstate m = (mstate)msp; +#else + mstate m = get_mstate_for(oldp); + if (!m->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(m, oldmem); + return 0; + } +#endif + if (1) + { + mchunkptr newp = m->try_realloc_chunk(oldp, nb, 1); + if (newp != 0) + { + m->check_inuse_chunk(newp); + mem = chunk2mem(newp); + } + else + { + mem = mspace_malloc(m, bytes); + if (mem != 0) + { + size_t oc = oldp->chunksize() - oldp->overhead_for(); + memcpy(mem, oldmem, (oc < bytes) ? oc : bytes); + mspace_free(m, oldmem); + } + } + } + } + return mem; +} + +#if 0 + +SPP_API mspace create_mspace_with_base(void* base, size_t capacity, int locked) +{ + mstate m = 0; + size_t msize; + mparams.ensure_initialization(); + msize = pad_request(sizeof(malloc_state)); + if (capacity > msize + top_foot_size() && + capacity < (size_t) - (msize + top_foot_size() + mparams._page_size)) + { + m = init_user_mstate((char*)base, capacity); + m->_seg._sflags = EXTERN_BIT; + m->set_lock(locked); + } + return (mspace)m; +} + +SPP_API int mspace_track_large_chunks(mspace msp, int enable) +{ + int ret = 0; + mstate ms = (mstate)msp; + if (1) + { + if (!ms->use_mmap()) + ret = 1; + if (!enable) + ms->enable_mmap(); + else + ms->disable_mmap(); + } + return ret; +} + +SPP_API void* mspace_realloc_in_place(mspace msp, void* oldmem, size_t bytes) +{ + void* mem = 0; + if (oldmem != 0) + { + if (bytes >= MAX_REQUEST) + SPP_MALLOC_FAILURE_ACTION; + else + { + size_t nb = request2size(bytes); + mchunkptr oldp = mem2chunk(oldmem); +#if ! SPP_FOOTERS + mstate m = (mstate)msp; +#else + mstate m = get_mstate_for(oldp); + (void)msp; // placate people compiling -Wunused + if (!m->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(m, oldmem); + return 0; + } +#endif + if (1) + { + mchunkptr newp = m->try_realloc_chunk(oldp, nb, 0); + if (newp == oldp) + { + m->check_inuse_chunk(newp); + mem = oldmem; + } + } + } + } + return mem; +} + +SPP_API void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) +{ + mstate ms = (mstate)msp; + if (!ms->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(ms, ms); + return 0; + } + if (alignment <= SPP_MALLOC_ALIGNMENT) + return mspace_malloc(msp, bytes); + return ms->internal_memalign(alignment, bytes); +} + +SPP_API void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]) +{ + size_t sz = elem_size; // serves as 1-element array + mstate ms = (mstate)msp; + if (!ms->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(ms, ms); + return 0; + } + return ms->ialloc(n_elements, &sz, 3, chunks); +} + +SPP_API void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]) +{ + mstate ms = (mstate)msp; + if (!ms->ok_magic()) + { + SPP_USAGE_ERROR_ACTION(ms, ms); + return 0; + } + return ms->ialloc(n_elements, sizes, 0, chunks); +} + +#endif + +SPP_API size_t mspace_bulk_free(mspace msp, void* array[], size_t nelem) +{ + return ((mstate)msp)->internal_bulk_free(array, nelem); +} + +#if SPP_MALLOC_INSPECT_ALL +SPP_API void mspace_inspect_all(mspace msp, + void(*handler)(void *start, + void *end, + size_t used_bytes, + void* callback_arg), + void* arg) +{ + mstate ms = (mstate)msp; + if (ms->ok_magic()) + internal_inspect_all(ms, handler, arg); + else + SPP_USAGE_ERROR_ACTION(ms, ms); +} +#endif + +SPP_API int mspace_trim(mspace msp, size_t pad) +{ + int result = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + result = ms->sys_trim(pad); + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return result; +} + +SPP_API size_t mspace_footprint(mspace msp) +{ + size_t result = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + result = ms->_footprint; + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return result; +} + +SPP_API size_t mspace_max_footprint(mspace msp) +{ + size_t result = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + result = ms->_max_footprint; + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return result; +} + +SPP_API size_t mspace_footprint_limit(mspace msp) +{ + size_t result = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + { + size_t maf = ms->_footprint_limit; + result = (maf == 0) ? spp_max_size_t : maf; + } + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return result; +} + +SPP_API size_t mspace_set_footprint_limit(mspace msp, size_t bytes) +{ + size_t result = 0; + mstate ms = (mstate)msp; + if (ms->ok_magic()) + { + if (bytes == 0) + result = mparams.granularity_align(1); // Use minimal size + if (bytes == spp_max_size_t) + result = 0; // disable + else + result = mparams.granularity_align(bytes); + ms->_footprint_limit = result; + } + else + SPP_USAGE_ERROR_ACTION(ms, ms); + return result; +} + +SPP_API size_t mspace_usable_size(const void* mem) +{ + if (mem != 0) + { + mchunkptr p = mem2chunk(mem); + if (p->is_inuse()) + return p->chunksize() - p->overhead_for(); + } + return 0; +} + +SPP_API int mspace_mallopt(int param_number, int value) +{ + return mparams.change(param_number, value); +} + +} // spp_ namespace + + +#endif // SPP_EXCLUDE_IMPLEMENTATION + +#endif // spp_dlalloc__h_ diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_memory.h b/resources/3rdparty/sparsepp/sparsepp/spp_memory.h new file mode 100755 index 000000000..f208e73cb --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_memory.h @@ -0,0 +1,121 @@ +#if !defined(spp_memory_h_guard) +#define spp_memory_h_guard + +#include +#include +#include + +#if defined(_WIN32) || defined( __CYGWIN__) + #define SPP_WIN +#endif + +#ifdef SPP_WIN + #include + #include + #undef min + #undef max +#else + #include + #include +#endif + +namespace spp +{ + uint64_t GetSystemMemory() + { +#ifdef SPP_WIN + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); + return static_cast(memInfo.ullTotalPageFile); +#else + struct sysinfo memInfo; + sysinfo (&memInfo); + auto totalVirtualMem = memInfo.totalram; + + totalVirtualMem += memInfo.totalswap; + totalVirtualMem *= memInfo.mem_unit; + return static_cast(totalVirtualMem); +#endif + } + + uint64_t GetTotalMemoryUsed() + { +#ifdef SPP_WIN + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); + return static_cast(memInfo.ullTotalPageFile - memInfo.ullAvailPageFile); +#else + struct sysinfo memInfo; + sysinfo(&memInfo); + auto virtualMemUsed = memInfo.totalram - memInfo.freeram; + + virtualMemUsed += memInfo.totalswap - memInfo.freeswap; + virtualMemUsed *= memInfo.mem_unit; + + return static_cast(virtualMemUsed); +#endif + } + + uint64_t GetProcessMemoryUsed() + { +#ifdef SPP_WIN + PROCESS_MEMORY_COUNTERS_EX pmc; + GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); + return static_cast(pmc.PrivateUsage); +#else + auto parseLine = + [](char* line)->int + { + auto i = strlen(line); + + while(*line < '0' || *line > '9') + { + line++; + } + + line[i-3] = '\0'; + i = atoi(line); + return i; + }; + + auto file = fopen("/proc/self/status", "r"); + auto result = -1; + char line[128]; + + while(fgets(line, 128, file) != nullptr) + { + if(strncmp(line, "VmSize:", 7) == 0) + { + result = parseLine(line); + break; + } + } + + fclose(file); + return static_cast(result) * 1024; +#endif + } + + uint64_t GetPhysicalMemory() + { +#ifdef SPP_WIN + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); + return static_cast(memInfo.ullTotalPhys); +#else + struct sysinfo memInfo; + sysinfo(&memInfo); + + auto totalPhysMem = memInfo.totalram; + + totalPhysMem *= memInfo.mem_unit; + return static_cast(totalPhysMem); +#endif + } + +} + +#endif // spp_memory_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_smartptr.h b/resources/3rdparty/sparsepp/sparsepp/spp_smartptr.h new file mode 100755 index 000000000..28c4588e4 --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_smartptr.h @@ -0,0 +1,76 @@ +#if !defined(spp_smartptr_h_guard) +#define spp_smartptr_h_guard + + +/* ----------------------------------------------------------------------------------------------- + * quick version of intrusive_ptr + * ----------------------------------------------------------------------------------------------- + */ + +#include +#include + +// ------------------------------------------------------------------------ +class spp_rc +{ +public: + spp_rc() : _cnt(0) {} + spp_rc(const spp_rc &) : _cnt(0) {} + void increment() const { ++_cnt; } + void decrement() const { assert(_cnt); if (--_cnt == 0) delete this; } + unsigned count() const { return _cnt; } + +protected: + virtual ~spp_rc() {} + +private: + mutable unsigned _cnt; +}; + +// ------------------------------------------------------------------------ +template +class spp_sptr +{ +public: + spp_sptr() : _p(0) {} + spp_sptr(T *p) : _p(p) { if (_p) _p->increment(); } + spp_sptr(const spp_sptr &o) : _p(o._p) { if (_p) _p->increment(); } +#ifndef SPP_NO_CXX11_RVALUE_REFERENCES + spp_sptr(spp_sptr &&o) : _p(o._p) { o._p = (T *)0; } + spp_sptr& operator=(spp_sptr &&o) + { + if (_p) _p->decrement(); + _p = o._p; + o._p = (T *)0; + } +#endif + ~spp_sptr() { if (_p) _p->decrement(); } + spp_sptr& operator=(const spp_sptr &o) { reset(o._p); return *this; } + T* get() const { return _p; } + void swap(spp_sptr &o) { T *tmp = _p; _p = o._p; o._p = tmp; } + void reset(const T *p = 0) + { + if (p == _p) + return; + if (_p) _p->decrement(); + _p = (T *)p; + if (_p) _p->increment(); + } + T* operator->() const { return const_cast(_p); } + bool operator!() const { return _p == 0; } + +private: + T *_p; +}; + +// ------------------------------------------------------------------------ +namespace std +{ + template + inline void swap(spp_sptr &a, spp_sptr &b) + { + a.swap(b); + } +} + +#endif // spp_smartptr_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_stdint.h b/resources/3rdparty/sparsepp/sparsepp/spp_stdint.h new file mode 100755 index 000000000..500d3d35b --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_stdint.h @@ -0,0 +1,16 @@ +#if !defined(spp_stdint_h_guard) +#define spp_stdint_h_guard + +#include + +#if defined(SPP_HAS_CSTDINT) && (__cplusplus >= 201103) + #include +#else + #if defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) + #include + #else + #include + #endif +#endif + +#endif // spp_stdint_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_timer.h b/resources/3rdparty/sparsepp/sparsepp/spp_timer.h new file mode 100755 index 000000000..48180f4d0 --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_timer.h @@ -0,0 +1,58 @@ +/** + Copyright (c) 2016 Mariano Gonzalez + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +#ifndef spp_timer_h_guard +#define spp_timer_h_guard + +#include + +namespace spp +{ + template + class Timer + { + public: + Timer() { reset(); } + void reset() { _start = _snap = clock::now(); } + void snap() { _snap = clock::now(); } + + float get_total() const { return get_diff(_start, clock::now()); } + float get_delta() const { return get_diff(_snap, clock::now()); } + + private: + using clock = std::chrono::high_resolution_clock; + using point = std::chrono::time_point; + + template + static T get_diff(const point& start, const point& end) + { + using duration_t = std::chrono::duration; + + return std::chrono::duration_cast(end - start).count(); + } + + point _start; + point _snap; + }; +} + +#endif // spp_timer_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_traits.h b/resources/3rdparty/sparsepp/sparsepp/spp_traits.h new file mode 100755 index 000000000..bd105093f --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_traits.h @@ -0,0 +1,122 @@ +#if !defined(spp_traits_h_guard) +#define spp_traits_h_guard + +#include + +template class HashObject; // for Google's benchmark, not in spp namespace! + +namespace spp_ +{ + +// --------------------------------------------------------------------------- +// type_traits we need +// --------------------------------------------------------------------------- +template +struct integral_constant { static const T value = v; }; + +template const T integral_constant::value; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +typedef integral_constant zero_type; +typedef integral_constant one_type; +typedef integral_constant two_type; +typedef integral_constant three_type; + +template struct is_same : public false_type { }; +template struct is_same : public true_type { }; + +template struct remove_const { typedef T type; }; +template struct remove_const { typedef T type; }; + +template struct remove_volatile { typedef T type; }; +template struct remove_volatile { typedef T type; }; + +template struct remove_cv +{ + typedef typename remove_const::type>::type type; +}; + +// ---------------- is_integral ---------------------------------------- +template struct is_integral; +template struct is_integral : false_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +template<> struct is_integral : true_type { }; +#ifdef SPP_HAS_LONG_LONG + template<> struct is_integral : true_type { }; + template<> struct is_integral : true_type { }; +#endif +template struct is_integral : is_integral { }; +template struct is_integral : is_integral { }; +template struct is_integral : is_integral { }; + +// ---------------- is_floating_point ---------------------------------------- +template struct is_floating_point; +template struct is_floating_point : false_type { }; +template<> struct is_floating_point : true_type { }; +template<> struct is_floating_point : true_type { }; +template<> struct is_floating_point : true_type { }; +template struct is_floating_point : is_floating_point { }; +template struct is_floating_point : is_floating_point { }; +template struct is_floating_point : is_floating_point { }; + +// ---------------- is_pointer ---------------------------------------- +template struct is_pointer; +template struct is_pointer : false_type { }; +template struct is_pointer : true_type { }; +template struct is_pointer : is_pointer { }; +template struct is_pointer : is_pointer { }; +template struct is_pointer : is_pointer { }; + +// ---------------- is_reference ---------------------------------------- +template struct is_reference; +template struct is_reference : false_type {}; +template struct is_reference : true_type {}; + +// ---------------- is_relocatable ---------------------------------------- +// relocatable values can be moved around in memory using memcpy and remain +// correct. Most types are relocatable, an example of a type who is not would +// be a struct which contains a pointer to a buffer inside itself - this is the +// case for std::string in gcc 5. +// ------------------------------------------------------------------------ +template struct is_relocatable; +template struct is_relocatable : + integral_constant::value || is_floating_point::value)> +{ }; + +template struct is_relocatable > : true_type { }; + +template struct is_relocatable : is_relocatable { }; +template struct is_relocatable : is_relocatable { }; +template struct is_relocatable : is_relocatable { }; +template struct is_relocatable : is_relocatable { }; +template struct is_relocatable > : + integral_constant::value && is_relocatable::value)> +{ }; + +// A template helper used to select A or B based on a condition. +// ------------------------------------------------------------ +template +struct if_ +{ + typedef A type; +}; + +template +struct if_ +{ + typedef B type; +}; + +} // spp_ namespace + +#endif // spp_traits_h_guard diff --git a/resources/3rdparty/sparsepp/sparsepp/spp_utils.h b/resources/3rdparty/sparsepp/sparsepp/spp_utils.h new file mode 100755 index 000000000..743ab7bca --- /dev/null +++ b/resources/3rdparty/sparsepp/sparsepp/spp_utils.h @@ -0,0 +1,447 @@ +// ---------------------------------------------------------------------- +// Copyright (c) 2016, Steven Gregory Popovitch - greg7mdp@gmail.com +// All rights reserved. +// +// Code derived derived from Boost libraries. +// Boost software licence reproduced below. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * The name of Steven Gregory Popovitch may not be used to +// endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// ---------------------------------------------------------------------- + +// --------------------------------------------------------------------------- +// Boost Software License - Version 1.0 - August 17th, 2003 +// +// Permission is hereby granted, free of charge, to any person or organization +// obtaining a copy of the software and accompanying documentation covered by +// this license (the "Software") to use, reproduce, display, distribute, +// execute, and transmit the Software, and to prepare derivative works of the +// Software, and to permit third-parties to whom the Software is furnished to +// do so, all subject to the following: +// +// The copyright notices in the Software and this entire statement, including +// the above license grant, this restriction and the following disclaimer, +// must be included in all copies of the Software, in whole or in part, and +// all derivative works of the Software, unless such copies or derivative +// works are solely in the form of machine-executable object code generated by +// a source language processor. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// --------------------------------------------------------------------------- + +// ---------------------------------------------------------------------- +// H A S H F U N C T I O N S +// ---------------------------- +// +// Implements spp::spp_hash() and spp::hash_combine() +// ---------------------------------------------------------------------- + +#if !defined(spp_utils_h_guard_) +#define spp_utils_h_guard_ + +#if defined(_MSC_VER) + #if (_MSC_VER >= 1600 ) // vs2010 (1900 is vs2015) + #include + #define SPP_HASH_CLASS std::hash + #else + #include + #define SPP_HASH_CLASS stdext::hash_compare + #endif + #if (_MSC_FULL_VER < 190021730) + #define SPP_NO_CXX11_NOEXCEPT + #endif +#elif defined __clang__ + #if __has_feature(cxx_noexcept) // what to use here? + #include + #define SPP_HASH_CLASS std::hash + #else + #include + #define SPP_HASH_CLASS std::tr1::hash + #endif + + #if !__has_feature(cxx_noexcept) + #define SPP_NO_CXX11_NOEXCEPT + #endif +#elif defined(__GNUC__) + #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) + #include + #define SPP_HASH_CLASS std::hash + + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) < 40600 + #define SPP_NO_CXX11_NOEXCEPT + #endif + #else + #include + #define SPP_HASH_CLASS std::tr1::hash + #define SPP_NO_CXX11_NOEXCEPT + #endif +#else + #include + #define SPP_HASH_CLASS std::hash +#endif + +#ifdef SPP_NO_CXX11_NOEXCEPT + #define SPP_NOEXCEPT +#else + #define SPP_NOEXCEPT noexcept +#endif + +#ifdef SPP_NO_CXX11_CONSTEXPR + #define SPP_CONSTEXPR +#else + #define SPP_CONSTEXPR constexpr +#endif + +#define SPP_INLINE + +#ifndef spp_ + #define spp_ spp +#endif + +namespace spp_ +{ + +template T spp_min(T a, T b) { return a < b ? a : b; } +template T spp_max(T a, T b) { return a >= b ? a : b; } + +template +struct spp_hash +{ + SPP_INLINE size_t operator()(const T &__v) const SPP_NOEXCEPT + { + SPP_HASH_CLASS hasher; + return hasher(__v); + } +}; + +template +struct spp_hash +{ + static size_t spp_log2 (size_t val) SPP_NOEXCEPT + { + size_t res = 0; + while (val > 1) + { + val >>= 1; + res++; + } + return res; + } + + SPP_INLINE size_t operator()(const T *__v) const SPP_NOEXCEPT + { + static const size_t shift = 3; // spp_log2(1 + sizeof(T)); // T might be incomplete! + const uintptr_t i = (const uintptr_t)__v; + return static_cast(i >> shift); + } +}; + +// from http://burtleburtle.net/bob/hash/integer.html +// fast and efficient for power of two table sizes where we always +// consider the last bits. +// --------------------------------------------------------------- +inline size_t spp_mix_32(uint32_t a) +{ + a = a ^ (a >> 4); + a = (a ^ 0xdeadbeef) + (a << 5); + a = a ^ (a >> 11); + return static_cast(a); +} + +// Maybe we should do a more thorough scrambling as described in +// https://gist.github.com/badboy/6267743 +// ------------------------------------------------------------- +inline size_t spp_mix_64(uint64_t a) +{ + a = a ^ (a >> 4); + a = (a ^ 0xdeadbeef) + (a << 5); + a = a ^ (a >> 11); + return (size_t)a; +} + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(bool __v) const SPP_NOEXCEPT + { return static_cast(__v); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(char __v) const SPP_NOEXCEPT + { return static_cast(__v); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(signed char __v) const SPP_NOEXCEPT + { return static_cast(__v); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(unsigned char __v) const SPP_NOEXCEPT + { return static_cast(__v); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(wchar_t __v) const SPP_NOEXCEPT + { return static_cast(__v); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(int16_t __v) const SPP_NOEXCEPT + { return spp_mix_32(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(uint16_t __v) const SPP_NOEXCEPT + { return spp_mix_32(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(int32_t __v) const SPP_NOEXCEPT + { return spp_mix_32(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(uint32_t __v) const SPP_NOEXCEPT + { return spp_mix_32(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(int64_t __v) const SPP_NOEXCEPT + { return spp_mix_64(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(uint64_t __v) const SPP_NOEXCEPT + { return spp_mix_64(static_cast(__v)); } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(float __v) const SPP_NOEXCEPT + { + // -0.0 and 0.0 should return same hash + uint32_t *as_int = reinterpret_cast(&__v); + return (__v == 0) ? static_cast(0) : spp_mix_32(*as_int); + } +}; + +template <> +struct spp_hash : public std::unary_function +{ + SPP_INLINE size_t operator()(double __v) const SPP_NOEXCEPT + { + // -0.0 and 0.0 should return same hash + uint64_t *as_int = reinterpret_cast(&__v); + return (__v == 0) ? static_cast(0) : spp_mix_64(*as_int); + } +}; + +template struct Combiner +{ + inline void operator()(T& seed, T value); +}; + +template struct Combiner +{ + inline void operator()(T& seed, T value) + { + seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2); + } +}; + +template struct Combiner +{ + inline void operator()(T& seed, T value) + { + seed ^= value + T(0xc6a4a7935bd1e995) + (seed << 6) + (seed >> 2); + } +}; + +template +inline void hash_combine(std::size_t& seed, T const& v) +{ + spp_::spp_hash hasher; + Combiner combiner; + + combiner(seed, hasher(v)); +} + +static inline uint32_t s_spp_popcount_default(uint32_t i) SPP_NOEXCEPT +{ + i = i - ((i >> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >> 2) & 0x33333333); + return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; +} + +static inline uint32_t s_spp_popcount_default(uint64_t x) SPP_NOEXCEPT +{ + const uint64_t m1 = uint64_t(0x5555555555555555); // binary: 0101... + const uint64_t m2 = uint64_t(0x3333333333333333); // binary: 00110011.. + const uint64_t m4 = uint64_t(0x0f0f0f0f0f0f0f0f); // binary: 4 zeros, 4 ones ... + const uint64_t h01 = uint64_t(0x0101010101010101); // the sum of 256 to the power of 0,1,2,3... + + x -= (x >> 1) & m1; // put count of each 2 bits into those 2 bits + x = (x & m2) + ((x >> 2) & m2); // put count of each 4 bits into those 4 bits + x = (x + (x >> 4)) & m4; // put count of each 8 bits into those 8 bits + return (x * h01)>>56; // returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24)+... +} + +#ifdef __APPLE__ + static inline uint32_t count_trailing_zeroes(size_t v) SPP_NOEXCEPT + { + size_t x = (v & -v) - 1; + // sadly sizeof() required to build on macos + return sizeof(size_t) == 8 ? s_spp_popcount_default((uint64_t)x) : s_spp_popcount_default((uint32_t)x); + } + + static inline uint32_t s_popcount(size_t v) SPP_NOEXCEPT + { + // sadly sizeof() required to build on macos + return sizeof(size_t) == 8 ? s_spp_popcount_default((uint64_t)v) : s_spp_popcount_default((uint32_t)v); + } +#else + static inline uint32_t count_trailing_zeroes(size_t v) SPP_NOEXCEPT + { + return s_spp_popcount_default((v & -(intptr_t)v) - 1); + } + + static inline uint32_t s_popcount(size_t v) SPP_NOEXCEPT + { + return s_spp_popcount_default(v); + } +#endif + +// ----------------------------------------------------------- +// ----------------------------------------------------------- +template +class libc_allocator +{ +public: + typedef T value_type; + typedef T* pointer; + typedef ptrdiff_t difference_type; + typedef const T* const_pointer; + typedef size_t size_type; + + libc_allocator() {} + libc_allocator(const libc_allocator &) {} + libc_allocator& operator=(const libc_allocator &) { return *this; } + +#ifndef SPP_NO_CXX11_RVALUE_REFERENCES + libc_allocator(libc_allocator &&) {} + libc_allocator& operator=(libc_allocator &&) { return *this; } +#endif + + pointer allocate(size_t n, const_pointer /* unused */= 0) + { + return static_cast(malloc(n * sizeof(T))); + } + + void deallocate(pointer p, size_t /* unused */) + { + free(p); + } + + pointer reallocate(pointer p, size_t new_size) + { + return static_cast(realloc(p, new_size * sizeof(T))); + } + + // extra API to match spp_allocator interface + pointer reallocate(pointer p, size_t /* old_size */, size_t new_size) + { + return static_cast(realloc(p, new_size * sizeof(T))); + } + + size_type max_size() const + { + return static_cast(-1) / sizeof(value_type); + } + + void construct(pointer p, const value_type& val) + { + new(p) value_type(val); + } + + void destroy(pointer p) { p->~value_type(); } + + template + struct rebind + { + typedef spp_::libc_allocator other; + }; + +}; + +// forward declaration +// ------------------- +template +class spp_allocator; + +} + +template +inline bool operator==(const spp_::libc_allocator &, const spp_::libc_allocator &) +{ + return true; +} + +template +inline bool operator!=(const spp_::libc_allocator &, const spp_::libc_allocator &) +{ + return false; +} + +#endif // spp_utils_h_guard_ + diff --git a/resources/3rdparty/sparsepp/spp.natvis b/resources/3rdparty/sparsepp/spp.natvis new file mode 100755 index 000000000..1ca15df6f --- /dev/null +++ b/resources/3rdparty/sparsepp/spp.natvis @@ -0,0 +1,41 @@ + + + + + + + {{size = {rep.table._num_buckets}}} + + + + + + + + rep.table._num_buckets + + + item_ptr = grp->_group + cnt = grp->_num_buckets + + + item_ptr,na + item_ptr++ + cnt-- + + ++grp + + + + + + + end() + end() + {*col_current} + + *col_current + + + + diff --git a/resources/3rdparty/sparsepp/tests/makefile b/resources/3rdparty/sparsepp/tests/makefile new file mode 100755 index 000000000..df4eb6f6c --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/makefile @@ -0,0 +1,27 @@ +CXXFLAGS = -O2 -std=c++11 -I.. +CXXFLAGS += -Wall -pedantic -Wextra -D_XOPEN_SOURCE=700 +SPP_DEPS_1 = spp.h spp_utils.h spp_dlalloc.h spp_traits.h spp_config.h +SPP_DEPS = $(addprefix ../sparsepp/,$(SPP_DEPS_1)) +TARGETS = spp_test spp_alloc_test spp_bitset_test perftest1 bench + + +ifeq ($(OS),Windows_NT) + LDFLAGS = -lpsapi +endif + +def: spp_test + +all: $(TARGETS) + +clean: + rm -rf $(TARGETS) vsprojects/x64/* vsprojects/x86/* + +test: + ./spp_test + +spp_test: spp_test.cc $(SPP_DEPS) makefile + $(CXX) $(CXXFLAGS) -D_CRT_SECURE_NO_WARNINGS spp_test.cc -o spp_test + +%: %.cc $(SPP_DEPS) makefile + $(CXX) $(CXXFLAGS) -DNDEBUG $< -o $@ $(LDFLAGS) + diff --git a/resources/3rdparty/sparsepp/tests/perftest1.cc b/resources/3rdparty/sparsepp/tests/perftest1.cc new file mode 100755 index 000000000..ae8609e79 --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/perftest1.cc @@ -0,0 +1,162 @@ +// compile on linux with: g++ -std=c++11 -O2 perftest1.cc -o perftest1 +// ----------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define SPP 1 +#define DENSE 0 +#define SPARSE 0 +#define STD 0 + +#if SPP + #include +#elif DENSE + #include +#elif SPARSE + #include +#elif STD + #include +#endif + +using std::make_pair; + +template +void test(T &s, int count) +{ + spp::Timer timer; + + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.insert(make_pair(rand(), i)); + + printf("%d random inserts in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.find(rand()); + + printf("%d random finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(1); + for (int i = 0; i < count; ++i) + s.find(rand()); + printf("%d random not-finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + s.clear(); + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.insert(make_pair(i, i)); + printf("%d sequential inserts in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.find(i); + + printf("%d sequential finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(1); + for (int i = 0; i < count; ++i) + { + int x = rand(); + s.find(x); + } + printf("%d random not-finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + s.clear(); + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.insert(make_pair(-i, -i)); + + printf("%d neg sequential inserts in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(0); + for (int i = 0; i < count; ++i) + s.find(-i); + + printf("%d neg sequential finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + timer.snap(); + srand(1); + for (int i = 0; i < count; ++i) + s.find(rand()); + printf("%d random not-finds in %5.2f seconds\n", count, timer.get_delta() / 1000); + + s.clear(); +} + + +struct Hasher64 { + size_t operator()(uint64_t k) const { return (k ^ 14695981039346656037ULL) * 1099511628211ULL; } +}; + +struct Hasher32 { + size_t operator()(uint32_t k) const { return (k ^ 2166136261U) * 16777619UL; } +}; + +struct Hasheri32 { + size_t operator()(int k) const + { + return (k ^ 2166136261U) * 16777619UL; + } +}; + +struct Hasher_32 { + size_t operator()(int k) const + { + uint32_t a = (uint32_t)k; +#if 0 + a = (a ^ 61) ^ (a >> 16); + a = a + (a << 3); + a = a ^ (a >> 4); + a = a * 0x27d4eb2d; + a = a ^ (a >> 15); + return a; +#else + a = a ^ (a >> 4); + a = (a ^ 0xdeadbeef) + (a << 5); + a = a ^ (a >> 11); + return a; +#endif + } +}; + +int main() +{ +#if SPP + spp::sparse_hash_map s; + printf ("Testing spp::sparse_hash_map\n"); +#elif DENSE + google::dense_hash_map s; + s.set_empty_key(-INT_MAX); + s.set_deleted_key(-(INT_MAX - 1)); + printf ("Testing google::dense_hash_map\n"); +#elif SPARSE + google::sparse_hash_map s; + s.set_deleted_key(-INT_MAX); + printf ("Testing google::sparse_hash_map\n"); +#elif STD + std::unordered_map s; + printf ("Testing std::unordered_map\n"); +#endif + printf ("------------------------------\n"); + test(s, 50000000); + + + return 0; +} diff --git a/resources/3rdparty/sparsepp/tests/spp_alloc_test.cc b/resources/3rdparty/sparsepp/tests/spp_alloc_test.cc new file mode 100755 index 000000000..06b23ac80 --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/spp_alloc_test.cc @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include +#include + +// enable debugging code in spp_bitset.h +#define SPP_TEST 1 + +#include +#include +#include + +using namespace std; + +static float _to_mb(uint64_t m) { return (float)((double)m / (1024 * 1024)); } + +// ----------------------------------------------------------- +// ----------------------------------------------------------- +template +class TestAlloc +{ +public: + TestAlloc(size_t num_alloc = 8000000) : + _num_alloc(num_alloc) + { + _allocated.resize(_num_alloc, nullptr); + _sizes.resize(_num_alloc, 0); + _start_mem_usage = spp::GetProcessMemoryUsed(); + } + + void run() + { + srand(43); // always same sequence of random numbers + + for (size_t i=0; i<_num_alloc; ++i) + _sizes[i] = std::max(2, (rand() % 5) * 2); + + spp::Timer timer; + + // allocate small buffers + // ---------------------- + for (size_t i=0; i<_num_alloc; ++i) + { + _allocated[i] = _allocator.allocate(_sizes[i]); + _set_buf(_allocated[i], _sizes[i]); + } + +#if 1 + // and grow the buffers to a max size of 24 each + // --------------------------------------------- + for (uint32_t j=4; j<26; j += 2) + { + for (size_t i=0; i<_num_alloc; ++i) + { + // if ( _sizes[i] < j) // windows allocator friendly! + if ((rand() % 4) != 3 && _sizes[i] < j) // really messes up windows allocator + { + _allocated[i] = _allocator.reallocate(_allocated[i], j); + _check_buf(_allocated[i], _sizes[i]); + _set_buf(_allocated[i], j); + _sizes[i] = j; + } + } + } +#endif + +#if 0 + // test erase (shrinking the buffers) + // --------------------------------------------- + for (uint32_t j=28; j>4; j -= 2) + { + for (size_t i=0; i<_num_alloc; ++i) + { + // if ( _sizes[i] < j) // windows allocator friendly! + if ((rand() % 4) != 3 && _sizes[i] > j) // really messes up windows allocator + { + _allocated[i] = _allocator.reallocate(_allocated[i], j); + _check_buf1(_allocated[i], _sizes[i]); + _set_buf(_allocated[i], j); + _sizes[i] = j; + } + } + } +#endif + +#if 0 + // and grow the buffers back to a max size of 24 each + // -------------------------------------------------- + for (uint32_t j=4; j<26; j += 2) + { + for (size_t i=0; i<_num_alloc; ++i) + { + // if ( _sizes[i] < j) // windows allocator friendly! + if ((rand() % 4) != 3 && _sizes[i] < j) // really messes up windows allocator + { + _allocated[i] = _allocator.reallocate(_allocated[i], j); + _check_buf(_allocated[i], _sizes[i]); + _set_buf(_allocated[i], j); + _sizes[i] = j; + } + } + } +#endif + + size_t total_units = 0; + for (size_t i=0; i<_num_alloc; ++i) + total_units += _sizes[i]; + + uint64_t mem_usage = spp::GetProcessMemoryUsed(); + uint64_t alloc_mem_usage = mem_usage - _start_mem_usage; + uint64_t expected_mem_usage = total_units * sizeof(T); + + // finally free the memory + // ----------------------- + for (size_t i=0; i<_num_alloc; ++i) + { + _check_buf(_allocated[i], _sizes[i]); + _allocator.deallocate(_allocated[i], _sizes[i]); + } + + uint64_t mem_usage_end = spp::GetProcessMemoryUsed(); + + printf("allocated %zd entities of size %zd\n", total_units, sizeof(T)); + printf("done in %3.2f seconds, mem_usage %4.1f/%4.1f/%4.1f MB\n", + timer.get_total() / 1000, _to_mb(_start_mem_usage), _to_mb(mem_usage), _to_mb(mem_usage_end)); + printf("expected mem usage: %4.1f\n", _to_mb(expected_mem_usage)); + if (expected_mem_usage <= alloc_mem_usage) + printf("overhead: %4.1f%%\n", + (float)((double)(alloc_mem_usage - expected_mem_usage) / expected_mem_usage) * 100); + else + printf("bug: alloc_mem_usage <= expected_mem_usage\n"); + + std::vector().swap(_allocated); + std::vector().swap(_sizes); + + printf("\nmem usage after freeing vectors: %4.1f\n", _to_mb(spp::GetProcessMemoryUsed())); + } + +private: + + void _set_buf(T *buff, uint32_t sz) { *buff = (T)sz; buff[sz - 1] = (T)sz; } + void _check_buf1(T *buff, uint32_t sz) + { + assert(*buff == (T)sz); + (void)(buff + sz); // silence warning + } + void _check_buf(T *buff, uint32_t sz) + { + assert(*buff == (T)sz && buff[sz - 1] == (T)sz); + (void)(buff + sz); // silence warning + } + + size_t _num_alloc; + uint64_t _start_mem_usage; + std::vector _allocated; + std::vector _sizes; + A _allocator; +}; + +// ----------------------------------------------------------- +// ----------------------------------------------------------- +template +void run_test(const char *alloc_name) +{ + printf("\n---------------- testing %s\n\n", alloc_name); + + printf("\nmem usage before the alloc test: %4.1f\n", + _to_mb(spp::GetProcessMemoryUsed())); + { + TestAlloc< X, A > test_alloc; + test_alloc.run(); + } + printf("mem usage after the alloc test: %4.1f\n", + _to_mb(spp::GetProcessMemoryUsed())); + + printf("\n\n"); +} + +// ----------------------------------------------------------- +// ----------------------------------------------------------- +int main() +{ + typedef uint64_t X; + + run_test>("libc_allocator"); + run_test>("spp_allocator"); +} diff --git a/resources/3rdparty/sparsepp/tests/spp_bitset_test.cc b/resources/3rdparty/sparsepp/tests/spp_bitset_test.cc new file mode 100755 index 000000000..3c775f3f3 --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/spp_bitset_test.cc @@ -0,0 +1,284 @@ +#include +#include +#include +#include +#include +#include + +// enable debugging code in spp_bitset.h +#define SPP_TEST 1 + +#include +#include +#include + +using namespace std; + +// ----------------------------------------------------------- +// ----------------------------------------------------------- +template +class TestBitset +{ +public: + typedef spp::spp_bitset BS; + + TestBitset() + {} + + void test_set(size_t num_iter) + { + size_t num_errors = 0; + BS bs, bs2; + + printf("testing set on spp_bitset<%zu> , num_iter=%6zu -> ", N, num_iter); + + for (size_t i=0; i, num_iter=%6zu -> ", N, num_iter); + + for (size_t i=0; i, num_iter=%6zu -> ", N, num_iter); + + for (size_t i=0; i<4 * N; ++i) + { + bs.set(rand() % N); + if (i > 2 * N) + { + for (size_t j=0; j, num_iter=%6zu -> ", N, num_iter); + + for (size_t i=0; i 1000) + { + bs.set(1000); + size_t longest = bs.longest_zero_sequence(); + assert(longest == 1000-11 || longest == N-1001); + if (!(longest == 1000-11 || longest == N-1001)) + ++num_errors; + } + + spp::Timer timer_lz; + spp::Timer timer_lz_slow; + float lz_time(0), lz_time_slow(0); + + printf("testing longest_zero_sequence() , num_iter=%6zu -> ", num_iter); + srand(1); + for (size_t i=0; i 1000) + { + bs.set(1000); + size_t longest = bs.longest_zero_sequence(); + assert(longest == 1000-11 || longest == N-1001); + if (!(longest == 1000-11 || longest == N-1001)) + ++num_errors; + } + + spp::Timer timer_lz; + spp::Timer timer_lz_slow; + float lz_time(0), lz_time_slow(0); + + printf("testing longest_zero_sequence2() , num_iter=%6zu -> ", num_iter); + srand(1); + for (size_t i=0; i timer_ctz; + spp::Timer timer_ctz_slow; + float ctz_time(0), ctz_time_slow(0); + + printf("testing count_trailing_zeroes() , num_iter=%6zu -> ", num_iter); + for (size_t i=0; i test_bitset_1024; + test_bitset_1024.run(); + + TestBitset<4096> test_bitset_4096; + test_bitset_4096.run(); + + //TestBitset<8192> test_bitset_8192; + //test_bitset_8192.run(); +} diff --git a/resources/3rdparty/sparsepp/tests/spp_test.cc b/resources/3rdparty/sparsepp/tests/spp_test.cc new file mode 100755 index 000000000..279dd0163 --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/spp_test.cc @@ -0,0 +1,2988 @@ +// ---------------------------------------------------------------------- +// Copyright (c) 2016, Gregory Popovitch - greg7mdp@gmail.com +// All rights reserved. +// +// This work is derived from Google's sparsehash library +// +// Copyright (c) 2010, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// ---------------------------------------------------------------------- + +#ifdef _MSC_VER + #pragma warning( disable : 4820 ) // '6' bytes padding added after data member... + #pragma warning( disable : 4710 ) // function not inlined + #pragma warning( disable : 4514 ) // unreferenced inline function has been removed + #pragma warning( disable : 4996 ) // 'fopen': This function or variable may be unsafe +#endif + +#include + +#ifdef _MSC_VER + #pragma warning( disable : 4127 ) // conditional expression is constant + #pragma warning(push, 0) +#endif + + +#include +#include // for size_t +#include +#include +#include +#include +#include +#include +#include // for class typeinfo (returned by typeid) +#include +#include // for length_error + +namespace sparsehash_internal = SPP_NAMESPACE::sparsehash_internal; +using SPP_NAMESPACE::sparsetable; +using SPP_NAMESPACE::sparse_hashtable; +using SPP_NAMESPACE::sparse_hash_map; +using SPP_NAMESPACE::sparse_hash_set; + + + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +#ifndef _MSC_VER // windows defines its own version + #define _strdup strdup + #ifdef __MINGW32__ // mingw has trouble writing to /tmp + static std::string TmpFile(const char* basename) + { + return std::string("./#") + basename; + } + #endif +#else + #pragma warning(disable : 4996) + #define snprintf sprintf_s + #define WIN32_LEAN_AND_MEAN /* We always want minimal includes */ + #include + std::string TmpFile(const char* basename) + { + char tmppath_buffer[1024]; + int tmppath_len = GetTempPathA(sizeof(tmppath_buffer), tmppath_buffer); + if (tmppath_len <= 0 || tmppath_len >= sizeof(tmppath_buffer)) + return basename; // an error, so just bail on tmppath + + sprintf_s(tmppath_buffer + tmppath_len, 1024 - tmppath_len, "\\%s", basename); + return tmppath_buffer; + } +#endif + +#ifdef _MSC_VER + #pragma warning(pop) +#endif + + +// --------------------------------------------------------------------- +// This is the "default" interface, which just passes everything +// through to the underlying hashtable. You'll need to subclass it to +// specialize behavior for an individual hashtable. +// --------------------------------------------------------------------- +template +class BaseHashtableInterface +{ +public: + virtual ~BaseHashtableInterface() {} + + typedef typename HT::key_type key_type; + typedef typename HT::value_type value_type; + typedef typename HT::hasher hasher; + typedef typename HT::key_equal key_equal; + typedef typename HT::allocator_type allocator_type; + + typedef typename HT::size_type size_type; + typedef typename HT::difference_type difference_type; + typedef typename HT::pointer pointer; + typedef typename HT::const_pointer const_pointer; + typedef typename HT::reference reference; + typedef typename HT::const_reference const_reference; + + class const_iterator; + + class iterator : public HT::iterator + { + public: + iterator() : parent_(NULL) { } // this allows code like "iterator it;" + iterator(typename HT::iterator it, const BaseHashtableInterface* parent) + : HT::iterator(it), parent_(parent) { } + key_type key() { return parent_->it_to_key(*this); } + + private: + friend class BaseHashtableInterface::const_iterator; // for its ctor + const BaseHashtableInterface* parent_; + }; + + class const_iterator : public HT::const_iterator + { + public: + const_iterator() : parent_(NULL) { } + const_iterator(typename HT::const_iterator it, + const BaseHashtableInterface* parent) + : HT::const_iterator(it), parent_(parent) { } + + const_iterator(typename HT::iterator it, + BaseHashtableInterface* parent) + : HT::const_iterator(it), parent_(parent) { } + + // The parameter type here *should* just be "iterator", but MSVC + // gets confused by that, so I'm overly specific. + const_iterator(typename BaseHashtableInterface::iterator it) + : HT::const_iterator(it), parent_(it.parent_) { } + + key_type key() { return parent_->it_to_key(*this); } + + private: + const BaseHashtableInterface* parent_; + }; + + class const_local_iterator; + + class local_iterator : public HT::local_iterator + { + public: + local_iterator() : parent_(NULL) { } + local_iterator(typename HT::local_iterator it, + const BaseHashtableInterface* parent) + : HT::local_iterator(it), parent_(parent) { } + key_type key() { return parent_->it_to_key(*this); } + + private: + friend class BaseHashtableInterface::const_local_iterator; // for its ctor + const BaseHashtableInterface* parent_; + }; + + class const_local_iterator : public HT::const_local_iterator + { + public: + const_local_iterator() : parent_(NULL) { } + const_local_iterator(typename HT::const_local_iterator it, + const BaseHashtableInterface* parent) + : HT::const_local_iterator(it), parent_(parent) { } + const_local_iterator(typename HT::local_iterator it, + BaseHashtableInterface* parent) + : HT::const_local_iterator(it), parent_(parent) { } + const_local_iterator(local_iterator it) + : HT::const_local_iterator(it), parent_(it.parent_) { } + key_type key() { return parent_->it_to_key(*this); } + + private: + const BaseHashtableInterface* parent_; + }; + + iterator begin() { return iterator(ht_.begin(), this); } + iterator end() { return iterator(ht_.end(), this); } + const_iterator begin() const { return const_iterator(ht_.begin(), this); } + const_iterator end() const { return const_iterator(ht_.end(), this); } + local_iterator begin(size_type i) { return local_iterator(ht_.begin(i), this); } + local_iterator end(size_type i) { return local_iterator(ht_.end(i), this); } + const_local_iterator begin(size_type i) const { return const_local_iterator(ht_.begin(i), this); } + const_local_iterator end(size_type i) const { return const_local_iterator(ht_.end(i), this); } + + hasher hash_funct() const { return ht_.hash_funct(); } + hasher hash_function() const { return ht_.hash_function(); } + key_equal key_eq() const { return ht_.key_eq(); } + allocator_type get_allocator() const { return ht_.get_allocator(); } + + BaseHashtableInterface(size_type expected_max_items_in_table, + const hasher& hf, + const key_equal& eql, + const allocator_type& alloc) + : ht_(expected_max_items_in_table, hf, eql, alloc) { } + + // Not all ht_'s support this constructor: you should only call it + // from a subclass if you know your ht supports it. Otherwise call + // the previous constructor, followed by 'insert(f, l);'. + template + BaseHashtableInterface(InputIterator f, InputIterator l, + size_type expected_max_items_in_table, + const hasher& hf, + const key_equal& eql, + const allocator_type& alloc) + : ht_(f, l, expected_max_items_in_table, hf, eql, alloc) { + } + + // This is the version of the constructor used by dense_*, which + // requires an empty key in the constructor. + template + BaseHashtableInterface(InputIterator f, InputIterator l, key_type empty_k, + size_type expected_max_items_in_table, + const hasher& hf, + const key_equal& eql, + const allocator_type& alloc) + : ht_(f, l, empty_k, expected_max_items_in_table, hf, eql, alloc) { + } + + // This is the constructor appropriate for {dense,sparse}hashtable. + template + BaseHashtableInterface(size_type expected_max_items_in_table, + const hasher& hf, + const key_equal& eql, + const ExtractKey& ek, + const SetKey& sk, + const allocator_type& alloc) + : ht_(expected_max_items_in_table, hf, eql, ek, sk, alloc) { } + + + void clear() { ht_.clear(); } + void swap(BaseHashtableInterface& other) { ht_.swap(other.ht_); } + + // Only part of the API for some hashtable implementations. + void clear_no_resize() { clear(); } + + size_type size() const { return ht_.size(); } + size_type max_size() const { return ht_.max_size(); } + bool empty() const { return ht_.empty(); } + size_type bucket_count() const { return ht_.bucket_count(); } + size_type max_bucket_count() const { return ht_.max_bucket_count(); } + + size_type bucket_size(size_type i) const { + return ht_.bucket_size(i); + } + size_type bucket(const key_type& key) const { + return ht_.bucket(key); + } + + float load_factor() const { return ht_.load_factor(); } + float max_load_factor() const { return ht_.max_load_factor(); } + void max_load_factor(float grow) { ht_.max_load_factor(grow); } + float min_load_factor() const { return ht_.min_load_factor(); } + void min_load_factor(float shrink) { ht_.min_load_factor(shrink); } + void set_resizing_parameters(float shrink, float grow) { + ht_.set_resizing_parameters(shrink, grow); + } + + void resize(size_type hint) { ht_.resize(hint); } + void rehash(size_type hint) { ht_.rehash(hint); } + + iterator find(const key_type& key) { + return iterator(ht_.find(key), this); + } + + const_iterator find(const key_type& key) const { + return const_iterator(ht_.find(key), this); + } + + // Rather than try to implement operator[], which doesn't make much + // sense for set types, we implement two methods: bracket_equal and + // bracket_assign. By default, bracket_equal(a, b) returns true if + // ht[a] == b, and false otherwise. (Note that this follows + // operator[] semantics exactly, including inserting a if it's not + // already in the hashtable, before doing the equality test.) For + // sets, which have no operator[], b is ignored, and bracket_equal + // returns true if key is in the set and false otherwise. + // bracket_assign(a, b) is equivalent to ht[a] = b. For sets, b is + // ignored, and bracket_assign is equivalent to ht.insert(a). + template + bool bracket_equal(const key_type& key, const AssignValue& expected) { + return ht_[key] == expected; + } + + template + void bracket_assign(const key_type& key, const AssignValue& value) { + ht_[key] = value; + } + + size_type count(const key_type& key) const { return ht_.count(key); } + + std::pair equal_range(const key_type& key) + { + std::pair r + = ht_.equal_range(key); + return std::pair(iterator(r.first, this), + iterator(r.second, this)); + } + std::pair equal_range(const key_type& key) const + { + std::pair r + = ht_.equal_range(key); + return std::pair( + const_iterator(r.first, this), const_iterator(r.second, this)); + } + + const_iterator random_element(class ACMRandom* r) const { + return const_iterator(ht_.random_element(r), this); + } + + iterator random_element(class ACMRandom* r) { + return iterator(ht_.random_element(r), this); + } + + std::pair insert(const value_type& obj) { + std::pair r = ht_.insert(obj); + return std::pair(iterator(r.first, this), r.second); + } + template + void insert(InputIterator f, InputIterator l) { + ht_.insert(f, l); + } + void insert(typename HT::const_iterator f, typename HT::const_iterator l) { + ht_.insert(f, l); + } + iterator insert(typename HT::iterator, const value_type& obj) { + return iterator(insert(obj).first, this); + } + + // These will commonly need to be overridden by the child. + void set_empty_key(const key_type& k) { ht_.set_empty_key(k); } + void clear_empty_key() { ht_.clear_empty_key(); } + key_type empty_key() const { return ht_.empty_key(); } + + void set_deleted_key(const key_type& k) { ht_.set_deleted_key(k); } + void clear_deleted_key() { ht_.clear_deleted_key(); } + + size_type erase(const key_type& key) { return ht_.erase(key); } + void erase(typename HT::iterator it) { ht_.erase(it); } + void erase(typename HT::iterator f, typename HT::iterator l) { + ht_.erase(f, l); + } + + bool operator==(const BaseHashtableInterface& other) const { + return ht_ == other.ht_; + } + bool operator!=(const BaseHashtableInterface& other) const { + return ht_ != other.ht_; + } + + template + bool serialize(ValueSerializer serializer, OUTPUT *fp) { + return ht_.serialize(serializer, fp); + } + template + bool unserialize(ValueSerializer serializer, INPUT *fp) { + return ht_.unserialize(serializer, fp); + } + + template + bool write_metadata(OUTPUT *fp) { + return ht_.write_metadata(fp); + } + template + bool read_metadata(INPUT *fp) { + return ht_.read_metadata(fp); + } + template + bool write_nopointer_data(OUTPUT *fp) { + return ht_.write_nopointer_data(fp); + } + template + bool read_nopointer_data(INPUT *fp) { + return ht_.read_nopointer_data(fp); + } + + // low-level stats + int num_table_copies() const { return (int)ht_.num_table_copies(); } + + // Not part of the hashtable API, but is provided to make testing easier. + virtual key_type get_key(const value_type& value) const = 0; + // All subclasses should define get_data(value_type) as well. I don't + // provide an abstract-virtual definition here, because the return type + // differs between subclasses (not all subclasses define data_type). + //virtual data_type get_data(const value_type& value) const = 0; + //virtual data_type default_data() const = 0; + + // These allow introspection into the interface. "Supports" means + // that the implementation of this functionality isn't a noop. + virtual bool supports_clear_no_resize() const = 0; + virtual bool supports_empty_key() const = 0; + virtual bool supports_deleted_key() const = 0; + virtual bool supports_brackets() const = 0; // has a 'real' operator[] + virtual bool supports_readwrite() const = 0; + virtual bool supports_num_table_copies() const = 0; + virtual bool supports_serialization() const = 0; + +protected: + HT ht_; + + // These are what subclasses have to define to get class-specific behavior + virtual key_type it_to_key(const iterator& it) const = 0; + virtual key_type it_to_key(const const_iterator& it) const = 0; + virtual key_type it_to_key(const local_iterator& it) const = 0; + virtual key_type it_to_key(const const_local_iterator& it) const = 0; +}; + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template , + class EqualKey = std::equal_to, + class Alloc = SPP_DEFAULT_ALLOCATOR > > +class HashtableInterface_SparseHashMap + : public BaseHashtableInterface< sparse_hash_map > +{ +private: + typedef sparse_hash_map ht; + typedef BaseHashtableInterface p; // parent + +public: + explicit HashtableInterface_SparseHashMap( + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(expected_max_items, hf, eql, alloc) { } + + template + HashtableInterface_SparseHashMap( + InputIterator f, InputIterator l, + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(f, l, expected_max_items, hf, eql, alloc) { } + + typename p::key_type get_key(const typename p::value_type& value) const { + return value.first; + } + typename ht::data_type get_data(const typename p::value_type& value) const { + return value.second; + } + typename ht::data_type default_data() const { + return typename ht::data_type(); + } + + bool supports_clear_no_resize() const { return false; } + bool supports_empty_key() const { return false; } + bool supports_deleted_key() const { return false; } + bool supports_brackets() const { return true; } + bool supports_readwrite() const { return true; } + bool supports_num_table_copies() const { return false; } + bool supports_serialization() const { return true; } + + void set_empty_key(const typename p::key_type&) { } + void clear_empty_key() { } + typename p::key_type empty_key() const { return typename p::key_type(); } + + int num_table_copies() const { return 0; } + + typedef typename ht::NopointerSerializer NopointerSerializer; + +protected: + template + friend void swap(HashtableInterface_SparseHashMap& a, + HashtableInterface_SparseHashMap& b); + + typename p::key_type it_to_key(const typename p::iterator& it) const { + return it->first; + } + typename p::key_type it_to_key(const typename p::const_iterator& it) const { + return it->first; + } + typename p::key_type it_to_key(const typename p::local_iterator& it) const { + return it->first; + } + typename p::key_type it_to_key(const typename p::const_local_iterator& it) const { + return it->first; + } +}; + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template +void swap(HashtableInterface_SparseHashMap& a, + HashtableInterface_SparseHashMap& b) +{ + swap(a.ht_, b.ht_); +} + + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template , + class EqualKey = std::equal_to, + class Alloc = SPP_DEFAULT_ALLOCATOR > +class HashtableInterface_SparseHashSet + : public BaseHashtableInterface< sparse_hash_set > +{ +private: + typedef sparse_hash_set ht; + typedef BaseHashtableInterface p; // parent + +public: + explicit HashtableInterface_SparseHashSet( + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(expected_max_items, hf, eql, alloc) { } + + template + HashtableInterface_SparseHashSet( + InputIterator f, InputIterator l, + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(f, l, expected_max_items, hf, eql, alloc) { } + + template + bool bracket_equal(const typename p::key_type& key, const AssignValue&) { + return this->ht_.find(key) != this->ht_.end(); + } + + template + void bracket_assign(const typename p::key_type& key, const AssignValue&) { + this->ht_.insert(key); + } + + typename p::key_type get_key(const typename p::value_type& value) const { + return value; + } + // For sets, the only 'data' is that an item is actually inserted. + bool get_data(const typename p::value_type&) const { + return true; + } + bool default_data() const { + return true; + } + + bool supports_clear_no_resize() const { return false; } + bool supports_empty_key() const { return false; } + bool supports_deleted_key() const { return false; } + bool supports_brackets() const { return false; } + bool supports_readwrite() const { return true; } + bool supports_num_table_copies() const { return false; } + bool supports_serialization() const { return true; } + + void set_empty_key(const typename p::key_type&) { } + void clear_empty_key() { } + typename p::key_type empty_key() const { return typename p::key_type(); } + + int num_table_copies() const { return 0; } + + typedef typename ht::NopointerSerializer NopointerSerializer; + +protected: + template + friend void swap(HashtableInterface_SparseHashSet& a, + HashtableInterface_SparseHashSet& b); + + typename p::key_type it_to_key(const typename p::iterator& it) const { + return *it; + } + typename p::key_type it_to_key(const typename p::const_iterator& it) const { + return *it; + } + typename p::key_type it_to_key(const typename p::local_iterator& it) const { + return *it; + } + typename p::key_type it_to_key(const typename p::const_local_iterator& it) + const { + return *it; + } +}; + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template +void swap(HashtableInterface_SparseHashSet& a, + HashtableInterface_SparseHashSet& b) +{ + swap(a.ht_, b.ht_); +} + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template +class HashtableInterface_SparseHashtable + : public BaseHashtableInterface< sparse_hashtable > +{ +private: + typedef sparse_hashtable ht; + typedef BaseHashtableInterface p; // parent + +public: + explicit HashtableInterface_SparseHashtable( + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(expected_max_items, hf, eql, + ExtractKey(), SetKey(), alloc) { } + + template + HashtableInterface_SparseHashtable( + InputIterator f, InputIterator l, + typename p::size_type expected_max_items = 0, + const typename p::hasher& hf = typename p::hasher(), + const typename p::key_equal& eql = typename p::key_equal(), + const typename p::allocator_type& alloc = typename p::allocator_type()) + : BaseHashtableInterface(expected_max_items, hf, eql, + ExtractKey(), SetKey(), alloc) { + this->insert(f, l); + } + + float max_load_factor() const { + float shrink, grow; + this->ht_.get_resizing_parameters(&shrink, &grow); + return grow; + } + void max_load_factor(float new_grow) { + float shrink, grow; + this->ht_.get_resizing_parameters(&shrink, &grow); + this->ht_.set_resizing_parameters(shrink, new_grow); + } + float min_load_factor() const { + float shrink, grow; + this->ht_.get_resizing_parameters(&shrink, &grow); + return shrink; + } + void min_load_factor(float new_shrink) { + float shrink, grow; + this->ht_.get_resizing_parameters(&shrink, &grow); + this->ht_.set_resizing_parameters(new_shrink, grow); + } + + template + bool bracket_equal(const typename p::key_type&, const AssignValue&) { + return false; + } + + template + void bracket_assign(const typename p::key_type&, const AssignValue&) { + } + + typename p::key_type get_key(const typename p::value_type& value) const { + return extract_key(value); + } + typename p::value_type get_data(const typename p::value_type& value) const { + return value; + } + typename p::value_type default_data() const { + return typename p::value_type(); + } + + bool supports_clear_no_resize() const { return false; } + bool supports_empty_key() const { return false; } + bool supports_deleted_key() const { return false; } + bool supports_brackets() const { return false; } + bool supports_readwrite() const { return true; } + bool supports_num_table_copies() const { return true; } + bool supports_serialization() const { return true; } + + void set_empty_key(const typename p::key_type&) { } + void clear_empty_key() { } + typename p::key_type empty_key() const { return typename p::key_type(); } + + // These tr1 names aren't defined for sparse_hashtable. + typename p::hasher hash_function() { return this->hash_funct(); } + void rehash(typename p::size_type hint) { this->resize(hint); } + + // TODO(csilvers): also support/test destructive_begin()/destructive_end()? + + typedef typename ht::NopointerSerializer NopointerSerializer; + +protected: + template + friend void swap( + HashtableInterface_SparseHashtable& a, + HashtableInterface_SparseHashtable& b); + + typename p::key_type it_to_key(const typename p::iterator& it) const { + return extract_key(*it); + } + typename p::key_type it_to_key(const typename p::const_iterator& it) const { + return extract_key(*it); + } + typename p::key_type it_to_key(const typename p::local_iterator& it) const { + return extract_key(*it); + } + typename p::key_type it_to_key(const typename p::const_local_iterator& it) + const { + return extract_key(*it); + } + +private: + ExtractKey extract_key; +}; + +// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +template +void swap(HashtableInterface_SparseHashtable& a, + HashtableInterface_SparseHashtable& b) { + swap(a.ht_, b.ht_); +} + +void EXPECT_TRUE(bool cond) +{ + if (!cond) + { + ::fputs("Test failed:\n", stderr); + ::exit(1); + } +} + +namespace spp_ +{ + +namespace testing +{ + +#define EXPECT_FALSE(a) EXPECT_TRUE(!(a)) +#define EXPECT_EQ(a, b) EXPECT_TRUE((a) == (b)) +#define EXPECT_NE(a, b) EXPECT_TRUE((a) != (b)) +#define EXPECT_LT(a, b) EXPECT_TRUE((a) < (b)) +#define EXPECT_GT(a, b) EXPECT_TRUE((a) > (b)) +#define EXPECT_LE(a, b) EXPECT_TRUE((a) <= (b)) +#define EXPECT_GE(a, b) EXPECT_TRUE((a) >= (b)) + +#define EXPECT_DEATH(cmd, expected_error_string) \ + try { \ + cmd; \ + EXPECT_FALSE("did not see expected error: " #expected_error_string); \ + } catch (const std::length_error&) { \ + /* Good, the cmd failed. */ \ + } + +#define TEST(suitename, testname) \ + class TEST_##suitename##_##testname { \ + public: \ + TEST_##suitename##_##testname() { \ + ::fputs("Running " #suitename "." #testname "\n", stderr); \ + Run(); \ + } \ + void Run(); \ + }; \ + static TEST_##suitename##_##testname \ + test_instance_##suitename##_##testname; \ + void TEST_##suitename##_##testname::Run() + + +template +struct TypeList3 +{ + typedef C1 type1; + typedef C2 type2; + typedef C3 type3; +}; + +// I need to list 9 types here, for code below to compile, though +// only the first 3 are ever used. +#define TYPED_TEST_CASE_3(classname, typelist) \ + typedef typelist::type1 classname##_type1; \ + typedef typelist::type2 classname##_type2; \ + typedef typelist::type3 classname##_type3; \ + SPP_ATTRIBUTE_UNUSED static const int classname##_numtypes = 3; \ + typedef typelist::type1 classname##_type4; \ + typedef typelist::type1 classname##_type5; \ + typedef typelist::type1 classname##_type6; \ + typedef typelist::type1 classname##_type7; \ + typedef typelist::type1 classname##_type8; \ + typedef typelist::type1 classname##_type9 + +template +struct TypeList9 +{ + typedef C1 type1; + typedef C2 type2; + typedef C3 type3; + typedef C4 type4; + typedef C5 type5; + typedef C6 type6; + typedef C7 type7; + typedef C8 type8; + typedef C9 type9; +}; + +#define TYPED_TEST_CASE_9(classname, typelist) \ + typedef typelist::type1 classname##_type1; \ + typedef typelist::type2 classname##_type2; \ + typedef typelist::type3 classname##_type3; \ + typedef typelist::type4 classname##_type4; \ + typedef typelist::type5 classname##_type5; \ + typedef typelist::type6 classname##_type6; \ + typedef typelist::type7 classname##_type7; \ + typedef typelist::type8 classname##_type8; \ + typedef typelist::type9 classname##_type9; \ + static const int classname##_numtypes = 9 + +#define TYPED_TEST(superclass, testname) \ + template \ + class TEST_onetype_##superclass##_##testname : \ + public superclass { \ + public: \ + TEST_onetype_##superclass##_##testname() { \ + Run(); \ + } \ + private: \ + void Run(); \ + }; \ + class TEST_typed_##superclass##_##testname { \ + public: \ + explicit TEST_typed_##superclass##_##testname() { \ + if (superclass##_numtypes >= 1) { \ + ::fputs("Running " #superclass "." #testname ".1\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 2) { \ + ::fputs("Running " #superclass "." #testname ".2\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 3) { \ + ::fputs("Running " #superclass "." #testname ".3\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 4) { \ + ::fputs("Running " #superclass "." #testname ".4\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 5) { \ + ::fputs("Running " #superclass "." #testname ".5\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 6) { \ + ::fputs("Running " #superclass "." #testname ".6\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 7) { \ + ::fputs("Running " #superclass "." #testname ".7\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 8) { \ + ::fputs("Running " #superclass "." #testname ".8\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + if (superclass##_numtypes >= 9) { \ + ::fputs("Running " #superclass "." #testname ".9\n", stderr); \ + TEST_onetype_##superclass##_##testname t; \ + } \ + } \ + }; \ + static TEST_typed_##superclass##_##testname \ + test_instance_typed_##superclass##_##testname; \ + template \ + void TEST_onetype_##superclass##_##testname::Run() + +// This is a dummy class just to make converting from internal-google +// to opensourcing easier. +class Test { }; + +} // namespace testing + +} // namespace spp_ + +namespace testing = SPP_NAMESPACE::testing; + +using std::cout; +using std::pair; +using std::set; +using std::string; +using std::vector; + +typedef unsigned char uint8; + +#ifdef _MSC_VER +// Below, we purposefully test having a very small allocator size. +// This causes some "type conversion too small" errors when using this +// allocator with sparsetable buckets. We're testing to make sure we +// handle that situation ok, so we don't need the compiler warnings. +#pragma warning(disable:4244) +#define ATTRIBUTE_UNUSED +#else +#define ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +namespace { + +#ifndef _MSC_VER // windows defines its own version +# ifdef __MINGW32__ // mingw has trouble writing to /tmp +static string TmpFile(const char* basename) { + return string("./#") + basename; +} +# else +static string TmpFile(const char* basename) { + string kTmpdir = "/tmp"; + return kTmpdir + "/" + basename; +} +# endif +#endif + +// Used as a value in some of the hashtable tests. It's just some +// arbitrary user-defined type with non-trivial memory management. +// --------------------------------------------------------------- +struct ValueType +{ +public: + ValueType() : s_(kDefault) { } + ValueType(const char* init_s) : s_(kDefault) { set_s(init_s); } + ~ValueType() { set_s(NULL); } + ValueType(const ValueType& that) : s_(kDefault) { operator=(that); } + void operator=(const ValueType& that) { set_s(that.s_); } + bool operator==(const ValueType& that) const { + return strcmp(this->s(), that.s()) == 0; + } + void set_s(const char* new_s) { + if (s_ != kDefault) + free(const_cast(s_)); + s_ = (new_s == NULL ? kDefault : reinterpret_cast(_strdup(new_s))); + } + const char* s() const { return s_; } +private: + const char* s_; + static const char* const kDefault; +}; + +const char* const ValueType::kDefault = "hi"; + +// This is used by the low-level sparse/dense_hashtable classes, +// which support the most general relationship between keys and +// values: the key is derived from the value through some arbitrary +// function. (For classes like sparse_hash_map, the 'value' is a +// key/data pair, and the function to derive the key is +// FirstElementOfPair.) KeyToValue is the inverse of this function, +// so GetKey(KeyToValue(key)) == key. To keep the tests a bit +// simpler, we've chosen to make the key and value actually be the +// same type, which is why we need only one template argument for the +// types, rather than two (one for the key and one for the value). +template +struct SetKey +{ + void operator()(KeyAndValueT* value, const KeyAndValueT& new_key) const + { + *value = KeyToValue()(new_key); + } +}; + +// A hash function that keeps track of how often it's called. We use +// a simple djb-hash so we don't depend on how STL hashes. We use +// this same method to do the key-comparison, so we can keep track +// of comparison-counts too. +struct Hasher +{ + explicit Hasher(int i=0) : id_(i), num_hashes_(0), num_compares_(0) { } + int id() const { return id_; } + int num_hashes() const { return num_hashes_; } + int num_compares() const { return num_compares_; } + + size_t operator()(int a) const { + num_hashes_++; + return static_cast(a); + } + size_t operator()(const char* a) const { + num_hashes_++; + size_t hash = 0; + for (size_t i = 0; a[i]; i++ ) + hash = 33 * hash + a[i]; + return hash; + } + size_t operator()(const string& a) const { + num_hashes_++; + size_t hash = 0; + for (size_t i = 0; i < a.length(); i++ ) + hash = 33 * hash + a[i]; + return hash; + } + size_t operator()(const int* a) const { + num_hashes_++; + return static_cast(reinterpret_cast(a)); + } + bool operator()(int a, int b) const { + num_compares_++; + return a == b; + } + bool operator()(const string& a, const string& b) const { + num_compares_++; + return a == b; + } + bool operator()(const char* a, const char* b) const { + num_compares_++; + // The 'a == b' test is necessary, in case a and b are both NULL. + return (a == b || (a && b && strcmp(a, b) == 0)); + } + +private: + mutable int id_; + mutable int num_hashes_; + mutable int num_compares_; +}; + +// Allocator that allows controlling its size in various ways, to test +// allocator overflow. Because we use this allocator in a vector, we +// need to define != and swap for gcc. +// ------------------------------------------------------------------ +template(~0)> +struct Alloc +{ + typedef T value_type; + typedef SizeT size_type; + typedef ptrdiff_t difference_type; + typedef T* pointer; + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + + explicit Alloc(int i=0, int* count=NULL) : id_(i), count_(count) {} + ~Alloc() {} + pointer address(reference r) const { return &r; } + const_pointer address(const_reference r) const { return &r; } + pointer allocate(size_type n, const_pointer = 0) { + if (count_) ++(*count_); + return static_cast(malloc(n * sizeof(value_type))); + } + void deallocate(pointer p, size_type) { + free(p); + } + pointer reallocate(pointer p, size_type n) { + if (count_) ++(*count_); + return static_cast(realloc(p, n * sizeof(value_type))); + } + size_type max_size() const { + return static_cast(MAX_SIZE); + } + void construct(pointer p, const value_type& val) { + new(p) value_type(val); + } + void destroy(pointer p) { p->~value_type(); } + + bool is_custom_alloc() const { return true; } + + template + Alloc(const Alloc& that) + : id_(that.id_), count_(that.count_) { + } + + template + struct rebind { + typedef Alloc other; + }; + + bool operator==(const Alloc& that) const { + return this->id_ == that.id_ && this->count_ == that.count_; + } + bool operator!=(const Alloc& that) const { + return !this->operator==(that); + } + + int id() const { return id_; } + + // I have to make these public so the constructor used for rebinding + // can see them. Normally, I'd just make them private and say: + // template friend struct Alloc; + // but MSVC 7.1 barfs on that. So public it is. But no peeking! +public: + int id_; + int* count_; +}; + + +// Below are a few fun routines that convert a value into a key, used +// for dense_hashtable and sparse_hashtable. It's our responsibility +// to make sure, when we insert values into these objects, that the +// values match the keys we insert them under. To allow us to use +// these routines for SetKey as well, we require all these functions +// be their own inverse: f(f(x)) == x. +template +struct Negation { + typedef Value result_type; + Value operator()(Value& v) { return -v; } + const Value operator()(const Value& v) const { return -v; } +}; + +struct Capital +{ + typedef string result_type; + string operator()(string& s) { + return string(1, s[0] ^ 32) + s.substr(1); + } + const string operator()(const string& s) const { + return string(1, s[0] ^ 32) + s.substr(1); + } +}; + +struct Identity +{ // lame, I know, but an important case to test. + typedef const char* result_type; + const char* operator()(const char* s) const { + return s; + } +}; + +// This is just to avoid memory leaks -- it's a global pointer to +// all the memory allocated by UniqueObjectHelper. We'll use it +// to semi-test sparsetable as well. :-) +std::vector g_unique_charstar_objects(16, (char *)0); + +// This is an object-generator: pass in an index, and it will return a +// unique object of type ItemType. We provide specializations for the +// types we actually support. +template ItemType UniqueObjectHelper(int index); +template<> int UniqueObjectHelper(int index) +{ + return index; +} +template<> string UniqueObjectHelper(int index) +{ + char buffer[64]; + snprintf(buffer, sizeof(buffer), "%d", index); + return buffer; +} +template<> char* UniqueObjectHelper(int index) +{ + // First grow the table if need be. + size_t table_size = g_unique_charstar_objects.size(); + while (index >= static_cast(table_size)) { + assert(table_size * 2 > table_size); // avoid overflow problems + table_size *= 2; + } + if (table_size > g_unique_charstar_objects.size()) + g_unique_charstar_objects.resize(table_size, (char *)0); + + if (!g_unique_charstar_objects[static_cast(index)]) { + char buffer[64]; + snprintf(buffer, sizeof(buffer), "%d", index); + g_unique_charstar_objects[static_cast(index)] = _strdup(buffer); + } + return g_unique_charstar_objects[static_cast(index)]; +} +template<> const char* UniqueObjectHelper(int index) { + return UniqueObjectHelper(index); +} +template<> ValueType UniqueObjectHelper(int index) { + return ValueType(UniqueObjectHelper(index).c_str()); +} +template<> pair UniqueObjectHelper(int index) { + return pair(index, index + 1); +} +template<> pair UniqueObjectHelper(int index) +{ + return pair( + UniqueObjectHelper(index), UniqueObjectHelper(index + 1)); +} +template<> pair UniqueObjectHelper(int index) +{ + return pair( + UniqueObjectHelper(index), UniqueObjectHelper(index+1)); +} + +class ValueSerializer +{ +public: + bool operator()(FILE* fp, const int& value) { + return fwrite(&value, sizeof(value), 1, fp) == 1; + } + bool operator()(FILE* fp, int* value) { + return fread(value, sizeof(*value), 1, fp) == 1; + } + bool operator()(FILE* fp, const string& value) { + const size_t size = value.size(); + return (*this)(fp, (int)size) && fwrite(value.c_str(), size, 1, fp) == 1; + } + bool operator()(FILE* fp, string* value) { + int size; + if (!(*this)(fp, &size)) return false; + char* buf = new char[(size_t)size]; + if (fread(buf, (size_t)size, 1, fp) != 1) { + delete[] buf; + return false; + } + new (value) string(buf, (size_t)size); + delete[] buf; + return true; + } + template + bool operator()(OUTPUT* fp, const ValueType& v) { + return (*this)(fp, string(v.s())); + } + template + bool operator()(INPUT* fp, ValueType* v) { + string data; + if (!(*this)(fp, &data)) return false; + new(v) ValueType(data.c_str()); + return true; + } + template + bool operator()(OUTPUT* fp, const char* const& value) { + // Just store the index. + return (*this)(fp, atoi(value)); + } + template + bool operator()(INPUT* fp, const char** value) { + // Look up via index. + int index; + if (!(*this)(fp, &index)) return false; + *value = UniqueObjectHelper(index); + return true; + } + template + bool operator()(OUTPUT* fp, std::pair* value) { + return (*this)(fp, const_cast(&value->first)) + && (*this)(fp, &value->second); + } + template + bool operator()(INPUT* fp, const std::pair& value) { + return (*this)(fp, value.first) && (*this)(fp, value.second); + } +}; + +template +class HashtableTest : public ::testing::Test +{ +public: + HashtableTest() : ht_() { } + // Give syntactically-prettier access to UniqueObjectHelper. + typename HashtableType::value_type UniqueObject(int index) { + return UniqueObjectHelper(index); + } + typename HashtableType::key_type UniqueKey(int index) { + return this->ht_.get_key(this->UniqueObject(index)); + } +protected: + HashtableType ht_; +}; + +} + +// These are used to specify the empty key and deleted key in some +// contexts. They can't be in the unnamed namespace, or static, +// because the template code requires external linkage. +extern const string kEmptyString("--empty string--"); +extern const string kDeletedString("--deleted string--"); +extern const int kEmptyInt = 0; +extern const int kDeletedInt = -1234676543; // an unlikely-to-pick int +extern const char* const kEmptyCharStar = "--empty char*--"; +extern const char* const kDeletedCharStar = "--deleted char*--"; + +namespace { + +#define INT_HASHTABLES \ + HashtableInterface_SparseHashMap > >, \ + HashtableInterface_SparseHashSet >, \ + /* This is a table where the key associated with a value is -value */ \ + HashtableInterface_SparseHashtable, \ + SetKey >, \ + Hasher, Alloc > + +#define STRING_HASHTABLES \ + HashtableInterface_SparseHashMap > >, \ + HashtableInterface_SparseHashSet >, \ + /* This is a table where the key associated with a value is Cap(value) */ \ + HashtableInterface_SparseHashtable, \ + Hasher, Alloc > + +// --------------------------------------------------------------------- +// I'd like to use ValueType keys for SparseHashtable<> and +// DenseHashtable<> but I can't due to memory-management woes (nobody +// really owns the char* involved). So instead I do something simpler. +// --------------------------------------------------------------------- +#define CHARSTAR_HASHTABLES \ + HashtableInterface_SparseHashMap > >, \ + HashtableInterface_SparseHashSet >, \ + HashtableInterface_SparseHashtable, \ + Hasher, Alloc > + +// --------------------------------------------------------------------- +// This is the list of types we run each test against. +// We need to define the same class 4 times due to limitations in the +// testing framework. Basically, we associate each class below with +// the set of types we want to run tests on it with. +// --------------------------------------------------------------------- +template class HashtableIntTest + : public HashtableTest { }; + +template class HashtableStringTest + : public HashtableTest { }; + +template class HashtableCharStarTest + : public HashtableTest { }; + +template class HashtableAllTest + : public HashtableTest { }; + +typedef testing::TypeList3 IntHashtables; +typedef testing::TypeList3 StringHashtables; +typedef testing::TypeList3 CharStarHashtables; +typedef testing::TypeList9 AllHashtables; + +TYPED_TEST_CASE_3(HashtableIntTest, IntHashtables); +TYPED_TEST_CASE_3(HashtableStringTest, StringHashtables); +TYPED_TEST_CASE_3(HashtableCharStarTest, CharStarHashtables); +TYPED_TEST_CASE_9(HashtableAllTest, AllHashtables); + +// ------------------------------------------------------------------------ +// First, some testing of the underlying infrastructure. + +#if 0 + +TEST(HashtableCommonTest, HashMunging) +{ + const Hasher hasher; + + // We don't munge the hash value on non-pointer template types. + { + const sparsehash_internal::sh_hashtable_settings + settings(hasher, 0.0, 0.0); + const int v = 1000; + EXPECT_EQ(hasher(v), settings.hash(v)); + } + + { + // We do munge the hash value on pointer template types. + const sparsehash_internal::sh_hashtable_settings + settings(hasher, 0.0, 0.0); + int* v = NULL; + v += 0x10000; // get a non-trivial pointer value + EXPECT_NE(hasher(v), settings.hash(v)); + } + { + const sparsehash_internal::sh_hashtable_settings + settings(hasher, 0.0, 0.0); + const int* v = NULL; + v += 0x10000; // get a non-trivial pointer value + EXPECT_NE(hasher(v), settings.hash(v)); + } +} + +#endif + +// ------------------------------------------------------------------------ +// If the first arg to TYPED_TEST is HashtableIntTest, it will run +// this test on all the hashtable types, with key=int and value=int. +// Likewise, HashtableStringTest will have string key/values, and +// HashtableCharStarTest will have char* keys and -- just to mix it up +// a little -- ValueType values. HashtableAllTest will run all three +// key/value types on all 6 hashtables types, for 9 test-runs total +// per test. +// +// In addition, TYPED_TEST makes available the magic keyword +// TypeParam, which is the type being used for the current test. + +// This first set of tests just tests the public API, going through +// the public typedefs and methods in turn. It goes approximately +// in the definition-order in sparse_hash_map.h. +// ------------------------------------------------------------------------ +TYPED_TEST(HashtableIntTest, Typedefs) +{ + // Make sure all the standard STL-y typedefs are defined. The exact + // key/value types don't matter here, so we only bother testing on + // the int tables. This is just a compile-time "test"; nothing here + // can fail at runtime. + this->ht_.set_deleted_key(-2); // just so deleted_key succeeds + typename TypeParam::key_type kt; + typename TypeParam::value_type vt; + typename TypeParam::hasher h; + typename TypeParam::key_equal ke; + typename TypeParam::allocator_type at; + + typename TypeParam::size_type st; + typename TypeParam::difference_type dt; + typename TypeParam::pointer p; + typename TypeParam::const_pointer cp; + // I can't declare variables of reference-type, since I have nothing + // to point them to, so I just make sure that these types exist. + ATTRIBUTE_UNUSED typedef typename TypeParam::reference r; + ATTRIBUTE_UNUSED typedef typename TypeParam::const_reference cf; + + typename TypeParam::iterator i; + typename TypeParam::const_iterator ci; + typename TypeParam::local_iterator li; + typename TypeParam::const_local_iterator cli; + + // Now make sure the variables are used, so the compiler doesn't + // complain. Where possible, I "use" the variable by calling the + // method that's supposed to return the unique instance of the + // relevant type (eg. get_allocator()). Otherwise, I try to call a + // different, arbitrary function that returns the type. Sometimes + // the type isn't used at all, and there's no good way to use the + // variable. + (void)vt; // value_type may not be copyable. Easiest not to try. + h = this->ht_.hash_funct(); + ke = this->ht_.key_eq(); + at = this->ht_.get_allocator(); + st = this->ht_.size(); + (void)dt; + (void)p; + (void)cp; + (void)kt; + (void)st; + i = this->ht_.begin(); + ci = this->ht_.begin(); + li = this->ht_.begin(0); + cli = this->ht_.begin(0); +} + +TYPED_TEST(HashtableAllTest, NormalIterators) +{ + EXPECT_TRUE(this->ht_.begin() == this->ht_.end()); + this->ht_.insert(this->UniqueObject(1)); + { + typename TypeParam::iterator it = this->ht_.begin(); + EXPECT_TRUE(it != this->ht_.end()); + ++it; + EXPECT_TRUE(it == this->ht_.end()); + } +} + + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) + +template struct MyHash; +typedef std::pair StringPair; + +template<> struct MyHash +{ + size_t operator()(StringPair const& p) const + { + return std::hash()(p.first); + } +}; + +class MovableOnlyType +{ + std::string _str; + std::uint64_t _int; + +public: + // Make object movable and non-copyable + MovableOnlyType(MovableOnlyType &&) = default; + MovableOnlyType(const MovableOnlyType &) = delete; + MovableOnlyType& operator=(MovableOnlyType &&) = default; + MovableOnlyType& operator=(const MovableOnlyType &) = delete; + MovableOnlyType() : _str("whatever"), _int(2) {} +}; + +void movable_emplace_test(std::size_t iterations, int container_size) +{ + for (std::size_t i=0;i m; + m.reserve(static_cast(container_size)); + char buff[20]; + for (int j=0; j mymap; + + mymap.emplace ("NCC-1701", "J.T. Kirk"); + mymap.emplace ("NCC-1701-D", "J.L. Picard"); + mymap.emplace ("NCC-74656", "K. Janeway"); + EXPECT_TRUE(mymap["NCC-74656"] == std::string("K. Janeway")); + + sparse_hash_set > myset; + myset.emplace ("NCC-1701", "J.T. Kirk"); + } + + movable_emplace_test(10, 50); +} +#endif + + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) +TEST(HashtableTest, IncompleteTypes) +{ + int i; + sparse_hash_map ht2; + ht2[&i] = 3; + + struct Bogus; + sparse_hash_map ht3; + ht3[(Bogus *)0] = 8; +} +#endif + + +#if !defined(SPP_NO_CXX11_VARIADIC_TEMPLATES) +TEST(HashtableTest, ReferenceWrapper) +{ + sparse_hash_map> x; + int a = 5; + x.insert(std::make_pair(3, std::ref(a))); + EXPECT_EQ(x.at(3), 5); +} +#endif + +#if !defined(SPP_NO_CXX11_RVALUE_REFERENCES) +class CNonCopyable +{ +public: + CNonCopyable(CNonCopyable const &) = delete; + const CNonCopyable& operator=(CNonCopyable const &) = delete; + CNonCopyable() = default; +}; + + +struct Probe : CNonCopyable +{ + Probe() {} + Probe(Probe &&) {} + void operator=(Probe &&) {} + +private: + Probe(const Probe &); + Probe& operator=(const Probe &); +}; + +TEST(HashtableTest, NonCopyable) +{ + typedef spp::sparse_hash_map THashMap; + THashMap probes; + + probes.insert(THashMap::value_type(27, Probe())); + EXPECT_EQ(probes.begin()->first, 27); +} + +#endif + + +TEST(HashtableTest, ModifyViaIterator) +{ + // This only works for hash-maps, since only they have non-const values. + { + sparse_hash_map ht; + ht[1] = 2; + sparse_hash_map::iterator it = ht.find(1); + EXPECT_TRUE(it != ht.end()); + EXPECT_EQ(1, it->first); + EXPECT_EQ(2, it->second); + it->second = 5; + it = ht.find(1); + EXPECT_TRUE(it != ht.end()); + EXPECT_EQ(5, it->second); + } +} + +TYPED_TEST(HashtableAllTest, ConstIterators) +{ + this->ht_.insert(this->UniqueObject(1)); + typename TypeParam::const_iterator it = this->ht_.begin(); + EXPECT_TRUE(it != (typename TypeParam::const_iterator)this->ht_.end()); + ++it; + EXPECT_TRUE(it == (typename TypeParam::const_iterator)this->ht_.end()); +} + +TYPED_TEST(HashtableAllTest, LocalIterators) +{ + // Now, tr1 begin/end (the local iterator that takes a bucket-number). + // ht::bucket() returns the bucket that this key would be inserted in. + this->ht_.insert(this->UniqueObject(1)); + const typename TypeParam::size_type bucknum = + this->ht_.bucket(this->UniqueKey(1)); + typename TypeParam::local_iterator b = this->ht_.begin(bucknum); + typename TypeParam::local_iterator e = this->ht_.end(bucknum); + EXPECT_TRUE(b != e); + b++; + EXPECT_TRUE(b == e); + + // Check an empty bucket. We can just xor the bottom bit and be sure + // of getting a legal bucket, since #buckets is always a power of 2. + EXPECT_TRUE(this->ht_.begin(bucknum ^ 1) == this->ht_.end(bucknum ^ 1)); + // Another test, this time making sure we're using the right types. + typename TypeParam::local_iterator b2 = this->ht_.begin(bucknum ^ 1); + typename TypeParam::local_iterator e2 = this->ht_.end(bucknum ^ 1); + EXPECT_TRUE(b2 == e2); +} + +TYPED_TEST(HashtableAllTest, ConstLocalIterators) +{ + this->ht_.insert(this->UniqueObject(1)); + const typename TypeParam::size_type bucknum = + this->ht_.bucket(this->UniqueKey(1)); + typename TypeParam::const_local_iterator b = this->ht_.begin(bucknum); + typename TypeParam::const_local_iterator e = this->ht_.end(bucknum); + EXPECT_TRUE(b != e); + b++; + EXPECT_TRUE(b == e); + typename TypeParam::const_local_iterator b2 = this->ht_.begin(bucknum ^ 1); + typename TypeParam::const_local_iterator e2 = this->ht_.end(bucknum ^ 1); + EXPECT_TRUE(b2 == e2); +} + +TYPED_TEST(HashtableAllTest, Iterating) +{ + // Test a bit more iterating than just one ++. + this->ht_.insert(this->UniqueObject(1)); + this->ht_.insert(this->UniqueObject(11)); + this->ht_.insert(this->UniqueObject(111)); + this->ht_.insert(this->UniqueObject(1111)); + this->ht_.insert(this->UniqueObject(11111)); + this->ht_.insert(this->UniqueObject(111111)); + this->ht_.insert(this->UniqueObject(1111111)); + this->ht_.insert(this->UniqueObject(11111111)); + this->ht_.insert(this->UniqueObject(111111111)); + typename TypeParam::iterator it = this->ht_.begin(); + for (int i = 1; i <= 9; i++) { // start at 1 so i is never 0 + // && here makes it easier to tell what loop iteration the test failed on. + EXPECT_TRUE(i && (it++ != this->ht_.end())); + } + EXPECT_TRUE(it == this->ht_.end()); +} + +TYPED_TEST(HashtableIntTest, Constructors) +{ + // The key/value types don't matter here, so I just test on one set + // of tables, the ones with int keys, which can easily handle the + // placement-news we have to do below. + Hasher hasher(1); // 1 is a unique id + int alloc_count = 0; + Alloc alloc(2, &alloc_count); + + TypeParam ht_noarg; + TypeParam ht_onearg(100); + TypeParam ht_twoarg(100, hasher); + TypeParam ht_threearg(100, hasher, hasher); // hasher serves as key_equal too + TypeParam ht_fourarg(100, hasher, hasher, alloc); + + // The allocator should have been called at most once, for the last ht. + EXPECT_GE(1, alloc_count); + int old_alloc_count = alloc_count; + + const typename TypeParam::value_type input[] = { + this->UniqueObject(1), + this->UniqueObject(2), + this->UniqueObject(4), + this->UniqueObject(8) + }; + const int num_inputs = sizeof(input) / sizeof(input[0]); + const typename TypeParam::value_type *begin = &input[0]; + const typename TypeParam::value_type *end = begin + num_inputs; + TypeParam ht_iter_noarg(begin, end); + TypeParam ht_iter_onearg(begin, end, 100); + TypeParam ht_iter_twoarg(begin, end, 100, hasher); + TypeParam ht_iter_threearg(begin, end, 100, hasher, hasher); + TypeParam ht_iter_fourarg(begin, end, 100, hasher, hasher, alloc); + // Now the allocator should have been called more. + EXPECT_GT(alloc_count, old_alloc_count); + old_alloc_count = alloc_count; + + // Let's do a lot more inserting and make sure the alloc-count goes up + for (int i = 2; i < 2000; i++) + ht_fourarg.insert(this->UniqueObject(i)); + EXPECT_GT(alloc_count, old_alloc_count); + + EXPECT_LT(ht_noarg.bucket_count(), 100u); + EXPECT_GE(ht_onearg.bucket_count(), 100u); + EXPECT_GE(ht_twoarg.bucket_count(), 100u); + EXPECT_GE(ht_threearg.bucket_count(), 100u); + EXPECT_GE(ht_fourarg.bucket_count(), 100u); + EXPECT_GE(ht_iter_onearg.bucket_count(), 100u); + + // When we pass in a hasher -- it can serve both as the hash-function + // and the key-equal function -- its id should be 1. Where we don't + // pass it in and use the default Hasher object, the id should be 0. + EXPECT_EQ(0, ht_noarg.hash_funct().id()); + EXPECT_EQ(0, ht_noarg.key_eq().id()); + EXPECT_EQ(0, ht_onearg.hash_funct().id()); + EXPECT_EQ(0, ht_onearg.key_eq().id()); + EXPECT_EQ(1, ht_twoarg.hash_funct().id()); + EXPECT_EQ(0, ht_twoarg.key_eq().id()); + EXPECT_EQ(1, ht_threearg.hash_funct().id()); + EXPECT_EQ(1, ht_threearg.key_eq().id()); + + EXPECT_EQ(0, ht_iter_noarg.hash_funct().id()); + EXPECT_EQ(0, ht_iter_noarg.key_eq().id()); + EXPECT_EQ(0, ht_iter_onearg.hash_funct().id()); + EXPECT_EQ(0, ht_iter_onearg.key_eq().id()); + EXPECT_EQ(1, ht_iter_twoarg.hash_funct().id()); + EXPECT_EQ(0, ht_iter_twoarg.key_eq().id()); + EXPECT_EQ(1, ht_iter_threearg.hash_funct().id()); + EXPECT_EQ(1, ht_iter_threearg.key_eq().id()); + + // Likewise for the allocator + EXPECT_EQ(0, ht_threearg.get_allocator().id()); + EXPECT_EQ(0, ht_iter_threearg.get_allocator().id()); + EXPECT_EQ(2, ht_fourarg.get_allocator().id()); + EXPECT_EQ(2, ht_iter_fourarg.get_allocator().id()); +} + +TYPED_TEST(HashtableAllTest, OperatorEquals) +{ + { + TypeParam ht1, ht2; + ht1.set_deleted_key(this->UniqueKey(1)); + ht2.set_deleted_key(this->UniqueKey(2)); + + ht1.insert(this->UniqueObject(10)); + ht2.insert(this->UniqueObject(20)); + EXPECT_FALSE(ht1 == ht2); + ht1 = ht2; + EXPECT_TRUE(ht1 == ht2); + } + { + TypeParam ht1, ht2; + ht1.insert(this->UniqueObject(30)); + ht1 = ht2; + EXPECT_EQ(0u, ht1.size()); + } + { + TypeParam ht1, ht2; + ht1.set_deleted_key(this->UniqueKey(1)); + ht2.insert(this->UniqueObject(1)); // has same key as ht1.delkey + ht1 = ht2; // should reset deleted-key to 'unset' + EXPECT_EQ(1u, ht1.size()); + EXPECT_EQ(1u, ht1.count(this->UniqueKey(1))); + } +} + +TYPED_TEST(HashtableAllTest, Clear) +{ + for (int i = 1; i < 200; i++) { + this->ht_.insert(this->UniqueObject(i)); + } + this->ht_.clear(); + EXPECT_EQ(0u, this->ht_.size()); + // TODO(csilvers): do we want to enforce that the hashtable has or + // has not shrunk? It does for dense_* but not sparse_*. +} + +TYPED_TEST(HashtableAllTest, ClearNoResize) +{ + if (!this->ht_.supports_clear_no_resize()) + return; + typename TypeParam::size_type empty_bucket_count = this->ht_.bucket_count(); + int last_element = 1; + while (this->ht_.bucket_count() == empty_bucket_count) { + this->ht_.insert(this->UniqueObject(last_element)); + ++last_element; + } + typename TypeParam::size_type last_bucket_count = this->ht_.bucket_count(); + this->ht_.clear_no_resize(); + EXPECT_EQ(last_bucket_count, this->ht_.bucket_count()); + EXPECT_TRUE(this->ht_.empty()); + + // When inserting the same number of elements again, no resize + // should be necessary. + for (int i = 1; i < last_element; ++i) { + this->ht_.insert(this->UniqueObject(last_element + i)); + EXPECT_EQ(last_bucket_count, this->ht_.bucket_count()); + } +} + +TYPED_TEST(HashtableAllTest, Swap) +{ + // Let's make a second hashtable with its own hasher, key_equal, etc. + Hasher hasher(1); // 1 is a unique id + TypeParam other_ht(200, hasher, hasher); + + this->ht_.set_deleted_key(this->UniqueKey(1)); + other_ht.set_deleted_key(this->UniqueKey(2)); + + for (int i = 3; i < 2000; i++) { + this->ht_.insert(this->UniqueObject(i)); + } + this->ht_.erase(this->UniqueKey(1000)); + other_ht.insert(this->UniqueObject(2001)); + typename TypeParam::size_type expected_buckets = other_ht.bucket_count(); + + this->ht_.swap(other_ht); + + EXPECT_EQ(1, this->ht_.hash_funct().id()); + EXPECT_EQ(0, other_ht.hash_funct().id()); + + EXPECT_EQ(1, this->ht_.key_eq().id()); + EXPECT_EQ(0, other_ht.key_eq().id()); + + EXPECT_EQ(expected_buckets, this->ht_.bucket_count()); + EXPECT_GT(other_ht.bucket_count(), 200u); + + EXPECT_EQ(1u, this->ht_.size()); + EXPECT_EQ(1996u, other_ht.size()); // because we erased 1000 + + EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(111))); + EXPECT_EQ(1u, other_ht.count(this->UniqueKey(111))); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(2001))); + EXPECT_EQ(0u, other_ht.count(this->UniqueKey(2001))); + EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(1000))); + EXPECT_EQ(0u, other_ht.count(this->UniqueKey(1000))); + + // We purposefully don't swap allocs -- they're not necessarily swappable. + + // Now swap back, using the free-function swap + // NOTE: MSVC seems to have trouble with this free swap, not quite + // sure why. I've given up trying to fix it though. +#ifdef _MSC_VER + other_ht.swap(this->ht_); +#else + std::swap(this->ht_, other_ht); +#endif + + EXPECT_EQ(0, this->ht_.hash_funct().id()); + EXPECT_EQ(1, other_ht.hash_funct().id()); + EXPECT_EQ(1996u, this->ht_.size()); + EXPECT_EQ(1u, other_ht.size()); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(111))); + EXPECT_EQ(0u, other_ht.count(this->UniqueKey(111))); + + // A user reported a crash with this code using swap to clear. + // We've since fixed the bug; this prevents a regression. + TypeParam swap_to_clear_ht; + swap_to_clear_ht.set_deleted_key(this->UniqueKey(1)); + for (int i = 2; i < 10000; ++i) { + swap_to_clear_ht.insert(this->UniqueObject(i)); + } + TypeParam empty_ht; + empty_ht.swap(swap_to_clear_ht); + swap_to_clear_ht.set_deleted_key(this->UniqueKey(1)); + for (int i = 2; i < 10000; ++i) { + swap_to_clear_ht.insert(this->UniqueObject(i)); + } +} + +TYPED_TEST(HashtableAllTest, Size) +{ + EXPECT_EQ(0u, this->ht_.size()); + for (int i = 1; i < 1000; i++) { // go through some resizes + this->ht_.insert(this->UniqueObject(i)); + EXPECT_EQ(static_cast(i), this->ht_.size()); + } + this->ht_.clear(); + EXPECT_EQ(0u, this->ht_.size()); + + this->ht_.set_deleted_key(this->UniqueKey(1)); + EXPECT_EQ(0u, this->ht_.size()); // deleted key doesn't count + for (int i = 2; i < 1000; i++) { // go through some resizes + this->ht_.insert(this->UniqueObject(i)); + this->ht_.erase(this->UniqueKey(i)); + EXPECT_EQ(0u, this->ht_.size()); + } +} + +TEST(HashtableTest, MaxSizeAndMaxBucketCount) +{ + // The max size depends on the allocator. So we can't use the + // built-in allocator type; instead, we make our own types. + sparse_hash_set > ht_default; + sparse_hash_set > ht_char; + sparse_hash_set > ht_104; + + EXPECT_GE(ht_default.max_size(), 256u); + EXPECT_EQ(255u, ht_char.max_size()); + EXPECT_EQ(104u, ht_104.max_size()); + + // In our implementations, MaxBucketCount == MaxSize. + EXPECT_EQ(ht_default.max_size(), ht_default.max_bucket_count()); + EXPECT_EQ(ht_char.max_size(), ht_char.max_bucket_count()); + EXPECT_EQ(ht_104.max_size(), ht_104.max_bucket_count()); +} + +TYPED_TEST(HashtableAllTest, Empty) +{ + EXPECT_TRUE(this->ht_.empty()); + + this->ht_.insert(this->UniqueObject(1)); + EXPECT_FALSE(this->ht_.empty()); + + this->ht_.clear(); + EXPECT_TRUE(this->ht_.empty()); + + TypeParam empty_ht; + this->ht_.insert(this->UniqueObject(1)); + this->ht_.swap(empty_ht); + EXPECT_TRUE(this->ht_.empty()); +} + +TYPED_TEST(HashtableAllTest, BucketCount) +{ + TypeParam ht(100); + // constructor arg is number of *items* to be inserted, not the + // number of buckets, so we expect more buckets. + EXPECT_GT(ht.bucket_count(), 100u); + for (int i = 1; i < 200; i++) { + ht.insert(this->UniqueObject(i)); + } + EXPECT_GT(ht.bucket_count(), 200u); +} + +TYPED_TEST(HashtableAllTest, BucketAndBucketSize) +{ + const typename TypeParam::size_type expected_bucknum = this->ht_.bucket( + this->UniqueKey(1)); + EXPECT_EQ(0u, this->ht_.bucket_size(expected_bucknum)); + + this->ht_.insert(this->UniqueObject(1)); + EXPECT_EQ(expected_bucknum, this->ht_.bucket(this->UniqueKey(1))); + EXPECT_EQ(1u, this->ht_.bucket_size(expected_bucknum)); + + // Check that a bucket we didn't insert into, has a 0 size. Since + // we have an even number of buckets, bucknum^1 is guaranteed in range. + EXPECT_EQ(0u, this->ht_.bucket_size(expected_bucknum ^ 1)); +} + +TYPED_TEST(HashtableAllTest, LoadFactor) +{ + const typename TypeParam::size_type kSize = 16536; + // Check growing past various thresholds and then shrinking below + // them. + for (float grow_threshold = 0.2f; + grow_threshold <= 0.8f; + grow_threshold += 0.2f) + { + TypeParam ht; + ht.set_deleted_key(this->UniqueKey(1)); + ht.max_load_factor(grow_threshold); + ht.min_load_factor(0.0); + EXPECT_EQ(grow_threshold, ht.max_load_factor()); + EXPECT_EQ(0.0, ht.min_load_factor()); + + ht.resize(kSize); + size_t bucket_count = ht.bucket_count(); + // Erase and insert an element to set consider_shrink = true, + // which should not cause a shrink because the threshold is 0.0. + ht.insert(this->UniqueObject(2)); + ht.erase(this->UniqueKey(2)); + for (int i = 2;; ++i) + { + ht.insert(this->UniqueObject(i)); + if (static_cast(ht.size())/bucket_count < grow_threshold) { + EXPECT_EQ(bucket_count, ht.bucket_count()); + } else { + EXPECT_GT(ht.bucket_count(), bucket_count); + break; + } + } + // Now set a shrink threshold 1% below the current size and remove + // items until the size falls below that. + const float shrink_threshold = static_cast(ht.size()) / + ht.bucket_count() - 0.01f; + + // This time around, check the old set_resizing_parameters interface. + ht.set_resizing_parameters(shrink_threshold, 1.0); + EXPECT_EQ(1.0, ht.max_load_factor()); + EXPECT_EQ(shrink_threshold, ht.min_load_factor()); + + bucket_count = ht.bucket_count(); + for (int i = 2;; ++i) + { + ht.erase(this->UniqueKey(i)); + // A resize is only triggered by an insert, so add and remove a + // value every iteration to trigger the shrink as soon as the + // threshold is passed. + ht.erase(this->UniqueKey(i+1)); + ht.insert(this->UniqueObject(i+1)); + if (static_cast(ht.size())/bucket_count > shrink_threshold) { + EXPECT_EQ(bucket_count, ht.bucket_count()); + } else { + EXPECT_LT(ht.bucket_count(), bucket_count); + break; + } + } + } +} + +TYPED_TEST(HashtableAllTest, ResizeAndRehash) +{ + // resize() and rehash() are synonyms. rehash() is the tr1 name. + TypeParam ht(10000); + ht.max_load_factor(0.8f); // for consistency's sake + + for (int i = 1; i < 100; ++i) + ht.insert(this->UniqueObject(i)); + ht.resize(0); + // Now ht should be as small as possible. + EXPECT_LT(ht.bucket_count(), 300u); + + ht.rehash(9000); // use the 'rehash' version of the name. + // Bucket count should be next power of 2, after considering max_load_factor. + EXPECT_EQ(16384u, ht.bucket_count()); + for (int i = 101; i < 200; ++i) + ht.insert(this->UniqueObject(i)); + // Adding a few hundred buckets shouldn't have caused a resize yet. + EXPECT_EQ(ht.bucket_count(), 16384u); +} + +TYPED_TEST(HashtableAllTest, FindAndCountAndEqualRange) +{ + pair eq_pair; + pair const_eq_pair; + + EXPECT_TRUE(this->ht_.empty()); + EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) == this->ht_.end()); + EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(1))); + eq_pair = this->ht_.equal_range(this->UniqueKey(1)); + EXPECT_TRUE(eq_pair.first == eq_pair.second); + + this->ht_.insert(this->UniqueObject(1)); + EXPECT_FALSE(this->ht_.empty()); + this->ht_.insert(this->UniqueObject(11)); + this->ht_.insert(this->UniqueObject(111)); + this->ht_.insert(this->UniqueObject(1111)); + this->ht_.insert(this->UniqueObject(11111)); + this->ht_.insert(this->UniqueObject(111111)); + this->ht_.insert(this->UniqueObject(1111111)); + this->ht_.insert(this->UniqueObject(11111111)); + this->ht_.insert(this->UniqueObject(111111111)); + EXPECT_EQ(9u, this->ht_.size()); + typename TypeParam::const_iterator it = this->ht_.find(this->UniqueKey(1)); + EXPECT_EQ(it.key(), this->UniqueKey(1)); + + // Allow testing the const version of the methods as well. + const TypeParam ht = this->ht_; + + // Some successful lookups (via find, count, and equal_range). + EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) != this->ht_.end()); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1))); + eq_pair = this->ht_.equal_range(this->UniqueKey(1)); + EXPECT_TRUE(eq_pair.first != eq_pair.second); + EXPECT_EQ(eq_pair.first.key(), this->UniqueKey(1)); + ++eq_pair.first; + EXPECT_TRUE(eq_pair.first == eq_pair.second); + + EXPECT_TRUE(ht.find(this->UniqueKey(1)) != ht.end()); + EXPECT_EQ(1u, ht.count(this->UniqueKey(1))); + const_eq_pair = ht.equal_range(this->UniqueKey(1)); + EXPECT_TRUE(const_eq_pair.first != const_eq_pair.second); + EXPECT_EQ(const_eq_pair.first.key(), this->UniqueKey(1)); + ++const_eq_pair.first; + EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); + + EXPECT_TRUE(this->ht_.find(this->UniqueKey(11111)) != this->ht_.end()); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(11111))); + eq_pair = this->ht_.equal_range(this->UniqueKey(11111)); + EXPECT_TRUE(eq_pair.first != eq_pair.second); + EXPECT_EQ(eq_pair.first.key(), this->UniqueKey(11111)); + ++eq_pair.first; + EXPECT_TRUE(eq_pair.first == eq_pair.second); + + EXPECT_TRUE(ht.find(this->UniqueKey(11111)) != ht.end()); + EXPECT_EQ(1u, ht.count(this->UniqueKey(11111))); + const_eq_pair = ht.equal_range(this->UniqueKey(11111)); + EXPECT_TRUE(const_eq_pair.first != const_eq_pair.second); + EXPECT_EQ(const_eq_pair.first.key(), this->UniqueKey(11111)); + ++const_eq_pair.first; + EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); + + // Some unsuccessful lookups (via find, count, and equal_range). + EXPECT_TRUE(this->ht_.find(this->UniqueKey(11112)) == this->ht_.end()); + EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(11112))); + eq_pair = this->ht_.equal_range(this->UniqueKey(11112)); + EXPECT_TRUE(eq_pair.first == eq_pair.second); + + EXPECT_TRUE(ht.find(this->UniqueKey(11112)) == ht.end()); + EXPECT_EQ(0u, ht.count(this->UniqueKey(11112))); + const_eq_pair = ht.equal_range(this->UniqueKey(11112)); + EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); + + EXPECT_TRUE(this->ht_.find(this->UniqueKey(11110)) == this->ht_.end()); + EXPECT_EQ(0u, this->ht_.count(this->UniqueKey(11110))); + eq_pair = this->ht_.equal_range(this->UniqueKey(11110)); + EXPECT_TRUE(eq_pair.first == eq_pair.second); + + EXPECT_TRUE(ht.find(this->UniqueKey(11110)) == ht.end()); + EXPECT_EQ(0u, ht.count(this->UniqueKey(11110))); + const_eq_pair = ht.equal_range(this->UniqueKey(11110)); + EXPECT_TRUE(const_eq_pair.first == const_eq_pair.second); +} + +TYPED_TEST(HashtableAllTest, BracketInsert) +{ + // tests operator[], for those types that support it. + if (!this->ht_.supports_brackets()) + return; + + // bracket_equal is equivalent to ht_[a] == b. It should insert a if + // it doesn't already exist. + EXPECT_TRUE(this->ht_.bracket_equal(this->UniqueKey(1), + this->ht_.default_data())); + EXPECT_TRUE(this->ht_.find(this->UniqueKey(1)) != this->ht_.end()); + + // bracket_assign is equivalent to ht_[a] = b. + this->ht_.bracket_assign(this->UniqueKey(2), + this->ht_.get_data(this->UniqueObject(4))); + EXPECT_TRUE(this->ht_.find(this->UniqueKey(2)) != this->ht_.end()); + EXPECT_TRUE(this->ht_.bracket_equal( + this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(4)))); + + this->ht_.bracket_assign( + this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6))); + EXPECT_TRUE(this->ht_.bracket_equal( + this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6)))); + // bracket_equal shouldn't have modified the value. + EXPECT_TRUE(this->ht_.bracket_equal( + this->UniqueKey(2), this->ht_.get_data(this->UniqueObject(6)))); + + // Verify that an operator[] that doesn't cause a resize, also + // doesn't require an extra rehash. + TypeParam ht(100); + EXPECT_EQ(0, ht.hash_funct().num_hashes()); + ht.bracket_assign(this->UniqueKey(2), ht.get_data(this->UniqueObject(2))); + EXPECT_EQ(1, ht.hash_funct().num_hashes()); + + // And overwriting, likewise, should only cause one extra hash. + ht.bracket_assign(this->UniqueKey(2), ht.get_data(this->UniqueObject(2))); + EXPECT_EQ(2, ht.hash_funct().num_hashes()); +} + + +TYPED_TEST(HashtableAllTest, InsertValue) +{ + // First, try some straightforward insertions. + EXPECT_TRUE(this->ht_.empty()); + this->ht_.insert(this->UniqueObject(1)); + EXPECT_FALSE(this->ht_.empty()); + this->ht_.insert(this->UniqueObject(11)); + this->ht_.insert(this->UniqueObject(111)); + this->ht_.insert(this->UniqueObject(1111)); + this->ht_.insert(this->UniqueObject(11111)); + this->ht_.insert(this->UniqueObject(111111)); + this->ht_.insert(this->UniqueObject(1111111)); + this->ht_.insert(this->UniqueObject(11111111)); + this->ht_.insert(this->UniqueObject(111111111)); + EXPECT_EQ(9u, this->ht_.size()); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1))); + EXPECT_EQ(1u, this->ht_.count(this->UniqueKey(1111))); + + // Check the return type. + pair insert_it; + insert_it = this->ht_.insert(this->UniqueObject(1)); + EXPECT_EQ(false, insert_it.second); // false: already present + EXPECT_TRUE(*insert_it.first == this->UniqueObject(1)); + + insert_it = this->ht_.insert(this->UniqueObject(2)); + EXPECT_EQ(true, insert_it.second); // true: not already present + EXPECT_TRUE(*insert_it.first == this->UniqueObject(2)); +} + +TYPED_TEST(HashtableIntTest, InsertRange) +{ + // We just test the ints here, to make the placement-new easier. + TypeParam ht_source; + ht_source.insert(this->UniqueObject(10)); + ht_source.insert(this->UniqueObject(100)); + ht_source.insert(this->UniqueObject(1000)); + ht_source.insert(this->UniqueObject(10000)); + ht_source.insert(this->UniqueObject(100000)); + ht_source.insert(this->UniqueObject(1000000)); + + const typename TypeParam::value_type input[] = { + // This is a copy of the first element in ht_source. + *ht_source.begin(), + this->UniqueObject(2), + this->UniqueObject(4), + this->UniqueObject(8) + }; + + set set_input; + set_input.insert(this->UniqueObject(1111111)); + set_input.insert(this->UniqueObject(111111)); + set_input.insert(this->UniqueObject(11111)); + set_input.insert(this->UniqueObject(1111)); + set_input.insert(this->UniqueObject(111)); + set_input.insert(this->UniqueObject(11)); + + // Insert from ht_source, an iterator of the same type as us. + typename TypeParam::const_iterator begin = ht_source.begin(); + typename TypeParam::const_iterator end = begin; + std::advance(end, 3); + this->ht_.insert(begin, end); // insert 3 elements from ht_source + EXPECT_EQ(3u, this->ht_.size()); + EXPECT_TRUE(*this->ht_.begin() == this->UniqueObject(10) || + *this->ht_.begin() == this->UniqueObject(100) || + *this->ht_.begin() == this->UniqueObject(1000) || + *this->ht_.begin() == this->UniqueObject(10000) || + *this->ht_.begin() == this->UniqueObject(100000) || + *this->ht_.begin() == this->UniqueObject(1000000)); + + // And insert from set_input, a separate, non-random-access iterator. + typename set::const_iterator set_begin; + typename set::const_iterator set_end; + set_begin = set_input.begin(); + set_end = set_begin; + std::advance(set_end, 3); + this->ht_.insert(set_begin, set_end); + EXPECT_EQ(6u, this->ht_.size()); + + // Insert from input as well, a separate, random-access iterator. + // The first element of input overlaps with an existing element + // of ht_, so this should only up the size by 2. + this->ht_.insert(&input[0], &input[3]); + EXPECT_EQ(8u, this->ht_.size()); +} + +TEST(HashtableTest, InsertValueToMap) +{ + // For the maps in particular, ensure that inserting doesn't change + // the value. + sparse_hash_map shm; + pair::iterator, bool> shm_it; + shm[1] = 2; // test a different method of inserting + shm_it = shm.insert(pair(1, 3)); + EXPECT_EQ(false, shm_it.second); + EXPECT_EQ(1, shm_it.first->first); + EXPECT_EQ(2, shm_it.first->second); + shm_it.first->second = 20; + EXPECT_EQ(20, shm[1]); + + shm_it = shm.insert(pair(2, 4)); + EXPECT_EQ(true, shm_it.second); + EXPECT_EQ(2, shm_it.first->first); + EXPECT_EQ(4, shm_it.first->second); + EXPECT_EQ(4, shm[2]); +} + +TYPED_TEST(HashtableStringTest, EmptyKey) +{ + // Only run the string tests, to make it easier to know what the + // empty key should be. + if (!this->ht_.supports_empty_key()) + return; + EXPECT_EQ(kEmptyString, this->ht_.empty_key()); +} + +TYPED_TEST(HashtableAllTest, Erase) +{ + this->ht_.set_deleted_key(this->UniqueKey(1)); + EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(20))); + this->ht_.insert(this->UniqueObject(10)); + this->ht_.insert(this->UniqueObject(20)); + EXPECT_EQ(1u, this->ht_.erase(this->UniqueKey(20))); + EXPECT_EQ(1u, this->ht_.size()); + EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(20))); + EXPECT_EQ(1u, this->ht_.size()); + EXPECT_EQ(0u, this->ht_.erase(this->UniqueKey(19))); + EXPECT_EQ(1u, this->ht_.size()); + + typename TypeParam::iterator it = this->ht_.find(this->UniqueKey(10)); + EXPECT_TRUE(it != this->ht_.end()); + this->ht_.erase(it); + EXPECT_EQ(0u, this->ht_.size()); + + for (int i = 10; i < 100; i++) + this->ht_.insert(this->UniqueObject(i)); + EXPECT_EQ(90u, this->ht_.size()); + this->ht_.erase(this->ht_.begin(), this->ht_.end()); + EXPECT_EQ(0u, this->ht_.size()); +} + +TYPED_TEST(HashtableAllTest, EraseDoesNotResize) +{ + this->ht_.set_deleted_key(this->UniqueKey(1)); + for (int i = 10; i < 2000; i++) { + this->ht_.insert(this->UniqueObject(i)); + } + const typename TypeParam::size_type old_count = this->ht_.bucket_count(); + for (int i = 10; i < 1000; i++) { // erase half one at a time + EXPECT_EQ(1u, this->ht_.erase(this->UniqueKey(i))); + } + this->ht_.erase(this->ht_.begin(), this->ht_.end()); // and the rest at once + EXPECT_EQ(0u, this->ht_.size()); + EXPECT_EQ(old_count, this->ht_.bucket_count()); +} + +TYPED_TEST(HashtableAllTest, Equals) +{ + // The real test here is whether two hashtables are equal if they + // have the same items but in a different order. + TypeParam ht1; + TypeParam ht2; + + EXPECT_TRUE(ht1 == ht1); + EXPECT_FALSE(ht1 != ht1); + EXPECT_TRUE(ht1 == ht2); + EXPECT_FALSE(ht1 != ht2); + ht1.set_deleted_key(this->UniqueKey(1)); + // Only the contents affect equality, not things like deleted-key. + EXPECT_TRUE(ht1 == ht2); + EXPECT_FALSE(ht1 != ht2); + ht1.resize(2000); + EXPECT_TRUE(ht1 == ht2); + + // The choice of allocator/etc doesn't matter either. + Hasher hasher(1); + Alloc alloc(2, NULL); + TypeParam ht3(5, hasher, hasher, alloc); + EXPECT_TRUE(ht1 == ht3); + EXPECT_FALSE(ht1 != ht3); + + ht1.insert(this->UniqueObject(2)); + EXPECT_TRUE(ht1 != ht2); + EXPECT_FALSE(ht1 == ht2); // this should hold as well! + + ht2.insert(this->UniqueObject(2)); + EXPECT_TRUE(ht1 == ht2); + + for (int i = 3; i <= 2000; i++) { + ht1.insert(this->UniqueObject(i)); + } + for (int i = 2000; i >= 3; i--) { + ht2.insert(this->UniqueObject(i)); + } + EXPECT_TRUE(ht1 == ht2); +} + +TEST(HashtableTest, IntIO) +{ + // Since the set case is just a special (easier) case than the map case, I + // just test on sparse_hash_map. This handles the easy case where we can + // use the standard reader and writer. + sparse_hash_map ht_out; + ht_out.set_deleted_key(0); + for (int i = 1; i < 1000; i++) { + ht_out[i] = i * i; + } + ht_out.erase(563); // just to test having some erased keys when we write. + ht_out.erase(22); + + string file(TmpFile("intio")); + FILE* fp = fopen(file.c_str(), "wb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_out.write_metadata(fp)); + EXPECT_TRUE(ht_out.write_nopointer_data(fp)); + fclose(fp); + } + + sparse_hash_map ht_in; + fp = fopen(file.c_str(), "rb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_in.read_metadata(fp)); + EXPECT_TRUE(ht_in.read_nopointer_data(fp)); + fclose(fp); + } + + EXPECT_EQ(1, ht_in[1]); + EXPECT_EQ(998001, ht_in[999]); + EXPECT_EQ(100, ht_in[10]); + EXPECT_EQ(441, ht_in[21]); + EXPECT_EQ(0, ht_in[22]); // should not have been saved + EXPECT_EQ(0, ht_in[563]); +} + +TEST(HashtableTest, StringIO) +{ + // Since the set case is just a special (easier) case than the map case, + // I just test on sparse_hash_map. This handles the difficult case where + // we have to write our own custom reader/writer for the data. + typedef sparse_hash_map SP; + SP ht_out; + ht_out.set_deleted_key(string("")); + + for (int i = 32; i < 128; i++) { + // This maps 'a' to 32 a's, 'b' to 33 b's, etc. + ht_out[string(1, (char)i)] = string((size_t)i, (char)i); + } + ht_out.erase("c"); // just to test having some erased keys when we write. + ht_out.erase("y"); + + string file(TmpFile("stringio")); + FILE* fp = fopen(file.c_str(), "wb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_out.write_metadata(fp)); + + for (SP::const_iterator it = ht_out.cbegin(); it != ht_out.cend(); ++it) + { + const string::size_type first_size = it->first.length(); + fwrite(&first_size, sizeof(first_size), 1, fp); // ignore endianness issues + fwrite(it->first.c_str(), first_size, 1, fp); + + const string::size_type second_size = it->second.length(); + fwrite(&second_size, sizeof(second_size), 1, fp); + fwrite(it->second.c_str(), second_size, 1, fp); + } + fclose(fp); + } + + sparse_hash_map ht_in; + fp = fopen(file.c_str(), "rb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_in.read_metadata(fp)); + for (sparse_hash_map::iterator + it = ht_in.begin(); it != ht_in.end(); ++it) { + string::size_type first_size; + EXPECT_EQ(1u, fread(&first_size, sizeof(first_size), 1, fp)); + char* first = new char[first_size]; + EXPECT_EQ(1u, fread(first, first_size, 1, fp)); + + string::size_type second_size; + EXPECT_EQ(1u, fread(&second_size, sizeof(second_size), 1, fp)); + char* second = new char[second_size]; + EXPECT_EQ(1u, fread(second, second_size, 1, fp)); + + // it points to garbage, so we have to use placement-new to initialize. + // We also have to use const-cast since it->first is const. + new(const_cast(&it->first)) string(first, first_size); + new(&it->second) string(second, second_size); + delete[] first; + delete[] second; + } + fclose(fp); + } + EXPECT_EQ(string(" "), ht_in[" "]); + EXPECT_EQ(string("+++++++++++++++++++++++++++++++++++++++++++"), ht_in["+"]); + EXPECT_EQ(string(""), ht_in["c"]); // should not have been saved + EXPECT_EQ(string(""), ht_in["y"]); +} + +TYPED_TEST(HashtableAllTest, Serialization) +{ + if (!this->ht_.supports_serialization()) return; + TypeParam ht_out; + ht_out.set_deleted_key(this->UniqueKey(2000)); + for (int i = 1; i < 100; i++) { + ht_out.insert(this->UniqueObject(i)); + } + // just to test having some erased keys when we write. + ht_out.erase(this->UniqueKey(56)); + ht_out.erase(this->UniqueKey(22)); + + string file(TmpFile("serialization")); + FILE* fp = fopen(file.c_str(), "wb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_out.serialize(ValueSerializer(), fp)); + fclose(fp); + } + + TypeParam ht_in; + fp = fopen(file.c_str(), "rb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_in.unserialize(ValueSerializer(), fp)); + fclose(fp); + } + + EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); + EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); + EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); + // should not have been saved + EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); +} + +TYPED_TEST(HashtableIntTest, NopointerSerialization) +{ + if (!this->ht_.supports_serialization()) return; + TypeParam ht_out; + ht_out.set_deleted_key(this->UniqueKey(2000)); + for (int i = 1; i < 100; i++) { + ht_out.insert(this->UniqueObject(i)); + } + // just to test having some erased keys when we write. + ht_out.erase(this->UniqueKey(56)); + ht_out.erase(this->UniqueKey(22)); + + string file(TmpFile("nopointer_serialization")); + FILE* fp = fopen(file.c_str(), "wb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), fp)); + fclose(fp); + } + + TypeParam ht_in; + fp = fopen(file.c_str(), "rb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), fp)); + fclose(fp); + } + + EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); + EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); + EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); + // should not have been saved + EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); +} + +// We don't support serializing to a string by default, but you can do +// it by writing your own custom input/output class. +class StringIO { + public: + explicit StringIO(string* s) : s_(s) {} + size_t Write(const void* buf, size_t len) { + s_->append(reinterpret_cast(buf), len); + return len; + } + size_t Read(void* buf, size_t len) { + if (s_->length() < len) + len = s_->length(); + memcpy(reinterpret_cast(buf), s_->data(), len); + s_->erase(0, len); + return len; + } + private: + StringIO& operator=(const StringIO&); + string* const s_; +}; + +TYPED_TEST(HashtableIntTest, SerializingToString) +{ + if (!this->ht_.supports_serialization()) return; + TypeParam ht_out; + ht_out.set_deleted_key(this->UniqueKey(2000)); + for (int i = 1; i < 100; i++) { + ht_out.insert(this->UniqueObject(i)); + } + // just to test having some erased keys when we write. + ht_out.erase(this->UniqueKey(56)); + ht_out.erase(this->UniqueKey(22)); + + string stringbuf; + StringIO stringio(&stringbuf); + EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), + &stringio)); + + TypeParam ht_in; + EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), + &stringio)); + + EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); + EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); + EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); + // should not have been saved + EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); +} + +// An easier way to do the above would be to use the existing stream methods. +TYPED_TEST(HashtableIntTest, SerializingToStringStream) +{ + if (!this->ht_.supports_serialization()) return; + TypeParam ht_out; + ht_out.set_deleted_key(this->UniqueKey(2000)); + for (int i = 1; i < 100; i++) { + ht_out.insert(this->UniqueObject(i)); + } + // just to test having some erased keys when we write. + ht_out.erase(this->UniqueKey(56)); + ht_out.erase(this->UniqueKey(22)); + + std::stringstream string_buffer; + EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), + &string_buffer)); + + TypeParam ht_in; + EXPECT_TRUE(ht_in.unserialize(typename TypeParam::NopointerSerializer(), + &string_buffer)); + + EXPECT_EQ(this->UniqueObject(1), *ht_in.find(this->UniqueKey(1))); + EXPECT_EQ(this->UniqueObject(99), *ht_in.find(this->UniqueKey(99))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(100))); + EXPECT_EQ(this->UniqueObject(21), *ht_in.find(this->UniqueKey(21))); + // should not have been saved + EXPECT_FALSE(ht_in.count(this->UniqueKey(22))); + EXPECT_FALSE(ht_in.count(this->UniqueKey(56))); +} + +// Verify that the metadata serialization is endianness and word size +// agnostic. +TYPED_TEST(HashtableAllTest, MetadataSerializationAndEndianness) +{ + TypeParam ht_out; + string kExpectedDense("\x13W\x86""B\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0", + 24); + + // GP change - switched size from 20 to formula, because the sparsegroup bitmap is 4 or 8 bytes and not 6 + string kExpectedSparse("$hu1\0\0\0 \0\0\0\0\0\0\0\0\0\0\0", 12 + sizeof(group_bm_type)); + + if (ht_out.supports_readwrite()) { + size_t num_bytes = 0; + string file(TmpFile("metadata_serialization")); + FILE* fp = fopen(file.c_str(), "wb"); + if (fp) + { + EXPECT_TRUE(fp != NULL); + + EXPECT_TRUE(ht_out.write_metadata(fp)); + EXPECT_TRUE(ht_out.write_nopointer_data(fp)); + + num_bytes = (const size_t)ftell(fp); + fclose(fp); + } + + char contents[24] = {0}; + fp = fopen(file.c_str(), "rb"); + if (fp) + { + EXPECT_LE(num_bytes, static_cast(24)); + EXPECT_EQ(num_bytes, fread(contents, 1, num_bytes <= 24 ? num_bytes : 24, fp)); + EXPECT_EQ(EOF, fgetc(fp)); // check we're *exactly* the right size + fclose(fp); + } + // TODO(csilvers): check type of ht_out instead of looking at the 1st byte. + if (contents[0] == kExpectedDense[0]) { + EXPECT_EQ(kExpectedDense, string(contents, num_bytes)); + } else { + EXPECT_EQ(kExpectedSparse, string(contents, num_bytes)); + } + } + + // Do it again with new-style serialization. Here we can use StringIO. + if (ht_out.supports_serialization()) { + string stringbuf; + StringIO stringio(&stringbuf); + EXPECT_TRUE(ht_out.serialize(typename TypeParam::NopointerSerializer(), + &stringio)); + if (stringbuf[0] == kExpectedDense[0]) { + EXPECT_EQ(kExpectedDense, stringbuf); + } else { + EXPECT_EQ(kExpectedSparse, stringbuf); + } + } +} + + +// ------------------------------------------------------------------------ +// The above tests test the general API for correctness. These tests +// test a few corner cases that have tripped us up in the past, and +// more general, cross-API issues like memory management. + +TYPED_TEST(HashtableAllTest, BracketOperatorCrashing) +{ + this->ht_.set_deleted_key(this->UniqueKey(1)); + for (int iters = 0; iters < 10; iters++) { + // We start at 33 because after shrinking, we'll be at 32 buckets. + for (int i = 33; i < 133; i++) { + this->ht_.bracket_assign(this->UniqueKey(i), + this->ht_.get_data(this->UniqueObject(i))); + } + this->ht_.clear_no_resize(); + // This will force a shrink on the next insert, which we want to test. + this->ht_.bracket_assign(this->UniqueKey(2), + this->ht_.get_data(this->UniqueObject(2))); + this->ht_.erase(this->UniqueKey(2)); + } +} + +// For data types with trivial copy-constructors and destructors, we +// should use an optimized routine for data-copying, that involves +// memmove. We test this by keeping count of how many times the +// copy-constructor is called; it should be much less with the +// optimized code. +struct Memmove +{ +public: + Memmove(): i(0) {} + explicit Memmove(int ival): i(ival) {} + Memmove(const Memmove& that) { this->i = that.i; num_copies++; } + int i; + static int num_copies; +}; +int Memmove::num_copies = 0; + +struct NoMemmove +{ +public: + NoMemmove(): i(0) {} + explicit NoMemmove(int ival): i(ival) {} + NoMemmove(const NoMemmove& that) { this->i = that.i; num_copies++; } + int i; + static int num_copies; +}; +int NoMemmove::num_copies = 0; + +} // unnamed namespace + +#if 0 +// This is what tells the hashtable code it can use memmove for this class: +namespace google { + +template<> struct has_trivial_copy : true_type { }; +template<> struct has_trivial_destructor : true_type { }; + +}; +#endif + +namespace +{ + +TEST(HashtableTest, SimpleDataTypeOptimizations) +{ + // Only sparsehashtable optimizes moves in this way. + sparse_hash_map memmove; + sparse_hash_map nomemmove; + sparse_hash_map > > + memmove_nonstandard_alloc; + + Memmove::num_copies = 0; + for (int i = 10000; i > 0; i--) { + memmove[i] = Memmove(i); + } + // GP change - const int memmove_copies = Memmove::num_copies; + + NoMemmove::num_copies = 0; + for (int i = 10000; i > 0; i--) { + nomemmove[i] = NoMemmove(i); + } + // GP change - const int nomemmove_copies = NoMemmove::num_copies; + + Memmove::num_copies = 0; + for (int i = 10000; i > 0; i--) { + memmove_nonstandard_alloc[i] = Memmove(i); + } + // GP change - const int memmove_nonstandard_alloc_copies = Memmove::num_copies; + + // GP change - commented out following two lines + //EXPECT_GT(nomemmove_copies, memmove_copies); + //EXPECT_EQ(nomemmove_copies, memmove_nonstandard_alloc_copies); +} + +TYPED_TEST(HashtableAllTest, ResizeHysteresis) +{ + // We want to make sure that when we create a hashtable, and then + // add and delete one element, the size of the hashtable doesn't + // change. + this->ht_.set_deleted_key(this->UniqueKey(1)); + typename TypeParam::size_type old_bucket_count = this->ht_.bucket_count(); + this->ht_.insert(this->UniqueObject(4)); + this->ht_.erase(this->UniqueKey(4)); + this->ht_.insert(this->UniqueObject(4)); + this->ht_.erase(this->UniqueKey(4)); + EXPECT_EQ(old_bucket_count, this->ht_.bucket_count()); + + // Try it again, but with a hashtable that starts very small + TypeParam ht(2); + EXPECT_LT(ht.bucket_count(), 32u); // verify we really do start small + ht.set_deleted_key(this->UniqueKey(1)); + old_bucket_count = ht.bucket_count(); + ht.insert(this->UniqueObject(4)); + ht.erase(this->UniqueKey(4)); + ht.insert(this->UniqueObject(4)); + ht.erase(this->UniqueKey(4)); + EXPECT_EQ(old_bucket_count, ht.bucket_count()); +} + +TEST(HashtableTest, ConstKey) +{ + // Sometimes people write hash_map, even though the + // const isn't necessary. Make sure we handle this cleanly. + sparse_hash_map shm; + shm.set_deleted_key(1); + shm[10] = 20; +} + +TYPED_TEST(HashtableAllTest, ResizeActuallyResizes) +{ + // This tests for a problem we had where we could repeatedly "resize" + // a hashtable to the same size it was before, on every insert. + // ----------------------------------------------------------------- + const typename TypeParam::size_type kSize = 1<<10; // Pick any power of 2 + const float kResize = 0.8f; // anything between 0.5 and 1 is fine. + const int kThreshold = static_cast(kSize * kResize - 1); + this->ht_.set_resizing_parameters(0, kResize); + this->ht_.set_deleted_key(this->UniqueKey(kThreshold + 100)); + + // Get right up to the resizing threshold. + for (int i = 0; i <= kThreshold; i++) { + this->ht_.insert(this->UniqueObject(i+1)); + } + // The bucket count should equal kSize. + EXPECT_EQ(kSize, this->ht_.bucket_count()); + + // Now start doing erase+insert pairs. This should cause us to + // copy the hashtable at most once. + const int pre_copies = this->ht_.num_table_copies(); + for (int i = 0; i < static_cast(kSize); i++) { + this->ht_.erase(this->UniqueKey(kThreshold)); + this->ht_.insert(this->UniqueObject(kThreshold)); + } + EXPECT_LT(this->ht_.num_table_copies(), pre_copies + 2); + + // Now create a hashtable where we go right to the threshold, then + // delete everything and do one insert. Even though our hashtable + // is now tiny, we should still have at least kSize buckets, because + // our shrink threshhold is 0. + // ----------------------------------------------------------------- + TypeParam ht2; + ht2.set_deleted_key(this->UniqueKey(kThreshold + 100)); + ht2.set_resizing_parameters(0, kResize); + EXPECT_LT(ht2.bucket_count(), kSize); + for (int i = 0; i <= kThreshold; i++) { + ht2.insert(this->UniqueObject(i+1)); + } + EXPECT_EQ(ht2.bucket_count(), kSize); + for (int i = 0; i <= kThreshold; i++) { + ht2.erase(this->UniqueKey(i+1)); + EXPECT_EQ(ht2.bucket_count(), kSize); + } + ht2.insert(this->UniqueObject(kThreshold+2)); + EXPECT_GE(ht2.bucket_count(), kSize); +} + +TEST(HashtableTest, CXX11) +{ +#if !defined(SPP_NO_CXX11_HDR_INITIALIZER_LIST) + { + // Initializer lists + // ----------------- + typedef sparse_hash_map Smap; + + Smap smap({ {1, 1}, {2, 2} }); + EXPECT_EQ(smap.size(), 2); + + smap = { {1, 1}, {2, 2}, {3, 4} }; + EXPECT_EQ(smap.size(), 3); + + smap.insert({{5, 1}, {6, 1}}); + EXPECT_EQ(smap.size(), 5); + EXPECT_EQ(smap[6], 1); + EXPECT_EQ(smap.at(6), 1); + try + { + EXPECT_EQ(smap.at(999), 1); + } + catch (...) + {}; + + sparse_hash_set sset({ 1, 3, 4, 5 }); + EXPECT_EQ(sset.size(), 4); + } +#endif +} + + + +TEST(HashtableTest, NestedHashtables) +{ + // People can do better than to have a hash_map of hash_maps, but we + // should still support it. I try a few different mappings. + sparse_hash_map, Hasher, Hasher> ht1; + + ht1["hi"]; // create a sub-ht with the default values + ht1["lo"][1] = "there"; + sparse_hash_map, Hasher, Hasher> + ht1copy = ht1; +} + +TEST(HashtableDeathTest, ResizeOverflow) +{ + sparse_hash_map ht2; + EXPECT_DEATH(ht2.resize(static_cast(-1)), "overflows size_type"); +} + +TEST(HashtableDeathTest, InsertSizeTypeOverflow) +{ + static const int kMax = 256; + vector test_data(kMax); + for (int i = 0; i < kMax; ++i) { + test_data[(size_t)i] = i+1000; + } + + sparse_hash_set > shs; + + // Test we are using the correct allocator + EXPECT_TRUE(shs.get_allocator().is_custom_alloc()); + + // Test size_type overflow in insert(it, it) + EXPECT_DEATH(shs.insert(test_data.begin(), test_data.end()), "overflows size_type"); +} + +TEST(HashtableDeathTest, InsertMaxSizeOverflow) +{ + static const int kMax = 256; + vector test_data(kMax); + for (int i = 0; i < kMax; ++i) { + test_data[(size_t)i] = i+1000; + } + + sparse_hash_set > shs; + + // Test max_size overflow + EXPECT_DEATH(shs.insert(test_data.begin(), test_data.begin() + 11), "exceed max_size"); +} + +TEST(HashtableDeathTest, ResizeSizeTypeOverflow) +{ + // Test min-buckets overflow, when we want to resize too close to size_type + sparse_hash_set > shs; + + EXPECT_DEATH(shs.resize(250), "overflows size_type"); +} + +TEST(HashtableDeathTest, ResizeDeltaOverflow) +{ + static const int kMax = 256; + vector test_data(kMax); + for (int i = 0; i < kMax; ++i) { + test_data[(size_t)i] = i+1000; + } + + sparse_hash_set > shs; + + for (int i = 0; i < 9; i++) { + shs.insert(i); + } + EXPECT_DEATH(shs.insert(test_data.begin(), test_data.begin() + 250), + "overflows size_type"); +} + +// ------------------------------------------------------------------------ +// This informational "test" comes last so it's easy to see. +// Also, benchmarks. + +TYPED_TEST(HashtableAllTest, ClassSizes) +{ + std::cout << "sizeof(" << typeid(TypeParam).name() << "): " + << sizeof(this->ht_) << "\n"; +} + +} // unnamed namespace + +int main(int, char **) +{ + // All the work is done in the static constructors. If they don't + // die, the tests have all passed. + cout << "PASS\n"; + return 0; +} diff --git a/resources/3rdparty/sparsepp/tests/vsprojects/spp.sln b/resources/3rdparty/sparsepp/tests/vsprojects/spp.sln new file mode 100755 index 000000000..06da8666e --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/vsprojects/spp.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spp_test", "spp_test.vcxproj", "{9863A521-E9DB-4775-A276-CADEF726CF11}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spp_alloc_test", "spp_alloc_test.vcxproj", "{19BC4240-15ED-4C76-BC57-34BB70FE163B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9863A521-E9DB-4775-A276-CADEF726CF11}.Debug|x64.ActiveCfg = Debug|x64 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Debug|x64.Build.0 = Debug|x64 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Debug|x86.ActiveCfg = Debug|Win32 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Debug|x86.Build.0 = Debug|Win32 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Release|x64.ActiveCfg = Release|x64 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Release|x64.Build.0 = Release|x64 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Release|x86.ActiveCfg = Release|Win32 + {9863A521-E9DB-4775-A276-CADEF726CF11}.Release|x86.Build.0 = Release|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x64.ActiveCfg = Debug|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x64.Build.0 = Debug|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x86.ActiveCfg = Debug|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Debug|x86.Build.0 = Debug|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x64.ActiveCfg = Release|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x64.Build.0 = Release|x64 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x86.ActiveCfg = Release|Win32 + {19BC4240-15ED-4C76-BC57-34BB70FE163B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj b/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj new file mode 100755 index 000000000..609710ffe --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + {19BC4240-15ED-4C76-BC57-34BB70FE163B} + Win32Proj + 8.1 + + + + Application + v140 + MultiByte + + + Application + MultiByte + v140 + + + Application + v140 + MultiByte + + + Application + v140 + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>14.0.23107.0 + + + None + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + $(OutDir)spp_alloc_test.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + $(OutDir)spp_alloc_test.pdb + Console + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + Console + true + true + MachineX86 + true + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_alloc_test.exe + true + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj.filters b/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj.filters new file mode 100755 index 000000000..8c773fa94 --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/vsprojects/spp_alloc_test.vcxproj.filters @@ -0,0 +1,28 @@ + + + + + {c644622a-f598-4fcf-861c-199b4b988881} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj b/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj new file mode 100755 index 000000000..c510a10cf --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + {9863A521-E9DB-4775-A276-CADEF726CF11} + Win32Proj + 8.1 + + + + Application + v140 + MultiByte + + + Application + MultiByte + v140 + + + Application + v140 + MultiByte + + + Application + v140 + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>14.0.23107.0 + + + None + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + true + AllRules.ruleset + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_test.exe + true + $(OutDir)spp_test.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + EnableAllWarnings + ProgramDatabase + ../.. + + + $(OutDir)spp_test.exe + true + $(OutDir)spp_test.pdb + Console + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_test.exe + true + Console + true + true + MachineX86 + + + + + WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ../.. + + + $(OutDir)spp_test.exe + true + Console + true + true + + + + + + \ No newline at end of file diff --git a/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj.filters b/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj.filters new file mode 100755 index 000000000..70934ad0c --- /dev/null +++ b/resources/3rdparty/sparsepp/tests/vsprojects/spp_test.vcxproj.filters @@ -0,0 +1,32 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file From 52b07a0c2f6db4cd5d0b2edea59217a17ecfcc0a Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 25 Jul 2017 12:17:53 +0200 Subject: [PATCH 08/95] fixed a bug in sparse matrix builder, fixed some tests --- resources/examples/testfiles/dtmc/die.pm | 3 +++ src/storm/builder/ExplicitModelBuilder.cpp | 2 +- src/storm/generator/PrismNextStateGenerator.cpp | 7 +++---- src/storm/modelchecker/exploration/Bounds.cpp | 2 ++ .../SparseExplorationModelChecker.cpp | 13 +++++++++++++ src/storm/storage/SparseMatrix.cpp | 17 ++++++++++------- 6 files changed, 32 insertions(+), 12 deletions(-) diff --git a/resources/examples/testfiles/dtmc/die.pm b/resources/examples/testfiles/dtmc/die.pm index 5b7eb8e36..e41139001 100644 --- a/resources/examples/testfiles/dtmc/die.pm +++ b/resources/examples/testfiles/dtmc/die.pm @@ -24,3 +24,6 @@ rewards "coin_flips" endrewards label "one" = s=7&d=1; +label "two" = s=7&d=2; +label "three" = s=7&d=3; +label "done" = s=7; diff --git a/src/storm/builder/ExplicitModelBuilder.cpp b/src/storm/builder/ExplicitModelBuilder.cpp index 9de544e7b..665190e6c 100644 --- a/src/storm/builder/ExplicitModelBuilder.cpp +++ b/src/storm/builder/ExplicitModelBuilder.cpp @@ -306,7 +306,7 @@ namespace storm { // initialize the model components with the obtained information. storm::storage::sparse::ModelComponents modelComponents(transitionMatrixBuilder.build(), buildStateLabeling(), std::unordered_map(), !generator->isDiscreteTimeModel(), std::move(markovianStates)); - + // Now finalize all reward models. for (auto& rewardModelBuilder : rewardModelBuilders) { modelComponents.rewardModels.emplace(rewardModelBuilder.getName(), rewardModelBuilder.build(modelComponents.transitionMatrix.getRowCount(), modelComponents.transitionMatrix.getColumnCount(), modelComponents.transitionMatrix.getRowGroupCount())); diff --git a/src/storm/generator/PrismNextStateGenerator.cpp b/src/storm/generator/PrismNextStateGenerator.cpp index 6b80e8c52..bf9d73876 100644 --- a/src/storm/generator/PrismNextStateGenerator.cpp +++ b/src/storm/generator/PrismNextStateGenerator.cpp @@ -216,7 +216,6 @@ namespace storm { for (auto& choice : allLabeledChoices) { allChoices.push_back(std::move(choice)); } - std::size_t totalNumberOfChoices = allChoices.size(); // If there is not a single choice, we return immediately, because the state has no behavior (other than @@ -283,9 +282,9 @@ namespace storm { for (auto& choice : allChoices) { result.addChoice(std::move(choice)); } - + this->postprocess(result); - + return result; } @@ -394,7 +393,7 @@ namespace storm { if (!this->evaluator->asBool(command.getGuardExpression())) { continue; } - + result.push_back(Choice(command.getActionIndex(), command.isMarkovian())); Choice& choice = result.back(); diff --git a/src/storm/modelchecker/exploration/Bounds.cpp b/src/storm/modelchecker/exploration/Bounds.cpp index 55ed075a9..a3600707d 100644 --- a/src/storm/modelchecker/exploration/Bounds.cpp +++ b/src/storm/modelchecker/exploration/Bounds.cpp @@ -98,11 +98,13 @@ namespace storm { template void Bounds::setUpperBoundForState(StateType const& state, ExplorationInformation const& explorationInformation, ValueType const& value) { + std::cout << "setting value " << value << " for state " << state << " with row group " << explorationInformation.getRowGroup(state) << std::endl; setUpperBoundForRowGroup(explorationInformation.getRowGroup(state), value); } template void Bounds::setUpperBoundForRowGroup(StateType const& group, ValueType const& value) { + std::cout << "setting value " << value << " for state (row group) " << group << " where size is " << boundsPerState.size() << std::endl; boundsPerState[group].second = value; } diff --git a/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp b/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp index de099d655..c5cd4ba6a 100644 --- a/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp +++ b/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp @@ -476,12 +476,25 @@ namespace storm { } // Set the bounds of the identified states. + std::cout << "prob0: " << statesWithProbability0 << std::endl; for (auto state : statesWithProbability0) { + // Skip the sink state as it is not contained in the original system. + if (state == sink) { + continue; + } + + std::cout << "setting 0 for state " << state << std::endl; StateType originalState = relevantStates[state]; + std::cout << "original state is " << originalState << ", size: " << relevantStates.size() << std::endl; bounds.setUpperBoundForState(originalState, explorationInformation, storm::utility::zero()); explorationInformation.addTerminalState(originalState); } for (auto state : statesWithProbability1) { + // Skip the sink state as it is not contained in the original system. + if (state == sink) { + continue; + } + StateType originalState = relevantStates[state]; bounds.setLowerBoundForState(originalState, explorationInformation, storm::utility::one()); explorationInformation.addTerminalState(originalState); diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 7e239c14e..38c43f6cf 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -193,13 +193,15 @@ namespace storm { ++currentRowGroup; // Close all rows from the most recent one to the starting row. - for (index_type i = lastRow + 1; i <= startingRow; ++i) { + for (index_type i = lastRow + 1; i < startingRow; ++i) { rowIndications.push_back(currentEntryCount); } - // Reset the most recently seen row/column to allow for proper insertion of the following elements. - lastRow = startingRow; - lastColumn = 0; + if (lastRow + 1 < startingRow) { + // Reset the most recently seen row/column to allow for proper insertion of the following elements. + lastRow = startingRow - 1; + lastColumn = 0; + } } template @@ -228,7 +230,7 @@ namespace storm { // as now the indices of row i are always between rowIndications[i] and rowIndications[i + 1], also for // the first and last row. rowIndications.push_back(currentEntryCount); - assert(rowCount == rowIndications.size() - 1); + STORM_LOG_ASSERT(rowCount == rowIndications.size() - 1, "Wrong sizes of vectors."); uint_fast64_t columnCount = hasEntries ? highestColumn + 1 : 0; if (initialColumnCountSet && forceInitialDimensions) { STORM_LOG_THROW(columnCount <= initialColumnCount, storm::exceptions::InvalidStateException, "Expected not more than " << initialColumnCount << " columns, but got " << columnCount << "."); @@ -1589,8 +1591,9 @@ namespace storm { template bool SparseMatrix::isProbabilistic() const { storm::utility::ConstantsComparator comparator; - for(index_type row = 0; row < this->rowCount; ++row) { - if(!comparator.isOne(getRowSum(row))) { + for (index_type row = 0; row < this->rowCount; ++row) { + ValueType sum = getRowSum(row); + if (!comparator.isOne(sum)) { return false; } } From 3bf40471b48bfc8f45412cf30da3ccb60d8f250a Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 25 Jul 2017 17:03:36 +0200 Subject: [PATCH 09/95] small fixes in matrix builder and removal of debug output --- src/storm/modelchecker/exploration/Bounds.cpp | 2 -- .../exploration/SparseExplorationModelChecker.cpp | 10 +++++----- src/storm/solver/GmmxxLinearEquationSolver.cpp | 3 ++- src/storm/storage/SparseMatrix.cpp | 9 +++++++++ src/storm/storage/SparseMatrix.h | 3 +++ 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/storm/modelchecker/exploration/Bounds.cpp b/src/storm/modelchecker/exploration/Bounds.cpp index a3600707d..55ed075a9 100644 --- a/src/storm/modelchecker/exploration/Bounds.cpp +++ b/src/storm/modelchecker/exploration/Bounds.cpp @@ -98,13 +98,11 @@ namespace storm { template void Bounds::setUpperBoundForState(StateType const& state, ExplorationInformation const& explorationInformation, ValueType const& value) { - std::cout << "setting value " << value << " for state " << state << " with row group " << explorationInformation.getRowGroup(state) << std::endl; setUpperBoundForRowGroup(explorationInformation.getRowGroup(state), value); } template void Bounds::setUpperBoundForRowGroup(StateType const& group, ValueType const& value) { - std::cout << "setting value " << value << " for state (row group) " << group << " where size is " << boundsPerState.size() << std::endl; boundsPerState[group].second = value; } diff --git a/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp b/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp index c5cd4ba6a..e13192034 100644 --- a/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp +++ b/src/storm/modelchecker/exploration/SparseExplorationModelChecker.cpp @@ -440,8 +440,9 @@ namespace storm { // duplicate work is the following. Optimally, we would only do the MEC decomposition, because we need // it anyway. However, when only detecting (accepting) MECs, we do not infer which of the other states // (not contained in MECs) also have probability 0/1. - statesWithProbability0 = storm::utility::graph::performProb0A(transposedMatrix, allStates, targetStates); targetStates.set(sink, true); + statesWithProbability0 = storm::utility::graph::performProb0A(transposedMatrix, allStates, targetStates); + targetStates.set(sink, false); statesWithProbability1 = storm::utility::graph::performProb1E(relevantStatesMatrix, relevantStatesMatrix.getRowGroupIndices(), transposedMatrix, allStates, targetStates); storm::storage::MaximalEndComponentDecomposition mecDecomposition(relevantStatesMatrix, relevantStatesMatrix.transpose(true)); @@ -449,7 +450,8 @@ namespace storm { STORM_LOG_TRACE("Successfully computed MEC decomposition. Found " << (mecDecomposition.size() > 1 ? (mecDecomposition.size() - 1) : 0) << " MEC(s)."); // If the decomposition contains only the MEC consisting of the sink state, we count it as 'failed'. - if (mecDecomposition.size() > 1) { + STORM_LOG_ASSERT(mecDecomposition.size() > 0, "Expected at least one MEC (the trivial sink MEC)."); + if (mecDecomposition.size() == 1) { ++stats.failedEcDetections; } else { stats.totalNumberOfEcDetected += mecDecomposition.size() - 1; @@ -476,16 +478,14 @@ namespace storm { } // Set the bounds of the identified states. - std::cout << "prob0: " << statesWithProbability0 << std::endl; + STORM_LOG_ASSERT((statesWithProbability0 & statesWithProbability1).empty(), "States with probability 0 and 1 overlap."); for (auto state : statesWithProbability0) { // Skip the sink state as it is not contained in the original system. if (state == sink) { continue; } - std::cout << "setting 0 for state " << state << std::endl; StateType originalState = relevantStates[state]; - std::cout << "original state is " << originalState << ", size: " << relevantStates.size() << std::endl; bounds.setUpperBoundForState(originalState, explorationInformation, storm::utility::zero()); explorationInformation.addTerminalState(originalState); } diff --git a/src/storm/solver/GmmxxLinearEquationSolver.cpp b/src/storm/solver/GmmxxLinearEquationSolver.cpp index 7503584c8..d1eec14cb 100644 --- a/src/storm/solver/GmmxxLinearEquationSolver.cpp +++ b/src/storm/solver/GmmxxLinearEquationSolver.cpp @@ -224,10 +224,11 @@ namespace storm { template void GmmxxLinearEquationSolver::multiply(std::vector& x, std::vector const* b, std::vector& result) const { - if(!gmmxxA) { + if (!gmmxxA) { gmmxxA = storm::adapters::GmmxxAdapter::toGmmxxSparseMatrix(*A); } if (b) { + std::cout << "A: " << A->getRowCount() << "x" << A->getColumnCount() << ", x: " << x.size() << ", b: " << b->size() << ", r: " << result.size() << std::endl; gmm::mult_add(*gmmxxA, x, *b, result); } else { gmm::mult(*gmmxxA, x, result); diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 38c43f6cf..aa7ec3087 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -210,10 +210,19 @@ namespace storm { bool hasEntries = currentEntryCount != 0; uint_fast64_t rowCount = hasEntries ? lastRow + 1 : 0; + + // If the last row group was empty, we need to add one more to the row count, because otherwise this empty row is not counted. + if (hasCustomRowGrouping) { + if (lastRow < rowGroupIndices->back()) { + ++rowCount; + } + } + if (initialRowCountSet && forceInitialDimensions) { STORM_LOG_THROW(rowCount <= initialRowCount, storm::exceptions::InvalidStateException, "Expected not more than " << initialRowCount << " rows, but got " << rowCount << "."); rowCount = std::max(rowCount, initialRowCount); } + rowCount = std::max(rowCount, overriddenRowCount); // If the current row count was overridden, we may need to add empty rows. diff --git a/src/storm/storage/SparseMatrix.h b/src/storm/storage/SparseMatrix.h index bd8c1bad1..6a613dd3d 100644 --- a/src/storm/storage/SparseMatrix.h +++ b/src/storm/storage/SparseMatrix.h @@ -293,6 +293,9 @@ namespace storm { // Stores the currently active row group. This is used for correctly constructing the row grouping of the // matrix. index_type currentRowGroup; + + // A flag that stores whether the current row group does not yet contain an element. + bool currentRowGroupEmpty; }; /*! From 282345e49d00f205b3945c3c6bf5e7c1d8fa538a Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 25 Jul 2017 17:04:28 +0200 Subject: [PATCH 10/95] remove debug output --- src/storm/solver/GmmxxLinearEquationSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/storm/solver/GmmxxLinearEquationSolver.cpp b/src/storm/solver/GmmxxLinearEquationSolver.cpp index d1eec14cb..187e5bf2b 100644 --- a/src/storm/solver/GmmxxLinearEquationSolver.cpp +++ b/src/storm/solver/GmmxxLinearEquationSolver.cpp @@ -228,7 +228,6 @@ namespace storm { gmmxxA = storm::adapters::GmmxxAdapter::toGmmxxSparseMatrix(*A); } if (b) { - std::cout << "A: " << A->getRowCount() << "x" << A->getColumnCount() << ", x: " << x.size() << ", b: " << b->size() << ", r: " << result.size() << std::endl; gmm::mult_add(*gmmxxA, x, *b, result); } else { gmm::mult(*gmmxxA, x, result); From f5ba5204c91c0ae9fe3efd7c005ac12a90948afb Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 28 Jul 2017 22:28:17 +0200 Subject: [PATCH 11/95] adding some debug functionality to DdManager to corner dynamic reordering issue with CUDD --- CMakeLists.txt | 2 ++ resources/3rdparty/include_cudd.cmake | 9 ++++++++- .../prctl/helper/SparseMdpPrctlHelper.cpp | 5 +---- src/storm/settings/modules/CuddSettings.cpp | 13 ++++++++++--- src/storm/settings/modules/CuddSettings.h | 8 ++++++++ .../modules/EigenEquationSolverSettings.cpp | 2 +- .../modules/NativeEquationSolverSettings.cpp | 2 +- src/storm/solver/LinearEquationSolver.h | 6 +++--- .../solver/StandardMinMaxLinearEquationSolver.cpp | 2 +- .../solver/SymbolicNativeLinearEquationSolver.cpp | 2 +- .../TopologicalMinMaxLinearEquationSolver.cpp | 1 - src/storm/storage/dd/DdManager.cpp | 5 +++++ src/storm/storage/dd/DdManager.h | 5 +++++ src/storm/storage/dd/cudd/InternalCuddDdManager.cpp | 13 +++++++++++-- src/storm/storage/dd/cudd/InternalCuddDdManager.h | 5 +++++ .../storage/dd/sylvan/InternalSylvanDdManager.cpp | 4 ++++ .../storage/dd/sylvan/InternalSylvanDdManager.h | 5 +++++ 17 files changed, 71 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5b905eb1..f8cfcea20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,8 @@ export_option(STORM_USE_CLN_EA) option(STORM_USE_CLN_RF "Sets whether CLN instead of GMP numbers should be used for rational functions." ON) export_option(STORM_USE_CLN_RF) option(BUILD_SHARED_LIBS "Build the Storm library dynamically" OFF) +option(STORM_DEBUG_CUDD "Build CUDD in debug mode." OFF) +MARK_AS_ADVANCED(STORM_DEBUG_CUDD) set(BOOST_ROOT "" CACHE STRING "A hint to the root directory of Boost (optional).") set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).") set(Z3_ROOT "" CACHE STRING "A hint to the root directory of Z3 (optional).") diff --git a/resources/3rdparty/include_cudd.cmake b/resources/3rdparty/include_cudd.cmake index e4bcebcb9..3030f44b3 100644 --- a/resources/3rdparty/include_cudd.cmake +++ b/resources/3rdparty/include_cudd.cmake @@ -16,7 +16,14 @@ endif() set(CUDD_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0/lib) -set(STORM_CUDD_FLAGS "CFLAGS=-O3 -w -DPIC -DHAVE_IEEE_754 -fno-common -ffast-math -fno-finite-math-only") +# create CUDD compilation flags +if (NOT STORM_DEBUG_CUDD) + set(STORM_CUDD_FLAGS "-O3") +else() + message(WARNING "Building CUDD in DEBUG mode.") + set(STORM_CUDD_FLAGS "-O0 -g") +endif() +set(STORM_CUDD_FLAGS "CFLAGS=${STORM_CUDD_FLAGS} -w -DPIC -DHAVE_IEEE_754 -fno-common -ffast-math -fno-finite-math-only") if (NOT STORM_PORTABLE) set(STORM_CUDD_FLAGS "${STORM_CUDD_FLAGS} -march=native") endif() diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index b10934fdb..13dc404ed 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -388,10 +388,8 @@ namespace storm { MDPSparseModelCheckingHelperReturnType SparseMdpPrctlHelper::computeReachabilityRewardsHelper(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, std::function(uint_fast64_t, storm::storage::SparseMatrix const&, storm::storage::BitVector const&)> const& totalStateRewardVectorGetter, storm::storage::BitVector const& targetStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint) { std::vector result(transitionMatrix.getRowGroupCount(), storm::utility::zero()); - std::vector const& nondeterministicChoiceIndices = transitionMatrix.getRowGroupIndices(); - // Determine which states have a reward that is infinity or less than infinity. storm::storage::BitVector maybeStates, infinityStates; if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().getComputeOnlyMaybeStates()) { @@ -497,7 +495,6 @@ namespace storm { } STORM_LOG_ASSERT((!produceScheduler && !scheduler) || (!scheduler->isPartialScheduler() && scheduler->isDeterministicScheduler() && scheduler->isMemorylessScheduler()), "Unexpected format of obtained scheduler."); - return MDPSparseModelCheckingHelperReturnType(std::move(result), std::move(scheduler)); } @@ -510,7 +507,7 @@ namespace storm { } // Likewise, if all bits are set, we can avoid the computation and set. - if ((~psiStates).empty()) { + if (psiStates.full()) { return std::vector(numberOfStates, storm::utility::one()); } diff --git a/src/storm/settings/modules/CuddSettings.cpp b/src/storm/settings/modules/CuddSettings.cpp index e680276bf..89e299aee 100644 --- a/src/storm/settings/modules/CuddSettings.cpp +++ b/src/storm/settings/modules/CuddSettings.cpp @@ -17,12 +17,15 @@ namespace storm { const std::string CuddSettings::moduleName = "cudd"; const std::string CuddSettings::precisionOptionName = "precision"; const std::string CuddSettings::maximalMemoryOptionName = "maxmem"; - const std::string CuddSettings::reorderOptionName = "reorder"; + const std::string CuddSettings::reorderOptionName = "dynreorder"; + const std::string CuddSettings::reorderTechniqueOptionName = "reordertechnique"; CuddSettings::CuddSettings() : ModuleSettings(moduleName) { this->addOption(storm::settings::OptionBuilder(moduleName, precisionOptionName, true, "Sets the precision used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value", "The precision up to which to constants are considered to be different.").setDefaultValueDouble(1e-15).addValidatorDouble(ArgumentValidatorFactory::createDoubleRangeValidatorExcluding(0.0, 1.0)).build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, maximalMemoryOptionName, true, "Sets the upper bound of memory available to Cudd in MB.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("value", "The memory available to Cudd (0 means unlimited).").setDefaultValueUnsignedInteger(4096).build()).build()); + + this->addOption(storm::settings::OptionBuilder(moduleName, reorderOptionName, false, "Sets whether dynamic reordering is allowed.").build()); std::vector reorderingTechniques; reorderingTechniques.push_back("none"); @@ -43,7 +46,7 @@ namespace storm { reorderingTechniques.push_back("annealing"); reorderingTechniques.push_back("genetic"); reorderingTechniques.push_back("exact"); - this->addOption(storm::settings::OptionBuilder(moduleName, reorderOptionName, true, "Sets the reordering technique used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("method", "Sets which technique is used by Cudd's reordering routines.").setDefaultValueString("gsift").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(reorderingTechniques)).build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, reorderTechniqueOptionName, true, "Sets the reordering technique used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("method", "Sets which technique is used by Cudd's reordering routines.").setDefaultValueString("gsift").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(reorderingTechniques)).build()).build()); } double CuddSettings::getConstantPrecision() const { @@ -54,8 +57,12 @@ namespace storm { return this->getOption(maximalMemoryOptionName).getArgumentByName("value").getValueAsUnsignedInteger(); } + bool CuddSettings::isReorderingEnabled() const { + return this->getOption(reorderOptionName).getHasOptionBeenSet(); + } + CuddSettings::ReorderingTechnique CuddSettings::getReorderingTechnique() const { - std::string reorderingTechniqueAsString = this->getOption(reorderOptionName).getArgumentByName("method").getValueAsString(); + std::string reorderingTechniqueAsString = this->getOption(reorderTechniqueOptionName).getArgumentByName("method").getValueAsString(); if (reorderingTechniqueAsString == "none") { return CuddSettings::ReorderingTechnique::None; } else if (reorderingTechniqueAsString == "random") { diff --git a/src/storm/settings/modules/CuddSettings.h b/src/storm/settings/modules/CuddSettings.h index 01a81389c..5c4e22da2 100644 --- a/src/storm/settings/modules/CuddSettings.h +++ b/src/storm/settings/modules/CuddSettings.h @@ -34,6 +34,13 @@ namespace storm { */ uint_fast64_t getMaximalMemory() const; + /*! + * Retrieves whether dynamic reordering is enabled. + * + * @return True iff dynamic reordering is enabled. + */ + bool isReorderingEnabled() const; + /*! * Retrieves the reordering technique that CUDD is supposed to use. * @@ -49,6 +56,7 @@ namespace storm { static const std::string precisionOptionName; static const std::string maximalMemoryOptionName; static const std::string reorderOptionName; + static const std::string reorderTechniqueOptionName; }; } // namespace modules diff --git a/src/storm/settings/modules/EigenEquationSolverSettings.cpp b/src/storm/settings/modules/EigenEquationSolverSettings.cpp index 937f36026..cc3589937 100644 --- a/src/storm/settings/modules/EigenEquationSolverSettings.cpp +++ b/src/storm/settings/modules/EigenEquationSolverSettings.cpp @@ -26,7 +26,7 @@ namespace storm { EigenEquationSolverSettings::EigenEquationSolverSettings() : ModuleSettings(moduleName) { std::vector methods = {"sparselu", "bicgstab", "dgmres", "gmres"}; - this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the eigen solver.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("sparselu").build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the eigen solver.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("gmres").build()).build()); // Register available preconditioners. std::vector preconditioner = {"ilu", "diagonal", "none"}; diff --git a/src/storm/settings/modules/NativeEquationSolverSettings.cpp b/src/storm/settings/modules/NativeEquationSolverSettings.cpp index 7803939bf..26a15ea67 100644 --- a/src/storm/settings/modules/NativeEquationSolverSettings.cpp +++ b/src/storm/settings/modules/NativeEquationSolverSettings.cpp @@ -25,7 +25,7 @@ namespace storm { NativeEquationSolverSettings::NativeEquationSolverSettings() : ModuleSettings(moduleName) { std::vector methods = { "jacobi", "gaussseidel", "sor" }; - this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the native engine.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("jacobi").build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the native engine.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("gaussseidel").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, maximalIterationsOptionName, false, "The maximal number of iterations to perform before iterative solving is aborted.").setShortName(maximalIterationsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count", "The maximal iteration count.").setDefaultValueUnsignedInteger(20000).build()).build()); diff --git a/src/storm/solver/LinearEquationSolver.h b/src/storm/solver/LinearEquationSolver.h index b94626cd2..170d625f7 100644 --- a/src/storm/solver/LinearEquationSolver.h +++ b/src/storm/solver/LinearEquationSolver.h @@ -85,17 +85,17 @@ namespace storm { virtual void clearCache() const; /*! - * Sets a lower bound for the solution that can potentially used by the solver. + * Sets a lower bound for the solution that can potentially be used by the solver. */ void setLowerBound(ValueType const& value); /*! - * Sets an upper bound for the solution that can potentially used by the solver. + * Sets an upper bound for the solution that can potentially be used by the solver. */ void setUpperBound(ValueType const& value); /*! - * Sets bounds for the solution that can potentially used by the solver. + * Sets bounds for the solution that can potentially be used by the solver. */ void setBounds(ValueType const& lower, ValueType const& upper); diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp index 627dcd131..1162ee496 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp @@ -106,7 +106,7 @@ namespace storm { std::vector scheduler = this->hasSchedulerHint() ? this->choicesHint.get() : std::vector(this->A.getRowGroupCount()); // Get a vector for storing the right-hand side of the inner equation system. - if(!auxiliaryRowGroupVector) { + if (!auxiliaryRowGroupVector) { auxiliaryRowGroupVector = std::make_unique>(this->A.getRowGroupCount()); } std::vector& subB = *auxiliaryRowGroupVector; diff --git a/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp b/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp index 000e25926..2d0e82a1d 100644 --- a/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp @@ -69,7 +69,7 @@ namespace storm { storm::dd::Add lu = diagonal.ite(manager.template getAddZero(), this->A); storm::dd::Add diagonalAdd = diagonal.template toAdd(); storm::dd::Add diag = diagonalAdd.multiplyMatrix(this->A, this->columnMetaVariables); - + storm::dd::Add scaledLu = lu / diag; storm::dd::Add scaledB = b / diag; diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp index d47bff510..88a7ea218 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp @@ -453,7 +453,6 @@ namespace storm { // Reduce the vector x' by applying min/max for all non-deterministic choices as given by the topmost // element of the min/max operator stack. storm::utility::vector::reduceVectorMinOrMax(dir, *multiplyResult, x, this->A.getRowGroupIndices()); - } } diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index b029da879..a27e86dea 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -464,6 +464,11 @@ namespace storm { return &internalDdManager; } + template + void DdManager::debugCheck() const { + internalDdManager.debugCheck(); + } + template class DdManager; template Add DdManager::getAddZero() const; diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index fdee32589..2d2405bb6 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -290,6 +290,11 @@ namespace storm { * @return The internal DD manager. */ InternalDdManager const& getInternalDdManager() const; + + /*! + * Performs a debug check if available. + */ + void debugCheck() const; private: /*! diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index 0585b793e..e7b7961fe 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -10,10 +10,12 @@ namespace storm { InternalDdManager::InternalDdManager() : cuddManager(), reorderingTechnique(CUDD_REORDER_NONE), numberOfDdVariables(0) { this->cuddManager.SetMaxMemory(static_cast(storm::settings::getModule().getMaximalMemory() * 1024ul * 1024ul)); - this->cuddManager.SetEpsilon(storm::settings::getModule().getConstantPrecision()); + + auto const& settings = storm::settings::getModule(); + this->cuddManager.SetEpsilon(settings.getConstantPrecision()); // Now set the selected reordering technique. - storm::settings::modules::CuddSettings::ReorderingTechnique reorderingTechniqueAsSetting = storm::settings::getModule().getReorderingTechnique(); + storm::settings::modules::CuddSettings::ReorderingTechnique reorderingTechniqueAsSetting = settings.getReorderingTechnique(); switch (reorderingTechniqueAsSetting) { case storm::settings::modules::CuddSettings::ReorderingTechnique::None: this->reorderingTechnique = CUDD_REORDER_NONE; break; case storm::settings::modules::CuddSettings::ReorderingTechnique::Random: this->reorderingTechnique = CUDD_REORDER_RANDOM; break; @@ -34,6 +36,8 @@ namespace storm { case storm::settings::modules::CuddSettings::ReorderingTechnique::Genetic: this->reorderingTechnique = CUDD_REORDER_GENETIC; break; case storm::settings::modules::CuddSettings::ReorderingTechnique::Exact: this->reorderingTechnique = CUDD_REORDER_EXACT; break; } + + this->allowDynamicReordering(settings.isReorderingEnabled()); } InternalDdManager::~InternalDdManager() { @@ -111,6 +115,11 @@ namespace storm { this->getCuddManager().ReduceHeap(this->reorderingTechnique, 0); } + void InternalDdManager::debugCheck() const { + this->getCuddManager().CheckKeys(); + this->getCuddManager().DebugCheck(); + } + cudd::Cudd& InternalDdManager::getCuddManager() { return cuddManager; } diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.h b/src/storm/storage/dd/cudd/InternalCuddDdManager.h index 08717f345..44efef0c5 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.h +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.h @@ -119,6 +119,11 @@ namespace storm { */ void triggerReordering(); + /*! + * Performs a debug check if available. + */ + void debugCheck() const; + /*! * Retrieves the number of DD variables managed by this manager. * diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 85f1d2fa4..11c7b09d6 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -207,6 +207,10 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Operation is not supported by sylvan."); } + void InternalDdManager::debugCheck() const { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Operation is not supported by sylvan."); + } + uint_fast64_t InternalDdManager::getNumberOfDdVariables() const { return nextFreeVariableIndex; } diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h index 71db91b7e..c10915145 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h @@ -120,6 +120,11 @@ namespace storm { */ void triggerReordering(); + /*! + * Performs a debug check if available. + */ + void debugCheck() const; + /*! * Retrieves the number of DD variables managed by this manager. * From 4492f428bba44a2055f629472ec61ed47097fe66 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 29 Jul 2017 09:55:04 +0200 Subject: [PATCH 12/95] worked in fix to Cudd_addMinus suggested by Fabio Somenzi --- resources/3rdparty/cudd-3.0.0/cudd/cuddAddApply.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/3rdparty/cudd-3.0.0/cudd/cuddAddApply.c b/resources/3rdparty/cudd-3.0.0/cudd/cuddAddApply.c index 01fc45fe6..c0b6cebe0 100644 --- a/resources/3rdparty/cudd-3.0.0/cudd/cuddAddApply.c +++ b/resources/3rdparty/cudd-3.0.0/cudd/cuddAddApply.c @@ -350,7 +350,9 @@ Cudd_addMinus( F = *f; G = *g; if (F == G) return(DD_ZERO(dd)); - if (F == DD_ZERO(dd)) return(cuddAddNegateRecur(dd,G)); + // CHANGED BY CHRISTIAN DEHNERT. + // Commented out this case to avoid issues with dynamic reordering (fix suggested by Fabio Somenzi). + // if (F == DD_ZERO(dd)) return(cuddAddNegateRecur(dd,G)); if (G == DD_ZERO(dd)) return(F); if (cuddIsConstant(F) && cuddIsConstant(G)) { value = cuddV(F)-cuddV(G); From f1ca2853f7efa822e44b59911ef5dc38257e1593 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 29 Jul 2017 11:25:05 +0200 Subject: [PATCH 13/95] fixed some typo and added some documentation --- src/storm/settings/modules/JitBuilderSettings.cpp | 4 ++-- src/storm/storage/dd/cudd/InternalCuddDdManager.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storm/settings/modules/JitBuilderSettings.cpp b/src/storm/settings/modules/JitBuilderSettings.cpp index b779f23f5..7dc6808e9 100644 --- a/src/storm/settings/modules/JitBuilderSettings.cpp +++ b/src/storm/settings/modules/JitBuilderSettings.cpp @@ -34,8 +34,8 @@ namespace storm { .addArgument(storm::settings::ArgumentBuilder::createStringArgument("dir", "The directory containing the carl headers.").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, compilerFlagsOptionName, false, "The flags passed to the compiler.") .addArgument(storm::settings::ArgumentBuilder::createStringArgument("flags", "The compiler flags.").build()).build()); - this->addOption(storm::settings::OptionBuilder(moduleName, optimizationLevelOptionName, false, "The optimization level to use.") - .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("level", "The compiler flags.").setDefaultValueUnsignedInteger(3).build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, optimizationLevelOptionName, false, "Sets the optimization level.") + .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("level", "The level to use.").setDefaultValueUnsignedInteger(3).build()).build()); } bool JitBuilderSettings::isCompilerSet() const { diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index e7b7961fe..952c7199c 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -85,7 +85,9 @@ namespace storm { } } - // Connect the two variables so they are not 'torn apart' during dynamic reordering. + // Connect the variables so they are not 'torn apart' by dynamic reordering. + // Note that MTR_FIXED preserves the order of the layers. While this is not always necessary to preserve, + // (for example) the hybrid engine relies on this connection, so we choose MTR_FIXED instead of MTR_DEFAULT. cuddManager.MakeTreeNode(result.front().getIndex(), numberOfLayers, MTR_FIXED); // Keep track of the number of variables. From b25ef3f09c7d98116926e39a9b76830530db6334 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 31 Jul 2017 10:19:06 +0200 Subject: [PATCH 14/95] introduced symbolic bisimulation modes lazy and eager, fixed bug in sparse quotient extraction --- src/storm/api/bisimulation.h | 10 ++-- src/storm/cli/cli.cpp | 2 +- src/storm/models/symbolic/Model.cpp | 2 +- src/storm/models/symbolic/Model.h | 3 +- .../models/symbolic/NondeterministicModel.cpp | 9 ++++ .../models/symbolic/NondeterministicModel.h | 9 ++++ .../settings/modules/BisimulationSettings.cpp | 14 ++++++ .../settings/modules/BisimulationSettings.h | 8 +++ .../bisimulation/BisimulationDecomposition.h | 18 +++---- .../storage/bisimulation/BisimulationType.h | 10 ++++ .../storage/dd/BisimulationDecomposition.cpp | 50 +++++++++++-------- .../storage/dd/BisimulationDecomposition.h | 9 ++-- src/storm/storage/dd/DdMetaVariable.cpp | 1 + .../storage/dd/bisimulation/Partition.cpp | 41 +++++++++++---- src/storm/storage/dd/bisimulation/Partition.h | 14 ++++-- .../dd/bisimulation/QuotientExtractor.cpp | 27 +++++++--- .../dd/bisimulation/SignatureComputer.cpp | 34 ++++++++++++- .../dd/bisimulation/SignatureComputer.h | 18 ++++++- .../storage/dd/bisimulation/SignatureMode.h | 11 ++++ 19 files changed, 222 insertions(+), 68 deletions(-) create mode 100644 src/storm/storage/bisimulation/BisimulationType.h create mode 100644 src/storm/storage/dd/bisimulation/SignatureMode.h diff --git a/src/storm/api/bisimulation.h b/src/storm/api/bisimulation.h index ac8797fc8..c59c62b09 100644 --- a/src/storm/api/bisimulation.h +++ b/src/storm/api/bisimulation.h @@ -55,16 +55,18 @@ namespace storm { } template - typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas) { + typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType = storm::storage::BisimulationType::Strong, storm::dd::bisimulation::SignatureMode const& mode = storm::dd::bisimulation::SignatureMode::Eager) { + STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc), storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is currently only available for DTMCs and CTMCs."); + STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); - storm::dd::BisimulationDecomposition decomposition(*model, formulas); - decomposition.compute(); + storm::dd::BisimulationDecomposition decomposition(*model, formulas, bisimulationType); + decomposition.compute(mode); return decomposition.getQuotient(); } template - typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas) { + typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType = storm::storage::BisimulationType::Strong, storm::dd::bisimulation::SignatureMode const& mode = storm::dd::bisimulation::SignatureMode::Eager) { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is not supported for this combination of DD library and value type."); return nullptr; } diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index 7a1ef8066..5bab54a87 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -485,7 +485,7 @@ namespace storm { STORM_LOG_WARN_COND(!bisimulationSettings.isWeakBisimulationSet(), "Weak bisimulation is currently not supported on DDs. Falling back to strong bisimulation."); STORM_LOG_INFO("Performing bisimulation minimization..."); - return storm::api::performBisimulationMinimization(model, createFormulasToRespect(input.properties)); + return storm::api::performBisimulationMinimization(model, createFormulasToRespect(input.properties), storm::storage::BisimulationType::Strong, bisimulationSettings.getSignatureMode()); } template diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 2a6804618..27a37534f 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -162,7 +162,7 @@ namespace storm { } template - storm::dd::Bdd Model::getQualitativeTransitionMatrix() const { + storm::dd::Bdd Model::getQualitativeTransitionMatrix(bool) const { return this->getTransitionMatrix().notZero(); } diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index c9a628ff4..dbd74634c 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -204,9 +204,10 @@ namespace storm { * Retrieves the matrix qualitatively (i.e. without probabilities) representing the transitions of the * model. * + * @param keepNondeterminism If false, the matrix will abstract from the nondeterminism variables. * @return A matrix representing the qualitative transitions of the model. */ - storm::dd::Bdd getQualitativeTransitionMatrix() const; + virtual storm::dd::Bdd getQualitativeTransitionMatrix(bool keepNondeterminism = true) const; /*! * Retrieves the meta variables used to encode the rows of the transition matrix and the vector indices. diff --git a/src/storm/models/symbolic/NondeterministicModel.cpp b/src/storm/models/symbolic/NondeterministicModel.cpp index 71a334a1a..6545e27c0 100644 --- a/src/storm/models/symbolic/NondeterministicModel.cpp +++ b/src/storm/models/symbolic/NondeterministicModel.cpp @@ -96,6 +96,15 @@ namespace storm { illegalMask = !(this->getTransitionMatrix().notZero().existsAbstract(this->getColumnVariables())) && this->getReachableStates(); } + template + storm::dd::Bdd NondeterministicModel::getQualitativeTransitionMatrix(bool keepNondeterminism) const { + if (!keepNondeterminism) { + return this->getTransitionMatrix().notZero().existsAbstract(this->getNondeterminismVariables()); + } else { + return Model::getQualitativeTransitionMatrix(keepNondeterminism); + } + } + // Explicitly instantiate the template class. template class NondeterministicModel; template class NondeterministicModel; diff --git a/src/storm/models/symbolic/NondeterministicModel.h b/src/storm/models/symbolic/NondeterministicModel.h index e97347c44..45dc27b0a 100644 --- a/src/storm/models/symbolic/NondeterministicModel.h +++ b/src/storm/models/symbolic/NondeterministicModel.h @@ -113,6 +113,15 @@ namespace storm { */ storm::dd::Bdd getIllegalSuccessorMask() const; + /*! + * Retrieves the matrix qualitatively (i.e. without probabilities) representing the transitions of the + * model. + * + * @param keepNondeterminism If false, the matrix will abstract from the nondeterminism variables. + * @return A matrix representing the qualitative transitions of the model. + */ + virtual storm::dd::Bdd getQualitativeTransitionMatrix(bool keepNondeterminism = true) const override; + virtual void printModelInformationToStream(std::ostream& out) const override; protected: diff --git a/src/storm/settings/modules/BisimulationSettings.cpp b/src/storm/settings/modules/BisimulationSettings.cpp index 2c1db8a39..679daa54d 100644 --- a/src/storm/settings/modules/BisimulationSettings.cpp +++ b/src/storm/settings/modules/BisimulationSettings.cpp @@ -16,6 +16,7 @@ namespace storm { const std::string BisimulationSettings::typeOptionName = "type"; const std::string BisimulationSettings::representativeOptionName = "repr"; const std::string BisimulationSettings::quotientFormatOptionName = "quot"; + const std::string BisimulationSettings::signatureModeOptionName = "sigmode"; BisimulationSettings::BisimulationSettings() : ModuleSettings(moduleName) { std::vector types = { "strong", "weak" }; @@ -25,6 +26,9 @@ namespace storm { this->addOption(storm::settings::OptionBuilder(moduleName, quotientFormatOptionName, true, "Sets the format in which the quotient is extracted (only applies to DD-based bisimulation).").addArgument(storm::settings::ArgumentBuilder::createStringArgument("format", "The format of the quotient.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(quotTypes)).setDefaultValueString("dd").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, representativeOptionName, false, "Sets whether to use representatives in the quotient rather than block numbers.").build()); + + std::vector signatureModes = { "eager", "lazy" }; + this->addOption(storm::settings::OptionBuilder(moduleName, signatureModeOptionName, false, "Sets the signature computation mode.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("mode", "The mode to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(signatureModes)).setDefaultValueString("eager").build()).build()); } bool BisimulationSettings::isStrongBisimulationSet() const { @@ -53,6 +57,16 @@ namespace storm { return this->getOption(representativeOptionName).getHasOptionBeenSet(); } + storm::dd::bisimulation::SignatureMode BisimulationSettings::getSignatureMode() const { + std::string modeAsString = this->getOption(signatureModeOptionName).getArgumentByName("mode").getValueAsString(); + if (modeAsString == "eager") { + return storm::dd::bisimulation::SignatureMode::Eager; + } else if (modeAsString == "lazy") { + return storm::dd::bisimulation::SignatureMode::Lazy; + } + STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unknown signature mode '" << modeAsString << "."); + } + bool BisimulationSettings::check() const { bool optionsSet = this->getOption(typeOptionName).getHasOptionBeenSet(); STORM_LOG_WARN_COND(storm::settings::getModule().isBisimulationSet() || !optionsSet, "Bisimulation minimization is not selected, so setting options for bisimulation has no effect."); diff --git a/src/storm/settings/modules/BisimulationSettings.h b/src/storm/settings/modules/BisimulationSettings.h index ccdea9e5d..0d71baa86 100644 --- a/src/storm/settings/modules/BisimulationSettings.h +++ b/src/storm/settings/modules/BisimulationSettings.h @@ -3,6 +3,8 @@ #include "storm/settings/modules/ModuleSettings.h" +#include "storm/storage/dd/bisimulation/SignatureMode.h" + namespace storm { namespace settings { namespace modules { @@ -48,6 +50,11 @@ namespace storm { */ bool isUseRepresentativesSet() const; + /*! + * Retrieves the mode to compute signatures. + */ + storm::dd::bisimulation::SignatureMode getSignatureMode() const; + virtual bool check() const override; // The name of the module. @@ -58,6 +65,7 @@ namespace storm { static const std::string typeOptionName; static const std::string representativeOptionName; static const std::string quotientFormatOptionName; + static const std::string signatureModeOptionName; }; } // namespace modules } // namespace settings diff --git a/src/storm/storage/bisimulation/BisimulationDecomposition.h b/src/storm/storage/bisimulation/BisimulationDecomposition.h index 49089063a..6aa56345c 100644 --- a/src/storm/storage/bisimulation/BisimulationDecomposition.h +++ b/src/storm/storage/bisimulation/BisimulationDecomposition.h @@ -7,6 +7,7 @@ #include "storm/storage/Decomposition.h" #include "storm/storage/StateBlock.h" #include "storm/storage/bisimulation/Partition.h" +#include "storm/storage/bisimulation/BisimulationType.h" #include "storm/solver/OptimizationDirection.h" #include "storm/logic/Formulas.h" @@ -18,15 +19,12 @@ namespace storm { namespace utility { template class ConstantsComparator; } - + namespace logic { class Formula; } namespace storage { - - enum class BisimulationType { Strong, Weak }; - enum class BisimulationTypeChoice { Strong, Weak, FromSettings }; inline BisimulationType resolveBisimulationTypeChoice(BisimulationTypeChoice c) { switch(c) { @@ -40,8 +38,8 @@ namespace storm { } else { return BisimulationType::Strong; } - } + return BisimulationType::Strong; } /*! @@ -89,7 +87,7 @@ namespace storm { /** * Sets the bisimulation type. If the bisimulation type is set to weak, - * we also change the bounded flag (as bounded properties are not preserved under + * we also change the bounded flag (as bounded properties are not preserved under * weak bisimulation). */ void setType(BisimulationType t) { @@ -136,7 +134,7 @@ namespace storm { private: boost::optional optimalityType; - + /// A flag that indicates whether or not the state-rewards of the model are to be respected (and should /// be kept in the quotient model, if one is built). bool keepRewards; @@ -155,7 +153,7 @@ namespace storm { * @param formula The only formula to check. */ void preserveSingleFormula(ModelType const& model, storm::logic::Formula const& formula); - + /*! * Adds the given expressions and labels to the set of respected atomic propositions. * @@ -189,7 +187,7 @@ namespace storm { * @return The quotient model. */ std::shared_ptr getQuotient() const; - + /*! * Computes the decomposition of the model into bisimulation equivalence classes. If requested, a quotient * model is built. @@ -263,7 +261,7 @@ namespace storm { // The model to decompose. ModelType const& model; - + // The backward transitions of the model. storm::storage::SparseMatrix backwardTransitions; diff --git a/src/storm/storage/bisimulation/BisimulationType.h b/src/storm/storage/bisimulation/BisimulationType.h new file mode 100644 index 000000000..fc9dba9b2 --- /dev/null +++ b/src/storm/storage/bisimulation/BisimulationType.h @@ -0,0 +1,10 @@ +#pragma once + +namespace storm { + namespace storage { + + enum class BisimulationType { Strong, Weak }; + enum class BisimulationTypeChoice { Strong, Weak, FromSettings }; + + } +} diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index 81ad026af..89746b5e9 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -8,22 +8,18 @@ #include "storm/exceptions/InvalidOperationException.h" #include "storm/exceptions/NotSupportedException.h" -#include - -extern llmsset_t nodes; - namespace storm { namespace dd { using namespace bisimulation; template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model) : BisimulationDecomposition(model, bisimulation::Partition::create(model)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : BisimulationDecomposition(model, bisimulation::Partition::create(model, bisimulationType)) { // Intentionally left empty. } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas) : BisimulationDecomposition(model, bisimulation::Partition::create(model, formulas)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) : BisimulationDecomposition(model, bisimulation::Partition::create(model, formulas, bisimulationType)) { // Intentionally left empty. } @@ -33,7 +29,7 @@ namespace storm { } template - void BisimulationDecomposition::compute() { + void BisimulationDecomposition::compute(bisimulation::SignatureMode const& mode) { this->status = Status::InComputation; auto start = std::chrono::high_resolution_clock::now(); std::chrono::high_resolution_clock::duration totalSignatureTime(0); @@ -45,27 +41,41 @@ namespace storm { #endif SignatureRefiner refiner(model.getManager(), currentPartition.getBlockVariable(), model.getRowVariables()); - SignatureComputer signatureComputer(model); + SignatureComputer signatureComputer(model, mode); bool done = false; uint64_t iterations = 0; while (!done) { ++iterations; auto iterationStart = std::chrono::high_resolution_clock::now(); - auto signatureStart = std::chrono::high_resolution_clock::now(); - Signature signature = signatureComputer.compute(currentPartition); - auto signatureEnd = std::chrono::high_resolution_clock::now(); - totalSignatureTime += (signatureEnd - signatureStart); + std::chrono::milliseconds::rep signatureTime = 0; + std::chrono::milliseconds::rep refinementTime = 0; - auto refinementStart = std::chrono::high_resolution_clock::now(); - Partition newPartition = refiner.refine(currentPartition, signature); - auto refinementEnd = std::chrono::high_resolution_clock::now(); - totalRefinementTime += (refinementEnd - refinementStart); - - auto signatureTime = std::chrono::duration_cast(signatureEnd - signatureStart).count(); - auto refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); + Partition newPartition; + for (uint64_t index = 0, end = signatureComputer.getNumberOfSignatures(); index < end; ++index) { + auto signatureStart = std::chrono::high_resolution_clock::now(); + Signature signature = signatureComputer.compute(currentPartition, index); + auto signatureEnd = std::chrono::high_resolution_clock::now(); + totalSignatureTime += (signatureEnd - signatureStart); + STORM_LOG_DEBUG("Signature " << iterations << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes and partition DD has " << currentPartition.getNodeCount() << " nodes."); + + auto refinementStart = std::chrono::high_resolution_clock::now(); + newPartition = refiner.refine(currentPartition, signature); + auto refinementEnd = std::chrono::high_resolution_clock::now(); + totalRefinementTime += (refinementEnd - refinementStart); + + signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); + refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); + + // Potentially exit early in case we have refined the partition already. + if (newPartition.getNumberOfBlocks() > currentPartition.getNumberOfBlocks()) { + break; + } + } + auto iterationTime = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - iterationStart).count(); - STORM_LOG_DEBUG("Iteration " << iterations << " produced " << newPartition.getNumberOfBlocks() << " blocks and was completed in " << iterationTime << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms). Signature DD has " << signature.getSignatureAdd().getNodeCount() << " nodes and partition DD has " << currentPartition.getNodeCount() << " nodes."); + + STORM_LOG_DEBUG("Iteration " << iterations << " produced " << newPartition.getNumberOfBlocks() << " blocks and was completed in " << iterationTime << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms)."); if (currentPartition == newPartition) { done = true; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index d13d6a114..3650c58ed 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -4,8 +4,9 @@ #include #include "storm/storage/dd/DdType.h" - +#include "storm/storage/bisimulation/BisimulationType.h" #include "storm/storage/dd/bisimulation/Partition.h" +#include "storm/storage/dd/bisimulation/SignatureMode.h" #include "storm/models/symbolic/Model.h" @@ -21,14 +22,14 @@ namespace storm { Initialized, InComputation, FixedPoint }; - BisimulationDecomposition(storm::models::symbolic::Model const& model); - BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas); + BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); + BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition); /*! * Computes the decomposition. */ - void compute(); + void compute(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager); /*! * Retrieves the quotient model after the bisimulation decomposition was computed. diff --git a/src/storm/storage/dd/DdMetaVariable.cpp b/src/storm/storage/dd/DdMetaVariable.cpp index fda284391..9cebd15cb 100644 --- a/src/storm/storage/dd/DdMetaVariable.cpp +++ b/src/storm/storage/dd/DdMetaVariable.cpp @@ -68,6 +68,7 @@ namespace storm { for (auto const& v : ddVariables) { indicesAndLevels.emplace_back(v.getIndex(), v.getLevel()); } + return indicesAndLevels; } diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index 6e71074eb..7c434f653 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -8,7 +8,11 @@ #include "storm/logic/AtomicExpressionFormula.h" #include "storm/logic/AtomicLabelFormula.h" +#include "storm/settings/SettingsManager.h" +#include "storm/settings/modules/BisimulationSettings.h" + #include "storm/utility/macros.h" +#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/InvalidPropertyException.h" namespace storm { @@ -41,34 +45,34 @@ namespace storm { } template - Partition Partition::create(storm::models::symbolic::Model const& model) { - return create(model, model.getLabels()); + Partition Partition::create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) { + return create(model, model.getLabels(), bisimulationType); } template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& labels) { + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType) { std::shared_ptr preservationInformation = std::make_shared(); std::vector expressions; for (auto const& label : labels) { preservationInformation->addLabel(label); expressions.push_back(model.getExpression(label)); } - return create(model, expressions, preservationInformation); + return create(model, expressions, preservationInformation, bisimulationType); } template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions) { + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { std::shared_ptr preservationInformation = std::make_shared(); for (auto const& expression : expressions) { preservationInformation->addExpression(expression); } - return create(model, expressions, preservationInformation); + return create(model, expressions, preservationInformation, bisimulationType); } template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector> const& formulas) { + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) { if (formulas.empty()) { - return create(model); + return create(model, bisimulationType); } std::shared_ptr preservationInformation = std::make_shared(); @@ -93,11 +97,14 @@ namespace storm { expressionVector.emplace_back(expression); } - return create(model, expressionVector, preservationInformation); + return create(model, expressionVector, preservationInformation, bisimulationType); } template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation) { + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation, storm::storage::BisimulationType const& bisimulationType) { + + STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); + storm::dd::DdManager& manager = model.getManager(); std::vector> stateSets; @@ -122,6 +129,20 @@ namespace storm { } } + template + uint64_t Partition::getNumberOfStates() const { + return this->getStates().getNonZeroCount(); + } + + template + storm::dd::Bdd Partition::getStates() const { + if (this->storedAsAdd()) { + return this->asAdd().notZero().existsAbstract({this->getBlockVariable()}); + } else { + return this->asBdd().existsAbstract({this->getBlockVariable()}); + } + } + template uint64_t Partition::getNumberOfBlocks() const { return nextFreeBlockIndex; diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h index f52c827cb..80d882645 100644 --- a/src/storm/storage/dd/bisimulation/Partition.h +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -8,6 +8,7 @@ #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/Add.h" #include "storm/storage/dd/Bdd.h" +#include "storm/storage/bisimulation/BisimulationType.h" #include "storm/models/symbolic/Model.h" @@ -35,23 +36,24 @@ namespace storm { /*! * Creates a partition from the given model that respects all labels. */ - static Partition create(storm::models::symbolic::Model const& model); + static Partition create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); /*! * Creates a partition from the given model that respects the given labels. */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& labels); + static Partition create(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType); /*! * Creates a partition from the given model that respects the given expressions. */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions); + static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType); /*! * Creates a partition from the given model that preserves the given formulas. */ - static Partition create(storm::models::symbolic::Model const& model, std::vector> const& formulas); + static Partition create(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); + uint64_t getNumberOfStates() const; uint64_t getNumberOfBlocks() const; bool storedAsAdd() const; @@ -66,6 +68,8 @@ namespace storm { uint64_t getNextFreeBlockIndex() const; uint64_t getNodeCount() const; + storm::dd::Bdd getStates() const; + PreservationInformation const& getPreservationInformation() const; private: @@ -98,7 +102,7 @@ namespace storm { /*! * Creates a partition from the given model that respects the given expressions. */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation); + static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation, storm::storage::BisimulationType const& bisimulationType); static std::pair, uint64_t> createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index aee570395..2fb31b2d1 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -83,6 +83,7 @@ namespace storm { // Create the number of rows necessary for the matrix. this->entries.resize(partition.getNumberOfBlocks()); + STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); storm::storage::BitVector encoding(this->stateVariablesIndicesAndLevels.size()); extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, encoding); @@ -106,11 +107,16 @@ namespace storm { return *blockCacheEntry; } +// FILE* fp = fopen("block.dot" , "w"); +// Cudd_DumpDot(ddman, 1, &blockEncoding, nullptr, nullptr, fp); +// fclose(fp); + uint64_t result = 0; uint64_t offset = 0; while (blockEncoding != Cudd_ReadOne(ddman)) { - if (Cudd_T(blockEncoding) != Cudd_ReadZero(ddman)) { - blockEncoding = Cudd_T(blockEncoding); + DdNode* then = Cudd_T(blockEncoding); + if (then != Cudd_ReadZero(ddman)) { + blockEncoding = then; result |= 1ull << offset; } else { blockEncoding = Cudd_E(blockEncoding); @@ -205,6 +211,7 @@ namespace storm { DdNode* te = transitionMatrixNode; DdNode* et = transitionMatrixNode; DdNode* ee = transitionMatrixNode; + STORM_LOG_ASSERT(transitionMatrixVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of transition matrix."); if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { DdNode* t = Cudd_T(transitionMatrixNode); DdNode* e = Cudd_E(transitionMatrixNode); @@ -226,16 +233,17 @@ namespace storm { } } else { if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { - tt = Cudd_T(transitionMatrixNode); - te = Cudd_E(transitionMatrixNode); + tt = et = Cudd_T(transitionMatrixNode); + te = ee = Cudd_E(transitionMatrixNode); } else { - tt = te = transitionMatrixNode; + tt = te = et = ee = transitionMatrixNode; } } // Move through partition (for source state). DdNode* sourceT; DdNode* sourceE; + STORM_LOG_ASSERT(sourcePartitionVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); if (sourcePartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { sourceT = Cudd_T(sourcePartitionNode); sourceE = Cudd_E(sourcePartitionNode); @@ -246,6 +254,7 @@ namespace storm { // Move through partition (for target state). DdNode* targetT; DdNode* targetE; + STORM_LOG_ASSERT(targetPartitionVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); if (targetPartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { targetT = Cudd_T(targetPartitionNode); targetE = Cudd_E(targetPartitionNode); @@ -422,10 +431,10 @@ namespace storm { } } else { if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { - tt = sylvan_high(transitionMatrixNode); - te = sylvan_low(transitionMatrixNode); + tt = et = sylvan_high(transitionMatrixNode); + te = ee = sylvan_low(transitionMatrixNode); } else { - tt = te = transitionMatrixNode; + tt = te = et = ee = transitionMatrixNode; } } @@ -490,6 +499,8 @@ namespace storm { template std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables()); + auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); + storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index 873d81608..f7606115f 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -7,14 +7,35 @@ namespace storm { namespace bisimulation { template - SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model) : model(model), transitionMatrix(model.getTransitionMatrix()) { + SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : model(model), transitionMatrix(model.getTransitionMatrix()), mode(mode) { if (DdType == storm::dd::DdType::Sylvan) { this->transitionMatrix = this->transitionMatrix.notZero().ite(this->transitionMatrix, this->transitionMatrix.getDdManager().template getAddUndefined()); } + if (mode == SignatureMode::Lazy) { + if (DdType == storm::dd::DdType::Sylvan) { + this->transitionMatrix01 = model.getQualitativeTransitionMatrix().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); + } else { + this->transitionMatrix01 = model.getQualitativeTransitionMatrix().template toAdd(); + } + } } template - Signature SignatureComputer::compute(Partition const& partition) { + uint64_t SignatureComputer::getNumberOfSignatures() const { + return this->mode == SignatureMode::Lazy ? 2 : 1; + } + + template + Signature SignatureComputer::compute(Partition const& partition, uint64_t index) { + if (mode == SignatureMode::Lazy && index == 1) { + return getQualitativeSignature(partition); + } else { + return getFullSignature(partition); + } + } + + template + Signature SignatureComputer::getFullSignature(Partition const& partition) const { if (partition.storedAsBdd()) { return Signature(this->transitionMatrix.multiplyMatrix(partition.asBdd(), model.getColumnVariables())); } else { @@ -22,6 +43,15 @@ namespace storm { } } + template + Signature SignatureComputer::getQualitativeSignature(Partition const& partition) const { + if (partition.storedAsBdd()) { + return Signature(this->transitionMatrix01.multiplyMatrix(partition.asBdd(), model.getColumnVariables())); + } else { + return Signature(this->transitionMatrix01.multiplyMatrix(partition.asAdd(), model.getColumnVariables())); + } + } + template class SignatureComputer; template class SignatureComputer; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.h b/src/storm/storage/dd/bisimulation/SignatureComputer.h index f2de03f49..9b6177c1e 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.h +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.h @@ -4,6 +4,7 @@ #include "storm/storage/dd/bisimulation/Signature.h" #include "storm/storage/dd/bisimulation/Partition.h" +#include "storm/storage/dd/bisimulation/SignatureMode.h" #include "storm/models/symbolic/Model.h" @@ -14,14 +15,27 @@ namespace storm { template class SignatureComputer { public: - SignatureComputer(storm::models::symbolic::Model const& model); + SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager); - Signature compute(Partition const& partition); + Signature compute(Partition const& partition, uint64_t index = 0); + + uint64_t getNumberOfSignatures() const; private: + Signature getFullSignature(Partition const& partition) const; + + Signature getQualitativeSignature(Partition const& partition) const; + storm::models::symbolic::Model const& model; + // The transition matrix to use for the signature computation. storm::dd::Add transitionMatrix; + + // The mode to use for signature computation. + SignatureMode mode; + + // Only used when using lazy signatures is enabled. + storm::dd::Add transitionMatrix01; }; } diff --git a/src/storm/storage/dd/bisimulation/SignatureMode.h b/src/storm/storage/dd/bisimulation/SignatureMode.h new file mode 100644 index 000000000..bcec54b6f --- /dev/null +++ b/src/storm/storage/dd/bisimulation/SignatureMode.h @@ -0,0 +1,11 @@ +#pragma once + +namespace storm { + namespace dd { + namespace bisimulation { + + enum class SignatureMode { Eager, Lazy }; + + } + } +} From 4af363811f442dfa3032f100e196590f8307ffc8 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 12:24:13 +0200 Subject: [PATCH 15/95] reworked refinement a bit in an attempt to prepare for MDPs --- .../storage/dd/BisimulationDecomposition.cpp | 78 +++++-------------- .../storage/dd/BisimulationDecomposition.h | 33 +++++--- .../dd/bisimulation/PartitionRefiner.cpp | 78 +++++++++++++++++++ src/storm/storage/dd/bisimulation/Signature.h | 1 + .../dd/bisimulation/SignatureComputer.cpp | 72 +++++++++++++---- .../dd/bisimulation/SignatureComputer.h | 37 ++++++++- src/storm/storage/dd/bisimulation/Status.h | 13 ++++ 7 files changed, 223 insertions(+), 89 deletions(-) create mode 100644 src/storm/storage/dd/bisimulation/PartitionRefiner.cpp create mode 100644 src/storm/storage/dd/bisimulation/Status.h diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index 89746b5e9..e7b27efaf 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -1,9 +1,11 @@ #include "storm/storage/dd/BisimulationDecomposition.h" -#include "storm/storage/dd/bisimulation/SignatureComputer.h" -#include "storm/storage/dd/bisimulation/SignatureRefiner.h" +#include "storm/storage/dd/bisimulation/PartitionRefiner.h" + #include "storm/storage/dd/bisimulation/QuotientExtractor.h" +#include "storm/models/symbolic/Model.h" + #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" #include "storm/exceptions/NotSupportedException.h" @@ -24,80 +26,42 @@ namespace storm { } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), currentPartition(initialPartition) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), refiner(std::make_unique>(model, initialPartition)) { STORM_LOG_THROW(!model.hasRewardModel(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support preserving rewards."); } + template + BisimulationDecomposition::~BisimulationDecomposition() = default; + template void BisimulationDecomposition::compute(bisimulation::SignatureMode const& mode) { - this->status = Status::InComputation; - auto start = std::chrono::high_resolution_clock::now(); - std::chrono::high_resolution_clock::duration totalSignatureTime(0); - std::chrono::high_resolution_clock::duration totalRefinementTime(0); + STORM_LOG_ASSERT(refiner, "No suitable refiner."); - STORM_LOG_TRACE("Initial partition has " << currentPartition.getNumberOfBlocks() << " blocks."); + STORM_LOG_TRACE("Initial partition has " << refiner->getStatePartition().getNumberOfBlocks() << " blocks."); #ifndef NDEBUG - STORM_LOG_TRACE("Initial partition has " << currentPartition.getNodeCount() << " nodes."); + STORM_LOG_TRACE("Initial partition has " << refiner->getStatePartition().getNodeCount() << " nodes."); #endif - - SignatureRefiner refiner(model.getManager(), currentPartition.getBlockVariable(), model.getRowVariables()); - SignatureComputer signatureComputer(model, mode); - bool done = false; + + auto start = std::chrono::high_resolution_clock::now(); uint64_t iterations = 0; - while (!done) { + bool refined = true; + while (refined) { + refined = refiner->refine(mode); ++iterations; - auto iterationStart = std::chrono::high_resolution_clock::now(); - - std::chrono::milliseconds::rep signatureTime = 0; - std::chrono::milliseconds::rep refinementTime = 0; - - Partition newPartition; - for (uint64_t index = 0, end = signatureComputer.getNumberOfSignatures(); index < end; ++index) { - auto signatureStart = std::chrono::high_resolution_clock::now(); - Signature signature = signatureComputer.compute(currentPartition, index); - auto signatureEnd = std::chrono::high_resolution_clock::now(); - totalSignatureTime += (signatureEnd - signatureStart); - STORM_LOG_DEBUG("Signature " << iterations << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes and partition DD has " << currentPartition.getNodeCount() << " nodes."); - - auto refinementStart = std::chrono::high_resolution_clock::now(); - newPartition = refiner.refine(currentPartition, signature); - auto refinementEnd = std::chrono::high_resolution_clock::now(); - totalRefinementTime += (refinementEnd - refinementStart); - - signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); - refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); - - // Potentially exit early in case we have refined the partition already. - if (newPartition.getNumberOfBlocks() > currentPartition.getNumberOfBlocks()) { - break; - } - } - - auto iterationTime = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - iterationStart).count(); - - STORM_LOG_DEBUG("Iteration " << iterations << " produced " << newPartition.getNumberOfBlocks() << " blocks and was completed in " << iterationTime << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms)."); - - if (currentPartition == newPartition) { - done = true; - } else { - currentPartition = newPartition; - } + STORM_LOG_TRACE("After iteration " << iterations << " partition has " << refiner->getStatePartition().getNumberOfBlocks() << " blocks."); } - - this->status = Status::FixedPoint; auto end = std::chrono::high_resolution_clock::now(); - auto totalSignatureTimeInMilliseconds = std::chrono::duration_cast(totalSignatureTime).count(); - auto totalRefinementTimeInMilliseconds = std::chrono::duration_cast(totalRefinementTime).count(); - STORM_LOG_DEBUG("Partition refinement completed in " << std::chrono::duration_cast(end - start).count() << "ms (" << iterations << " iterations, signature: " << totalSignatureTimeInMilliseconds << "ms, refinement: " << totalRefinementTimeInMilliseconds << "ms)."); + + STORM_LOG_DEBUG("Partition refinement completed in " << std::chrono::duration_cast(end - start).count() << "ms (" << iterations << " iterations)."); } template std::shared_ptr> BisimulationDecomposition::getQuotient() const { - STORM_LOG_THROW(this->status == Status::FixedPoint, storm::exceptions::InvalidOperationException, "Cannot extract quotient, because bisimulation decomposition was not completed."); + STORM_LOG_THROW(this->refiner->getStatus() == Status::FixedPoint, storm::exceptions::InvalidOperationException, "Cannot extract quotient, because bisimulation decomposition was not completed."); STORM_LOG_TRACE("Starting quotient extraction."); QuotientExtractor extractor; - std::shared_ptr> quotient = extractor.extract(model, currentPartition); + std::shared_ptr> quotient = extractor.extract(model, refiner->getStatePartition()); STORM_LOG_TRACE("Quotient extraction done."); return quotient; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index 3650c58ed..85bd1a48b 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -5,27 +5,39 @@ #include "storm/storage/dd/DdType.h" #include "storm/storage/bisimulation/BisimulationType.h" -#include "storm/storage/dd/bisimulation/Partition.h" #include "storm/storage/dd/bisimulation/SignatureMode.h" -#include "storm/models/symbolic/Model.h" - #include "storm/logic/Formula.h" namespace storm { + namespace models { + template + class Model; + + namespace symbolic { + template + class Model; + } + } + namespace dd { + namespace bisimulation { + template + class Partition; + + template + class PartitionRefiner; + } template class BisimulationDecomposition { public: - enum class Status { - Initialized, InComputation, FixedPoint - }; - BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition); + ~BisimulationDecomposition(); + /*! * Computes the decomposition. */ @@ -37,14 +49,11 @@ namespace storm { std::shared_ptr> getQuotient() const; private: - // The status of the computation. - Status status; - // The model for which to compute the bisimulation decomposition. storm::models::symbolic::Model const& model; - // The current partition in the partition refinement process. Initially set to the initial partition. - bisimulation::Partition currentPartition; + // The refiner to use. + std::unique_ptr> refiner; }; } diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp new file mode 100644 index 000000000..d2061ee07 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -0,0 +1,78 @@ +#include "storm/storage/dd/bisimulation/PartitionRefiner.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + PartitionRefiner::PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : status(Status::Initialized), refinements(0), statePartition(initialStatePartition), signatureComputer(model), signatureRefiner(model.getManager(), statePartition.getBlockVariable(), model.getRowVariables()) { + // Intentionally left empty. + } + + template + bool PartitionRefiner::refine(bisimulation::SignatureMode const& mode) { + this->status = Status::InComputation; + + this->signatureComputer.setSignatureMode(mode); + auto start = std::chrono::high_resolution_clock::now(); + + std::chrono::milliseconds::rep signatureTime = 0; + std::chrono::milliseconds::rep refinementTime = 0; + + bool alreadyRefined = false; + uint64_t index = 0; + Partition newStatePartition; + auto signatureIterator = signatureComputer.compute(statePartition); + while (signatureIterator.hasNext() && !alreadyRefined) { + auto signatureStart = std::chrono::high_resolution_clock::now(); + auto signature = signatureIterator.next(); + auto signatureEnd = std::chrono::high_resolution_clock::now(); + totalSignatureTime += (signatureEnd - signatureStart); + STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); + + auto refinementStart = std::chrono::high_resolution_clock::now(); + newStatePartition = signatureRefiner.refine(statePartition, signature); + auto refinementEnd = std::chrono::high_resolution_clock::now(); + totalRefinementTime += (refinementEnd - refinementStart); + + signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); + refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); + + // Potentially exit early in case we have refined the partition already. + if (newStatePartition.getNumberOfBlocks() > statePartition.getNumberOfBlocks()) { + alreadyRefined = true; + } + } + + auto totalTimeInRefinement = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); + ++refinements; + STORM_LOG_DEBUG("Refinement " << refinements << " produced " << newStatePartition.getNumberOfBlocks() << " blocks and was completed in " << totalTimeInRefinement << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms)."); + + if (statePartition == newStatePartition) { + this->status = Status::FixedPoint; + return false; + } else { + this->statePartition = newStatePartition; + return true; + } + } + + template + Partition const& PartitionRefiner::getStatePartition() const { + return statePartition; + } + + template + Status PartitionRefiner::getStatus() const { + return status; + } + + template class PartitionRefiner; + + template class PartitionRefiner; + template class PartitionRefiner; + template class PartitionRefiner; + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/Signature.h b/src/storm/storage/dd/bisimulation/Signature.h index 437839d54..b355b3021 100644 --- a/src/storm/storage/dd/bisimulation/Signature.h +++ b/src/storm/storage/dd/bisimulation/Signature.h @@ -11,6 +11,7 @@ namespace storm { template class Signature { public: + Signature() = default; Signature(storm::dd::Add const& signatureAdd); storm::dd::Add const& getSignatureAdd() const; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index f7606115f..6eca5cf06 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -2,36 +2,71 @@ #include "storm/storage/dd/DdManager.h" +#include "storm/utility/macros.h" +#include "storm/exceptions/OutOfRangeException.h" + namespace storm { namespace dd { namespace bisimulation { template - SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : model(model), transitionMatrix(model.getTransitionMatrix()), mode(mode) { + SignatureIterator::SignatureIterator(SignatureComputer const& signatureComputer, Partition const& partition) : signatureComputer(signatureComputer), partition(partition), position(0) { + // Intentionally left empty. + } + + template + bool SignatureIterator::hasNext() const { + if (signatureComputer.getSignatureMode() == SignatureMode::Eager) { + return position < 1; + } else { + return position < 2; + } + } + + template + Signature SignatureIterator::next() { + auto mode = signatureComputer.getSignatureMode(); + STORM_LOG_THROW((mode == SignatureMode::Eager && position < 1) || (mode == SignatureMode::Lazy && position < 2), storm::exceptions::OutOfRangeException, "Iterator is out of range."); + Signature result; + + if (mode == SignatureMode::Eager || position == 1) { + result = signatureComputer.getFullSignature(partition); + } else if (position == 0) { + result = signatureComputer.getQualitativeSignature(partition); + } + + ++position; + return result; + } + + template + SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : model(model), transitionMatrix(model.getTransitionMatrix()) { if (DdType == storm::dd::DdType::Sylvan) { this->transitionMatrix = this->transitionMatrix.notZero().ite(this->transitionMatrix, this->transitionMatrix.getDdManager().template getAddUndefined()); } - if (mode == SignatureMode::Lazy) { + this->setSignatureMode(mode); + } + + template + SignatureIterator SignatureComputer::compute(Partition const& partition) { + return SignatureIterator(*this, partition); + } + + template + void SignatureComputer::setSignatureMode(SignatureMode const& newMode) { + if (newMode == SignatureMode::Lazy && !transitionMatrix01) { if (DdType == storm::dd::DdType::Sylvan) { this->transitionMatrix01 = model.getQualitativeTransitionMatrix().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); } else { this->transitionMatrix01 = model.getQualitativeTransitionMatrix().template toAdd(); } } + this->mode = newMode; } template - uint64_t SignatureComputer::getNumberOfSignatures() const { - return this->mode == SignatureMode::Lazy ? 2 : 1; - } - - template - Signature SignatureComputer::compute(Partition const& partition, uint64_t index) { - if (mode == SignatureMode::Lazy && index == 1) { - return getQualitativeSignature(partition); - } else { - return getFullSignature(partition); - } + SignatureMode const& SignatureComputer::getSignatureMode() const { + return mode; } template @@ -45,15 +80,20 @@ namespace storm { template Signature SignatureComputer::getQualitativeSignature(Partition const& partition) const { + STORM_LOG_ASSERT(this->transitionMatrix01, "Need qualitative transition matrix for this step."); if (partition.storedAsBdd()) { - return Signature(this->transitionMatrix01.multiplyMatrix(partition.asBdd(), model.getColumnVariables())); + return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asBdd(), model.getColumnVariables())); } else { - return Signature(this->transitionMatrix01.multiplyMatrix(partition.asAdd(), model.getColumnVariables())); + return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asAdd(), model.getColumnVariables())); } } + + template class SignatureIterator; + template class SignatureIterator; + template class SignatureIterator; + template class SignatureIterator; template class SignatureComputer; - template class SignatureComputer; template class SignatureComputer; template class SignatureComputer; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.h b/src/storm/storage/dd/bisimulation/SignatureComputer.h index 9b6177c1e..426d9e329 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.h +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/bisimulation/Signature.h" @@ -11,21 +13,48 @@ namespace storm { namespace dd { namespace bisimulation { + + template + class SignatureComputer; + template + class SignatureIterator { + public: + SignatureIterator(SignatureComputer const& signatureComputer, Partition const& partition); + + bool hasNext() const; + + Signature next(); + + private: + // The signature computer to use. + SignatureComputer const& signatureComputer; + + // The current partition. + Partition const& partition; + + // The position in the enumeration. + uint64_t position; + }; + template class SignatureComputer { public: - SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager); + friend class SignatureIterator; - Signature compute(Partition const& partition, uint64_t index = 0); + SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager); - uint64_t getNumberOfSignatures() const; + void setSignatureMode(SignatureMode const& newMode); + + SignatureIterator compute(Partition const& partition); private: Signature getFullSignature(Partition const& partition) const; Signature getQualitativeSignature(Partition const& partition) const; + SignatureMode const& getSignatureMode() const; + storm::models::symbolic::Model const& model; // The transition matrix to use for the signature computation. @@ -35,7 +64,7 @@ namespace storm { SignatureMode mode; // Only used when using lazy signatures is enabled. - storm::dd::Add transitionMatrix01; + boost::optional> transitionMatrix01; }; } diff --git a/src/storm/storage/dd/bisimulation/Status.h b/src/storm/storage/dd/bisimulation/Status.h new file mode 100644 index 000000000..532f61d92 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/Status.h @@ -0,0 +1,13 @@ +#pragma once + +namespace storm { + namespace dd { + namespace bisimulation { + + enum class Status { + Initialized, InComputation, FixedPoint + }; + + } + } +} From 22d5cb95cd06579cba51c524a188a2521e9fbbfc Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 12:29:38 +0200 Subject: [PATCH 16/95] add forgotten file --- .../dd/bisimulation/PartitionRefiner.h | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/storm/storage/dd/bisimulation/PartitionRefiner.h diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h new file mode 100644 index 000000000..413889300 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -0,0 +1,66 @@ +#pragma once + +#include "storm/storage/dd/bisimulation/Status.h" +#include "storm/storage/dd/bisimulation/Partition.h" + +#include "storm/storage/dd/bisimulation/SignatureComputer.h" +#include "storm/storage/dd/bisimulation/SignatureRefiner.h" + +namespace storm { + namespace models { + namespace symbolic { + template + class Model; + } + } + + namespace dd { + namespace bisimulation { + + template + class PartitionRefiner { + public: + PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition); + + /*! + * Refines the partition. + * + * @param mode The signature mode to use. + * @return False iff the partition is stable and no refinement was actually performed. + */ + bool refine(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager); + + /*! + * Retrieves the current state partition in the refinement process. + */ + Partition const& getStatePartition() const; + + /*! + * Retrieves the status of the refinement process. + */ + Status getStatus() const; + + private: + // The current status. + Status status; + + // The number of refinements that were made. + uint64_t refinements; + + // The state partition in the refinement process. Initially set to the initial partition. + Partition statePartition; + + // The object used to compute the signatures. + SignatureComputer signatureComputer; + + // The object used to refine the partition(s) based on the signatures. + SignatureRefiner signatureRefiner; + + // Time measurements. + std::chrono::high_resolution_clock::duration totalSignatureTime; + std::chrono::high_resolution_clock::duration totalRefinementTime; + }; + + } + } +} From 277faf6673e2c6d0df5e1a884dbe0f43a3575a6c Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 12:49:56 +0200 Subject: [PATCH 17/95] started on MDP partition refiner --- .../dd/bisimulation/MdpPartitionRefiner.cpp | 29 +++++++++++++++++++ .../dd/bisimulation/PartitionRefiner.h | 4 +-- .../dd/bisimulation/PreservationInformation.h | 1 - 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp new file mode 100644 index 000000000..033f5f5f0 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -0,0 +1,29 @@ +#include "storm/storage/dd/bisimulation/MdpPartitionRefiner.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : PartitionRefiner(model, initialStatePartition) { + // Start by initializing the choice signature refiner. + std::set choiceSignatureVariables; + std::set_union(model.getRowMetaVariables().begin(), model.getRowMetaVariables().end(), model.getNondeterminismVariables().begin(), model.getNondeterminismVariables().end(), std::inserter(choiceSignatureVariables, choiceSignatureVariables.begin())); + choiceSignatureRefiner = SignatureRefiner(model.getManager(), this->statePartition.getBlockVariable(), choiceSignatureVariables); + + // Create dummy choice partition that is refined to the right result in the first call to refine. + } + + template + bool MdpPartitionRefiner::refine(bisimulation::SignatureMode const& mode) { + // Magic here. + } + + template + Partition const& MdpPartitionRefiner::getChoicePartition() const { + return choicePartition; + } + + } + } +} diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index 413889300..c5ccae949 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -40,7 +40,7 @@ namespace storm { */ Status getStatus() const; - private: + protected: // The current status. Status status; @@ -53,7 +53,7 @@ namespace storm { // The object used to compute the signatures. SignatureComputer signatureComputer; - // The object used to refine the partition(s) based on the signatures. + // The object used to refine the state partition based on the signatures. SignatureRefiner signatureRefiner; // Time measurements. diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.h b/src/storm/storage/dd/bisimulation/PreservationInformation.h index e936d3b0d..1aa2620bd 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.h +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.h @@ -11,7 +11,6 @@ namespace storm { class PreservationInformation { public: - PreservationInformation() = default; void addLabel(std::string const& label); From c586213bc60bf7690acfc25a6dcadae381d67abb Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 13:28:54 +0200 Subject: [PATCH 18/95] started on factoring out preservation information --- .../storage/dd/bisimulation/Partition.cpp | 65 +++------------- src/storm/storage/dd/bisimulation/Partition.h | 35 ++------- .../bisimulation/PreservationInformation.cpp | 74 ++++++++++++++++++- .../dd/bisimulation/PreservationInformation.h | 13 ++++ 4 files changed, 98 insertions(+), 89 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index 7c434f653..187c235e1 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -20,12 +20,12 @@ namespace storm { namespace bisimulation { template - Partition::Partition(std::shared_ptr preservationInformation, storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : preservationInformation(preservationInformation), partition(partitionAdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { + Partition::Partition(storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : partition(partitionAdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. } template - Partition::Partition(std::shared_ptr preservationInformation, storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : preservationInformation(preservationInformation), partition(partitionBdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { + Partition::Partition(storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : partition(partitionBdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. } @@ -36,72 +36,27 @@ namespace storm { template Partition Partition::replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const { - return Partition(preservationInformation, newPartitionAdd, blockVariables, nextFreeBlockIndex); + return Partition(newPartitionAdd, blockVariables, nextFreeBlockIndex); } template Partition Partition::replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const { - return Partition(preservationInformation, newPartitionBdd, blockVariables, nextFreeBlockIndex); + return Partition(newPartitionBdd, blockVariables, nextFreeBlockIndex); } template - Partition Partition::create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) { - return create(model, model.getLabels(), bisimulationType); - } - - template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType) { - std::shared_ptr preservationInformation = std::make_shared(); - std::vector expressions; - for (auto const& label : labels) { - preservationInformation->addLabel(label); - expressions.push_back(model.getExpression(label)); - } - return create(model, expressions, preservationInformation, bisimulationType); - } - - template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { - std::shared_ptr preservationInformation = std::make_shared(); - for (auto const& expression : expressions) { - preservationInformation->addExpression(expression); - } - return create(model, expressions, preservationInformation, bisimulationType); - } - - template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) { - if (formulas.empty()) { - return create(model, bisimulationType); - } - - std::shared_ptr preservationInformation = std::make_shared(); - std::set labels; - std::set expressions; - - for (auto const& formula : formulas) { - for (auto const& expressionFormula : formula->getAtomicExpressionFormulas()) { - expressions.insert(expressionFormula->getExpression()); - preservationInformation->addExpression(expressionFormula->getExpression()); - } - for (auto const& labelFormula : formula->getAtomicLabelFormulas()) { - std::string const& label = labelFormula->getLabel(); - STORM_LOG_THROW(model.hasLabel(label), storm::exceptions::InvalidPropertyException, "Property refers to illegal label '" << label << "'."); - preservationInformation->addLabel(label); - expressions.insert(model.getExpression(label)); - } - } + Partition Partition::create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation) { std::vector expressionVector; - for (auto const& expression : expressions) { + for (auto const& expression : preservationInformation.getExpressions()) { expressionVector.emplace_back(expression); } - return create(model, expressionVector, preservationInformation, bisimulationType); + return create(model, expressionVector, bisimulationType); } template - Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation, storm::storage::BisimulationType const& bisimulationType) { + Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); @@ -123,9 +78,9 @@ namespace storm { // Store the partition as an ADD only in the case of CUDD. if (DdType == storm::dd::DdType::CUDD) { - return Partition(preservationInformation, partitionBddAndBlockCount.first.template toAdd(), blockVariables, partitionBddAndBlockCount.second); + return Partition(partitionBddAndBlockCount.first.template toAdd(), blockVariables, partitionBddAndBlockCount.second); } else { - return Partition(preservationInformation, partitionBddAndBlockCount.first, blockVariables, partitionBddAndBlockCount.second); + return Partition(partitionBddAndBlockCount.first, blockVariables, partitionBddAndBlockCount.second); } } diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h index 80d882645..59183a332 100644 --- a/src/storm/storage/dd/bisimulation/Partition.h +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -30,28 +30,9 @@ namespace storm { bool operator==(Partition const& other); Partition replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; - Partition replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const; - /*! - * Creates a partition from the given model that respects all labels. - */ - static Partition create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); - - /*! - * Creates a partition from the given model that respects the given labels. - */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType); - - /*! - * Creates a partition from the given model that respects the given expressions. - */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType); - - /*! - * Creates a partition from the given model that preserves the given formulas. - */ - static Partition create(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); + static Partition create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation); uint64_t getNumberOfStates() const; uint64_t getNumberOfBlocks() const; @@ -69,14 +50,11 @@ namespace storm { uint64_t getNodeCount() const; storm::dd::Bdd getStates() const; - - PreservationInformation const& getPreservationInformation() const; - + private: /*! * Creates a new partition from the given data. * - * @param preservationInformation Informatin about which labels/expressions this partition preserves. * @param partitionAdd An ADD that maps encoding over the state/row variables and the block variable to * one iff the state is in the block. * @param blockVariables The variables to use for the block encoding. Its range must be [0, x] where x is @@ -84,12 +62,11 @@ namespace storm { * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices * between 0 and this number. */ - Partition(std::shared_ptr preservationInformation, storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); + Partition(storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); /*! * Creates a new partition from the given data. * - * @param preservationInformation Informatin about which labels/expressions this partition preserves. * @param partitionBdd A BDD that maps encoding over the state/row variables and the block variable to * true iff the state is in the block. * @param blockVariables The variables to use for the block encoding. Their range must be [0, x] where x is @@ -97,18 +74,16 @@ namespace storm { * @param nextFreeBlockIndex The next free block index. The existing blocks must be encoded with indices * between 0 and this number. */ - Partition(std::shared_ptr preservationInformation, storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); + Partition(storm::dd::Bdd const& partitionBdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex); /*! * Creates a partition from the given model that respects the given expressions. */ - static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, std::shared_ptr const& preservationInformation, storm::storage::BisimulationType const& bisimulationType); + static Partition create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType); static std::pair, uint64_t> createPartitionBdd(storm::dd::DdManager const& manager, storm::models::symbolic::Model const& model, std::vector> const& stateSets, storm::expressions::Variable const& blockVariable); static std::pair createBlockVariables(storm::dd::DdManager& manager, uint64_t numberOfDdVariables); - - std::shared_ptr preservationInformation; /// The DD representing the partition. The DD is over the row variables of the model and the block variable. boost::variant, storm::dd::Add> partition; diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp index f6d25ff4d..363e88fdd 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp @@ -1,24 +1,90 @@ #include "storm/storage/dd/bisimulation/PreservationInformation.h" +#include "storm/logic/Formulas.h" + +#include "storm/utility/macros.h" +#include "storm/exceptions/InvalidPropertyException.h" + namespace storm { namespace dd { namespace bisimulation { - void PreservationInformation::addLabel(std::string const& label) { + template + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : PreservationInformation(model, model.getLabels(), bisimulationType) { + // Intentionally left empty. + } + + template + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType) { + for (auto const& label : labels) { + this->addLabel(label); + this->addExpression(model.getExpression(label)); + } + } + + template + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { + for (auto const& e : expressions) { + this->addExpression(e); + } + } + + template + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) { + if (formulas.empty()) { + // Default to respect all labels if no formulas are given. + for (auto const& label : model.getLabels()) { + this->addLabel(label); + this->addExpression(model.getExpression(label)); + } + } else { + std::set labels; + std::set expressions; + + for (auto const& formula : formulas) { + for (auto const& expressionFormula : formula->getAtomicExpressionFormulas()) { + this->addExpression(expressionFormula->getExpression()); + } + for (auto const& labelFormula : formula->getAtomicLabelFormulas()) { + this->addLabel(labelFormula->getLabel()); + std::string const& label = labelFormula->getLabel(); + STORM_LOG_THROW(model.hasLabel(label), storm::exceptions::InvalidPropertyException, "Property refers to illegal label '" << label << "'."); + this->addExpression(model.getExpression(label)); + } + } + + std::vector expressionVector; + for (auto const& expression : expressions) { + expressionVector.emplace_back(expression); + } + } + } + + template + void PreservationInformation::addLabel(std::string const& label) { labels.insert(label); } - void PreservationInformation::addExpression(storm::expressions::Expression const& expression) { + template + void PreservationInformation::addExpression(storm::expressions::Expression const& expression) { expressions.insert(expression); } - std::set const& PreservationInformation::getLabels() const { + template + std::set const& PreservationInformation::getLabels() const { return labels; } - std::set const& PreservationInformation::getExpressions() const { + template + std::set const& PreservationInformation::getExpressions() const { return expressions; } + + template class PreservationInformation; + + template class PreservationInformation; + template class PreservationInformation; + template class PreservationInformation; } } } diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.h b/src/storm/storage/dd/bisimulation/PreservationInformation.h index 1aa2620bd..a5bfbc3d1 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.h +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.h @@ -2,6 +2,13 @@ #include #include +#include +#include + +#include "storm/models/symbolic/Model.h" +#include "storm/storage/bisimulation/BisimulationType.h" + +#include "storm/logic/Formula.h" #include "storm/storage/expressions/Expression.h" @@ -9,9 +16,15 @@ namespace storm { namespace dd { namespace bisimulation { + template class PreservationInformation { public: PreservationInformation() = default; + + PreservationInformation(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); + PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType); + PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType); + PreservationInformation(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); void addLabel(std::string const& label); void addExpression(storm::expressions::Expression const& expression); From 03920c096ab996a471528924f0054664eed2d41e Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 15:25:06 +0200 Subject: [PATCH 19/95] missing file --- .../dd/bisimulation/MdpPartitionRefiner.h | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h new file mode 100644 index 000000000..1037811d5 --- /dev/null +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h @@ -0,0 +1,37 @@ +#pragma once + +#include "storm/storage/dd/bisimulation/PartitionRefiner.h" + +namespace storm { + namespace dd { + namespace bisimulation { + + template + class MdpPartitionRefiner : public PartitionRefiner { + public: + MdpPartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition); + + /*! + * Refines the partition. + * + * @param mode The signature mode to use. + * @return False iff the partition is stable and no refinement was actually performed. + */ + bool refine(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager); + + /*! + * Retrieves the current choice partition in the refinement process. + */ + Partition const& getChoicePartition() const; + + private: + // The choice partition in the refinement process. + Partition choicePartition; + + // The object used to refine the choice partition based on the signatures. + SignatureRefiner choiceSignatureRefiner; + }; + + } + } +} From f3ebfaa90f2d8fa13e810683eb6c214273285853 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 1 Aug 2017 21:23:08 +0200 Subject: [PATCH 20/95] more work on MDP bisimulation --- src/storm/api/bisimulation.h | 2 +- src/storm/models/ModelBase.h | 11 +++ src/storm/models/symbolic/Model.cpp | 4 - src/storm/models/symbolic/Model.h | 4 +- .../storage/dd/BisimulationDecomposition.cpp | 21 +++-- .../storage/dd/BisimulationDecomposition.h | 6 +- .../dd/bisimulation/MdpPartitionRefiner.cpp | 28 ++++-- .../dd/bisimulation/MdpPartitionRefiner.h | 11 ++- .../storage/dd/bisimulation/Partition.cpp | 39 +++++++-- src/storm/storage/dd/bisimulation/Partition.h | 10 ++- .../dd/bisimulation/PartitionRefiner.cpp | 86 +++++++++++-------- .../dd/bisimulation/PartitionRefiner.h | 4 +- .../dd/bisimulation/QuotientExtractor.cpp | 28 +++--- .../dd/bisimulation/QuotientExtractor.h | 11 +-- .../dd/bisimulation/SignatureRefiner.cpp | 2 +- .../dd/bisimulation/SignatureRefiner.h | 9 +- 16 files changed, 181 insertions(+), 95 deletions(-) diff --git a/src/storm/api/bisimulation.h b/src/storm/api/bisimulation.h index c59c62b09..825b8e4c8 100644 --- a/src/storm/api/bisimulation.h +++ b/src/storm/api/bisimulation.h @@ -57,7 +57,7 @@ namespace storm { template typename std::enable_if::value, std::shared_ptr>>::type performBisimulationMinimization(std::shared_ptr> const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType = storm::storage::BisimulationType::Strong, storm::dd::bisimulation::SignatureMode const& mode = storm::dd::bisimulation::SignatureMode::Eager) { - STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc), storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is currently only available for DTMCs and CTMCs."); + STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc) || model->isOfType(storm::models::ModelType::Mdp), storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is currently only available for DTMCs and CTMCs."); STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); storm::dd::BisimulationDecomposition decomposition(*model, formulas, bisimulationType); diff --git a/src/storm/models/ModelBase.h b/src/storm/models/ModelBase.h index cbef9a9dc..e6fb3f52f 100644 --- a/src/storm/models/ModelBase.h +++ b/src/storm/models/ModelBase.h @@ -38,6 +38,17 @@ namespace storm { return std::dynamic_pointer_cast(this->shared_from_this()); } + /*! + * Casts the model into the model type given by the template parameter. + * + * @return A shared pointer of the requested type that points to the model if the cast succeeded and a null + * pointer otherwise. + */ + template + std::shared_ptr as() const { + return std::dynamic_pointer_cast(this->shared_from_this()); + } + /*! * @brief Return the actual type of the model. * diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 27a37534f..7801241a3 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -7,10 +7,6 @@ #include "storm/adapters/AddExpressionAdapter.h" -#include "storm/storage/dd/DdManager.h" -#include "storm/storage/dd/Add.h" -#include "storm/storage/dd/Bdd.h" - #include "storm/models/symbolic/StandardRewardModel.h" #include "storm/utility/macros.h" diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index dbd74634c..68d84cded 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -9,6 +9,7 @@ #include "storm/storage/expressions/Expression.h" #include "storm/storage/expressions/Variable.h" #include "storm/storage/dd/DdType.h" +#include "storm/storage/dd/Add.h" #include "storm/storage/dd/Bdd.h" #include "storm/models/Model.h" #include "storm/utility/OsDetection.h" @@ -22,9 +23,6 @@ namespace storm { template class Dd; - template - class Add; - template class DdManager; diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index e7b27efaf..77aa64f1d 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -1,10 +1,12 @@ #include "storm/storage/dd/BisimulationDecomposition.h" +#include "storm/storage/dd/bisimulation/Partition.h" #include "storm/storage/dd/bisimulation/PartitionRefiner.h" - +#include "storm/storage/dd/bisimulation/MdpPartitionRefiner.h" #include "storm/storage/dd/bisimulation/QuotientExtractor.h" #include "storm/models/symbolic/Model.h" +#include "storm/models/symbolic/Mdp.h" #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" @@ -14,19 +16,28 @@ namespace storm { namespace dd { using namespace bisimulation; + + template + std::unique_ptr> createRefiner(storm::models::symbolic::Model const& model, Partition const& initialPartition) { + if (model.isOfType(storm::models::ModelType::Mdp)) { + return std::make_unique>(*model.template as>(), initialPartition); + } else { + return std::make_unique>(model, initialPartition); + } + } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : BisimulationDecomposition(model, bisimulation::Partition::create(model, bisimulationType)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { // Intentionally left empty. } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) : BisimulationDecomposition(model, bisimulation::Partition::create(model, formulas, bisimulationType)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, formulas, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { // Intentionally left empty. } template - BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition) : model(model), refiner(std::make_unique>(model, initialPartition)) { + BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition, bisimulation::PreservationInformation const& preservationInformation) : model(model), preservationInformation(preservationInformation), refiner(createRefiner(model, initialPartition)) { STORM_LOG_THROW(!model.hasRewardModel(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support preserving rewards."); } @@ -61,7 +72,7 @@ namespace storm { STORM_LOG_TRACE("Starting quotient extraction."); QuotientExtractor extractor; - std::shared_ptr> quotient = extractor.extract(model, refiner->getStatePartition()); + std::shared_ptr> quotient = extractor.extract(model, refiner->getStatePartition(), preservationInformation); STORM_LOG_TRACE("Quotient extraction done."); return quotient; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index 85bd1a48b..efc5a0a7f 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -6,6 +6,7 @@ #include "storm/storage/dd/DdType.h" #include "storm/storage/bisimulation/BisimulationType.h" #include "storm/storage/dd/bisimulation/SignatureMode.h" +#include "storm/storage/dd/bisimulation/PreservationInformation.h" #include "storm/logic/Formula.h" @@ -34,7 +35,7 @@ namespace storm { public: BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType); BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType); - BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition); + BisimulationDecomposition(storm::models::symbolic::Model const& model, bisimulation::Partition const& initialPartition, bisimulation::PreservationInformation const& preservationInformation); ~BisimulationDecomposition(); @@ -52,6 +53,9 @@ namespace storm { // The model for which to compute the bisimulation decomposition. storm::models::symbolic::Model const& model; + // The object capturing what is preserved. + bisimulation::PreservationInformation preservationInformation; + // The refiner to use. std::unique_ptr> refiner; }; diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 033f5f5f0..78c89e7bf 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -1,22 +1,30 @@ #include "storm/storage/dd/bisimulation/MdpPartitionRefiner.h" +#include "storm/models/symbolic/Mdp.h" + namespace storm { namespace dd { namespace bisimulation { template - MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : PartitionRefiner(model, initialStatePartition) { - // Start by initializing the choice signature refiner. - std::set choiceSignatureVariables; - std::set_union(model.getRowMetaVariables().begin(), model.getRowMetaVariables().end(), model.getNondeterminismVariables().begin(), model.getNondeterminismVariables().end(), std::inserter(choiceSignatureVariables, choiceSignatureVariables.begin())); - choiceSignatureRefiner = SignatureRefiner(model.getManager(), this->statePartition.getBlockVariable(), choiceSignatureVariables); + MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())) { - // Create dummy choice partition that is refined to the right result in the first call to refine. + // Initialize the choice signature refiner. + std::set choiceSignatureVariables; + std::set_union(mdp.getRowVariables().begin(), mdp.getRowVariables().end(), mdp.getNondeterminismVariables().begin(), mdp.getNondeterminismVariables().end(), std::inserter(choiceSignatureVariables, choiceSignatureVariables.begin())); + choiceSignatureRefiner = SignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), choiceSignatureVariables); } template bool MdpPartitionRefiner::refine(bisimulation::SignatureMode const& mode) { - // Magic here. + Partition newChoicePartition = this->internalRefine(choiceSignatureRefiner, choicePartition, mode); + + if (newChoicePartition == choicePartition) { + this->status = Status::FixedPoint; + return false; + } else { + return PartitionRefiner::refine(mode); + } } template @@ -24,6 +32,12 @@ namespace storm { return choicePartition; } + template class MdpPartitionRefiner; + + template class MdpPartitionRefiner; + template class MdpPartitionRefiner; + template class MdpPartitionRefiner; + } } } diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h index 1037811d5..4abdcb427 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h @@ -3,13 +3,20 @@ #include "storm/storage/dd/bisimulation/PartitionRefiner.h" namespace storm { + namespace models { + namespace symbolic { + template + class Mdp; + } + } + namespace dd { namespace bisimulation { template class MdpPartitionRefiner : public PartitionRefiner { public: - MdpPartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition); + MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition); /*! * Refines the partition. @@ -17,7 +24,7 @@ namespace storm { * @param mode The signature mode to use. * @return False iff the partition is stable and no refinement was actually performed. */ - bool refine(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager); + virtual bool refine(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager) override; /*! * Retrieves the current choice partition in the refinement process. diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index 187c235e1..bde87a5b9 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -8,6 +8,8 @@ #include "storm/logic/AtomicExpressionFormula.h" #include "storm/logic/AtomicLabelFormula.h" +#include "storm/models/symbolic/Mdp.h" + #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/BisimulationSettings.h" @@ -19,6 +21,11 @@ namespace storm { namespace dd { namespace bisimulation { + template + Partition::Partition() : nextFreeBlockIndex(0) { + // Intentionally left empty. + } + template Partition::Partition(storm::dd::Add const& partitionAdd, std::pair const& blockVariables, uint64_t nextFreeBlockIndex) : partition(partitionAdd), blockVariables(blockVariables), nextFreeBlockIndex(nextFreeBlockIndex) { // Intentionally left empty. @@ -45,7 +52,7 @@ namespace storm { } template - Partition Partition::create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation) { + Partition Partition::create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation) { std::vector expressionVector; for (auto const& expression : preservationInformation.getExpressions()) { @@ -57,7 +64,6 @@ namespace storm { template Partition Partition::create(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { - STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); storm::dd::DdManager& manager = model.getManager(); @@ -72,6 +78,13 @@ namespace storm { auto const& ddMetaVariable = manager.getMetaVariable(metaVariable); numberOfDdVariables += ddMetaVariable.getNumberOfDdVariables(); } + if (model.getType() == storm::models::ModelType::Mdp) { + auto mdp = model.template as>(); + for (auto const& metaVariable : mdp->getNondeterminismVariables()) { + auto const& ddMetaVariable = manager.getMetaVariable(metaVariable); + numberOfDdVariables += ddMetaVariable.getNumberOfDdVariables(); + } + } std::pair blockVariables = createBlockVariables(manager, numberOfDdVariables); std::pair, uint64_t> partitionBddAndBlockCount = createPartitionBdd(manager, model, stateSets, blockVariables.first); @@ -84,6 +97,18 @@ namespace storm { } } + template + Partition Partition::createTrivialChoicePartition(storm::models::symbolic::NondeterministicModel const& model, std::pair const& blockVariables) { + storm::dd::Bdd choicePartitionBdd = !model.getIllegalSuccessorMask() && model.getManager().getEncoding(blockVariables.first, 0, false); + + // Store the partition as an ADD only in the case of CUDD. + if (DdType == storm::dd::DdType::CUDD) { + return Partition(choicePartitionBdd.template toAdd(), blockVariables, 1); + } else { + return Partition(choicePartitionBdd, blockVariables, 1); + } + } + template uint64_t Partition::getNumberOfStates() const { return this->getStates().getNonZeroCount(); @@ -123,6 +148,11 @@ namespace storm { return boost::get>(partition); } + template + std::pair const& Partition::getBlockVariables() const { + return blockVariables; + } + template storm::expressions::Variable const& Partition::getBlockVariable() const { return blockVariables.first; @@ -147,11 +177,6 @@ namespace storm { } } - template - PreservationInformation const& Partition::getPreservationInformation() const { - return *preservationInformation; - } - template void enumerateBlocksRec(std::vector> const& stateSets, storm::dd::Bdd const& currentStateSet, uint64_t offset, storm::expressions::Variable const& blockVariable, std::function const&)> const& callback) { if (currentStateSet.isZero()) { diff --git a/src/storm/storage/dd/bisimulation/Partition.h b/src/storm/storage/dd/bisimulation/Partition.h index 59183a332..3a620e681 100644 --- a/src/storm/storage/dd/bisimulation/Partition.h +++ b/src/storm/storage/dd/bisimulation/Partition.h @@ -11,6 +11,7 @@ #include "storm/storage/bisimulation/BisimulationType.h" #include "storm/models/symbolic/Model.h" +#include "storm/models/symbolic/NondeterministicModel.h" namespace storm { namespace logic { @@ -20,19 +21,21 @@ namespace storm { namespace dd { namespace bisimulation { + template class PreservationInformation; template class Partition { public: - Partition() = default; + Partition(); bool operator==(Partition const& other); Partition replacePartition(storm::dd::Add const& newPartitionAdd, uint64_t nextFreeBlockIndex) const; Partition replacePartition(storm::dd::Bdd const& newPartitionBdd, uint64_t nextFreeBlockIndex) const; - static Partition create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation); + static Partition create(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType, PreservationInformation const& preservationInformation); + static Partition createTrivialChoicePartition(storm::models::symbolic::NondeterministicModel const& model, std::pair const& blockVariables); uint64_t getNumberOfStates() const; uint64_t getNumberOfBlocks() const; @@ -42,7 +45,8 @@ namespace storm { storm::dd::Add const& asAdd() const; storm::dd::Bdd const& asBdd() const; - + + std::pair const& getBlockVariables() const; storm::expressions::Variable const& getBlockVariable() const; storm::expressions::Variable const& getPrimedBlockVariable() const; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index d2061ee07..b0dfa2aeb 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -10,44 +10,8 @@ namespace storm { } template - bool PartitionRefiner::refine(bisimulation::SignatureMode const& mode) { - this->status = Status::InComputation; - - this->signatureComputer.setSignatureMode(mode); - auto start = std::chrono::high_resolution_clock::now(); - - std::chrono::milliseconds::rep signatureTime = 0; - std::chrono::milliseconds::rep refinementTime = 0; - - bool alreadyRefined = false; - uint64_t index = 0; - Partition newStatePartition; - auto signatureIterator = signatureComputer.compute(statePartition); - while (signatureIterator.hasNext() && !alreadyRefined) { - auto signatureStart = std::chrono::high_resolution_clock::now(); - auto signature = signatureIterator.next(); - auto signatureEnd = std::chrono::high_resolution_clock::now(); - totalSignatureTime += (signatureEnd - signatureStart); - STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); - - auto refinementStart = std::chrono::high_resolution_clock::now(); - newStatePartition = signatureRefiner.refine(statePartition, signature); - auto refinementEnd = std::chrono::high_resolution_clock::now(); - totalRefinementTime += (refinementEnd - refinementStart); - - signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); - refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); - - // Potentially exit early in case we have refined the partition already. - if (newStatePartition.getNumberOfBlocks() > statePartition.getNumberOfBlocks()) { - alreadyRefined = true; - } - } - - auto totalTimeInRefinement = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); - ++refinements; - STORM_LOG_DEBUG("Refinement " << refinements << " produced " << newStatePartition.getNumberOfBlocks() << " blocks and was completed in " << totalTimeInRefinement << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms)."); - + bool PartitionRefiner::refine(SignatureMode const& mode) { + Partition newStatePartition = this->internalRefine(signatureRefiner, statePartition, mode); if (statePartition == newStatePartition) { this->status = Status::FixedPoint; return false; @@ -57,6 +21,52 @@ namespace storm { } } + template + Partition PartitionRefiner::internalRefine(SignatureRefiner& signatureRefiner, Partition const& oldPartition, SignatureMode const& mode) { + auto start = std::chrono::high_resolution_clock::now(); + + if (this->status != Status::FixedPoint) { + this->status = Status::InComputation; + + this->signatureComputer.setSignatureMode(mode); + + std::chrono::milliseconds::rep signatureTime = 0; + std::chrono::milliseconds::rep refinementTime = 0; + + bool refined = false; + uint64_t index = 0; + Partition newPartition; + auto signatureIterator = signatureComputer.compute(oldPartition); + while (signatureIterator.hasNext() && !refined) { + auto signatureStart = std::chrono::high_resolution_clock::now(); + auto signature = signatureIterator.next(); + auto signatureEnd = std::chrono::high_resolution_clock::now(); + totalSignatureTime += (signatureEnd - signatureStart); + STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); + + auto refinementStart = std::chrono::high_resolution_clock::now(); + newPartition = signatureRefiner.refine(statePartition, signature); + auto refinementEnd = std::chrono::high_resolution_clock::now(); + totalRefinementTime += (refinementEnd - refinementStart); + + signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); + refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); + + // Potentially exit early in case we have refined the partition already. + if (newPartition.getNumberOfBlocks() > oldPartition.getNumberOfBlocks()) { + refined = true; + } + } + + auto totalTimeInRefinement = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); + ++refinements; + STORM_LOG_DEBUG("Refinement " << refinements << " produced " << newPartition.getNumberOfBlocks() << " blocks and was completed in " << totalTimeInRefinement << "ms (signature: " << signatureTime << "ms, refinement: " << refinementTime << "ms)."); + return newPartition; + } else { + return oldPartition; + } + } + template Partition const& PartitionRefiner::getStatePartition() const { return statePartition; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index c5ccae949..b259de135 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -28,7 +28,7 @@ namespace storm { * @param mode The signature mode to use. * @return False iff the partition is stable and no refinement was actually performed. */ - bool refine(bisimulation::SignatureMode const& mode = bisimulation::SignatureMode::Eager); + virtual bool refine(SignatureMode const& mode = SignatureMode::Eager); /*! * Retrieves the current state partition in the refinement process. @@ -41,6 +41,8 @@ namespace storm { Status getStatus() const; protected: + Partition internalRefine(SignatureRefiner& signatureRefiner, Partition const& oldPartition, SignatureMode const& mode = SignatureMode::Eager); + // The current status. Status status; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 2fb31b2d1..ccaeaa774 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -480,13 +480,13 @@ namespace storm { } template - std::shared_ptr> QuotientExtractor::extract(storm::models::symbolic::Model const& model, Partition const& partition) { + std::shared_ptr> QuotientExtractor::extract(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { auto start = std::chrono::high_resolution_clock::now(); std::shared_ptr> result; if (quotientFormat == storm::settings::modules::BisimulationSettings::QuotientFormat::Sparse) { - result = extractSparseQuotient(model, partition); + result = extractSparseQuotient(model, partition, preservationInformation); } else { - result = extractDdQuotient(model, partition); + result = extractDdQuotient(model, partition, preservationInformation); } auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient extraction completed in " << std::chrono::duration_cast(end - start).count() << "ms."); @@ -497,7 +497,7 @@ namespace storm { } template - std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { + std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables()); auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); @@ -507,10 +507,10 @@ namespace storm { quotientStateLabeling.addLabel("init", sparseExtractor.extractStates(model.getInitialStates(), partition)); quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); - for (auto const& label : partition.getPreservationInformation().getLabels()) { + for (auto const& label : preservationInformation.getLabels()) { quotientStateLabeling.addLabel(label, sparseExtractor.extractStates(model.getStates(label), partition)); } - for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; stream << expression; std::string expressionAsString = stream.str(); @@ -533,12 +533,12 @@ namespace storm { } template - std::shared_ptr> QuotientExtractor::extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition) { - return extractQuotientUsingBlockVariables(model, partition); + std::shared_ptr> QuotientExtractor::extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { + return extractQuotientUsingBlockVariables(model, partition, preservationInformation); } template - std::shared_ptr> QuotientExtractor::extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition) { + std::shared_ptr> QuotientExtractor::extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { auto modelType = model.getType(); if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { @@ -568,10 +568,10 @@ namespace storm { storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; std::map> preservedLabelBdds; - for (auto const& label : partition.getPreservationInformation().getLabels()) { + for (auto const& label : preservationInformation.getLabels()) { preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); } - for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; stream << expression; std::string expressionAsString = stream.str(); @@ -597,7 +597,7 @@ namespace storm { } template - std::shared_ptr> QuotientExtractor::extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition) { + std::shared_ptr> QuotientExtractor::extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { auto modelType = model.getType(); if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { @@ -619,10 +619,10 @@ namespace storm { storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(model.getColumnVariables()) && reachableStates; std::map> preservedLabelBdds; - for (auto const& label : partition.getPreservationInformation().getLabels()) { + for (auto const& label : preservationInformation.getLabels()) { preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); } - for (auto const& expression : partition.getPreservationInformation().getExpressions()) { + for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; stream << expression; std::string expressionAsString = stream.str(); diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.h b/src/storm/storage/dd/bisimulation/QuotientExtractor.h index 14b518016..dda06a3d3 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.h +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.h @@ -8,6 +8,7 @@ #include "storm/models/sparse/Model.h" #include "storm/storage/dd/bisimulation/Partition.h" +#include "storm/storage/dd/bisimulation/PreservationInformation.h" #include "storm/settings/modules/BisimulationSettings.h" @@ -20,14 +21,14 @@ namespace storm { public: QuotientExtractor(); - std::shared_ptr> extract(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extract(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); private: - std::shared_ptr> extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); - std::shared_ptr> extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition); - std::shared_ptr> extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition); - std::shared_ptr> extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition); + std::shared_ptr> extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); + std::shared_ptr> extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); + std::shared_ptr> extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); bool useRepresentatives; storm::settings::modules::BisimulationSettings::QuotientFormat quotientFormat; diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 3f101776d..028fb7767 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -444,7 +444,7 @@ namespace storm { }; template - SignatureRefiner::SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables) : manager(manager), stateVariables(stateVariables) { + SignatureRefiner::SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables) : manager(&manager), stateVariables(stateVariables) { uint64_t lastStateLevel = 0; for (auto const& stateVariable : stateVariables) { lastStateLevel = std::max(lastStateLevel, manager.getMetaVariable(stateVariable).getHighestLevel()); diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.h b/src/storm/storage/dd/bisimulation/SignatureRefiner.h index 32532dc62..ba6777d13 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.h +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "storm/storage/dd/DdType.h" #include "storm/storage/dd/bisimulation/Partition.h" @@ -15,6 +17,7 @@ namespace storm { template class SignatureRefiner { public: + SignatureRefiner() = default; SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables); ~SignatureRefiner(); @@ -23,13 +26,13 @@ namespace storm { private: // The manager responsible for the DDs. - storm::dd::DdManager const& manager; + storm::dd::DdManager const* manager; // The variables encodin the states. - std::set const& stateVariables; + std::set stateVariables; // The internal refiner. - std::unique_ptr> internalRefiner; + std::shared_ptr> internalRefiner; }; } From a1db269e8fb57a9083613cde3848e91a41525b6f Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 2 Aug 2017 13:55:30 +0200 Subject: [PATCH 21/95] started on debugging MDP bisimulation --- src/storm/models/symbolic/Model.cpp | 10 ++++ src/storm/models/symbolic/Model.h | 14 +++++ .../models/symbolic/NondeterministicModel.cpp | 14 +++++ .../models/symbolic/NondeterministicModel.h | 3 + .../dd/bisimulation/MdpPartitionRefiner.cpp | 29 ++++++--- .../dd/bisimulation/MdpPartitionRefiner.h | 7 ++- .../dd/bisimulation/PartitionRefiner.cpp | 17 ++++-- .../dd/bisimulation/PartitionRefiner.h | 2 +- .../dd/bisimulation/SignatureComputer.cpp | 60 ++++++++++++++----- .../dd/bisimulation/SignatureComputer.h | 20 ++++--- 10 files changed, 138 insertions(+), 38 deletions(-) diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 7801241a3..46c8ad35c 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -172,6 +172,16 @@ namespace storm { return columnVariables; } + template + std::set Model::getRowAndNondeterminismVariables() const { + return rowVariables; + } + + template + std::set Model::getColumnAndNondeterminismVariables() const { + return columnVariables; + } + template std::vector> const& Model::getRowColumnMetaVariablePairs() const { return rowColumnMetaVariablePairs; diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index 68d84cded..395028ae9 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -221,6 +221,20 @@ namespace storm { */ std::set const& getColumnVariables() const; + /*! + * Retrieves all meta variables used to encode rows and nondetermism. + * + * @return All meta variables used to encode rows and nondetermism. + */ + virtual std::set getRowAndNondeterminismVariables() const; + + /*! + * Retrieves all meta variables used to encode columns and nondetermism. + * + * @return All meta variables used to encode columns and nondetermism. + */ + virtual std::set getColumnAndNondeterminismVariables() const; + /*! * Retrieves the pairs of row and column meta variables. * diff --git a/src/storm/models/symbolic/NondeterministicModel.cpp b/src/storm/models/symbolic/NondeterministicModel.cpp index 6545e27c0..32baf1cd2 100644 --- a/src/storm/models/symbolic/NondeterministicModel.cpp +++ b/src/storm/models/symbolic/NondeterministicModel.cpp @@ -62,6 +62,20 @@ namespace storm { return nondeterminismVariables; } + template + std::set NondeterministicModel::getRowAndNondeterminismVariables() const { + std::set result; + std::set_union(this->getRowVariables().begin(), this->getRowVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); + return result; + } + + template + std::set NondeterministicModel::getColumnAndNondeterminismVariables() const { + std::set result; + std::set_union(this->getColumnVariables().begin(), this->getColumnVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); + return result; + } + template storm::dd::Bdd const& NondeterministicModel::getIllegalMask() const { return illegalMask; diff --git a/src/storm/models/symbolic/NondeterministicModel.h b/src/storm/models/symbolic/NondeterministicModel.h index 45dc27b0a..b3d5b7cb6 100644 --- a/src/storm/models/symbolic/NondeterministicModel.h +++ b/src/storm/models/symbolic/NondeterministicModel.h @@ -99,6 +99,9 @@ namespace storm { */ std::set const& getNondeterminismVariables() const; + virtual std::set getRowAndNondeterminismVariables() const override; + virtual std::set getColumnAndNondeterminismVariables() const override; + /*! * Retrieves a BDD characterizing all illegal nondeterminism encodings in the model. * diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 78c89e7bf..86b0cf495 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -7,23 +7,36 @@ namespace storm { namespace bisimulation { template - MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())) { - - // Initialize the choice signature refiner. - std::set choiceSignatureVariables; - std::set_union(mdp.getRowVariables().begin(), mdp.getRowVariables().end(), mdp.getNondeterminismVariables().begin(), mdp.getNondeterminismVariables().end(), std::inserter(choiceSignatureVariables, choiceSignatureVariables.begin())); - choiceSignatureRefiner = SignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), choiceSignatureVariables); + MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())), stateSignatureComputer(mdp.getQualitativeTransitionMatrix(false), mdp.getColumnAndNondeterminismVariables()), stateSignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), mdp.getRowVariables()) { + // Intentionally left empty. } template bool MdpPartitionRefiner::refine(bisimulation::SignatureMode const& mode) { - Partition newChoicePartition = this->internalRefine(choiceSignatureRefiner, choicePartition, mode); + // In this procedure, we will + // (1) refine the partition of nondeterministic choices based on the state partition. For this, we use + // the signature computer/refiner of the superclass. These objects use the full transition matrix. + // (2) if the choice partition was in fact split, the state partition also needs to be refined. + // For this, we use the signature computer/refiner of this class. + + STORM_LOG_TRACE("Refining choice partition."); + Partition newChoicePartition = this->internalRefine(this->signatureComputer, this->signatureRefiner, choicePartition, this->statePartition, mode); if (newChoicePartition == choicePartition) { this->status = Status::FixedPoint; return false; } else { - return PartitionRefiner::refine(mode); + // If the choice partition changed, refine the state partition. Use eager mode as abstracting from the probabilities is not worth doing. + STORM_LOG_TRACE("Refining state partition."); + Partition newStatePartition = this->internalRefine(this->stateSignatureComputer, this->stateSignatureRefiner, this->statePartition, this->choicePartition, SignatureMode::Eager); + + if (newStatePartition == this->statePartition) { + this->status = Status::FixedPoint; + return false; + } else { + this->statePartition = newStatePartition; + return true; + } } } diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h index 4abdcb427..c513386ee 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h @@ -34,9 +34,12 @@ namespace storm { private: // The choice partition in the refinement process. Partition choicePartition; + + // The object used to compute the state signatures. + SignatureComputer stateSignatureComputer; - // The object used to refine the choice partition based on the signatures. - SignatureRefiner choiceSignatureRefiner; + // The object used to refine the state partition based on the signatures. + SignatureRefiner stateSignatureRefiner; }; } diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index b0dfa2aeb..bd9890adf 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -5,13 +5,13 @@ namespace storm { namespace bisimulation { template - PartitionRefiner::PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : status(Status::Initialized), refinements(0), statePartition(initialStatePartition), signatureComputer(model), signatureRefiner(model.getManager(), statePartition.getBlockVariable(), model.getRowVariables()) { + PartitionRefiner::PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : status(Status::Initialized), refinements(0), statePartition(initialStatePartition), signatureComputer(model), signatureRefiner(model.getManager(), statePartition.getBlockVariable(), model.getRowAndNondeterminismVariables()) { // Intentionally left empty. } template bool PartitionRefiner::refine(SignatureMode const& mode) { - Partition newStatePartition = this->internalRefine(signatureRefiner, statePartition, mode); + Partition newStatePartition = this->internalRefine(signatureComputer, signatureRefiner, statePartition, statePartition, mode); if (statePartition == newStatePartition) { this->status = Status::FixedPoint; return false; @@ -22,13 +22,13 @@ namespace storm { } template - Partition PartitionRefiner::internalRefine(SignatureRefiner& signatureRefiner, Partition const& oldPartition, SignatureMode const& mode) { + Partition PartitionRefiner::internalRefine(SignatureComputer& signatureComputer, SignatureRefiner& signatureRefiner, Partition const& oldPartition, Partition const& targetPartition, SignatureMode const& mode) { auto start = std::chrono::high_resolution_clock::now(); if (this->status != Status::FixedPoint) { this->status = Status::InComputation; - this->signatureComputer.setSignatureMode(mode); + signatureComputer.setSignatureMode(mode); std::chrono::milliseconds::rep signatureTime = 0; std::chrono::milliseconds::rep refinementTime = 0; @@ -36,7 +36,7 @@ namespace storm { bool refined = false; uint64_t index = 0; Partition newPartition; - auto signatureIterator = signatureComputer.compute(oldPartition); + auto signatureIterator = signatureComputer.compute(targetPartition); while (signatureIterator.hasNext() && !refined) { auto signatureStart = std::chrono::high_resolution_clock::now(); auto signature = signatureIterator.next(); @@ -44,11 +44,18 @@ namespace storm { totalSignatureTime += (signatureEnd - signatureStart); STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); + signature.getSignatureAdd().exportToDot("sig" + std::to_string(refinements) + ".dot"); + if (refinements == 1) { + exit(-1); + } + auto refinementStart = std::chrono::high_resolution_clock::now(); newPartition = signatureRefiner.refine(statePartition, signature); auto refinementEnd = std::chrono::high_resolution_clock::now(); totalRefinementTime += (refinementEnd - refinementStart); + newPartition.asAdd().exportToDot("newpart" + std::to_string(refinements) + ".dot"); + signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index b259de135..2bd090c3d 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -41,7 +41,7 @@ namespace storm { Status getStatus() const; protected: - Partition internalRefine(SignatureRefiner& signatureRefiner, Partition const& oldPartition, SignatureMode const& mode = SignatureMode::Eager); + Partition internalRefine(SignatureComputer& stateSignatureComputer, SignatureRefiner& signatureRefiner, Partition const& oldPartition, Partition const& targetPartition, SignatureMode const& mode = SignatureMode::Eager); // The current status. Status status; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index 6eca5cf06..e847dd9bc 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -40,11 +40,33 @@ namespace storm { } template - SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : model(model), transitionMatrix(model.getTransitionMatrix()) { + SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : SignatureComputer(model.getTransitionMatrix(), boost::none, model.getColumnVariables(), mode) { + // Intentionally left empty. + } + + template + SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : SignatureComputer(transitionMatrix, boost::none, columnVariables, mode) { + // Intentionally left empty. + } + + template + SignatureComputer::SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : SignatureComputer(qualitativeTransitionMatrix.template toAdd(), boost::none, columnVariables, mode) { + // Intentionally left empty. + } + + template + SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : transitionMatrix(transitionMatrix), columnVariables(columnVariables), mode(mode) { if (DdType == storm::dd::DdType::Sylvan) { this->transitionMatrix = this->transitionMatrix.notZero().ite(this->transitionMatrix, this->transitionMatrix.getDdManager().template getAddUndefined()); } - this->setSignatureMode(mode); + + if (qualitativeTransitionMatrix) { + if (DdType == storm::dd::DdType::Sylvan) { + this->transitionMatrix01 = qualitativeTransitionMatrix.get().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); + } else { + this->transitionMatrix01 = qualitativeTransitionMatrix.get().template toAdd(); + } + } } template @@ -54,13 +76,6 @@ namespace storm { template void SignatureComputer::setSignatureMode(SignatureMode const& newMode) { - if (newMode == SignatureMode::Lazy && !transitionMatrix01) { - if (DdType == storm::dd::DdType::Sylvan) { - this->transitionMatrix01 = model.getQualitativeTransitionMatrix().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); - } else { - this->transitionMatrix01 = model.getQualitativeTransitionMatrix().template toAdd(); - } - } this->mode = newMode; } @@ -71,20 +86,37 @@ namespace storm { template Signature SignatureComputer::getFullSignature(Partition const& partition) const { + this->transitionMatrix.exportToDot("trans.dot"); if (partition.storedAsBdd()) { - return Signature(this->transitionMatrix.multiplyMatrix(partition.asBdd(), model.getColumnVariables())); + return Signature(this->transitionMatrix.multiplyMatrix(partition.asBdd(), columnVariables)); } else { - return Signature(this->transitionMatrix.multiplyMatrix(partition.asAdd(), model.getColumnVariables())); + auto result = Signature(this->transitionMatrix.multiplyMatrix(partition.asAdd(), columnVariables)); + + std::cout << "abstracting vars" << std::endl; + for (auto const& v : columnVariables) { + std::cout << v.getName() << std::endl; + } + std::cout << "----" << std::endl; + result.getSignatureAdd().exportToDot("fullsig.dot"); + + return result; } } template Signature SignatureComputer::getQualitativeSignature(Partition const& partition) const { - STORM_LOG_ASSERT(this->transitionMatrix01, "Need qualitative transition matrix for this step."); + if (this->mode == SignatureMode::Lazy && !transitionMatrix01) { + if (DdType == storm::dd::DdType::Sylvan) { + this->transitionMatrix01 = this->transitionMatrix.notZero().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); + } else { + this->transitionMatrix01 = this->transitionMatrix.notZero().template toAdd(); + } + } + if (partition.storedAsBdd()) { - return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asBdd(), model.getColumnVariables())); + return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asBdd(), columnVariables)); } else { - return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asAdd(), model.getColumnVariables())); + return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asAdd(), columnVariables)); } } diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.h b/src/storm/storage/dd/bisimulation/SignatureComputer.h index 426d9e329..6bce20d57 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.h +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.h @@ -43,28 +43,32 @@ namespace storm { friend class SignatureIterator; SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager); + SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); + SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); + SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); void setSignatureMode(SignatureMode const& newMode); SignatureIterator compute(Partition const& partition); private: + /// Methods to compute the signatures. Signature getFullSignature(Partition const& partition) const; - Signature getQualitativeSignature(Partition const& partition) const; SignatureMode const& getSignatureMode() const; - - storm::models::symbolic::Model const& model; - - // The transition matrix to use for the signature computation. + + /// The transition matrix to use for the signature computation. storm::dd::Add transitionMatrix; + + /// The set of variables from which to abstract when performing matrix-vector multiplication. + std::set columnVariables; - // The mode to use for signature computation. + /// The mode to use for signature computation. SignatureMode mode; - // Only used when using lazy signatures is enabled. - boost::optional> transitionMatrix01; + /// Only used when using lazy signatures is enabled. + mutable boost::optional> transitionMatrix01; }; } From d0840f783a76849ac5d74fa9265f568713a34168 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 2 Aug 2017 21:58:54 +0200 Subject: [PATCH 22/95] further in debugging MDP bisimulation --- .../dd/bisimulation/MdpPartitionRefiner.cpp | 10 ++- .../dd/bisimulation/PartitionRefiner.cpp | 6 +- .../dd/bisimulation/SignatureComputer.cpp | 88 ++++++++++++------- .../dd/bisimulation/SignatureComputer.h | 17 ++-- .../storage/dd/bisimulation/SignatureMode.h | 2 +- 5 files changed, 80 insertions(+), 43 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 86b0cf495..914656d89 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -7,8 +7,10 @@ namespace storm { namespace bisimulation { template - MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())), stateSignatureComputer(mdp.getQualitativeTransitionMatrix(false), mdp.getColumnAndNondeterminismVariables()), stateSignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), mdp.getRowVariables()) { + MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())), stateSignatureComputer(mdp.getQualitativeTransitionMatrix(), mdp.getColumnAndNondeterminismVariables(), SignatureMode::Qualitative, true), stateSignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), mdp.getRowVariables()) { // Intentionally left empty. + + mdp.getTransitionMatrix().exportToDot("fulltrans.dot"); } template @@ -26,9 +28,11 @@ namespace storm { this->status = Status::FixedPoint; return false; } else { - // If the choice partition changed, refine the state partition. Use eager mode as abstracting from the probabilities is not worth doing. + this->choicePartition = newChoicePartition; + + // If the choice partition changed, refine the state partition. Use qualitative mode we must properly abstract from choice counts. STORM_LOG_TRACE("Refining state partition."); - Partition newStatePartition = this->internalRefine(this->stateSignatureComputer, this->stateSignatureRefiner, this->statePartition, this->choicePartition, SignatureMode::Eager); + Partition newStatePartition = this->internalRefine(this->stateSignatureComputer, this->stateSignatureRefiner, this->statePartition, this->choicePartition, SignatureMode::Qualitative); if (newStatePartition == this->statePartition) { this->status = Status::FixedPoint; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index bd9890adf..b3e19cdc2 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -45,9 +45,9 @@ namespace storm { STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); signature.getSignatureAdd().exportToDot("sig" + std::to_string(refinements) + ".dot"); - if (refinements == 1) { - exit(-1); - } +// if (refinements == 1) { +// exit(-1); +// } auto refinementStart = std::chrono::high_resolution_clock::now(); newPartition = signatureRefiner.refine(statePartition, signature); diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index e847dd9bc..ae82f91e9 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -16,23 +16,35 @@ namespace storm { template bool SignatureIterator::hasNext() const { - if (signatureComputer.getSignatureMode() == SignatureMode::Eager) { - return position < 1; - } else { - return position < 2; + switch (signatureComputer.getSignatureMode()) { + case SignatureMode::Qualitative: + case SignatureMode::Eager: return position < 1; + case SignatureMode::Lazy: return position < 2; } } template Signature SignatureIterator::next() { auto mode = signatureComputer.getSignatureMode(); - STORM_LOG_THROW((mode == SignatureMode::Eager && position < 1) || (mode == SignatureMode::Lazy && position < 2), storm::exceptions::OutOfRangeException, "Iterator is out of range."); + STORM_LOG_THROW((mode == SignatureMode::Eager && position < 1) || (mode == SignatureMode::Lazy && position < 2) || (mode == SignatureMode::Qualitative && position < 1), storm::exceptions::OutOfRangeException, "Iterator is out of range."); Signature result; - if (mode == SignatureMode::Eager || position == 1) { - result = signatureComputer.getFullSignature(partition); - } else if (position == 0) { - result = signatureComputer.getQualitativeSignature(partition); + if (mode == SignatureMode::Eager) { + if (position == 0) { + result = signatureComputer.getFullSignature(partition); + } + } else if (mode == SignatureMode::Lazy) { + if (position == 0) { + result = signatureComputer.getQualitativeSignature(partition); + } else { + result = signatureComputer.getFullSignature(partition); + } + } else if (mode == SignatureMode::Qualitative) { + if (position == 0) { + result = signatureComputer.getQualitativeSignature(partition); + } + } else { + STORM_LOG_ASSERT(false, "Unknown signature mode."); } ++position; @@ -40,29 +52,29 @@ namespace storm { } template - SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode) : SignatureComputer(model.getTransitionMatrix(), boost::none, model.getColumnVariables(), mode) { + SignatureComputer::SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode, bool ensureQualitative) : SignatureComputer(model.getTransitionMatrix(), boost::none, model.getColumnVariables(), mode, ensureQualitative) { // Intentionally left empty. } template - SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : SignatureComputer(transitionMatrix, boost::none, columnVariables, mode) { + SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode, bool ensureQualitative) : SignatureComputer(transitionMatrix, boost::none, columnVariables, mode, ensureQualitative) { // Intentionally left empty. } template - SignatureComputer::SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : SignatureComputer(qualitativeTransitionMatrix.template toAdd(), boost::none, columnVariables, mode) { + SignatureComputer::SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode, bool ensureQualitative) : SignatureComputer(qualitativeTransitionMatrix.template toAdd(), boost::none, columnVariables, mode, ensureQualitative) { // Intentionally left empty. } template - SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode) : transitionMatrix(transitionMatrix), columnVariables(columnVariables), mode(mode) { + SignatureComputer::SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode, bool ensureQualitative) : transitionMatrix(transitionMatrix), columnVariables(columnVariables), mode(mode), ensureQualitative(ensureQualitative) { if (DdType == storm::dd::DdType::Sylvan) { this->transitionMatrix = this->transitionMatrix.notZero().ite(this->transitionMatrix, this->transitionMatrix.getDdManager().template getAddUndefined()); } if (qualitativeTransitionMatrix) { - if (DdType == storm::dd::DdType::Sylvan) { - this->transitionMatrix01 = qualitativeTransitionMatrix.get().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); + if (DdType == storm::dd::DdType::Sylvan || ensureQualitative) { + this->transitionMatrix01 = qualitativeTransitionMatrix.get(); } else { this->transitionMatrix01 = qualitativeTransitionMatrix.get().template toAdd(); } @@ -86,40 +98,54 @@ namespace storm { template Signature SignatureComputer::getFullSignature(Partition const& partition) const { - this->transitionMatrix.exportToDot("trans.dot"); if (partition.storedAsBdd()) { return Signature(this->transitionMatrix.multiplyMatrix(partition.asBdd(), columnVariables)); } else { - auto result = Signature(this->transitionMatrix.multiplyMatrix(partition.asAdd(), columnVariables)); - - std::cout << "abstracting vars" << std::endl; - for (auto const& v : columnVariables) { - std::cout << v.getName() << std::endl; - } - std::cout << "----" << std::endl; - result.getSignatureAdd().exportToDot("fullsig.dot"); - - return result; + return Signature(this->transitionMatrix.multiplyMatrix(partition.asAdd(), columnVariables)); } } template Signature SignatureComputer::getQualitativeSignature(Partition const& partition) const { - if (this->mode == SignatureMode::Lazy && !transitionMatrix01) { - if (DdType == storm::dd::DdType::Sylvan) { - this->transitionMatrix01 = this->transitionMatrix.notZero().ite(this->transitionMatrix.getDdManager().template getAddOne(), this->transitionMatrix.getDdManager().template getAddUndefined()); + if (!transitionMatrix01) { + if (DdType == storm::dd::DdType::Sylvan || this->ensureQualitative) { + this->transitionMatrix01 = this->transitionMatrix.notZero(); } else { this->transitionMatrix01 = this->transitionMatrix.notZero().template toAdd(); } } if (partition.storedAsBdd()) { - return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asBdd(), columnVariables)); + return this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asBdd(), columnVariables).template toAdd(); } else { - return Signature(this->transitionMatrix01.get().multiplyMatrix(partition.asAdd(), columnVariables)); + if (this->qualitativeTransitionMatrixIsBdd()) { + this->getQualitativeTransitionMatrixAsBdd().template toAdd().exportToDot("lasttrans.dot"); + partition.asAdd().exportToDot("lastpart.dot"); + this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asAdd().toBdd(), columnVariables).template toAdd().exportToDot("lastresult.dot"); + return Signature(this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asAdd().toBdd(), columnVariables).template toAdd()); + } else { + return Signature(this->getQualitativeTransitionMatrixAsAdd().multiplyMatrix(partition.asAdd(), columnVariables)); + } } } + template + bool SignatureComputer::qualitativeTransitionMatrixIsBdd() const { + return transitionMatrix01.get().which() == 0; + } + + template + storm::dd::Bdd const& SignatureComputer::getQualitativeTransitionMatrixAsBdd() const { + STORM_LOG_ASSERT(this->transitionMatrix01, "Missing qualitative transition matrix."); + return boost::get>(this->transitionMatrix01.get()); + } + + template + storm::dd::Add const& SignatureComputer::getQualitativeTransitionMatrixAsAdd() const { + STORM_LOG_ASSERT(this->transitionMatrix01, "Missing qualitative transition matrix."); + return boost::get>(this->transitionMatrix01.get()); + } + template class SignatureIterator; template class SignatureIterator; template class SignatureIterator; diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.h b/src/storm/storage/dd/bisimulation/SignatureComputer.h index 6bce20d57..421acc90a 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.h +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.h @@ -42,10 +42,10 @@ namespace storm { public: friend class SignatureIterator; - SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager); - SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); - SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); - SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager); + SignatureComputer(storm::models::symbolic::Model const& model, SignatureMode const& mode = SignatureMode::Eager, bool ensureQualitative = false); + SignatureComputer(storm::dd::Add const& transitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager, bool ensureQualitative = false); + SignatureComputer(storm::dd::Bdd const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager, bool ensureQualitative = false); + SignatureComputer(storm::dd::Add const& transitionMatrix, boost::optional> const& qualitativeTransitionMatrix, std::set const& columnVariables, SignatureMode const& mode = SignatureMode::Eager, bool ensureQualitative = false); void setSignatureMode(SignatureMode const& newMode); @@ -56,6 +56,10 @@ namespace storm { Signature getFullSignature(Partition const& partition) const; Signature getQualitativeSignature(Partition const& partition) const; + bool qualitativeTransitionMatrixIsBdd() const; + storm::dd::Bdd const& getQualitativeTransitionMatrixAsBdd() const; + storm::dd::Add const& getQualitativeTransitionMatrixAsAdd() const; + SignatureMode const& getSignatureMode() const; /// The transition matrix to use for the signature computation. @@ -67,8 +71,11 @@ namespace storm { /// The mode to use for signature computation. SignatureMode mode; + /// A flag indicating whether the qualitative signature needs to make sure that the result is in fact qualitative. + bool ensureQualitative; + /// Only used when using lazy signatures is enabled. - mutable boost::optional> transitionMatrix01; + mutable boost::optional, storm::dd::Add>> transitionMatrix01; }; } diff --git a/src/storm/storage/dd/bisimulation/SignatureMode.h b/src/storm/storage/dd/bisimulation/SignatureMode.h index bcec54b6f..41457ba76 100644 --- a/src/storm/storage/dd/bisimulation/SignatureMode.h +++ b/src/storm/storage/dd/bisimulation/SignatureMode.h @@ -4,7 +4,7 @@ namespace storm { namespace dd { namespace bisimulation { - enum class SignatureMode { Eager, Lazy }; + enum class SignatureMode { Eager, Lazy, Qualitative }; } } From 472eaffabc38e723053fbc5ed8e95b2bb63b0aa0 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 3 Aug 2017 16:57:11 +0200 Subject: [PATCH 23/95] more work on refiners that deal with nondeterminism variables --- .../dd/bisimulation/SignatureRefiner.cpp | 287 ++++++++++-------- .../dd/bisimulation/SignatureRefiner.h | 2 +- 2 files changed, 153 insertions(+), 136 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 028fb7767..4595b5fd0 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -10,6 +10,7 @@ #include "storm/utility/macros.h" #include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/NotImplementedException.h" +#include "storm/exceptions/InvalidArgumentException.h" #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/BisimulationSettings.h" @@ -79,7 +80,7 @@ namespace storm { template class InternalSignatureRefiner { public: - InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, storm::dd::Bdd const& nondeterminismVariables, storm::dd::Bdd const& nonBlockVariables) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), nondeterminismVariables(nondeterminismVariables), nonBlockVariables(nonBlockVariables), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { // Intentionally left empty. } @@ -97,18 +98,22 @@ namespace storm { signatureCache.clear(); reuseBlocksCache.clear(); nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); - + + internalDdManager.debugCheck(); + // Perform the actual recursive refinement step. - DdNodePtr result = refine(oldPartition.asAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode()); + DdNodePtr result = refine(oldPartition.asAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode(), nondeterminismVariables.getInternalBdd().getCuddDdNode(), nonBlockVariables.getInternalBdd().getCuddDdNode()); // Construct resulting ADD from the obtained node and the meta information. storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, cudd::ADD(internalDdManager.getCuddManager(), result)); storm::dd::Add newPartitionAdd(oldPartition.asAdd().getDdManager(), internalNewPartitionAdd, oldPartition.asAdd().getContainedMetaVariables()); + internalDdManager.debugCheck(); + return newPartitionAdd; } - DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode) { + DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode, DdNode* nondeterminismVariablesNode, DdNode* nonBlockVariablesNode) { ::DdManager* ddman = internalDdManager.getCuddManager().getManager(); // If we arrived at the constant zero node, then this was an illegal state encoding (we require @@ -118,45 +123,66 @@ namespace storm { } // Check the cache whether we have seen the same node before. - std::unique_ptr& sigCacheEntrySmartPtr = signatureCache[std::make_pair(signatureNode, partitionNode)]; - if (sigCacheEntrySmartPtr) { + auto nodePair = std::make_pair(signatureNode, partitionNode); + auto it = signatureCache.find(nodePair); + if (it != signatureCache.end()) { // If so, we return the corresponding result. - return *sigCacheEntrySmartPtr; + return it->second; } - DdNode** newEntryPtr = new DdNode*; - sigCacheEntrySmartPtr.reset(newEntryPtr); - - // Determine the levels in the DDs. - uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode) - 1; - uint64_t signatureVariable = Cudd_NodeReadIndex(signatureNode); - uint64_t partitionLevel = Cudd_ReadPerm(ddman, partitionVariable); - uint64_t signatureLevel = Cudd_ReadPerm(ddman, signatureVariable); - uint64_t topLevel = std::min(partitionLevel, signatureLevel); - uint64_t topVariable = topLevel == partitionLevel ? partitionVariable : signatureVariable; - - // Check whether the top variable is still within the state encoding. - if (topLevel <= lastStateLevel) { - // Determine subresults by recursive descent. - DdNodePtr thenResult; - DdNodePtr elseResult; - if (partitionLevel < signatureLevel) { - thenResult = refine(Cudd_T(partitionNode), signatureNode); - Cudd_Ref(thenResult); - elseResult = refine(Cudd_E(partitionNode), signatureNode); - Cudd_Ref(elseResult); - } else if (partitionLevel > signatureLevel) { - thenResult = refine(partitionNode, Cudd_T(signatureNode)); - Cudd_Ref(thenResult); - elseResult = refine(partitionNode, Cudd_E(signatureNode)); - Cudd_Ref(elseResult); + // If there are no more non-block variables, we hit the signature. + if (Cudd_IsConstant(nonBlockVariablesNode)) { + // If this is the first time (in this traversal) that we encounter this signature, we check + // whether we can assign the old block number to it. + auto& reuseEntry = reuseBlocksCache[partitionNode]; + if (!reuseEntry.isReused()) { + reuseEntry.setReused(); + signatureCache[nodePair] = partitionNode; + return partitionNode; } else { - thenResult = refine(Cudd_T(partitionNode), Cudd_T(signatureNode)); - Cudd_Ref(thenResult); - elseResult = refine(Cudd_E(partitionNode), Cudd_E(signatureNode)); - Cudd_Ref(elseResult); + DdNode* result; + { + storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); + ++nextFreeBlockIndex; + result = blockEncoding.getInternalAdd().getCuddDdNode(); + Cudd_Ref(result); + } + signatureCache[nodePair] = result; + Cudd_Deref(result); + return result; } - + } else { + // If there are more variables that belong to the non-block part of the encoding, we need to recursively descend. + + // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. + short offset = 1; + if (!Cudd_IsConstant(nondeterminismVariablesNode) && Cudd_NodeReadIndex(nondeterminismVariablesNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + offset = 0; + } + + DdNode* partitionThen; + DdNode* partitionElse; + if (Cudd_NodeReadIndex(partitionNode) - offset == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + partitionThen = Cudd_T(partitionNode); + partitionElse = Cudd_E(partitionNode); + } else { + partitionThen = partitionElse = partitionNode; + } + + DdNode* signatureThen; + DdNode* signatureElse; + if (Cudd_NodeReadIndex(signatureNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + signatureThen = Cudd_T(signatureNode); + signatureElse = Cudd_E(signatureNode); + } else { + signatureThen = signatureElse = signatureNode; + } + + DdNode* thenResult = refine(partitionThen, signatureThen, offset == 0 ? Cudd_T(nondeterminismVariablesNode) : nondeterminismVariablesNode, Cudd_T(nonBlockVariablesNode)); + Cudd_Ref(thenResult); + DdNode* elseResult = refine(partitionElse, signatureElse, offset == 0 ? Cudd_T(nondeterminismVariablesNode) : nondeterminismVariablesNode, Cudd_T(nonBlockVariablesNode)); + Cudd_Ref(elseResult); + DdNode* result; if (thenResult == elseResult) { Cudd_Deref(thenResult); @@ -164,7 +190,7 @@ namespace storm { result = thenResult; } else { // Get the node to connect the subresults. - DdNode* var = Cudd_addIthVar(ddman, topVariable + 1); + DdNode* var = Cudd_addIthVar(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset); Cudd_Ref(var); result = Cudd_addIte(ddman, var, thenResult, elseResult); Cudd_Ref(result); @@ -174,33 +200,10 @@ namespace storm { } // Store the result in the cache. - *newEntryPtr = result; + signatureCache[nodePair] = result; Cudd_Deref(result); return result; - } else { - - // If we are not within the state encoding any more, we hit the signature itself. - - // If this is the first time (in this traversal) that we encounter this signature, we check - // whether we can assign the old block number to it. - auto& reuseEntry = reuseBlocksCache[partitionNode]; - if (!reuseEntry.isReused()) { - reuseEntry.setReused(); - *newEntryPtr = partitionNode; - return partitionNode; - } else { - DdNode* result; - { - storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); - ++nextFreeBlockIndex; - result = blockEncoding.getInternalAdd().getCuddDdNode(); - Cudd_Ref(result); - } - *newEntryPtr = result; - Cudd_Deref(result); - return result; - } } } @@ -208,8 +211,9 @@ namespace storm { storm::dd::InternalDdManager const& internalDdManager; storm::expressions::Variable const& blockVariable; - // The last level that belongs to the state encoding in the DDs. - uint64_t lastStateLevel; + // The cubes representing all non-block and all nondeterminism variables, respectively. + storm::dd::Bdd nondeterminismVariables; + storm::dd::Bdd nonBlockVariables; // The current number of blocks of the new partition. uint64_t nextFreeBlockIndex; @@ -221,7 +225,7 @@ namespace storm { uint64_t lastNumberOfVisitedNodes; // The cache used to identify states with identical signature. - spp::sparse_hash_map, std::unique_ptr, CuddPointerPairHash> signatureCache; + spp::sparse_hash_map, DdNode*, CuddPointerPairHash> signatureCache; // The cache used to identify which old block numbers have already been reused. spp::sparse_hash_map reuseBlocksCache; @@ -230,7 +234,7 @@ namespace storm { template class InternalSignatureRefiner { public: - InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, uint64_t lastStateLevel) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), numberOfBlockVariables(manager.getMetaVariable(blockVariable).getNumberOfDdVariables()), blockCube(manager.getMetaVariable(blockVariable).getCube()), lastStateLevel(lastStateLevel), nextFreeBlockIndex(0), numberOfRefinements(0), signatureCache() { + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, storm::dd::Bdd const& nondeterminismVariables, storm::dd::Bdd const& nonBlockVariables) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), nondeterminismVariables(nondeterminismVariables), nonBlockVariables(nonBlockVariables), numberOfBlockVariables(manager.getMetaVariable(blockVariable).getNumberOfDdVariables()), blockCube(manager.getMetaVariable(blockVariable).getCube()), nextFreeBlockIndex(0), numberOfRefinements(0), signatureCache() { // Perform garbage collection to clean up stuff not needed anymore. LACE_ME; sylvan_gc(); @@ -270,7 +274,7 @@ namespace storm { // totalMakeNodeTime = std::chrono::high_resolution_clock::duration(0); // Perform the actual recursive refinement step. - BDD result = refine(oldPartition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), signatureAdd.getInternalAdd().getSylvanMtbdd().GetMTBDD()); + BDD result = refine(oldPartition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), signatureAdd.getInternalAdd().getSylvanMtbdd().GetMTBDD(), nondeterminismVariables.getInternalBdd().getSylvanBdd().GetBDD(), nonBlockVariables.getInternalBdd().getSylvanBdd().GetBDD()); // Construct resulting BDD from the obtained node and the meta information. storm::dd::InternalBdd internalNewPartitionBdd(&internalDdManager, sylvan::Bdd(result)); @@ -300,7 +304,7 @@ namespace storm { return sylvan_cube(blockCube.getInternalBdd().getSylvanBdd().GetBDD(), e.data()); } - BDD refine(BDD partitionNode, MTBDD signatureNode) { + BDD refine(BDD partitionNode, MTBDD signatureNode, BDD nondeterminismVariablesNode, BDD nonBlockVariablesNode) { LACE_ME; // If we arrived at the constant zero node, then this was an illegal state encoding (we require @@ -331,93 +335,98 @@ namespace storm { sigCacheEntrySmartPtr.reset(newEntryPtr); sylvan_gc_test(); - - // Determine levels in the DDs. -// start = std::chrono::high_resolution_clock::now(); - BDDVAR signatureVariable = sylvan_isconst(signatureNode) ? 0xffffffff : sylvan_var(signatureNode); - BDDVAR partitionVariable = sylvan_var(partitionNode) - 1; - BDDVAR topVariable = std::min(signatureVariable, partitionVariable); -// end = std::chrono::high_resolution_clock::now(); -// totalLevelLookupTime += end - start; - // Check whether the top variable is still within the state encoding. - if (topVariable <= lastStateLevel) { - // Determine subresults by recursive descent. - BDD thenResult; - BDD elseResult; - if (partitionVariable < signatureVariable) { - elseResult = refine(sylvan_low(partitionNode), signatureNode); - thenResult = refine(sylvan_high(partitionNode), signatureNode); - } else if (partitionVariable > signatureVariable) { - elseResult = refine(partitionNode, sylvan_low(signatureNode)); - thenResult = refine(partitionNode, sylvan_high(signatureNode)); - } else { - elseResult = refine(sylvan_low(partitionNode), sylvan_low(signatureNode)); - thenResult = refine(sylvan_high(partitionNode), sylvan_high(signatureNode)); - } - - BDD result; - if (thenResult == elseResult) { - result = thenResult; - } else { - // Get the node to connect the subresults. -// start = std::chrono::high_resolution_clock::now(); - result = sylvan_makenode(topVariable + 1, elseResult, thenResult); -// end = std::chrono::high_resolution_clock::now(); -// totalMakeNodeTime += end - start; - } - - // Store the result in the cache. -// start = std::chrono::high_resolution_clock::now(); - *newEntryPtr = result; -// end = std::chrono::high_resolution_clock::now(); -// totalSignatureCacheStoreTime += end - start; - - return result; - } else { - - // If we are not within the state encoding any more, we hit the signature itself. - + // If there are no more non-block variables, we hit the signature. + if (sylvan_isconst(nonBlockVariablesNode)) { // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. -// start = std::chrono::high_resolution_clock::now(); + + // start = std::chrono::high_resolution_clock::now(); auto& reuseBlockEntry = reuseBlocksCache[partitionNode]; -// end = std::chrono::high_resolution_clock::now(); -// totalReuseBlocksLookupTime += end - start; + // end = std::chrono::high_resolution_clock::now(); + // totalReuseBlocksLookupTime += end - start; if (!reuseBlockEntry.isReused()) { reuseBlockEntry.setReused(); reuseBlocksCache.emplace(partitionNode, true); -// start = std::chrono::high_resolution_clock::now(); + // start = std::chrono::high_resolution_clock::now(); *newEntryPtr = partitionNode; -// end = std::chrono::high_resolution_clock::now(); -// totalSignatureCacheStoreTime += end - start; + // end = std::chrono::high_resolution_clock::now(); + // totalSignatureCacheStoreTime += end - start; return partitionNode; } else { -// start = std::chrono::high_resolution_clock::now(); + // start = std::chrono::high_resolution_clock::now(); BDD result = encodeBlock(nextFreeBlockIndex++); -// end = std::chrono::high_resolution_clock::now(); -// totalBlockEncodingTime += end - start; + // end = std::chrono::high_resolution_clock::now(); + // totalBlockEncodingTime += end - start; -// start = std::chrono::high_resolution_clock::now(); + // start = std::chrono::high_resolution_clock::now(); *newEntryPtr = result; -// end = std::chrono::high_resolution_clock::now(); -// totalSignatureCacheStoreTime += end - start; + // end = std::chrono::high_resolution_clock::now(); + // totalSignatureCacheStoreTime += end - start; return result; } + } else { + // If there are more variables that belong to the non-block part of the encoding, we need to recursively descend. + + // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. + short offset = 1; + if (!sylvan_isconst(nondeterminismVariablesNode) && sylvan_var(nondeterminismVariablesNode) == sylvan_var(nonBlockVariablesNode)) { + offset = 0; + } + + BDD partitionThen; + BDD partitionElse; + if (sylvan_var(partitionNode) - offset == sylvan_var(nonBlockVariablesNode)) { + partitionThen = sylvan_high(partitionNode); + partitionElse = sylvan_low(partitionNode); + } else { + partitionThen = partitionElse = partitionNode; + } + + MTBDD signatureThen; + MTBDD signatureElse; + if (sylvan_var(signatureNode) == sylvan_var(nonBlockVariablesNode)) { + signatureThen = sylvan_high(signatureNode); + signatureElse = sylvan_low(signatureNode); + } else { + signatureThen = signatureElse = signatureNode; + } + + BDD thenResult = refine(partitionThen, signatureThen, offset == 0 ? sylvan_high(nondeterminismVariablesNode) : nondeterminismVariablesNode, sylvan_high(nonBlockVariablesNode)); + BDD elseResult = refine(partitionElse, signatureElse, offset == 0 ? sylvan_high(nondeterminismVariablesNode) : nondeterminismVariablesNode, sylvan_high(nonBlockVariablesNode)); + + BDD result; + if (thenResult == elseResult) { + result = thenResult; + } else { + // Get the node to connect the subresults. + // start = std::chrono::high_resolution_clock::now(); + result = sylvan_makenode(sylvan_var(nonBlockVariablesNode) + offset, elseResult, thenResult); + // end = std::chrono::high_resolution_clock::now(); + // totalMakeNodeTime += end - start; + } + + // Store the result in the cache. + // start = std::chrono::high_resolution_clock::now(); + *newEntryPtr = result; + // end = std::chrono::high_resolution_clock::now(); + // totalSignatureCacheStoreTime += end - start; + + return result; } } storm::dd::DdManager const& manager; storm::dd::InternalDdManager const& internalDdManager; storm::expressions::Variable const& blockVariable; + + storm::dd::Bdd nondeterminismVariables; + storm::dd::Bdd nonBlockVariables; uint64_t numberOfBlockVariables; storm::dd::Bdd blockCube; - // The last level that belongs to the state encoding in the DDs. - uint64_t lastStateLevel; - // The current number of blocks of the new partition. uint64_t nextFreeBlockIndex; @@ -444,13 +453,21 @@ namespace storm { }; template - SignatureRefiner::SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables) : manager(&manager), stateVariables(stateVariables) { - uint64_t lastStateLevel = 0; - for (auto const& stateVariable : stateVariables) { - lastStateLevel = std::max(lastStateLevel, manager.getMetaVariable(stateVariable).getHighestLevel()); + SignatureRefiner::SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables, std::set const& nondeterminismVariables) : manager(&manager), stateVariables(stateVariables) { + + storm::dd::Bdd nonBlockVariablesCube = manager.getBddOne(); + storm::dd::Bdd nondeterminismVariablesCube = manager.getBddOne(); + for (auto const& var : nondeterminismVariables) { + auto cube = manager.getMetaVariable(var).getCube(); + nonBlockVariablesCube &= cube; + nondeterminismVariablesCube &= cube; + } + for (auto const& var : stateVariables) { + auto cube = manager.getMetaVariable(var).getCube(); + nonBlockVariablesCube &= cube; } - internalRefiner = std::make_unique>(manager, blockVariable, lastStateLevel); + internalRefiner = std::make_unique>(manager, blockVariable, nondeterminismVariablesCube, nonBlockVariablesCube); } template diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.h b/src/storm/storage/dd/bisimulation/SignatureRefiner.h index ba6777d13..64797bdd8 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.h +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.h @@ -18,7 +18,7 @@ namespace storm { class SignatureRefiner { public: SignatureRefiner() = default; - SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables); + SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables, std::set const& nondeterminismVariables = std::set()); ~SignatureRefiner(); From 2b0911d627ffb0f20bf199e0499cdba9d6b68057 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 3 Aug 2017 18:20:30 +0200 Subject: [PATCH 24/95] more work on MDP bisimulation --- src/storm/models/symbolic/Model.cpp | 13 +- src/storm/models/symbolic/Model.h | 15 +- .../models/symbolic/NondeterministicModel.cpp | 14 -- .../models/symbolic/NondeterministicModel.h | 5 +- .../dd/bisimulation/PartitionRefiner.cpp | 6 +- .../dd/bisimulation/QuotientExtractor.cpp | 2 +- .../dd/bisimulation/SignatureRefiner.cpp | 162 +++++++++--------- 7 files changed, 112 insertions(+), 105 deletions(-) diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 46c8ad35c..61f9932f4 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -174,12 +174,21 @@ namespace storm { template std::set Model::getRowAndNondeterminismVariables() const { - return rowVariables; + std::set result; + std::set_union(this->getRowVariables().begin(), this->getRowVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); + return result; } template std::set Model::getColumnAndNondeterminismVariables() const { - return columnVariables; + std::set result; + std::set_union(this->getColumnVariables().begin(), this->getColumnVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); + return result; + } + + template + std::set const& Model::getNondeterminismVariables() const { + return emptyVariableSet; } template diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index 395028ae9..1f0aee439 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -226,14 +226,21 @@ namespace storm { * * @return All meta variables used to encode rows and nondetermism. */ - virtual std::set getRowAndNondeterminismVariables() const; + std::set getRowAndNondeterminismVariables() const; /*! * Retrieves all meta variables used to encode columns and nondetermism. * * @return All meta variables used to encode columns and nondetermism. */ - virtual std::set getColumnAndNondeterminismVariables() const; + std::set getColumnAndNondeterminismVariables() const; + + /*! + * Retrieves all meta variables used to encode the nondeterminism. + * + * @return All meta variables used to encode the nondeterminism. + */ + virtual std::set const& getNondeterminismVariables() const; /*! * Retrieves the pairs of row and column meta variables. @@ -311,7 +318,6 @@ namespace storm { std::set const& getParameters() const; protected: - /*! * Sets the transition matrix of the model. * @@ -389,6 +395,9 @@ namespace storm { // The parameters. Only meaningful for models over rational functions. std::set parameters; + + // An empty variable set that can be used when references to non-existing sets need to be returned. + std::set emptyVariableSet; }; } // namespace symbolic diff --git a/src/storm/models/symbolic/NondeterministicModel.cpp b/src/storm/models/symbolic/NondeterministicModel.cpp index 32baf1cd2..6545e27c0 100644 --- a/src/storm/models/symbolic/NondeterministicModel.cpp +++ b/src/storm/models/symbolic/NondeterministicModel.cpp @@ -62,20 +62,6 @@ namespace storm { return nondeterminismVariables; } - template - std::set NondeterministicModel::getRowAndNondeterminismVariables() const { - std::set result; - std::set_union(this->getRowVariables().begin(), this->getRowVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); - return result; - } - - template - std::set NondeterministicModel::getColumnAndNondeterminismVariables() const { - std::set result; - std::set_union(this->getColumnVariables().begin(), this->getColumnVariables().end(), this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), std::inserter(result, result.begin())); - return result; - } - template storm::dd::Bdd const& NondeterministicModel::getIllegalMask() const { return illegalMask; diff --git a/src/storm/models/symbolic/NondeterministicModel.h b/src/storm/models/symbolic/NondeterministicModel.h index b3d5b7cb6..ecbc2af94 100644 --- a/src/storm/models/symbolic/NondeterministicModel.h +++ b/src/storm/models/symbolic/NondeterministicModel.h @@ -97,10 +97,7 @@ namespace storm { * * @return The meta variables used to encode the nondeterminism in the model. */ - std::set const& getNondeterminismVariables() const; - - virtual std::set getRowAndNondeterminismVariables() const override; - virtual std::set getColumnAndNondeterminismVariables() const override; + virtual std::set const& getNondeterminismVariables() const override; /*! * Retrieves a BDD characterizing all illegal nondeterminism encodings in the model. diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index b3e19cdc2..8a5915004 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -5,7 +5,7 @@ namespace storm { namespace bisimulation { template - PartitionRefiner::PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : status(Status::Initialized), refinements(0), statePartition(initialStatePartition), signatureComputer(model), signatureRefiner(model.getManager(), statePartition.getBlockVariable(), model.getRowAndNondeterminismVariables()) { + PartitionRefiner::PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition) : status(Status::Initialized), refinements(0), statePartition(initialStatePartition), signatureComputer(model), signatureRefiner(model.getManager(), statePartition.getBlockVariable(), model.getRowAndNondeterminismVariables(), model.getNondeterminismVariables()) { // Intentionally left empty. } @@ -44,7 +44,7 @@ namespace storm { totalSignatureTime += (signatureEnd - signatureStart); STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); - signature.getSignatureAdd().exportToDot("sig" + std::to_string(refinements) + ".dot"); +// signature.getSignatureAdd().exportToDot("sig" + std::to_string(refinements) + ".dot"); // if (refinements == 1) { // exit(-1); // } @@ -54,7 +54,7 @@ namespace storm { auto refinementEnd = std::chrono::high_resolution_clock::now(); totalRefinementTime += (refinementEnd - refinementStart); - newPartition.asAdd().exportToDot("newpart" + std::to_string(refinements) + ".dot"); +// newPartition.asAdd().exportToDot("newpart" + std::to_string(refinements) + ".dot"); signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index ccaeaa774..b88524f6c 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -592,7 +592,7 @@ namespace storm { return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); } } else { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot exctract quotient for this model type."); + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot extract quotient for this model type."); } } diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 4595b5fd0..e370a75bd 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -99,8 +99,6 @@ namespace storm { reuseBlocksCache.clear(); nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); - internalDdManager.debugCheck(); - // Perform the actual recursive refinement step. DdNodePtr result = refine(oldPartition.asAdd().getInternalAdd().getCuddDdNode(), signatureAdd.getInternalAdd().getCuddDdNode(), nondeterminismVariables.getInternalBdd().getCuddDdNode(), nonBlockVariables.getInternalBdd().getCuddDdNode()); @@ -108,8 +106,6 @@ namespace storm { storm::dd::InternalAdd internalNewPartitionAdd(&internalDdManager, cudd::ADD(internalDdManager.getCuddManager(), result)); storm::dd::Add newPartitionAdd(oldPartition.asAdd().getDdManager(), internalNewPartitionAdd, oldPartition.asAdd().getContainedMetaVariables()); - internalDdManager.debugCheck(); - return newPartitionAdd; } @@ -154,28 +150,48 @@ namespace storm { } else { // If there are more variables that belong to the non-block part of the encoding, we need to recursively descend. - // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. - short offset = 1; - if (!Cudd_IsConstant(nondeterminismVariablesNode) && Cudd_NodeReadIndex(nondeterminismVariablesNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { - offset = 0; - } - + bool skippedBoth = true; DdNode* partitionThen; DdNode* partitionElse; - if (Cudd_NodeReadIndex(partitionNode) - offset == Cudd_NodeReadIndex(nonBlockVariablesNode)) { - partitionThen = Cudd_T(partitionNode); - partitionElse = Cudd_E(partitionNode); - } else { - partitionThen = partitionElse = partitionNode; - } - DdNode* signatureThen; DdNode* signatureElse; - if (Cudd_NodeReadIndex(signatureNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { - signatureThen = Cudd_T(signatureNode); - signatureElse = Cudd_E(signatureNode); - } else { - signatureThen = signatureElse = signatureNode; + short offset = 1; + while (skippedBoth && !Cudd_IsConstant(nonBlockVariablesNode)) { + // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. + offset = 1; + if (!Cudd_IsConstant(nondeterminismVariablesNode) && Cudd_NodeReadIndex(nondeterminismVariablesNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + offset = 0; + } + + if (Cudd_NodeReadIndex(partitionNode) - offset == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + partitionThen = Cudd_T(partitionNode); + partitionElse = Cudd_E(partitionNode); + skippedBoth = false; + } else { + partitionThen = partitionElse = partitionNode; + } + + if (Cudd_NodeReadIndex(signatureNode) == Cudd_NodeReadIndex(nonBlockVariablesNode)) { + signatureThen = Cudd_T(signatureNode); + signatureElse = Cudd_E(signatureNode); + skippedBoth = false; + } else { + signatureThen = signatureElse = signatureNode; + } + + // If both (signature and partition) skipped the next variable, we fast-forward. + if (skippedBoth) { + // If the current variable is a nondeterminism variable, we need to advance both variable sets otherwise just the non-block variables. + nonBlockVariablesNode = Cudd_T(nonBlockVariablesNode); + if (offset == 0) { + nondeterminismVariablesNode = Cudd_T(nondeterminismVariablesNode); + } + } + } + + // If there are no more non-block variables remaining, make a recursive call to enter the base case. + if (Cudd_IsConstant(nonBlockVariablesNode)) { + return refine(partitionNode, signatureNode, nondeterminismVariablesNode, nonBlockVariablesNode); } DdNode* thenResult = refine(partitionThen, signatureThen, offset == 0 ? Cudd_T(nondeterminismVariablesNode) : nondeterminismVariablesNode, Cudd_T(nonBlockVariablesNode)); @@ -315,24 +331,13 @@ namespace storm { STORM_LOG_ASSERT(partitionNode != mtbdd_false, "Expected non-false node."); -// ++numberOfVisitedNodes; - // Check the cache whether we have seen the same node before. -// ++signatureCacheLookups; -// auto start = std::chrono::high_resolution_clock::now(); - std::unique_ptr& sigCacheEntrySmartPtr = signatureCache[std::make_pair(signatureNode, partitionNode)]; - if (sigCacheEntrySmartPtr) { -// ++signatureCacheHits; + auto nodePair = std::make_pair(signatureNode, partitionNode); + auto it = signatureCache.find(nodePair); + if (it != signatureCache.end()) { // If so, we return the corresponding result. -// auto end = std::chrono::high_resolution_clock::now(); -// totalSignatureCacheLookupTime += end - start; - return *sigCacheEntrySmartPtr; + return it->second; } -// auto end = std::chrono::high_resolution_clock::now(); -// totalSignatureCacheLookupTime += end - start; - - MTBDD* newEntryPtr = new MTBDD; - sigCacheEntrySmartPtr.reset(newEntryPtr); sylvan_gc_test(); @@ -341,55 +346,62 @@ namespace storm { // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. - // start = std::chrono::high_resolution_clock::now(); auto& reuseBlockEntry = reuseBlocksCache[partitionNode]; - // end = std::chrono::high_resolution_clock::now(); - // totalReuseBlocksLookupTime += end - start; if (!reuseBlockEntry.isReused()) { reuseBlockEntry.setReused(); reuseBlocksCache.emplace(partitionNode, true); - // start = std::chrono::high_resolution_clock::now(); - *newEntryPtr = partitionNode; - // end = std::chrono::high_resolution_clock::now(); - // totalSignatureCacheStoreTime += end - start; + signatureCache[nodePair] = partitionNode; return partitionNode; } else { - // start = std::chrono::high_resolution_clock::now(); BDD result = encodeBlock(nextFreeBlockIndex++); - // end = std::chrono::high_resolution_clock::now(); - // totalBlockEncodingTime += end - start; - - // start = std::chrono::high_resolution_clock::now(); - *newEntryPtr = result; - // end = std::chrono::high_resolution_clock::now(); - // totalSignatureCacheStoreTime += end - start; + signatureCache[nodePair] = result; return result; } } else { // If there are more variables that belong to the non-block part of the encoding, we need to recursively descend. - // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. - short offset = 1; - if (!sylvan_isconst(nondeterminismVariablesNode) && sylvan_var(nondeterminismVariablesNode) == sylvan_var(nonBlockVariablesNode)) { - offset = 0; - } - + bool skippedBoth = true; BDD partitionThen; BDD partitionElse; - if (sylvan_var(partitionNode) - offset == sylvan_var(nonBlockVariablesNode)) { - partitionThen = sylvan_high(partitionNode); - partitionElse = sylvan_low(partitionNode); - } else { - partitionThen = partitionElse = partitionNode; - } - MTBDD signatureThen; MTBDD signatureElse; - if (sylvan_var(signatureNode) == sylvan_var(nonBlockVariablesNode)) { - signatureThen = sylvan_high(signatureNode); - signatureElse = sylvan_low(signatureNode); - } else { - signatureThen = signatureElse = signatureNode; + short offset = 1; + while (skippedBoth && !sylvan_isconst(nonBlockVariablesNode)) { + // Remember an offset that indicates whether the top variable is a nondeterminism variable or not. + offset = 1; + if (!sylvan_isconst(nondeterminismVariablesNode) && sylvan_var(nondeterminismVariablesNode) == sylvan_var(nonBlockVariablesNode)) { + offset = 0; + } + + if (sylvan_var(partitionNode) - offset == sylvan_var(nonBlockVariablesNode)) { + partitionThen = sylvan_high(partitionNode); + partitionElse = sylvan_low(partitionNode); + skippedBoth = false; + } else { + partitionThen = partitionElse = partitionNode; + } + + if (sylvan_var(signatureNode) == sylvan_var(nonBlockVariablesNode)) { + signatureThen = sylvan_high(signatureNode); + signatureElse = sylvan_low(signatureNode); + skippedBoth = false; + } else { + signatureThen = signatureElse = signatureNode; + } + + // If both (signature and partition) skipped the next variable, we fast-forward. + if (skippedBoth) { + // If the current variable is a nondeterminism variable, we need to advance both variable sets otherwise just the non-block variables. + nonBlockVariablesNode = sylvan_high(nonBlockVariablesNode); + if (offset == 0) { + nondeterminismVariablesNode = sylvan_high(nondeterminismVariablesNode); + } + } + } + + // If there are no more non-block variables remaining, make a recursive call to enter the base case. + if (sylvan_isconst(nonBlockVariablesNode)) { + return refine(partitionNode, signatureNode, nondeterminismVariablesNode, nonBlockVariablesNode); } BDD thenResult = refine(partitionThen, signatureThen, offset == 0 ? sylvan_high(nondeterminismVariablesNode) : nondeterminismVariablesNode, sylvan_high(nonBlockVariablesNode)); @@ -400,17 +412,11 @@ namespace storm { result = thenResult; } else { // Get the node to connect the subresults. - // start = std::chrono::high_resolution_clock::now(); result = sylvan_makenode(sylvan_var(nonBlockVariablesNode) + offset, elseResult, thenResult); - // end = std::chrono::high_resolution_clock::now(); - // totalMakeNodeTime += end - start; } // Store the result in the cache. - // start = std::chrono::high_resolution_clock::now(); - *newEntryPtr = result; - // end = std::chrono::high_resolution_clock::now(); - // totalSignatureCacheStoreTime += end - start; + signatureCache[nodePair] = result; return result; } @@ -434,7 +440,7 @@ namespace storm { uint64_t numberOfRefinements; // The cache used to identify states with identical signature. - spp::sparse_hash_map, std::unique_ptr, SylvanMTBDDPairHash> signatureCache; + spp::sparse_hash_map, MTBDD, SylvanMTBDDPairHash> signatureCache; // The cache used to identify which old block numbers have already been reused. spp::sparse_hash_map reuseBlocksCache; From 9373e3d7639dd24e9f395de1cf0af37f6fb1dc6a Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 3 Aug 2017 22:14:05 +0200 Subject: [PATCH 25/95] started on MDP quotient extraction --- .../storage/dd/bisimulation/PartitionRefiner.cpp | 7 ------- .../storage/dd/bisimulation/QuotientExtractor.cpp | 12 ++++++++++-- .../storage/dd/bisimulation/SignatureComputer.cpp | 3 --- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index 8a5915004..74a563363 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -44,18 +44,11 @@ namespace storm { totalSignatureTime += (signatureEnd - signatureStart); STORM_LOG_DEBUG("Signature " << refinements << "[" << index << "] DD has " << signature.getSignatureAdd().getNodeCount() << " nodes."); -// signature.getSignatureAdd().exportToDot("sig" + std::to_string(refinements) + ".dot"); -// if (refinements == 1) { -// exit(-1); -// } - auto refinementStart = std::chrono::high_resolution_clock::now(); newPartition = signatureRefiner.refine(statePartition, signature); auto refinementEnd = std::chrono::high_resolution_clock::now(); totalRefinementTime += (refinementEnd - refinementStart); -// newPartition.asAdd().exportToDot("newpart" + std::to_string(refinements) + ".dot"); - signatureTime += std::chrono::duration_cast(signatureEnd - signatureStart).count(); refinementTime = std::chrono::duration_cast(refinementEnd - refinementStart).count(); diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index b88524f6c..ff114b482 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -4,6 +4,7 @@ #include "storm/models/symbolic/Dtmc.h" #include "storm/models/symbolic/Ctmc.h" +#include "storm/models/symbolic/Mdp.h" #include "storm/models/symbolic/StandardRewardModel.h" #include "storm/models/sparse/Dtmc.h" @@ -541,7 +542,7 @@ namespace storm { std::shared_ptr> QuotientExtractor::extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { auto modelType = model.getType(); - if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { + if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc || modelType == storm::models::ModelType::Mdp) { std::set blockVariableSet = {partition.getBlockVariable()}; std::set blockPrimeVariableSet = {partition.getPrimedBlockVariable()}; std::vector> blockMetaVariablePairs = {std::make_pair(partition.getBlockVariable(), partition.getPrimedBlockVariable())}; @@ -554,9 +555,12 @@ namespace storm { } storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); + partitionAsAdd.exportToDot("partition.dot"); auto start = std::chrono::high_resolution_clock::now(); storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + quotientTransitionMatrix.exportToDot("trans-1.dot"); quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); + quotientTransitionMatrix.exportToDot("quottrans.dot"); auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); @@ -588,8 +592,12 @@ namespace storm { if (modelType == storm::models::ModelType::Dtmc) { return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); - } else { + } else if (modelType == storm::models::ModelType::Ctmc) { return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + } else if (modelType == storm::models::ModelType::Mdp) { + return std::shared_ptr>(new storm::models::symbolic::Mdp(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, model.getNondeterminismVariables(), preservedLabelBdds, {})); + } else { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Unsupported quotient type."); } } else { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot extract quotient for this model type."); diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index ae82f91e9..682085468 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -119,9 +119,6 @@ namespace storm { return this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asBdd(), columnVariables).template toAdd(); } else { if (this->qualitativeTransitionMatrixIsBdd()) { - this->getQualitativeTransitionMatrixAsBdd().template toAdd().exportToDot("lasttrans.dot"); - partition.asAdd().exportToDot("lastpart.dot"); - this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asAdd().toBdd(), columnVariables).template toAdd().exportToDot("lastresult.dot"); return Signature(this->getQualitativeTransitionMatrixAsBdd().andExists(partition.asAdd().toBdd(), columnVariables).template toAdd()); } else { return Signature(this->getQualitativeTransitionMatrixAsAdd().multiplyMatrix(partition.asAdd(), columnVariables)); From 81e9d2ae507b95d59a5dca18f8916291f9af28a5 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 4 Aug 2017 14:35:38 +0200 Subject: [PATCH 26/95] added some sanity checks and debug output --- .../dd/bisimulation/QuotientExtractor.cpp | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index ff114b482..3027badf0 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -542,13 +542,26 @@ namespace storm { std::shared_ptr> QuotientExtractor::extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { auto modelType = model.getType(); + bool useRepresentativesForThisExtraction = this->useRepresentatives; if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc || modelType == storm::models::ModelType::Mdp) { + if (modelType == storm::models::ModelType::Mdp) { + STORM_LOG_WARN_COND(!useRepresentativesForThisExtraction, "Using representatives is unsupported for MDPs, falling back to regular extraction."); + useRepresentativesForThisExtraction = false; + } + + // Sanity checks. + STORM_LOG_ASSERT(partition.getNumberOfStates() == model.getNumberOfStates(), "Mismatching partition size."); + partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()).exportToDot("partstates.dot"); + model.getReachableStates().exportToDot("origstates.dot"); + std::cout << "equal? " << (partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()).template toAdd().notZero() == model.getReachableStates().template toAdd().notZero()) << std::endl; + STORM_LOG_ASSERT(partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()) == model.getReachableStates(), "Mismatching partition."); + std::set blockVariableSet = {partition.getBlockVariable()}; std::set blockPrimeVariableSet = {partition.getPrimedBlockVariable()}; std::vector> blockMetaVariablePairs = {std::make_pair(partition.getBlockVariable(), partition.getPrimedBlockVariable())}; storm::dd::Bdd partitionAsBdd = partition.storedAsBdd() ? partition.asBdd() : partition.asAdd().notZero(); - if (useRepresentatives) { + if (useRepresentativesForThisExtraction) { storm::dd::Bdd partitionAsBddOverPrimedBlockVariable = partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet); storm::dd::Bdd representativePartition = partitionAsBddOverPrimedBlockVariable.existsAbstractRepresentative(model.getColumnVariables()).renameVariables(model.getColumnVariables(), blockVariableSet); partitionAsBdd = (representativePartition && partitionAsBddOverPrimedBlockVariable).existsAbstract(blockPrimeVariableSet); @@ -556,12 +569,26 @@ namespace storm { storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); partitionAsAdd.exportToDot("partition.dot"); + model.getTransitionMatrix().sumAbstract(model.getColumnVariables()).exportToDot("origdist.dot"); auto start = std::chrono::high_resolution_clock::now(); storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(model.getTransitionMatrix().sumAbstract(model.getColumnVariables()), ValueType(1e-6)), "Expected something else."); + quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).exportToDot("sanity.dot"); quotientTransitionMatrix.exportToDot("trans-1.dot"); + partitionAsAdd = partitionAsAdd / partitionAsAdd.sumAbstract(model.getColumnVariables()); quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); quotientTransitionMatrix.exportToDot("quottrans.dot"); + auto partCount = partitionAsAdd.sumAbstract(model.getColumnVariables()); + partCount.exportToDot("partcount.dot"); auto end = std::chrono::high_resolution_clock::now(); + + // Check quotient matrix for sanity. + auto quotdist = quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet); + quotdist.exportToDot("quotdists.dot"); + (quotdist / partCount).exportToDot("distcount.dot"); + STORM_LOG_ASSERT(quotientTransitionMatrix.greater(storm::utility::one()).isZero(), "Illegal entries in quotient matrix."); + STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(quotientTransitionMatrix.notZero().existsAbstract(blockPrimeVariableSet).template toAdd(), ValueType(1e-6)), "Illegal non-probabilistic matrix."); + STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); @@ -616,10 +643,15 @@ namespace storm { storm::dd::Add partitionAsAdd = partition.storedAsBdd() ? partition.asBdd().template toAdd() : partition.asAdd(); storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd, model.getColumnVariables()); quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getColumnVariables()); + partitionAsAdd = partitionAsAdd / partitionAsAdd.sumAbstract(model.getColumnVariables()); quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getRowVariables()); storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); + // Check quotient matrix for sanity. + STORM_LOG_ASSERT(quotientTransitionMatrix.greater(storm::utility::one()).isZero(), "Illegal entries in quotient matrix."); + STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(quotientTransitionMatrix.notZero().existsAbstract(blockPrimeVariableSet).template toAdd(), ValueType(1e-6)), "Illegal non-probabilistic matrix."); + storm::dd::Bdd partitionAsBdd = partition.storedAsBdd() ? partition.asBdd() : partition.asAdd().notZero(); storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()).renameVariables(blockVariableSet, model.getRowVariables()); From d0cf2ef57be63ab2534e2175b01c32584c3ff92b Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 4 Aug 2017 23:01:17 +0200 Subject: [PATCH 27/95] update to version 1.4.0 of sylvan --- resources/3rdparty/sylvan/.travis.yml | 6 +- resources/3rdparty/sylvan/CHANGELOG.md | 48 + resources/3rdparty/sylvan/CMakeLists.txt | 13 +- resources/3rdparty/sylvan/cmake/FindGMP.cmake | 7 +- resources/3rdparty/sylvan/docs/index.rst | 268 ++++-- resources/3rdparty/sylvan/examples/ldd2bdd.c | 328 ++++--- resources/3rdparty/sylvan/examples/lddmc.c | 834 ++++++++++++------ resources/3rdparty/sylvan/examples/mc.c | 558 +++++++++--- .../3rdparty/sylvan/models/anderson.4.bdd | Bin 0 -> 38400 bytes .../3rdparty/sylvan/models/anderson.4.ldd | Bin 0 -> 4448 bytes .../3rdparty/sylvan/models/anderson.6.ldd | Bin 0 -> 7528 bytes .../3rdparty/sylvan/models/anderson.8.ldd | Bin 0 -> 9248 bytes .../3rdparty/sylvan/models/at.5.8-rgs.bdd | Bin 50448 -> 0 bytes .../3rdparty/sylvan/models/at.6.8-rgs.bdd | Bin 50128 -> 0 bytes .../3rdparty/sylvan/models/at.7.8-rgs.bdd | Bin 59144 -> 0 bytes resources/3rdparty/sylvan/models/bakery.4.bdd | Bin 0 -> 75016 bytes resources/3rdparty/sylvan/models/bakery.4.ldd | Bin 0 -> 27136 bytes resources/3rdparty/sylvan/models/bakery.5.ldd | Bin 0 -> 200720 bytes resources/3rdparty/sylvan/models/bakery.6.ldd | Bin 0 -> 83712 bytes resources/3rdparty/sylvan/models/bakery.7.ldd | Bin 0 -> 696944 bytes resources/3rdparty/sylvan/models/blocks.2.ldd | Bin 14616 -> 11036 bytes resources/3rdparty/sylvan/models/blocks.3.ldd | Bin 0 -> 22676 bytes resources/3rdparty/sylvan/models/blocks.4.ldd | Bin 41000 -> 39292 bytes .../sylvan/models/collision.4.9-rgs.bdd | Bin 73696 -> 0 bytes .../3rdparty/sylvan/models/collision.4.bdd | Bin 0 -> 40924 bytes .../3rdparty/sylvan/models/collision.4.ldd | Bin 0 -> 8148 bytes .../sylvan/models/collision.5.9-rgs.bdd | Bin 73760 -> 0 bytes .../3rdparty/sylvan/models/collision.5.bdd | Bin 0 -> 43968 bytes .../3rdparty/sylvan/models/collision.5.ldd | Bin 0 -> 8664 bytes .../3rdparty/sylvan/models/collision.6.bdd | Bin 0 -> 58532 bytes .../3rdparty/sylvan/models/collision.6.ldd | Bin 0 -> 10800 bytes resources/3rdparty/sylvan/models/lifts.6.bdd | Bin 0 -> 394508 bytes resources/3rdparty/sylvan/models/lifts.6.ldd | Bin 0 -> 96516 bytes resources/3rdparty/sylvan/models/lifts.7.bdd | Bin 0 -> 409772 bytes resources/3rdparty/sylvan/models/lifts.7.ldd | Bin 0 -> 99124 bytes .../sylvan/models/schedule_world.2.8-rgs.bdd | Bin 73472 -> 0 bytes .../sylvan/models/schedule_world.2.bdd | Bin 0 -> 18556 bytes .../sylvan/models/schedule_world.2.ldd | Bin 0 -> 4728 bytes .../sylvan/models/schedule_world.3.8-rgs.bdd | Bin 97456 -> 0 bytes .../sylvan/models/schedule_world.3.bdd | Bin 0 -> 24264 bytes .../sylvan/models/schedule_world.3.ldd | Bin 0 -> 5516 bytes resources/3rdparty/sylvan/src/CMakeLists.txt | 8 +- resources/3rdparty/sylvan/src/avl.h | 2 +- resources/3rdparty/sylvan/src/lace.c | 406 ++++++--- resources/3rdparty/sylvan/src/lace.h | 424 +++++---- resources/3rdparty/sylvan/src/sylvan.h | 37 +- resources/3rdparty/sylvan/src/sylvan_bdd.c | 22 +- resources/3rdparty/sylvan/src/sylvan_bdd.h | 41 +- .../3rdparty/sylvan/src/sylvan_bdd_storm.h | 8 + resources/3rdparty/sylvan/src/sylvan_cache.c | 13 +- resources/3rdparty/sylvan/src/sylvan_cache.h | 14 +- resources/3rdparty/sylvan/src/sylvan_common.c | 2 +- resources/3rdparty/sylvan/src/sylvan_common.h | 4 +- resources/3rdparty/sylvan/src/sylvan_gmp.c | 7 +- resources/3rdparty/sylvan/src/sylvan_gmp.h | 10 +- resources/3rdparty/sylvan/src/sylvan_int.h | 134 +-- resources/3rdparty/sylvan/src/sylvan_ldd.c | 248 +++++- resources/3rdparty/sylvan/src/sylvan_ldd.h | 140 +-- .../3rdparty/sylvan/src/sylvan_ldd_int.h | 27 +- resources/3rdparty/sylvan/src/sylvan_mt.c | 7 +- resources/3rdparty/sylvan/src/sylvan_mt.h | 6 +- resources/3rdparty/sylvan/src/sylvan_mtbdd.c | 394 +++++++-- resources/3rdparty/sylvan/src/sylvan_mtbdd.h | 425 ++++++--- .../3rdparty/sylvan/src/sylvan_mtbdd_int.h | 49 +- .../3rdparty/sylvan/src/sylvan_mtbdd_storm.c | 10 +- .../3rdparty/sylvan/src/sylvan_mtbdd_storm.h | 8 + .../3rdparty/sylvan/src/sylvan_obj_storm.cpp | 1 + resources/3rdparty/sylvan/src/sylvan_refs.c | 11 +- resources/3rdparty/sylvan/src/sylvan_refs.h | 5 +- resources/3rdparty/sylvan/src/sylvan_sl.c | 8 +- resources/3rdparty/sylvan/src/sylvan_sl.h | 2 +- resources/3rdparty/sylvan/src/sylvan_stats.c | 17 +- resources/3rdparty/sylvan/src/sylvan_stats.h | 10 +- resources/3rdparty/sylvan/src/sylvan_table.c | 201 ++++- resources/3rdparty/sylvan/src/sylvan_table.h | 31 +- resources/3rdparty/sylvan/src/sylvan_tls.h | 3 - .../storage/dd/sylvan/InternalSylvanBdd.cpp | 2 +- src/storm/utility/sylvan.h | 1 + 78 files changed, 3272 insertions(+), 1528 deletions(-) mode change 100755 => 100644 resources/3rdparty/sylvan/CMakeLists.txt create mode 100644 resources/3rdparty/sylvan/models/anderson.4.bdd create mode 100644 resources/3rdparty/sylvan/models/anderson.4.ldd create mode 100644 resources/3rdparty/sylvan/models/anderson.6.ldd create mode 100644 resources/3rdparty/sylvan/models/anderson.8.ldd delete mode 100755 resources/3rdparty/sylvan/models/at.5.8-rgs.bdd delete mode 100755 resources/3rdparty/sylvan/models/at.6.8-rgs.bdd delete mode 100755 resources/3rdparty/sylvan/models/at.7.8-rgs.bdd create mode 100644 resources/3rdparty/sylvan/models/bakery.4.bdd create mode 100644 resources/3rdparty/sylvan/models/bakery.4.ldd create mode 100644 resources/3rdparty/sylvan/models/bakery.5.ldd create mode 100644 resources/3rdparty/sylvan/models/bakery.6.ldd create mode 100644 resources/3rdparty/sylvan/models/bakery.7.ldd create mode 100644 resources/3rdparty/sylvan/models/blocks.3.ldd delete mode 100755 resources/3rdparty/sylvan/models/collision.4.9-rgs.bdd create mode 100644 resources/3rdparty/sylvan/models/collision.4.bdd create mode 100644 resources/3rdparty/sylvan/models/collision.4.ldd delete mode 100755 resources/3rdparty/sylvan/models/collision.5.9-rgs.bdd create mode 100644 resources/3rdparty/sylvan/models/collision.5.bdd create mode 100644 resources/3rdparty/sylvan/models/collision.5.ldd create mode 100644 resources/3rdparty/sylvan/models/collision.6.bdd create mode 100644 resources/3rdparty/sylvan/models/collision.6.ldd create mode 100644 resources/3rdparty/sylvan/models/lifts.6.bdd create mode 100644 resources/3rdparty/sylvan/models/lifts.6.ldd create mode 100644 resources/3rdparty/sylvan/models/lifts.7.bdd create mode 100644 resources/3rdparty/sylvan/models/lifts.7.ldd delete mode 100755 resources/3rdparty/sylvan/models/schedule_world.2.8-rgs.bdd create mode 100644 resources/3rdparty/sylvan/models/schedule_world.2.bdd create mode 100644 resources/3rdparty/sylvan/models/schedule_world.2.ldd delete mode 100755 resources/3rdparty/sylvan/models/schedule_world.3.8-rgs.bdd create mode 100644 resources/3rdparty/sylvan/models/schedule_world.3.bdd create mode 100644 resources/3rdparty/sylvan/models/schedule_world.3.ldd mode change 100755 => 100644 resources/3rdparty/sylvan/src/CMakeLists.txt diff --git a/resources/3rdparty/sylvan/.travis.yml b/resources/3rdparty/sylvan/.travis.yml index 835aaf383..e85d3b077 100755 --- a/resources/3rdparty/sylvan/.travis.yml +++ b/resources/3rdparty/sylvan/.travis.yml @@ -58,12 +58,12 @@ install: script: - ${CC} --version - ${CXX} --version -- cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSYLVAN_STATS=${SYLVAN_STATS} -DWITH_COVERAGE=${COVERAGE} -DSYLVAN_BUILD_DOCS=${SYLVAN_BUILD_DOCS} +- cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSYLVAN_STATS=${SYLVAN_STATS} -DWITH_COVERAGE=${COVERAGE} -DSYLVAN_BUILD_DOCS=${SYLVAN_BUILD_DOCS} -DSYLVAN_BUILD_EXAMPLES=ON - make -j 2 - make test - examples/simple -- examples/mc models/schedule_world.2.8-rgs.bdd -w 2 | tee /dev/fd/2 | grep -q "1,570,340" -- examples/lddmc models/blocks.2.ldd -w 2 | tee /dev/fd/2 | grep -q "7057 states" +- examples/mc models/schedule_world.2.bdd -w 2 | tee /dev/fd/2 | grep -q "1,570,340" +- examples/lddmc models/blocks.2.ldd -w 2 | tee /dev/fd/2 | grep -q "7,057 states" notifications: email: false diff --git a/resources/3rdparty/sylvan/CHANGELOG.md b/resources/3rdparty/sylvan/CHANGELOG.md index e4d58ae65..7cc6e1228 100755 --- a/resources/3rdparty/sylvan/CHANGELOG.md +++ b/resources/3rdparty/sylvan/CHANGELOG.md @@ -2,12 +2,60 @@ All notable changes to Sylvan will be documented in this file. ## [Unreleased] +### Changed +- We now implement twisted tabulation as the hash function for the nodes table. The old hash function is still available and the default behavior can be changed in `sylvan_table.h`. + +## [1.4.0] - 2017-07-12 +### Added +- Function `mtbdd_cmpl` that computes the complement for MTBDDs. (0 becomes 1, non-0 becomes 0) + +### Changed +- Changed file formats used by the examples to match the changes in LTSmin. +- Function `mtbdd_satcount` now does not count assignments leading to 0. Perhaps in the future we make this configurable. (Like in CuDD.) +- Slightly improved C++ support by wrapping header files in the namespace sylvan. + +### Fixed +- There was a bug where Lace tasks are overwritten during SYNC, which causes problems during garbage collection. Lace reusing the bucket during SYNC is by design and is difficult to change. We fix the issue by checking during garbage collection if the stored task is still the same function, which in the worst case marks more nodes than needed. +- Band-aid patch for hashing; very similar nodes were hashing to similar positions and strides, causing early garbage collections and full tables. The patch works for now, but we need a more robust solution. + +### Removed +- Removed support for HWLOC (pinning on NUMA machines). Planning to bring this back as an option, but in its current form it prevents multiple Sylvan programs from running simultaneously on the same machine. + +## [1.3.3] - 2017-06-03 +### Changed +- Changed file format for .bdd files in the MC example. + +### Fixed +- A major bug in `lddmc_match_sat_par` has been fixed. +- A bug in the saturation algorithm in the model checking example has been fixed. +- A major bug in the hash table rehashing implementation has been fixed. + +## [1.3.2] - 2017-05-23 +### Added +- Now implements `lddmc_protect` and `lddmc_unprotect` for external pointer references. +- Now implements `lddmc_refs_pushptr` and `lddmc_refs_popptr` for internal pointer references + +### Changed +- New version of Lace has slightly different API for manually created threads. + +## [1.3.1] - 2017-05-22 +### Fixed +- A bug in `mtbdd_refs_ptrs_up` caused a segfault. This has been fixed. + +## [1.3.0] - 2017-05-16 ### Added - The embedded work-stealing framework now explicitly checks for stack overflows and aborts with an appropriate error message written to stderr. - New functions `sylvan_project` and `sylvan_and_project` for BDDs, a dual of existential quantification, where instead of the variables to remove, the given set of variables are the variables to keep. +- New functions `mtbdd_refs_pushptr` and `mtbdd_refs_popptr` allow thread-specific referencing of pointers. ### Changed - Rewritten initialization of Sylvan. Before the call to `sylvan_init_package`, table sizes must be initialized either using `sylvan_set_sizes` or with the new function `sylvan_set_limits`. This new function allows the user to set a maximum number of bytes allocated for the nodes table and for the operation cache. +- Rewritten MTBDD referencing system. +- Rewritten MTBDD map and set functions (no API change except renaming `mtbdd_map_addall` to `mtbdd_map_update` with backward compatibility) +- The lock-free unique table now uses double hashing instead of rehashing. This can improve the performance for custom leaves and improves the hash spread. + +### Fixed +- A bug in `llmsset_lookup` affecting custom leaves has been fixed. ## [1.2.0] - 2017-02-03 ### Added diff --git a/resources/3rdparty/sylvan/CMakeLists.txt b/resources/3rdparty/sylvan/CMakeLists.txt old mode 100755 new mode 100644 index a251eadec..7332217d3 --- a/resources/3rdparty/sylvan/CMakeLists.txt +++ b/resources/3rdparty/sylvan/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1) -project(sylvan LANGUAGES C CXX VERSION 1.2.0) +project(sylvan LANGUAGES C CXX VERSION 1.4.0) set(PROJECT_DESCRIPTION "Sylvan, a parallel decision diagram library") set(PROJECT_URL "https://github.com/trolando/sylvan") @@ -25,8 +25,8 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") option(SYLVAN_PORTABLE "If set, the created library will be portable." OFF) option(USE_CARL "Sets whether carl should be included." ON) -set(CMAKE_C_FLAGS "-O2 -Wextra -Wall -fno-strict-aliasing -fPIC ${CMAKE_C_FLAGS}") -set(CMAKE_CXX_FLAGS "-O2 -Wextra -Wall -fno-strict-aliasing -Wno-deprecated -fPIC ${CMAKE_CXX_FLAGS}") +set(CMAKE_C_FLAGS "-O2 -Wextra -Wall -fno-strict-aliasing ${CMAKE_C_FLAGS}") +set(CMAKE_CXX_FLAGS "-O2 -Wextra -Wall -fno-strict-aliasing -Wno-deprecated ${CMAKE_CXX_FLAGS}") if (NOT SYLVAN_PORTABLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") @@ -73,18 +73,17 @@ include_directories("${PROJECT_BINARY_DIR}/../../../include") include_directories(src) add_subdirectory(src) -option(SYLVAN_BUILD_TESTS "Build example tools" ON) +option(SYLVAN_BUILD_TESTS "Build example tests" ON) if(SYLVAN_BUILD_TESTS) add_subdirectory(test) endif() - -option(SYLVAN_BUILD_EXAMPLES "Build example tools" ON) +option(SYLVAN_BUILD_EXAMPLES "Build example tools" OFF) if(SYLVAN_BUILD_EXAMPLES) add_subdirectory(examples) endif() -option(SYLVAN_BUILD_DOCS "Build documentation" ON) +option(SYLVAN_BUILD_DOCS "Build documentation" OFF) if(SYLVAN_BUILD_DOCS) configure_file("docs/conf.py.in" "docs/conf.py" @ONLY) find_package(Sphinx REQUIRED) diff --git a/resources/3rdparty/sylvan/cmake/FindGMP.cmake b/resources/3rdparty/sylvan/cmake/FindGMP.cmake index 7d787a84d..7dcd75afd 100755 --- a/resources/3rdparty/sylvan/cmake/FindGMP.cmake +++ b/resources/3rdparty/sylvan/cmake/FindGMP.cmake @@ -8,16 +8,13 @@ find_package(PkgConfig) pkg_check_modules(PC_GMP QUIET gmp) -set(GMP_INCLUDE "" CACHE PATH "include dir") -set(GMP_LOCATION "" CACHE PATH "location dir") - set(GMP_DEFINITIONS ${PC_GMP_CFLAGS_OTHER}) find_path(GMP_INCLUDE_DIR gmp.h - HINTS ${GMP_INCLUDE} ${PC_GMP_INCLUDEDIR} ${PC_GMP_INCLUDE_DIRS}) + HINTS ${PC_GMP_INCLUDEDIR} ${PC_GMP_INCLUDE_DIRS}) find_library(GMP_LIBRARIES NAMES gmp libgmp - HINTS ${GMP_LOCATION} ${PC_GMP_LIBDIR} ${PC_GMP_LIBRARY_DIRS} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) + HINTS ${PC_GMP_LIBDIR} ${PC_GMP_LIBRARY_DIRS}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE diff --git a/resources/3rdparty/sylvan/docs/index.rst b/resources/3rdparty/sylvan/docs/index.rst index cb2a33aa7..f15c2e85e 100755 --- a/resources/3rdparty/sylvan/docs/index.rst +++ b/resources/3rdparty/sylvan/docs/index.rst @@ -31,15 +31,19 @@ Bindings for other languages than C/C++ also exist: Dependencies ------------ -Sylvan has the following required dependencies: +Sylvan has the following dependencies: - **CMake** for compiling. - **gmp** (``libgmp-dev``) for the GMP leaves in MTBDDs. -- **hwloc** (``libhwloc-dev``) for pinning worker threads to processors. +- **Sphinx** if you want to build the documentation. Sylvan depends on the `work-stealing framework Lace `__ for its implementation. Lace is embedded in the Sylvan distribution. +Lace requires one additional library: + +- **hwloc** (``libhwloc-dev``) for pinning worker threads to processors. + Building -------- @@ -71,14 +75,12 @@ To use Sylvan, the library and its dependency Lace must be initialized: lace_init(n_workers, 0); lace_startup(0, NULL, NULL); - size_t nodes_minsize = 1LL<<22; - size_t nodes_maxsize = 1LL<<26; - size_t cache_minsize = 1LL<<23; - size_t cache_maxsize = 1LL<<27; - sylvan_init_package(nodes_minsize, nodes_maxsize, cache_minsize, cache_maxsize); + // use at most 512 MB, nodes:cache ratio 2:1, initial size 1/32 of maximum + sylvan_set_limits(512*1024*1024, 1, 5); + sylvan_init_package(); sylvan_init_mtbdd(); - ... + /* ... do stuff ... */ sylvan_stats_report(stdout); sylvan_quit(); @@ -90,19 +92,20 @@ for work-stealing. The parameter ``n_workers`` can be set to 0 for auto-detectio function ``lace_startup`` then creates all other worker threads. The worker threads run until ``lace_exit`` is called. Lace must be started before Sylvan can be initialized. -Sylvan is initialized with a call to ``sylvan_init_package``. Here we choose the initial -and maximum sizes of the nodes table and the operation cache. In the example, we choose a maximum -nodes table size of 2^26 and a maximum cache size of 2^27. The initial sizes are -set to 2^22 and 2^23, respectively. The sizes must be powers of 2. -Sylvan allocates memory for the maximum sizes *in virtual memory* but only uses the space -needed for the initial sizes. The sizes are doubled during garbage collection, until the maximum -size has been reached. +Sylvan is initialized with a call to ``sylvan_init_package``. Before this call, Sylvan needs to know +how much memory to allocate for the nodes table and the operation cache. In this example, we use the +``sylvan_set_limits`` function to tell Sylvan that it may allocate at most 512 MB for these tables. +The second parameter indicates the ratio of the nodes table and the operation cache, with each +higher number doubling the size of the nodes table. Negative numbers double the size of the operation +cache instead. In the example, we want the nodes table to be twice as big as the operation cache. +The third parameter controls how often garbage collection doubles the table sizes before +their maximum size is reached. The value 5 means that the initial tables are 32x as small as the maximum size. +By default, every execution of garbage collection doubles the table sizes. -After ``sylvan_init_package``, the subpackages ``mtbdd`` and ``ldd`` can be initialized with -``sylvan_init_mtbdd`` and ``sylvan_init_ldd``. This mainly allocates auxiliary datastructures for -garbage collection. +After ``sylvan_init_package``, subpackages like ``mtbdd`` and ``ldd`` can be initialized with +``sylvan_init_mtbdd`` and ``sylvan_init_ldd``. This allocates auxiliary datastructures. -If you enable statistics generation (via CMake) then you can use ``sylvan_stats_report`` to report +If you enabled statistics generation (via CMake), then you can use ``sylvan_stats_report`` to report the obtained statistics to a given ``FILE*``. The Lace framework @@ -110,7 +113,7 @@ The Lace framework Sylvan uses the Lace framework to offer 'automatic' parallelization of decision diagram operations. Many functions in Sylvan are Lace tasks. To call a Lace task, the variables -``__lace_worker`` and ``__lace_dq_head`` must be initialized **locally**. +``__lace_worker`` and ``__lace_dq_head`` must be initialized as **local** variables of the current function. Use the macro ``LACE_ME`` to initialize the variables in every function that calls Sylvan functions and is not itself a Lace task. @@ -121,98 +124,207 @@ Like all decision diagram implementations, Sylvan performs garbage collection. Garbage collection is triggered when trying to insert a new node and no empty space can be found in the table within a reasonable upper bound. +Garbage collection can be disabled with ``sylvan_gc_disable`` and enabled again with ``sylvan_gc_enable``. +Call ``sylvan_gc`` to manually trigger garbage collection. + To ensure that no decision diagram nodes are overwritten, you must ensure that Sylvan knows which decision diagrams you care about. -The easiest way to do this is with ``sylvan_protect`` and ``sylvan_unprotect`` to protect -a given pointer. -These functions protect the decision diagram referenced to by that pointer at the time -that garbage collection is performed. -Unlike some other implementations of decision diagrams, -you can modify the variable between the calls to ``sylvan_protect`` and ``sylvan_unprotect`` -without explicitly changing the reference. - -To manually trigger garbage collection, call ``sylvan_gc``. -You can use ``sylvan_gc_disable`` and ``sylvan_gc_enable`` to disable garbage collection or -enable it again. If garbage collection is disabled, the program will abort when the nodes table -is full. +Each subpackage implements mechanisms to store references to decision diagrams that must be kept. +For example, the *mtbdd* subpackage implements ``mtbdd_protect`` and ``mtbdd_unprotect`` to store pointers to +MTBDD variables. + +.. code:: c + + MTBDD* allocate_var() { + MTBDD* my_var = (MTBDD*)calloc(sizeof(MTBDD), 1); + mtbdd_protect(my_var); + return my_var; + } + + free_var(MTBDD* my_var) { + mtbdd_unprotect(my_var); + free(my_var); + } + +If you use ``mtbdd_protect`` you do not need to update the reference every time the value changes. + +The *mtbdd* subpackage also implements thread-local stacks to temporarily store pointers and results of tasks: + +.. code:: c + + MTBDD some_thing = ...; + mtbdd_refs_pushptr(&some_thing); + MTBDD result_param1 = mtbdd_false, result_param2 = mtbdd_false; + mtbdd_refs_pushptr(&result_param1); + mtbdd_refs_pushptr(&result_param2); + while (some_condition) { + mtbdd_refs_spawn(SPAWN(an_operation, some_thing, param1)); + result_param2 = CALL(an_operation, some_thing, param2); + result_param1 = mtbdd_refs_sync(SYNC(an_operation)); + some_thing = CALL(another_operation, result1, result2); + } + mtbdd_refs_popptr(3); + return some_thing; + +It is recommended to use the thread-local stacks for local variables, and to use the ``protect`` and ``unprotect`` +functions for other variables. Every SPAWN and SYNC of a Lace task that returns an MTBDD must be decorated with +``mtbdd_refs_stack`` and ``mtbdd_refs_sync`` as in the above example. + +References to decision diagrams must be added before a worker may cooperate on garbage collection. +Workers can cooperate on garbage collection during ``SYNC`` and when functions create nodes or use ``sylvan_gc_test`` to test whether to assist in garbage collection. +Functions for adding or removing references never perform garbage collection. +Furthermore, only the ``mtbdd_makenode`` function (and other node making primitives) implicitly reference their parameters; all other functions do not reference their parameters. +Nesting Sylvan functions (including ``sylvan_ithvar``) is bad practice and should be avoided. + **Warning**: Sylvan is a multi-threaded library and all workers must cooperate for garbage collection. If you use locking mechanisms in your code, beware of deadlocks! +You can explicitly cooperate on garbage collection with ``sylvan_gc_test()``. + +Basic BDD/MTBDD functionality +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Basic BDD functionality -~~~~~~~~~~~~~~~~~~~~~~~ +In Sylvan, BDDs are special cases of MTBDDs. +Several functions are specific for BDDs and they start with ``sylvan_``, whereas generic MTBDD functions start +with ``mtbdd_``. To create new BDDs, you can use: -- ``sylvan_true``: representation of constant ``true``. -- ``sylvan_false``: representation of constant ``false``. +- ``mtbdd_true``: representation of constant ``true``. +- ``mtbdd_false``: representation of constant ``false``. - ``sylvan_ithvar(var)``: representation of literal (negated: ``sylvan_nithvar(var)``) To follow the BDD edges and obtain the variable at the root of a BDD, -you can use (only for internal nodes, not for leaves ``sylvan_true`` and ``sylvan_false``): +you can use (only for internal nodes, not for leaves ``mtbdd_true`` and ``mtbdd_false``): -- ``sylvan_var(bdd)``: obtain the variable of the root node of . -- ``sylvan_high(bdd)``: follow the high edge of . -- ``sylvan_low(bdd)``: follow the low edge of . +- ``mtbdd_getvar(bdd)``: obtain the variable of the root node of . +- ``mtbdd_gethigh(bdd)``: follow the high edge of . +- ``mtbdd_getlow(bdd)``: follow the low edge of . You need to manually reference BDDs that you want to keep during garbage -collection: +collection (see the above explanation): -- ``sylvan_protect(bddptr)``: add a pointer reference to . -- ``sylvan_unprotect(bddptr)``: remove a pointer reference to . -- ``sylvan_ref(bdd)``: add a reference to . -- ``sylvan_deref(bdd)``: remove a reference to . +- ``mtbdd_protect(bddptr)``: add a pointer reference to . +- ``mtbdd_unprotect(bddptr)``: remove a pointer reference to . +- ``mtbdd_refs_pushptr(bddptr)``: add a local pointer reference to . +- ``mtbdd_refs_popptr(amount)``: remove the last local pointer references. +- ``mtbdd_refs_spawn(SPAWN(...))``: spawn a task that returns a BDD/MTBDD. +- ``mtbdd_refs_sync(SYNC(...))``: sync a task that returns a BDD/MTBDD. -It is recommended to use ``sylvan_protect`` and ``sylvan_unprotect``. +It is recommended to use ``mtbdd_protect`` and ``mtbdd_unprotect``. The C++ objects (defined in ``sylvan_obj.hpp``) handle this automatically. +For local variables, we recommend ``mtbdd_refs_pushptr`` and ``mtbdd_refs_popptr``. -The following basic operations are implemented: +The following basic BDD operations are implemented: - ``sylvan_not(bdd)``: compute the negation of . - ``sylvan_ite(a,b,c)``: compute 'if then else '. -- ``sylvan_and(a, b)``: compute ' and ' -- ``sylvan_or(a, b)``: compute ' or ' -- ``sylvan_nand(a, b)``: compute 'not ( and )' -- ``sylvan_nor(a, b)``: compute 'not ( or )' -- ``sylvan_imp(a, b)``: compute ' then ' -- ``sylvan_invimp(a, b)``: compute ' then ' -- ``sylvan_xor(a, b)``: compute ' xor ' -- ``sylvan_equiv(a, b)``: compute ' = ' -- ``sylvan_diff(a, b)``: compute ' and not ' -- ``sylvan_less(a, b)``: compute ' and not ' +- ``sylvan_and(a, b)``: compute ' and '. +- ``sylvan_or(a, b)``: compute ' or '. +- ``sylvan_nand(a, b)``: compute 'not ( and )'. +- ``sylvan_nor(a, b)``: compute 'not ( or )'. +- ``sylvan_imp(a, b)``: compute ' then '. +- ``sylvan_invimp(a, b)``: compute ' then '. +- ``sylvan_xor(a, b)``: compute ' xor '. +- ``sylvan_equiv(a, b)``: compute ' = '. +- ``sylvan_diff(a, b)``: compute ' and not '. +- ``sylvan_less(a, b)``: compute ' and not '. - ``sylvan_exists(bdd, vars)``: existential quantification of with respect to variables . - ``sylvan_forall(bdd, vars)``: universal quantification of with respect to variables . +- ``sylvan_project(bdd, vars)``: the dual of ``sylvan_exists``, projects the to the variable domain . A set of variables (like above) is a BDD representing the conjunction of the variables. - -Other BDD operations -~~~~~~~~~~~~~~~~~~~~ - -See ``src/sylvan_bdd.h`` for other operations on BDDs, especially operations -that are relevant for model checking. - -Basic MTBDD functionality -~~~~~~~~~~~~~~~~~~~~~~~~~ - -See ``src/sylvan_mtbdd.h`` for operations on multi-terminal BDDs. - -Basic LDD functionality -~~~~~~~~~~~~~~~~~~~~~~~ - -See ``src/sylvan_ldd.h`` for operations on List DDs. +A number of convencience functions are defined to manipulate sets of variables: + +- ``mtbdd_set_empty()``: obtain an empty set. +- ``mtbdd_set_isempty(set)``: compute whether the set is empty. +- ``mtbdd_set_first(set)``: obtain the first variable of the set. +- ``mtbdd_set_next(set)``: obtain the subset without the first variable. +- ``mtbdd_set_from_array(arr, len)``: create a set from a given array. +- ``mtbdd_set_to_array(set, arr)``: write the set to the given array. +- ``mtbdd_set_add(set, var)``: compute the set plus the variable. +- ``mtbdd_set_union(set1, set2)``: compute the union of two sets. +- ``mtbdd_set_remove(set, var)``: compute the set minus the variable. +- ``mtbdd_set_minus(set1, set2)``: compute the set minus the variables in . +- ``mtbdd_set_count(set)``: compute the number of variables in the set. +- ``mtbdd_set_contains(set, var)``: compute whether the set contains the variable. + +Sylvan also implements composition and substitution/variable renaming using a "MTBDD map". An MTBDD map is a special structure +implemented with special MTBDD nodes to store a mapping from variables (uint32_t) to MTBDDs. Like sets of variables and MTBDDs, MTBDD maps must +also be referenced for garbage collection. The following functions are related to MTBDD maps: + +- ``mtbdd_compose(dd, map)``: apply the map to the given decision diagram, transforming every node with a variable that is associated with some function F in the map by ``if then else ``. +- ``sylvan_compose(dd, map)``: same as ``mtbdd_compose``, but assumes the decision diagram only has Boolean leaves. +- ``mtbdd_map_empty()``: obtain an empty map. +- ``mtbdd_map_isempty(map)``: compute whether the map is empty. +- ``mtbdd_map_key(map)``: obtain the key of the first pair of the map. +- ``mtbdd_map_value(map)``: obtain the value of the first pair of the map. +- ``mtbdd_map_next(map)``: obtain the submap without the first pair. +- ``mtbdd_map_add(map, key, value)``: compute the map plus the given key-value pair. +- ``mtbdd_map_update(map1, map2)``: compute the union of two maps, with priority to map2 if both maps share variables. +- ``mtbdd_map_remove(map, var)``: compute the map minus the variable. +- ``mtbdd_map_removeall(map, set)``: compute the map minus the given variables. +- ``mtbdd_map_count(set)``: compute the number of pairs in the map. +- ``mtbdd_map_contains(map, var)``: compute whether the map contains the variable. + +Sylvan implements a number of counting operations: + +- ``mtbdd_satcount(bdd, number_of_vars)``: compute the number of minterms (assignments that lead to True) for a function with variables; we don't need to know the exact variables that may be in the BDD, just how many there are. +- ``sylvan_pathcount(bdd)``: compute the number of distinct paths to True. +- ``mtbdd_nodecount(bdd)``: compute the number of nodes (and leaves) in the BDD. +- ``mtbdd_nodecount_more(array, length)``: compute the number of nodes (and leaves) in the array of BDDs. + +Sylvan implements various advanced operations: + +- ``sylvan_and_exists(bdd_a, bdd_b, vars)``: compute ``sylvan_exists(sylvan_and(bdd_a, bdd_b), vars)`` in one step. +- ``sylvan_and_project(bdd_a, bdd_b, vars)``: compute ``sylvan_project(sylvan_and(bdd_a, bdd_b), vars)`` in one step. +- ``sylvan_cube(vars, values)``: compute a cube (to leaf True) of the given variables, where the array values indicates for each variable whether to use it in negative form (value 0) or positive form (value 1) or to skip it (as dont-care, value 2). +- ``sylvan_union_cube(set, vars, values)``: compute ``sylvan_or(set, sylvan_cube(vars, values))`` in one step. +- ``sylvan_constrain(bdd_f, bdd_c)``: compute the generic cofactor of F constrained by C, i.e, set F to False for all assignments not in C. +- ``sylvan_restrict(bdd_f, bdd_c)``: compute Coudert and Madre's restrict algorithm, which tries to minimize bdd_f according to a care set C using sibling substitution; the invariant is ``restrict(f, c) \and c == f \and c``; the result of this algorithm is often but not always smaller than the original. +- ``sylvan_pick_cube(bdd)`` or ``sylvan_sat_one_bdd(bdd)``: extract a single path to True from the BDD (returns the BDD of this path) +- ``sylvan_pick_single_cube(bdd, vars)`` or ``sylvan_sat_single(bdd, vars)`` extracts a single minterm from the BDD (returns the BDD of this assignment) +- ``sylvan_sat_one(bdd, vars, array)``: extract a single minterm from the BDD given the set of variables and write the values of the variables in order to the given array, with 0 when it is negative, 1 when it is positive, and 2 when it is dontcare. + +Sylvan implements several operations for transition systems. These operations assume an interleaved variable ordering, such that *source* or *unprimed* variables have even parity (0, 2, 4...) and matching *target* or *primed* variables have odd parity (1, 3, 5...). +The transition relations may be partial transition relations that only manipulate a subset of variables; hence, the operations also require the set of variables. + +- ``sylvan_relnext(set, relation, vars)``: apply the (partial) relation on the given variables to the set. +- ``sylvan_relprev(relation, set, vars)``: apply the (partial) relation in reverse to the set; this computes predecessors but can also concatenate relations as follows: ``sylvan_relprev(rel1, rel2, rel1_vars)``. +- ``sylvan_closure(relation)``: compute the transitive closure of the given set recursively (see Matsunaga et al, DAC 1993) + +See ``src/sylvan_bdd.h`` and ``src/mtbdd.h`` for other operations on BDDs and MTBDDs. + +Custom leaves +~~~~~~~~~~~~~ + +See ``src/sylvan_mt.h`` and the example in ``src/sylvan_gmp.h`` and ``src/sylvan_gmp.c`` for custom leaves in MTBDDs. + +Custom decision diagram operations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Adding custom decision diagram operations is easy. Include ``sylvan_int.h`` for the internal functions. See ``sylvan_cache.h`` +for how to use the operation cache. + +List decision diagrams +~~~~~~~~~~~~~~~~~~~~~~ + +See ``src/sylvan_ldd.h`` for operations on list decision diagrams. + +File I/O +~~~~~~~~ + +You can store and load BDDs using a number of methods, which are documented in the header files ``sylvan_mtbdd.h`` and ``sylvan_ldd.h``. Support for C++ ~~~~~~~~~~~~~~~ See ``src/sylvan_obj.hpp`` for the C++ interface. -.. Adding custom decision diagram operations -.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Table resizing ~~~~~~~~~~~~~~ During garbage collection, it is possible to resize the nodes table and -the cache. Sylvan provides two default implementations: an aggressive -version that resizes every time garbage collection is performed, and a +the cache. By default, Sylvan doubles the table sizes during every garbage +collection until the maximum table size has been reached. There is also a less aggressive version that only resizes when at least half the table is full. This can be configured in ``src/sylvan_config.h``. It is not possible to decrease the size of the nodes table and the cache. diff --git a/resources/3rdparty/sylvan/examples/ldd2bdd.c b/resources/3rdparty/sylvan/examples/ldd2bdd.c index 545be9792..b23311bd2 100755 --- a/resources/3rdparty/sylvan/examples/ldd2bdd.c +++ b/resources/3rdparty/sylvan/examples/ldd2bdd.c @@ -13,15 +13,15 @@ static int workers = 0; // autodetect static int verbose = 0; static char* model_filename = NULL; // filename of model static char* bdd_filename = NULL; // filename of output BDD -static char* sizes = "22,27,21,26"; // default sizes static int check_results = 0; +static int no_reachable = 0; /* argp configuration */ static struct argp_option options[] = { {"workers", 'w', "", 0, "Number of workers (default=0: autodetect)", 0}, - {"table-sizes", 1, ",,,", 0, "Sizes of nodes table and operation cache as powers of 2", 0}, - {"check-results", 2, 0, 0, "Check new transition relations ", 0}, + {"check-results", 2, 0, 0, "Check new transition relations", 0}, + {"no-reachable", 1, 0, 0, "Do not write reachabile states", 0}, {"verbose", 'v', 0, 0, "Set verbose", 0}, {0, 0, 0, 0, 0, 0} }; @@ -37,7 +37,7 @@ parse_opt(int key, char *arg, struct argp_state *state) verbose = 1; break; case 1: - sizes = arg; + no_reachable = 1; break; case 2: check_results = 1; @@ -58,67 +58,112 @@ parse_opt(int key, char *arg, struct argp_state *state) static struct argp argp = { options, parse_opt, " []", 0, 0, 0, 0 }; -/* Globals */ +/** + * Types (set and relation) + */ typedef struct set { - MDD mdd; - MDD proj; + MDD dd; } *set_t; typedef struct relation { - MDD mdd; - MDD meta; + MDD dd; + MDD meta; // for relprod + int r_k, w_k, *r_proj, *w_proj; } *rel_t; -static size_t vector_size; // size of vector +static int vector_size; // size of vector static int next_count; // number of partitions of the transition relation static rel_t *next; // each partition of the transition relation static int actionbits = 0; static int has_actions = 0; -#define Abort(...) { fprintf(stderr, __VA_ARGS__); exit(-1); } +#define Abort(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "Abort at line %d!\n", __LINE__); exit(-1); } /* Load a set from file */ #define set_load(f) CALL(set_load, f) TASK_1(set_t, set_load, FILE*, f) { - lddmc_serialize_fromfile(f); - - size_t mdd; - size_t proj; - int size; + set_t set = (set_t)malloc(sizeof(struct set)); - if (fread(&mdd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&proj, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&size, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + int k; + if (fread(&k, sizeof(int), 1, f) != 1) Abort("Invalid input file!"); + if (k != -1) Abort("Invalid input file!"); - set_t set = (set_t)malloc(sizeof(struct set)); - set->mdd = lddmc_ref(lddmc_serialize_get_reversed(mdd)); - set->proj = lddmc_ref(lddmc_serialize_get_reversed(proj)); + lddmc_serialize_fromfile(f); + size_t dd; + if (fread(&dd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!"); + set->dd = lddmc_serialize_get_reversed(dd); + lddmc_protect(&set->dd); return set; } /* Load a relation from file */ -#define rel_load(f) CALL(rel_load, f) -TASK_1(rel_t, rel_load, FILE*, f) +#define rel_load_proj(f) CALL(rel_load_proj, f) +TASK_1(rel_t, rel_load_proj, FILE*, f) { - lddmc_serialize_fromfile(f); + int r_k, w_k; + if (fread(&r_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); + if (fread(&w_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); - size_t mdd; - size_t meta; + rel_t rel = (rel_t)malloc(sizeof(struct relation)); + rel->r_k = r_k; + rel->w_k = w_k; + rel->r_proj = (int*)malloc(sizeof(int[rel->r_k])); + rel->w_proj = (int*)malloc(sizeof(int[rel->w_k])); + + if (fread(rel->r_proj, sizeof(int), rel->r_k, f) != (size_t)rel->r_k) Abort("Invalid file format."); + if (fread(rel->w_proj, sizeof(int), rel->w_k, f) != (size_t)rel->w_k) Abort("Invalid file format."); + + int *r_proj = rel->r_proj; + int *w_proj = rel->w_proj; + + /* Compute the meta */ + uint32_t meta[vector_size*2+2]; + memset(meta, 0, sizeof(uint32_t[vector_size*2+2])); + int r_i=0, w_i=0, i=0, j=0; + for (;;) { + int type = 0; + if (r_i < r_k && r_proj[r_i] == i) { + r_i++; + type += 1; // read + } + if (w_i < w_k && w_proj[w_i] == i) { + w_i++; + type += 2; // write + } + if (type == 0) meta[j++] = 0; + else if (type == 1) { meta[j++] = 3; } + else if (type == 2) { meta[j++] = 4; } + else if (type == 3) { meta[j++] = 1; meta[j++] = 2; } + if (r_i == r_k && w_i == w_k) { + meta[j++] = 5; // action label + meta[j++] = (uint32_t)-1; + break; + } + i++; + } - if (fread(&mdd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&meta, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); + rel->meta = lddmc_cube((uint32_t*)meta, j); + rel->dd = lddmc_false; - rel_t rel = (rel_t)malloc(sizeof(struct relation)); - rel->mdd = lddmc_ref(lddmc_serialize_get_reversed(mdd)); - rel->meta = lddmc_ref(lddmc_serialize_get_reversed(meta)); + lddmc_protect(&rel->meta); + lddmc_protect(&rel->dd); return rel; } +#define rel_load(f, rel) CALL(rel_load, f, rel) +VOID_TASK_2(rel_load, FILE*, f, rel_t, rel) +{ + lddmc_serialize_fromfile(f); + size_t dd; + if (fread(&dd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!"); + rel->dd = lddmc_serialize_get_reversed(dd); +} + /** * Compute the highest value for each variable level. * This method is called for the set of reachable states. @@ -199,7 +244,7 @@ VOID_TASK_3(compute_highest_action, MDD, dd, MDD, meta, uint32_t*, target) */ static uint64_t bdd_from_ldd_id; #define bdd_from_ldd(dd, bits, firstvar) CALL(bdd_from_ldd, dd, bits, firstvar) -TASK_3(MTBDD, bdd_from_ldd, MDD, dd, MDD, bits_mdd, uint32_t, firstvar) +TASK_3(MTBDD, bdd_from_ldd, MDD, dd, MDD, bits_dd, uint32_t, firstvar) { /* simple for leaves */ if (dd == lddmc_false) return mtbdd_false; @@ -208,16 +253,16 @@ TASK_3(MTBDD, bdd_from_ldd, MDD, dd, MDD, bits_mdd, uint32_t, firstvar) MTBDD result; /* get from cache */ /* note: some assumptions about the encoding... */ - if (cache_get3(bdd_from_ldd_id, dd, bits_mdd, firstvar, &result)) return result; + if (cache_get3(bdd_from_ldd_id, dd, bits_dd, firstvar, &result)) return result; mddnode_t n = LDD_GETNODE(dd); - mddnode_t nbits = LDD_GETNODE(bits_mdd); + mddnode_t nbits = LDD_GETNODE(bits_dd); int bits = (int)mddnode_getvalue(nbits); - /* spawn right, same bits_mdd and firstvar */ - mtbdd_refs_spawn(SPAWN(bdd_from_ldd, mddnode_getright(n), bits_mdd, firstvar)); + /* spawn right, same bits_dd and firstvar */ + mtbdd_refs_spawn(SPAWN(bdd_from_ldd, mddnode_getright(n), bits_dd, firstvar)); - /* call down, with next bits_mdd and firstvar */ + /* call down, with next bits_dd and firstvar */ MTBDD down = CALL(bdd_from_ldd, mddnode_getdown(n), mddnode_getdown(nbits), firstvar + 2*bits); /* encode current value */ @@ -239,7 +284,7 @@ TASK_3(MTBDD, bdd_from_ldd, MDD, dd, MDD, bits_mdd, uint32_t, firstvar) mtbdd_refs_pop(2); /* put in cache */ - cache_put3(bdd_from_ldd_id, dd, bits_mdd, firstvar, result); + cache_put3(bdd_from_ldd_id, dd, bits_dd, firstvar, result); return result; } @@ -249,7 +294,7 @@ TASK_3(MTBDD, bdd_from_ldd, MDD, dd, MDD, bits_mdd, uint32_t, firstvar) */ static uint64_t bdd_from_ldd_rel_id; #define bdd_from_ldd_rel(dd, bits, firstvar, meta) CALL(bdd_from_ldd_rel, dd, bits, firstvar, meta) -TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, meta) +TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_dd, uint32_t, firstvar, MDD, meta) { if (dd == lddmc_false) return mtbdd_false; if (dd == lddmc_true) return mtbdd_true; @@ -266,11 +311,11 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, MTBDD result; /* note: assumptions */ - if (cache_get4(bdd_from_ldd_rel_id, dd, bits_mdd, firstvar, meta, &result)) return result; + if (cache_get4(bdd_from_ldd_rel_id, dd, bits_dd, firstvar, meta, &result)) return result; const mddnode_t n = LDD_GETNODE(dd); const mddnode_t nmeta = LDD_GETNODE(meta); - const mddnode_t nbits = LDD_GETNODE(bits_mdd); + const mddnode_t nbits = LDD_GETNODE(bits_dd); const int bits = (int)mddnode_getvalue(nbits); const uint32_t vmeta = mddnode_getvalue(nmeta); @@ -285,10 +330,10 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, assert(mddnode_getright(n) != mtbdd_true); /* spawn right */ - mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_mdd, firstvar, meta)); + mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_dd, firstvar, meta)); /* compute down with same bits / firstvar */ - MTBDD down = bdd_from_ldd_rel(mddnode_getdown(n), bits_mdd, firstvar, mddnode_getdown(nmeta)); + MTBDD down = bdd_from_ldd_rel(mddnode_getdown(n), bits_dd, firstvar, mddnode_getdown(nmeta)); mtbdd_refs_push(down); /* encode read value */ @@ -319,7 +364,7 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, /* spawn right */ assert(mddnode_getright(n) != mtbdd_true); - mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_mdd, firstvar, meta)); + mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_dd, firstvar, meta)); /* get recursive result */ MTBDD down = CALL(bdd_from_ldd_rel, mddnode_getdown(n), mddnode_getdown(nbits), firstvar + 2*bits, mddnode_getdown(nmeta)); @@ -358,7 +403,7 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, assert(!mddnode_getcopy(n)); // do not process read copy nodes /* spawn right */ - mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_mdd, firstvar, meta)); + mtbdd_refs_spawn(SPAWN(bdd_from_ldd_rel, mddnode_getright(n), bits_dd, firstvar, meta)); /* get recursive result */ MTBDD down = CALL(bdd_from_ldd_rel, mddnode_getdown(n), mddnode_getdown(nbits), firstvar + 2*bits, mddnode_getdown(nmeta)); @@ -402,7 +447,7 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, assert(vmeta <= 5); } - cache_put4(bdd_from_ldd_rel_id, dd, bits_mdd, firstvar, meta, result); + cache_put4(bdd_from_ldd_rel_id, dd, bits_dd, firstvar, meta, result); return result; } @@ -411,7 +456,7 @@ TASK_4(MTBDD, bdd_from_ldd_rel, MDD, dd, MDD, bits_mdd, uint32_t, firstvar, MDD, * Compute the BDD equivalent of the meta variable (to a variables cube) */ MTBDD -meta_to_bdd(MDD meta, MDD bits_mdd, uint32_t firstvar) +meta_to_bdd(MDD meta, MDD bits_dd, uint32_t firstvar) { if (meta == lddmc_false || meta == lddmc_true) return mtbdd_true; @@ -430,10 +475,10 @@ meta_to_bdd(MDD meta, MDD bits_mdd, uint32_t firstvar) if (vmeta == 1) { /* return recursive result, don't go down on bits */ - return meta_to_bdd(mddnode_getdown(nmeta), bits_mdd, firstvar); + return meta_to_bdd(mddnode_getdown(nmeta), bits_dd, firstvar); } - const mddnode_t nbits = LDD_GETNODE(bits_mdd); + const mddnode_t nbits = LDD_GETNODE(bits_dd); const int bits = (int)mddnode_getvalue(nbits); /* compute recursive result */ @@ -450,16 +495,6 @@ meta_to_bdd(MDD meta, MDD bits_mdd, uint32_t firstvar) return res; } -static char* -to_h(double size, char *buf) -{ - const char* units[] = {"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; - int i = 0; - for (;size>1024;size/=1024) i++; - sprintf(buf, "%.*f %s", i, size, units[i]); - return buf; -} - VOID_TASK_0(gc_start) { printf("Starting garbage collection\n"); @@ -475,37 +510,13 @@ main(int argc, char **argv) { argp_parse(&argp, argc, argv, 0, 0, 0); - // Parse table sizes - int tablesize, maxtablesize, cachesize, maxcachesize; - if (sscanf(sizes, "%d,%d,%d,%d", &tablesize, &maxtablesize, &cachesize, &maxcachesize) != 4) { - Abort("Invalid string for --table-sizes, try e.g. --table-sizes=23,28,22,27"); - } - if (tablesize < 10 || maxtablesize < 10 || cachesize < 10 || maxcachesize < 10 || - tablesize > 40 || maxtablesize > 40 || cachesize > 40 || maxcachesize > 40) { - Abort("Invalid string for --table-sizes, must be between 10 and 40"); - } - if (tablesize > maxtablesize) { - Abort("Invalid string for --table-sizes, tablesize is larger than maxtablesize"); - } - if (cachesize > maxcachesize) { - Abort("Invalid string for --table-sizes, cachesize is larger than maxcachesize"); - } - - // Report table sizes - char buf[32]; - to_h((1ULL<mdd)); - for (i=0; imdd)); + printf("Initial states: %zu LDD nodes\n", lddmc_nodecount(initial->dd)); + for (int i=0; idd)); } } @@ -600,28 +594,18 @@ main(int argc, char **argv) // Compute highest value at each level (from reachable states) uint32_t highest[vector_size]; - for (size_t i=0; imdd, highest); + for (int i=0; idd, highest); // Compute highest action label value (from transition relations) uint32_t highest_action = 0; for (int i=0; imdd, next[i]->meta, &highest_action); - } - - // Report highest integers - /* - printf("Highest integer per level: "); - for (size_t i=0; i0) printf(", "); - printf("%u", highest[i]); + compute_highest_action(next[i]->dd, next[i]->meta, &highest_action); } - printf("\n"); - */ // Compute number of bits for each level int bits[vector_size]; - for (size_t i=0; i0) printf(", "); printf("%d", bits[i]); } @@ -650,15 +634,15 @@ main(int argc, char **argv) } // Compute bits MDD - MDD bits_mdd = lddmc_true; - for (size_t i=0; imdd, bits_mdd, 0); - assert((size_t)mtbdd_satcount(new_initial, totalbits) == (size_t)lddmc_satcount_cached(initial->mdd)); + MTBDD new_initial = bdd_from_ldd(initial->dd, bits_dd, 0); + assert((size_t)mtbdd_satcount(new_initial, totalbits) == (size_t)lddmc_satcount_cached(initial->dd)); mtbdd_refs_push(new_initial); { - size_t a = sylvan_serialize_add(new_initial); - size_t b = sylvan_serialize_add(state_vars); - size_t s = totalbits; - sylvan_serialize_tofile(f); - fwrite(&a, sizeof(size_t), 1, f); - fwrite(&s, sizeof(size_t), 1, f); - fwrite(&b, sizeof(size_t), 1, f); + int k = -1; + fwrite(&k, sizeof(int), 1, f); + mtbdd_writer_tobinary(f, &new_initial, 1); } // Custom operation that converts to BDD given number of bits for each level - MTBDD new_states = bdd_from_ldd(states->mdd, bits_mdd, 0); - assert((size_t)mtbdd_satcount(new_states, totalbits) == (size_t)lddmc_satcount_cached(states->mdd)); + MTBDD new_states = bdd_from_ldd(states->dd, bits_dd, 0); + assert((size_t)mtbdd_satcount(new_states, totalbits) == (size_t)lddmc_satcount_cached(states->dd)); mtbdd_refs_push(new_states); // Report size of BDD @@ -710,51 +689,52 @@ main(int argc, char **argv) // Write number of transitions fwrite(&next_count, sizeof(int), 1, f); - // Write transitions + // Write meta for each transition + for (int i=0; ir_k, sizeof(int), 1, f); + fwrite(&next[i]->w_k, sizeof(int), 1, f); + fwrite(next[i]->r_proj, sizeof(int), next[i]->r_k, f); + fwrite(next[i]->w_proj, sizeof(int), next[i]->w_k, f); + } + + // Write BDD for each transition for (int i=0; imdd, bits_mdd, 0, next[i]->meta); + MTBDD new_rel = bdd_from_ldd_rel(next[i]->dd, bits_dd, 0, next[i]->meta); mtbdd_refs_push(new_rel); + mtbdd_writer_tobinary(f, &new_rel, 1); - // Compute new for the current transition relation - MTBDD new_vars = meta_to_bdd(next[i]->meta, bits_mdd, 0); - mtbdd_refs_push(new_vars); + // Report number of nodes + if (verbose) printf("Transition %d: %zu BDD nodes\n", i, mtbdd_nodecount(new_rel)); if (check_results) { + // Compute new for the current transition relation + MTBDD new_vars = meta_to_bdd(next[i]->meta, bits_dd, 0); + mtbdd_refs_push(new_vars); + // Test if the transition is correctly converted MTBDD test = sylvan_relnext(new_states, new_rel, new_vars); mtbdd_refs_push(test); - MDD succ = lddmc_relprod(states->mdd, next[i]->mdd, next[i]->meta); + MDD succ = lddmc_relprod(states->dd, next[i]->dd, next[i]->meta); lddmc_refs_push(succ); - MTBDD test2 = bdd_from_ldd(succ, bits_mdd, 0); + MTBDD test2 = bdd_from_ldd(succ, bits_dd, 0); if (test != test2) Abort("Conversion error!\n"); - mtbdd_refs_pop(1); lddmc_refs_pop(1); + mtbdd_refs_pop(2); } - // Report number of nodes - if (verbose) printf("Transition %d: %zu BDD nodes\n", i, mtbdd_nodecount(new_rel)); - - size_t a = sylvan_serialize_add(new_rel); - size_t b = sylvan_serialize_add(new_vars); - sylvan_serialize_tofile(f); - fwrite(&a, sizeof(size_t), 1, f); - fwrite(&b, sizeof(size_t), 1, f); + mtbdd_refs_pop(1); } // Write reachable states - has_reachable = 1; + if (no_reachable) has_reachable = 0; fwrite(&has_reachable, sizeof(int), 1, f); - - { - size_t a = sylvan_serialize_add(new_states); - size_t b = sylvan_serialize_add(state_vars); - size_t s = totalbits; - sylvan_serialize_tofile(f); - fwrite(&a, sizeof(size_t), 1, f); - fwrite(&s, sizeof(size_t), 1, f); - fwrite(&b, sizeof(size_t), 1, f); + if (has_reachable) { + int k = -1; + fwrite(&k, sizeof(int), 1, f); + mtbdd_writer_tobinary(f, &new_states, 1); } + mtbdd_refs_pop(1); // new_states // Write action labels fwrite(&action_labels_count, sizeof(int), 1, f); diff --git a/resources/3rdparty/sylvan/examples/lddmc.c b/resources/3rdparty/sylvan/examples/lddmc.c index 0035420c1..52fdb5033 100755 --- a/resources/3rdparty/sylvan/examples/lddmc.c +++ b/resources/3rdparty/sylvan/examples/lddmc.c @@ -1,6 +1,6 @@ #include -#include #include +#include #include #include #include @@ -11,18 +11,19 @@ #endif #include -#include -#include -/* Configuration */ +#include + +/* Configuration (via argp) */ static int report_levels = 0; // report states at start of every level static int report_table = 0; // report table size at end of every level -static int strategy = 1; // set to 1 = use PAR strategy; set to 0 = use BFS strategy -static int check_deadlocks = 0; // set to 1 to check for deadlocks -static int print_transition_matrix = 1; // print transition relation matrix +static int report_nodes = 0; // report number of nodes of LDDs +static int strategy = 2; // 0 = BFS, 1 = PAR, 2 = SAT, 3 = CHAINING +static int check_deadlocks = 0; // set to 1 to check for deadlocks on-the-fly +static int print_transition_matrix = 0; // print transition relation matrix static int workers = 0; // autodetect static char* model_filename = NULL; // filename of model -static char* out_filename = NULL; // filename of output BDD +static char* out_filename = NULL; // filename of output #ifdef HAVE_PROFILER static char* profile_filename = NULL; // filename for profiling #endif @@ -31,13 +32,15 @@ static char* profile_filename = NULL; // filename for profiling static struct argp_option options[] = { {"workers", 'w', "", 0, "Number of workers (default=0: autodetect)", 0}, - {"strategy", 's', "", 0, "Strategy for reachability (default=par)", 0}, + {"strategy", 's', "", 0, "Strategy for reachability (default=par)", 0}, #ifdef HAVE_PROFILER {"profiler", 'p', "", 0, "Filename for profiling", 0}, #endif {"deadlocks", 3, 0, 0, "Check for deadlocks", 1}, + {"count-nodes", 5, 0, 0, "Report #nodes for LDDs", 1}, {"count-states", 1, 0, 0, "Report #states at each level", 1}, {"count-table", 2, 0, 0, "Report table usage at each level", 1}, + {"print-matrix", 4, 0, 0, "Print transition matrix", 1}, {0, 0, 0, 0, 0, 0} }; @@ -52,8 +55,12 @@ parse_opt(int key, char *arg, struct argp_state *state) if (strcmp(arg, "bfs")==0) strategy = 0; else if (strcmp(arg, "par")==0) strategy = 1; else if (strcmp(arg, "sat")==0) strategy = 2; + else if (strcmp(arg, "chaining")==0) strategy = 3; else argp_usage(state); break; + case 4: + print_transition_matrix = 1; + break; case 3: check_deadlocks = 1; break; @@ -63,6 +70,9 @@ parse_opt(int key, char *arg, struct argp_state *state) case 2: report_table = 1; break; + case 5: + report_nodes = 1; + break; #ifdef HAVE_PROFILER case 'p': profile_filename = arg; @@ -84,119 +94,214 @@ parse_opt(int key, char *arg, struct argp_state *state) static struct argp argp = { options, parse_opt, " []", 0, 0, 0, 0 }; -/* Globals */ +/** + * Types (set and relation) + */ typedef struct set { - MDD mdd; - MDD proj; - int size; + MDD dd; } *set_t; typedef struct relation { - MDD mdd; - MDD meta; - int size; + MDD dd; + MDD meta; // for relprod + int r_k, w_k, *r_proj, *w_proj; + int firstvar; // for saturation/chaining + MDD topmeta; // for saturation } *rel_t; -static size_t vector_size; // size of vector +static int vector_size; // size of vector in integers static int next_count; // number of partitions of the transition relation static rel_t *next; // each partition of the transition relation -#define Abort(...) { fprintf(stderr, __VA_ARGS__); exit(-1); } +/** + * Obtain current wallclock time + */ +static double +wctime() +{ + struct timeval tv; + gettimeofday(&tv, NULL); + return (tv.tv_sec + 1E-6 * tv.tv_usec); +} + +static double t_start; +#define INFO(s, ...) fprintf(stdout, "[% 8.2f] " s, wctime()-t_start, ##__VA_ARGS__) +#define Abort(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "Abort at line %d!\n", __LINE__); exit(-1); } -/* Load a set from file */ +/** + * Load a set from file + */ static set_t set_load(FILE* f) { - lddmc_serialize_fromfile(f); - - size_t mdd; - size_t proj; - int size; - - if (fread(&mdd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&proj, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&size, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + set_t set = (set_t)malloc(sizeof(struct set)); - LACE_ME; + /* read projection (actually we don't support projection) */ + int k; + if (fread(&k, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + if (k != -1) Abort("Invalid input file!\n"); // only support full vector - set_t set = (set_t)malloc(sizeof(struct set)); - set->mdd = lddmc_ref(lddmc_serialize_get_reversed(mdd)); - set->proj = lddmc_ref(lddmc_serialize_get_reversed(proj)); - set->size = size; + /* read dd */ + lddmc_serialize_fromfile(f); + size_t dd; + if (fread(&dd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); + set->dd = lddmc_serialize_get_reversed(dd); + lddmc_protect(&set->dd); return set; } -/* Save a set to file */ +/** + * Save a set to file + */ static void set_save(FILE* f, set_t set) { - size_t mdd = lddmc_serialize_add(set->mdd); - size_t proj = lddmc_serialize_add(set->proj); + int k = -1; + fwrite(&k, sizeof(int), 1, f); + size_t dd = lddmc_serialize_add(set->dd); lddmc_serialize_tofile(f); - fwrite(&mdd, sizeof(size_t), 1, f); - fwrite(&proj, sizeof(size_t), 1, f); - fwrite(&set->size, sizeof(int), 1, f);; + fwrite(&dd, sizeof(size_t), 1, f); +} + +/** + * Load a relation from file + */ +#define rel_load_proj(f) CALL(rel_load_proj, f) +TASK_1(rel_t, rel_load_proj, FILE*, f) +{ + int r_k, w_k; + if (fread(&r_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); + if (fread(&w_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); + + rel_t rel = (rel_t)malloc(sizeof(struct relation)); + rel->r_k = r_k; + rel->w_k = w_k; + rel->r_proj = (int*)malloc(sizeof(int[rel->r_k])); + rel->w_proj = (int*)malloc(sizeof(int[rel->w_k])); + + if (fread(rel->r_proj, sizeof(int), rel->r_k, f) != (size_t)rel->r_k) Abort("Invalid file format."); + if (fread(rel->w_proj, sizeof(int), rel->w_k, f) != (size_t)rel->w_k) Abort("Invalid file format."); + + int *r_proj = rel->r_proj; + int *w_proj = rel->w_proj; + + rel->firstvar = -1; + + /* Compute the meta */ + uint32_t meta[vector_size*2+2]; + memset(meta, 0, sizeof(uint32_t[vector_size*2+2])); + int r_i=0, w_i=0, i=0, j=0; + for (;;) { + int type = 0; + if (r_i < r_k && r_proj[r_i] == i) { + r_i++; + type += 1; // read + } + if (w_i < w_k && w_proj[w_i] == i) { + w_i++; + type += 2; // write + } + if (type == 0) meta[j++] = 0; + else if (type == 1) { meta[j++] = 3; } + else if (type == 2) { meta[j++] = 4; } + else if (type == 3) { meta[j++] = 1; meta[j++] = 2; } + if (type != 0 && rel->firstvar == -1) rel->firstvar = i; + if (r_i == r_k && w_i == w_k) { + meta[j++] = 5; // action label + meta[j++] = (uint32_t)-1; + break; + } + i++; + } + + rel->meta = lddmc_cube((uint32_t*)meta, j); + lddmc_protect(&rel->meta); + if (rel->firstvar != -1) { + rel->topmeta = lddmc_cube((uint32_t*)meta+rel->firstvar, j-rel->firstvar); + lddmc_protect(&rel->topmeta); + } + rel->dd = lddmc_false; + lddmc_protect(&rel->dd); + + return rel; +} + +#define rel_load(f, rel) CALL(rel_load, f, rel) +VOID_TASK_2(rel_load, FILE*, f, rel_t, rel) +{ + lddmc_serialize_fromfile(f); + size_t dd; + if (fread(&dd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!"); + rel->dd = lddmc_serialize_get_reversed(dd); +} + +/** + * Save a relation to file + */ +static void +rel_save_proj(FILE* f, rel_t rel) +{ + fwrite(&rel->r_k, sizeof(int), 1, f); + fwrite(&rel->w_k, sizeof(int), 1, f); + fwrite(rel->r_proj, sizeof(int), rel->r_k, f); + fwrite(rel->w_proj, sizeof(int), rel->w_k, f); } static void rel_save(FILE* f, rel_t rel) { - size_t mdd = lddmc_serialize_add(rel->mdd); - size_t meta = lddmc_serialize_add(rel->meta); + size_t dd = lddmc_serialize_add(rel->dd); lddmc_serialize_tofile(f); - fwrite(&mdd, sizeof(size_t), 1, f); - fwrite(&meta, sizeof(size_t), 1, f); + fwrite(&dd, sizeof(size_t), 1, f); } +/** + * Clone a set + */ static set_t set_clone(set_t source) { set_t set = (set_t)malloc(sizeof(struct set)); - set->mdd = lddmc_ref(source->mdd); - set->proj = lddmc_ref(source->proj); - set->size = source->size; + set->dd = source->dd; + lddmc_protect(&set->dd); return set; } -static int -calculate_size(MDD meta) +static char* +to_h(double size, char *buf) { - int result = 0; - uint32_t val = lddmc_getvalue(meta); - while (val != (uint32_t)-1) { - if (val != 0) result += 1; - meta = lddmc_follow(meta, val); - assert(meta != lddmc_true && meta != lddmc_false); - val = lddmc_getvalue(meta); - } - return result; + const char* units[] = {"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; + int i = 0; + for (;size>1024;size/=1024) i++; + sprintf(buf, "%.*f %s", i, size, units[i]); + return buf; } -/* Load a relation from file */ -static rel_t -rel_load(FILE* f) +static void +print_memory_usage(void) { - lddmc_serialize_fromfile(f); - - size_t mdd; - size_t meta; - - if (fread(&mdd, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - if (fread(&meta, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - - LACE_ME; - - rel_t rel = (rel_t)malloc(sizeof(struct relation)); - rel->mdd = lddmc_ref(lddmc_serialize_get_reversed(mdd)); - rel->meta = lddmc_ref(lddmc_serialize_get_reversed(meta)); - rel->size = calculate_size(rel->meta); + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("Memory usage: %s\n", buf); +} - return rel; +/** + * Get the first variable of the transition relation + */ +static int +get_first(MDD meta) +{ + uint32_t val = lddmc_getvalue(meta); + if (val != 0) return 0; + return 1+get_first(lddmc_follow(meta, val)); } +/** + * Print a single example of a set to stdout + */ static void print_example(MDD example) { @@ -205,9 +310,8 @@ print_example(MDD example) uint32_t vec[vector_size]; lddmc_sat_one(example, vec, vector_size); - size_t i; printf("["); - for (i=0; i0) printf(","); printf("%" PRIu32, vec[i]); } @@ -232,154 +336,176 @@ print_matrix(size_t size, MDD meta) } } -static char* -to_h(double size, char *buf) -{ - const char* units[] = {"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; - int i = 0; - for (;size>1024;size/=1024) i++; - sprintf(buf, "%.*f %s", i, size, units[i]); - return buf; -} - -static int -get_first(MDD meta) -{ - uint32_t val = lddmc_getvalue(meta); - if (val != 0) return 0; - return 1+get_first(lddmc_follow(meta, val)); -} - -/* Straight-forward implementation of parallel reduction */ +/** + * Implement parallel strategy (that performs the relprod operations in parallel) + */ TASK_5(MDD, go_par, MDD, cur, MDD, visited, size_t, from, size_t, len, MDD*, deadlocks) { if (len == 1) { // Calculate NEW successors (not in visited) - MDD succ = lddmc_ref(lddmc_relprod(cur, next[from]->mdd, next[from]->meta)); + MDD succ = lddmc_relprod(cur, next[from]->dd, next[from]->meta); + lddmc_refs_push(succ); if (deadlocks) { // check which MDDs in deadlocks do not have a successor in this relation - MDD anc = lddmc_ref(lddmc_relprev(succ, next[from]->mdd, next[from]->meta, cur)); - *deadlocks = lddmc_ref(lddmc_minus(*deadlocks, anc)); - lddmc_deref(anc); + MDD anc = lddmc_relprev(succ, next[from]->dd, next[from]->meta, cur); + lddmc_refs_push(anc); + *deadlocks = lddmc_minus(*deadlocks, anc); + lddmc_refs_pop(1); } - MDD result = lddmc_ref(lddmc_minus(succ, visited)); - lddmc_deref(succ); + MDD result = lddmc_minus(succ, visited); + lddmc_refs_pop(1); return result; - } else { - MDD deadlocks_left; - MDD deadlocks_right; - if (deadlocks) { - deadlocks_left = *deadlocks; - deadlocks_right = *deadlocks; - } - - // Recursively calculate left+right - SPAWN(go_par, cur, visited, from, (len+1)/2, deadlocks ? &deadlocks_left: NULL); - MDD right = CALL(go_par, cur, visited, from+(len+1)/2, len/2, deadlocks ? &deadlocks_right : NULL); - MDD left = SYNC(go_par); + } else if (deadlocks != NULL) { + MDD deadlocks_left = *deadlocks; + MDD deadlocks_right = *deadlocks; + lddmc_refs_pushptr(&deadlocks_left); + lddmc_refs_pushptr(&deadlocks_right); + + // Recursively compute left+right + lddmc_refs_spawn(SPAWN(go_par, cur, visited, from, len/2, &deadlocks_left)); + MDD right = CALL(go_par, cur, visited, from+len/2, len-len/2, &deadlocks_right); + lddmc_refs_push(right); + MDD left = lddmc_refs_sync(SYNC(go_par)); + lddmc_refs_push(left); // Merge results of left+right - MDD result = lddmc_ref(lddmc_union(left, right)); - lddmc_deref(left); - lddmc_deref(right); + MDD result = lddmc_union(left, right); + lddmc_refs_pop(2); - if (deadlocks) { - *deadlocks = lddmc_ref(lddmc_intersect(deadlocks_left, deadlocks_right)); - lddmc_deref(deadlocks_left); - lddmc_deref(deadlocks_right); - } + // Intersect deadlock sets + lddmc_refs_push(result); + *deadlocks = lddmc_intersect(deadlocks_left, deadlocks_right); + lddmc_refs_pop(1); + lddmc_refs_popptr(2); + + // Return result + return result; + } else { + // Recursively compute left+right + lddmc_refs_spawn(SPAWN(go_par, cur, visited, from, len/2, NULL)); + MDD right = CALL(go_par, cur, visited, from+len/2, len-len/2, NULL); + lddmc_refs_push(right); + MDD left = lddmc_refs_sync(SYNC(go_par)); + lddmc_refs_push(left); + // Merge results of left+right + MDD result = lddmc_union(left, right); + lddmc_refs_pop(2); + + // Return result return result; } } -/* PAR strategy, parallel strategy (operations called in parallel *and* parallelized by Sylvan) */ +/** + * Implementation of the PAR strategy + */ VOID_TASK_1(par, set_t, set) { - MDD visited = set->mdd; - MDD new = lddmc_ref(visited); - size_t counter = 1; - do { - char buf[32]; - to_h(getCurrentRSS(), buf); - printf("Memory usage: %s\n", buf); - printf("Level %zu... ", counter++); - if (report_levels) { - printf("%zu states... ", (size_t)lddmc_satcount_cached(visited)); - } - fflush(stdout); - - // calculate successors in parallel - MDD cur = new; - MDD deadlocks = cur; - new = CALL(go_par, cur, visited, 0, next_count, check_deadlocks ? &deadlocks : NULL); - lddmc_deref(cur); + /* Prepare variables */ + MDD visited = set->dd; + MDD front = visited; + lddmc_refs_pushptr(&visited); + lddmc_refs_pushptr(&front); + int iteration = 1; + do { if (check_deadlocks) { - printf("found %zu deadlock states... ", (size_t)lddmc_satcount_cached(deadlocks)); + // compute successors in parallel + MDD deadlocks = front; + lddmc_refs_pushptr(&deadlocks); + front = CALL(go_par, front, visited, 0, next_count, &deadlocks); + lddmc_refs_popptr(1); + if (deadlocks != lddmc_false) { + INFO("Found %'0.0f deadlock states... ", lddmc_satcount_cached(deadlocks)); printf("example: "); print_example(deadlocks); - printf("... "); + printf("\n"); check_deadlocks = 0; } + } else { + // compute successors in parallel + front = CALL(go_par, front, visited, 0, next_count, NULL); } - // visited = visited + new - MDD old_visited = visited; - visited = lddmc_ref(lddmc_union(visited, new)); - lddmc_deref(old_visited); + // visited = visited + front + visited = lddmc_union(visited, front); + INFO("Level %d done", iteration); + if (report_levels) { + printf(", %'0.0f states explored", lddmc_satcount_cached(visited)); + } if (report_table) { size_t filled, total; sylvan_table_usage(&filled, &total); - printf("done, table: %0.1f%% full (%zu nodes).\n", 100.0*(double)filled/total, filled); - } else { - printf("done.\n"); + printf(", table: %0.1f%% full (%'zu nodes)", 100.0*(double)filled/total, filled); } - } while (new != lddmc_false); - lddmc_deref(new); - set->mdd = visited; + char buf[32]; + to_h(getCurrentRSS(), buf); + printf(", rss=%s.\n", buf); + iteration++; + } while (front != lddmc_false); + + set->dd = visited; + lddmc_refs_popptr(2); } -/* Sequential version of merge-reduction */ +/** + * Implement sequential strategy (that performs the relprod operations one by one) + */ TASK_5(MDD, go_bfs, MDD, cur, MDD, visited, size_t, from, size_t, len, MDD*, deadlocks) { if (len == 1) { // Calculate NEW successors (not in visited) - MDD succ = lddmc_ref(lddmc_relprod(cur, next[from]->mdd, next[from]->meta)); + MDD succ = lddmc_relprod(cur, next[from]->dd, next[from]->meta); + lddmc_refs_push(succ); if (deadlocks) { // check which MDDs in deadlocks do not have a successor in this relation - MDD anc = lddmc_ref(lddmc_relprev(succ, next[from]->mdd, next[from]->meta, cur)); - *deadlocks = lddmc_ref(lddmc_minus(*deadlocks, anc)); - lddmc_deref(anc); + MDD anc = lddmc_relprev(succ, next[from]->dd, next[from]->meta, cur); + lddmc_refs_push(anc); + *deadlocks = lddmc_minus(*deadlocks, anc); + lddmc_refs_pop(1); } - MDD result = lddmc_ref(lddmc_minus(succ, visited)); - lddmc_deref(succ); + MDD result = lddmc_minus(succ, visited); + lddmc_refs_pop(1); return result; - } else { - MDD deadlocks_left; - MDD deadlocks_right; - if (deadlocks) { - deadlocks_left = *deadlocks; - deadlocks_right = *deadlocks; - } - - // Recursively calculate left+right - MDD left = CALL(go_bfs, cur, visited, from, (len+1)/2, deadlocks ? &deadlocks_left : NULL); - MDD right = CALL(go_bfs, cur, visited, from+(len+1)/2, len/2, deadlocks ? &deadlocks_right : NULL); + } else if (deadlocks != NULL) { + MDD deadlocks_left = *deadlocks; + MDD deadlocks_right = *deadlocks; + lddmc_refs_pushptr(&deadlocks_left); + lddmc_refs_pushptr(&deadlocks_right); + + // Recursively compute left+right + MDD left = CALL(go_par, cur, visited, from, len/2, &deadlocks_left); + lddmc_refs_push(left); + MDD right = CALL(go_par, cur, visited, from+len/2, len-len/2, &deadlocks_right); + lddmc_refs_push(right); // Merge results of left+right - MDD result = lddmc_ref(lddmc_union(left, right)); - lddmc_deref(left); - lddmc_deref(right); + MDD result = lddmc_union(left, right); + lddmc_refs_pop(2); - if (deadlocks) { - *deadlocks = lddmc_ref(lddmc_intersect(deadlocks_left, deadlocks_right)); - lddmc_deref(deadlocks_left); - lddmc_deref(deadlocks_right); - } + // Intersect deadlock sets + lddmc_refs_push(result); + *deadlocks = lddmc_intersect(deadlocks_left, deadlocks_right); + lddmc_refs_pop(1); + lddmc_refs_popptr(2); + // Return result + return result; + } else { + // Recursively compute left+right + MDD left = CALL(go_par, cur, visited, from, len/2, NULL); + lddmc_refs_push(left); + MDD right = CALL(go_par, cur, visited, from+len/2, len-len/2, NULL); + lddmc_refs_push(right); + + // Merge results of left+right + MDD result = lddmc_union(left, right); + lddmc_refs_pop(2); + + // Return result return result; } } @@ -387,160 +513,330 @@ TASK_5(MDD, go_bfs, MDD, cur, MDD, visited, size_t, from, size_t, len, MDD*, dea /* BFS strategy, sequential strategy (but operations are parallelized by Sylvan) */ VOID_TASK_1(bfs, set_t, set) { - MDD visited = set->mdd; - MDD new = lddmc_ref(visited); - size_t counter = 1; - do { - char buf[32]; - to_h(getCurrentRSS(), buf); - printf("Memory usage: %s\n", buf); - printf("Level %zu... ", counter++); - if (report_levels) { - printf("%zu states... ", (size_t)lddmc_satcount_cached(visited)); - } - fflush(stdout); - - MDD cur = new; - MDD deadlocks = cur; - new = CALL(go_bfs, cur, visited, 0, next_count, check_deadlocks ? &deadlocks : NULL); - lddmc_deref(cur); + /* Prepare variables */ + MDD visited = set->dd; + MDD front = visited; + lddmc_refs_pushptr(&visited); + lddmc_refs_pushptr(&front); + int iteration = 1; + do { if (check_deadlocks) { - printf("found %zu deadlock states... ", (size_t)lddmc_satcount_cached(deadlocks)); + // compute successors + MDD deadlocks = front; + lddmc_refs_pushptr(&deadlocks); + front = CALL(go_bfs, front, visited, 0, next_count, &deadlocks); + lddmc_refs_popptr(1); + if (deadlocks != lddmc_false) { + INFO("Found %'0.0f deadlock states... ", lddmc_satcount_cached(deadlocks)); printf("example: "); print_example(deadlocks); - printf("... "); + printf("\n"); check_deadlocks = 0; } + } else { + // compute successors + front = CALL(go_bfs, front, visited, 0, next_count, NULL); } - // visited = visited + new - MDD old_visited = visited; - visited = lddmc_ref(lddmc_union(visited, new)); - lddmc_deref(old_visited); + // visited = visited + front + visited = lddmc_union(visited, front); + INFO("Level %d done", iteration); + if (report_levels) { + printf(", %'0.0f states explored", lddmc_satcount_cached(visited)); + } if (report_table) { size_t filled, total; sylvan_table_usage(&filled, &total); - printf("done, table: %0.1f%% full (%zu nodes).\n", 100.0*(double)filled/total, filled); - } else { - printf("done.\n"); + printf(", table: %0.1f%% full (%'zu nodes)", 100.0*(double)filled/total, filled); } - } while (new != lddmc_false); - lddmc_deref(new); - set->mdd = visited; + char buf[32]; + to_h(getCurrentRSS(), buf); + printf(", rss=%s.\n", buf); + iteration++; + } while (front != lddmc_false); + + set->dd = visited; + lddmc_refs_popptr(2); } -/* Obtain current wallclock time */ -static double -wctime() +/** + * Implementation of (parallel) saturation + * (assumes relations are ordered on first variable) + */ +TASK_3(MDD, go_sat, MDD, set, int, idx, int, depth) { - struct timeval tv; - gettimeofday(&tv, NULL); - return (tv.tv_sec + 1E-6 * tv.tv_usec); + /* Terminal cases */ + if (set == lddmc_false) return lddmc_false; + if (idx == next_count) return set; + + /* Consult the cache */ + MDD result; + const MDD _set = set; + if (cache_get3(201LL<<40, _set, idx, 0, &result)) return result; + lddmc_refs_pushptr(&_set); + + /** + * Possible improvement: cache more things (like intermediate results?) + * and chain-apply more of the current level before going deeper? + */ + + /* Check if the relation should be applied */ + const int var = next[idx]->firstvar; + assert(depth <= var); + if (depth == var) { + /* Count the number of relations starting here */ + int n = 1; + while ((idx + n) < next_count && var == next[idx + n]->firstvar) n++; + /* + * Compute until fixpoint: + * - SAT deeper + * - chain-apply all current level once + */ + MDD prev = lddmc_false; + lddmc_refs_pushptr(&set); + lddmc_refs_pushptr(&prev); + while (prev != set) { + prev = set; + // SAT deeper + set = CALL(go_sat, set, idx + n, depth); + // chain-apply all current level once + for (int i=0; idd, next[idx+i]->topmeta, set); + } + } + lddmc_refs_popptr(2); + result = set; + } else { + /* Recursive computation */ + lddmc_refs_spawn(SPAWN(go_sat, lddmc_getright(set), idx, depth)); + MDD down = lddmc_refs_push(CALL(go_sat, lddmc_getdown(set), idx, depth+1)); + MDD right = lddmc_refs_sync(SYNC(go_sat)); + lddmc_refs_pop(1); + result = lddmc_makenode(lddmc_getvalue(set), down, right); + } + + /* Store in cache */ + cache_put3(201LL<<40, _set, idx, 0, result); + lddmc_refs_popptr(1); + return result; +} + +/** + * Wrapper for the Saturation strategy + */ +VOID_TASK_1(sat, set_t, set) +{ + set->dd = CALL(go_sat, set->dd, 0, 0); +} + +/** + * Implementation of the Chaining strategy (does not support deadlock detection) + */ +VOID_TASK_1(chaining, set_t, set) +{ + MDD visited = set->dd; + MDD front = visited; + MDD succ = sylvan_false; + + lddmc_refs_pushptr(&visited); + lddmc_refs_pushptr(&front); + lddmc_refs_pushptr(&succ); + + int iteration = 1; + do { + // calculate successors in parallel + for (int i=0; idd, next[i]->meta); + front = lddmc_union(front, succ); + succ = lddmc_false; // reset, for gc + } + + // front = front - visited + // visited = visited + front + front = lddmc_minus(front, visited); + visited = lddmc_union(visited, front); + + INFO("Level %d done", iteration); + if (report_levels) { + printf(", %'0.0f states explored", lddmc_satcount_cached(visited)); + } + if (report_table) { + size_t filled, total; + sylvan_table_usage(&filled, &total); + printf(", table: %0.1f%% full (%'zu nodes)", 100.0*(double)filled/total, filled); + } + char buf[32]; + to_h(getCurrentRSS(), buf); + printf(", rss=%s.\n", buf); + iteration++; + } while (front != lddmc_false); + + set->dd = visited; + lddmc_refs_popptr(3); +} + +VOID_TASK_0(gc_start) +{ + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("(GC) Starting garbage collection... (rss: %s)\n", buf); +} + +VOID_TASK_0(gc_end) +{ + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("(GC) Garbage collection done. (rss: %s)\n", buf); } int main(int argc, char **argv) { + /** + * Parse command line, set locale, set startup time for INFO messages. + */ argp_parse(&argp, argc, argv, 0, 0, 0); + setlocale(LC_NUMERIC, "en_US.utf-8"); + t_start = wctime(); + + /** + * Initialize Lace. + * + * First: setup with given number of workers (0 for autodetect) and some large size task queue. + * Second: start all worker threads with default settings. + * Third: setup local variables using the LACE_ME macro. + */ + lace_init(workers, 1000000); + lace_startup(0, NULL, NULL); + LACE_ME; + + /** + * Initialize Sylvan. + * + * First: set memory limits + * - 2 GB memory, nodes table twice as big as cache, initial size halved 6x + * (that means it takes 6 garbage collections to get to the maximum nodes&cache size) + * Second: initialize package and subpackages + * Third: add hooks to report garbage collection + */ + sylvan_set_limits(2LL<<30, 1, 6); + sylvan_init_package(); + sylvan_init_ldd(); + sylvan_gc_hook_pregc(TASK(gc_start)); + sylvan_gc_hook_postgc(TASK(gc_end)); + + /** + * Read the model from file + */ FILE *f = fopen(model_filename, "r"); if (f == NULL) { - fprintf(stderr, "Cannot open file '%s'!\n", model_filename); + Abort("Cannot open file '%s'!\n", model_filename); return -1; } - // Init Lace - lace_init(workers, 1000000); // auto-detect number of workers, use a 1,000,000 size task queue - lace_startup(0, NULL, NULL); // auto-detect program stack, do not use a callback for startup - - // Init Sylvan LDDmc - // Nodes table size: 24 bytes * 2**N_nodes - // Cache table size: 36 bytes * 2**N_cache - // With: N_nodes=25, N_cache=24: 1.3 GB memory - sylvan_set_sizes(1LL<<21, 1LL<<27, 1LL<<20, 1LL<<26); - sylvan_init_package(); - sylvan_init_ldd(); - sylvan_init_mtbdd(); - - // Read and report domain info (integers per vector and bits per integer) - if (fread(&vector_size, sizeof(size_t), 1, f) != 1) Abort("Invalid input file!\n"); - - printf("Vector size: %zu\n", vector_size); + /* Read domain data */ + if (fread(&vector_size, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); - // Read initial state - printf("Loading initial state... "); - fflush(stdout); + /* Read initial state */ set_t initial = set_load(f); - set_t states = set_clone(initial); - printf("done.\n"); - // Read transitions + /* Read number of transition relations */ if (fread(&next_count, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); next = (rel_t*)malloc(sizeof(rel_t) * next_count); - printf("Loading transition relations... "); - fflush(stdout); - int i; - for (i=0; imdd)); - for (i=0; imdd)); + + /** + * Pre-processing and some statistics reporting + */ + + if (strategy == 2 || strategy == 3) { + // for SAT and CHAINING, sort the transition relations (gnome sort because I like gnomes) + int i = 1, j = 2; + rel_t t; + while (i < next_count) { + rel_t *p = &next[i], *q = p-1; + if ((*q)->firstvar > (*p)->firstvar) { + t = *q; + *q = *p; + *p = t; + if (--i) continue; + } + i = j++; + } } + INFO("Read file '%s'\n", model_filename); + INFO("%d integers per state, %d transition groups\n", vector_size, next_count); + if (print_transition_matrix) { - for (i=0; imeta); printf(" (%d)\n", get_first(next[i]->meta)); } } - LACE_ME; + set_t states = set_clone(initial); #ifdef HAVE_PROFILER if (profile_filename != NULL) ProfilerStart(profile_filename); #endif - if (strategy == 1) { + + if (strategy == 0) { + double t1 = wctime(); + CALL(bfs, states); + double t2 = wctime(); + INFO("BFS Time: %f\n", t2-t1); + } else if (strategy == 1) { double t1 = wctime(); CALL(par, states); double t2 = wctime(); - printf("PAR Time: %f\n", t2-t1); - } else { + INFO("PAR Time: %f\n", t2-t1); + } else if (strategy == 2) { double t1 = wctime(); - CALL(bfs, states); + CALL(sat, states); double t2 = wctime(); - printf("BFS Time: %f\n", t2-t1); + INFO("SAT Time: %f\n", t2-t1); + } else if (strategy == 3) { + double t1 = wctime(); + CALL(chaining, states); + double t2 = wctime(); + INFO("CHAINING Time: %f\n", t2-t1); + } else { + Abort("Invalid strategy set?!\n"); } + #ifdef HAVE_PROFILER if (profile_filename != NULL) ProfilerStop(); #endif // Now we just have states - printf("Final states: %zu states\n", (size_t)lddmc_satcount_cached(states->mdd)); - printf("Final states: %zu MDD nodes\n", lddmc_nodecount(states->mdd)); + INFO("Final states: %'0.0f states\n", lddmc_satcount_cached(states->dd)); + if (report_nodes) { + INFO("Final states: %'zu MDD nodes\n", lddmc_nodecount(states->dd)); + } if (out_filename != NULL) { - printf("Writing to %s.\n", out_filename); + INFO("Writing to %s.\n", out_filename); // Create LDD file FILE *f = fopen(out_filename, "w"); lddmc_serialize_reset(); // Write domain... - fwrite(&vector_size, sizeof(size_t), 1, f); + fwrite(&vector_size, sizeof(int), 1, f); // Write initial state... set_save(f, initial); @@ -549,9 +845,8 @@ main(int argc, char **argv) fwrite(&next_count, sizeof(int), 1, f); // Write transitions - for (int i=0; i #endif +#include + #include -#include +#include -/* Configuration */ +/* Configuration (via argp) */ static int report_levels = 0; // report states at end of every level static int report_table = 0; // report table size at end of every level static int report_nodes = 0; // report number of nodes of BDDs -static int strategy = 1; // set to 1 = use PAR strategy; set to 0 = use BFS strategy -static int check_deadlocks = 0; // set to 1 to check for deadlocks +static int strategy = 2; // 0 = BFS, 1 = PAR, 2 = SAT, 3 = CHAINING +static int check_deadlocks = 0; // set to 1 to check for deadlocks on-the-fly (only bfs/par) static int merge_relations = 0; // merge relations to 1 relation static int print_transition_matrix = 0; // print transition relation matrix static int workers = 0; // autodetect @@ -31,7 +33,7 @@ static char* profile_filename = NULL; // filename for profiling static struct argp_option options[] = { {"workers", 'w', "", 0, "Number of workers (default=0: autodetect)", 0}, - {"strategy", 's', "", 0, "Strategy for reachability (default=par)", 0}, + {"strategy", 's', "", 0, "Strategy for reachability (default=sat)", 0}, #ifdef HAVE_PROFILER {"profiler", 'p', "", 0, "Filename for profiling", 0}, #endif @@ -54,6 +56,7 @@ parse_opt(int key, char *arg, struct argp_state *state) if (strcmp(arg, "bfs")==0) strategy = 0; else if (strcmp(arg, "par")==0) strategy = 1; else if (strcmp(arg, "sat")==0) strategy = 2; + else if (strcmp(arg, "chaining")==0) strategy = 3; else argp_usage(state); break; case 4: @@ -93,7 +96,9 @@ parse_opt(int key, char *arg, struct argp_state *state) } static struct argp argp = { options, parse_opt, "", 0, 0, 0, 0 }; -/* Globals */ +/** + * Types (set and relation) + */ typedef struct set { BDD bdd; @@ -104,15 +109,19 @@ typedef struct relation { BDD bdd; BDD variables; // all variables in the relation (used by relprod) + int r_k, w_k, *r_proj, *w_proj; } *rel_t; -static int vector_size; // size of vector -static int statebits, actionbits; // number of bits for state, number of bits for action -static int bits_per_integer; // number of bits per integer in the vector +static int vectorsize; // size of vector in integers +static int *statebits; // number of bits for each state integer +static int actionbits; // number of bits for action label +static int totalbits; // total number of bits static int next_count; // number of partitions of the transition relation static rel_t *next; // each partition of the transition relation -/* Obtain current wallclock time */ +/** + * Obtain current wallclock time + */ static double wctime() { @@ -123,66 +132,171 @@ wctime() static double t_start; #define INFO(s, ...) fprintf(stdout, "[% 8.2f] " s, wctime()-t_start, ##__VA_ARGS__) -#define Abort(...) { fprintf(stderr, __VA_ARGS__); exit(-1); } +#define Abort(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "Abort at line %d!\n", __LINE__); exit(-1); } -/* Load a set from file */ -#define set_load(f) CALL(set_load, f) -TASK_1(set_t, set_load, FILE*, f) +static char* +to_h(double size, char *buf) { - sylvan_serialize_fromfile(f); + const char* units[] = {"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; + int i = 0; + for (;size>1024;size/=1024) i++; + sprintf(buf, "%.*f %s", i, size, units[i]); + return buf; +} - size_t set_bdd, set_vector_size, set_state_vars; - if ((fread(&set_bdd, sizeof(size_t), 1, f) != 1) || - (fread(&set_vector_size, sizeof(size_t), 1, f) != 1) || - (fread(&set_state_vars, sizeof(size_t), 1, f) != 1)) { - Abort("Invalid input file!\n"); - } +static void +print_memory_usage(void) +{ + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("Memory usage: %s\n", buf); +} +/** + * Load a set from file + * The expected binary format: + * - int k : projection size, or -1 for full state + * - int[k] proj : k integers specifying the variables of the projection + * - MTBDD[1] BDD (mtbdd binary format) + */ +#define set_load(f) CALL(set_load, f) +TASK_1(set_t, set_load, FILE*, f) +{ + // allocate set set_t set = (set_t)malloc(sizeof(struct set)); - set->bdd = sylvan_serialize_get_reversed(set_bdd); - set->variables = sylvan_support(sylvan_serialize_get_reversed(set_state_vars)); - + set->bdd = sylvan_false; + set->variables = sylvan_true; sylvan_protect(&set->bdd); sylvan_protect(&set->variables); + // read k + int k; + if (fread(&k, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + + if (k == -1) { + // create variables for a full state vector + uint32_t vars[totalbits]; + for (int i=0; ivariables = sylvan_set_fromarray(vars, totalbits); + } else { + // read proj + int proj[k]; + if (fread(proj, sizeof(int), k, f) != (size_t)k) Abort("Invalid input file!\n"); + // create variables for a short/projected state vector + uint32_t vars[totalbits]; + uint32_t cv = 0; + int j = 0, n = 0; + for (int i=0; ivariables = sylvan_set_fromarray(vars, n); + } + + // read bdd + if (mtbdd_reader_frombinary(f, &set->bdd, 1) != 0) Abort("Invalid input file!\n"); + return set; } -/* Load a relation from file */ -#define rel_load(f) CALL(rel_load, f) -TASK_1(rel_t, rel_load, FILE*, f) +/** + * Load a relation from file + * This part just reads the r_k, w_k, r_proj and w_proj variables. + */ +#define rel_load_proj(f) CALL(rel_load_proj, f) +TASK_1(rel_t, rel_load_proj, FILE*, f) { - sylvan_serialize_fromfile(f); - - size_t rel_bdd, rel_vars; - if ((fread(&rel_bdd, sizeof(size_t), 1, f) != 1) || - (fread(&rel_vars, sizeof(size_t), 1, f) != 1)) { - Abort("Invalid input file!\n"); - } - rel_t rel = (rel_t)malloc(sizeof(struct relation)); - rel->bdd = sylvan_serialize_get_reversed(rel_bdd); - rel->variables = sylvan_support(sylvan_serialize_get_reversed(rel_vars)); - + int r_k, w_k; + if (fread(&r_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); + if (fread(&w_k, sizeof(int), 1, f) != 1) Abort("Invalid file format."); + rel->r_k = r_k; + rel->w_k = w_k; + int *r_proj = (int*)malloc(sizeof(int[r_k])); + int *w_proj = (int*)malloc(sizeof(int[w_k])); + if (fread(r_proj, sizeof(int), r_k, f) != (size_t)r_k) Abort("Invalid file format."); + if (fread(w_proj, sizeof(int), w_k, f) != (size_t)w_k) Abort("Invalid file format."); + rel->r_proj = r_proj; + rel->w_proj = w_proj; + + rel->bdd = sylvan_false; sylvan_protect(&rel->bdd); + + /* Compute a_proj the union of r_proj and w_proj, and a_k the length of a_proj */ + int a_proj[r_k+w_k]; + int r_i = 0, w_i = 0, a_i = 0; + for (;r_i < r_k || w_i < w_k;) { + if (r_i < r_k && w_i < w_k) { + if (r_proj[r_i] < w_proj[w_i]) { + a_proj[a_i++] = r_proj[r_i++]; + } else if (r_proj[r_i] > w_proj[w_i]) { + a_proj[a_i++] = w_proj[w_i++]; + } else /* r_proj[r_i] == w_proj[w_i] */ { + a_proj[a_i++] = w_proj[w_i++]; + r_i++; + } + } else if (r_i < r_k) { + a_proj[a_i++] = r_proj[r_i++]; + } else if (w_i < w_k) { + a_proj[a_i++] = w_proj[w_i++]; + } + } + const int a_k = a_i; + + /* Compute all_variables, which are all variables the transition relation is defined on */ + uint32_t all_vars[totalbits * 2]; + uint32_t curvar = 0; // start with variable 0 + int i=0, j=0, n=0; + for (; ivariables = sylvan_set_fromarray(all_vars, n); sylvan_protect(&rel->variables); return rel; } +/** + * Load a relation from file + * This part just reads the bdd of the relation + */ +#define rel_load(rel, f) CALL(rel_load, rel, f) +VOID_TASK_2(rel_load, rel_t, rel, FILE*, f) +{ + if (mtbdd_reader_frombinary(f, &rel->bdd, 1) != 0) Abort("Invalid file format!\n"); +} + +/** + * Print a single example of a set to stdout + * Assumption: the example is a full vector and variables contains all state variables... + */ #define print_example(example, variables) CALL(print_example, example, variables) VOID_TASK_2(print_example, BDD, example, BDDSET, variables) { - uint8_t str[vector_size * bits_per_integer]; + uint8_t str[totalbits]; if (example != sylvan_false) { sylvan_sat_one(example, variables, str); + int x=0; printf("["); - for (int i=0; i0) printf(","); printf("%" PRIu32, res); @@ -191,7 +305,84 @@ VOID_TASK_2(print_example, BDD, example, BDDSET, variables) } } -/* Straight-forward implementation of parallel reduction */ +/** + * Implementation of (parallel) saturation + * (assumes relations are ordered on first variable) + */ +TASK_2(BDD, go_sat, BDD, set, int, idx) +{ + /* Terminal cases */ + if (set == sylvan_false) return sylvan_false; + if (idx == next_count) return set; + + /* Consult the cache */ + BDD result; + const BDD _set = set; + if (cache_get3(200LL<<40, _set, idx, 0, &result)) return result; + mtbdd_refs_pushptr(&_set); + + /** + * Possible improvement: cache more things (like intermediate results?) + * and chain-apply more of the current level before going deeper? + */ + + /* Check if the relation should be applied */ + const uint32_t var = sylvan_var(next[idx]->variables); + if (set == sylvan_true || var <= sylvan_var(set)) { + /* Count the number of relations starting here */ + int count = idx+1; + while (count < next_count && var == sylvan_var(next[count]->variables)) count++; + count -= idx; + /* + * Compute until fixpoint: + * - SAT deeper + * - chain-apply all current level once + */ + BDD prev = sylvan_false; + BDD step = sylvan_false; + mtbdd_refs_pushptr(&set); + mtbdd_refs_pushptr(&prev); + mtbdd_refs_pushptr(&step); + while (prev != set) { + prev = set; + // SAT deeper + set = CALL(go_sat, set, idx+count); + // chain-apply all current level once + for (int i=0;ibdd, next[idx+i]->variables); + set = sylvan_or(set, step); + step = sylvan_false; // unset, for gc + } + } + mtbdd_refs_popptr(3); + result = set; + } else { + /* Recursive computation */ + mtbdd_refs_spawn(SPAWN(go_sat, sylvan_low(set), idx)); + BDD high = mtbdd_refs_push(CALL(go_sat, sylvan_high(set), idx)); + BDD low = mtbdd_refs_sync(SYNC(go_sat)); + mtbdd_refs_pop(1); + result = sylvan_makenode(sylvan_var(set), low, high); + } + + /* Store in cache */ + cache_put3(200LL<<40, _set, idx, 0, result); + mtbdd_refs_popptr(1); + return result; +} + +/** + * Wrapper for the Saturation strategy + */ +VOID_TASK_1(sat, set_t, set) +{ + set->bdd = CALL(go_sat, set->bdd, 0); +} + +/** + * Implement parallel strategy (that performs the relnext operations in parallel) + * This function does one level... + */ TASK_5(BDD, go_par, BDD, cur, BDD, visited, size_t, from, size_t, len, BDD*, deadlocks) { if (len == 1) { @@ -239,7 +430,9 @@ TASK_5(BDD, go_par, BDD, cur, BDD, visited, size_t, from, size_t, len, BDD*, dea } } -/* PAR strategy, parallel strategy (operations called in parallel *and* parallelized by Sylvan) */ +/** + * Implementation of the PAR strategy + */ VOID_TASK_1(par, set_t, set) { BDD visited = set->bdd; @@ -301,7 +494,10 @@ VOID_TASK_1(par, set_t, set) sylvan_unprotect(&deadlocks); } -/* Sequential version of merge-reduction */ +/** + * Implement sequential strategy (that performs the relnext operations one by one) + * This function does one level... + */ TASK_5(BDD, go_bfs, BDD, cur, BDD, visited, size_t, from, size_t, len, BDD*, deadlocks) { if (len == 1) { @@ -350,7 +546,9 @@ TASK_5(BDD, go_bfs, BDD, cur, BDD, visited, size_t, from, size_t, len, BDD*, dea } } -/* BFS strategy, sequential strategy (but operations are parallelized by Sylvan) */ +/** + * Implementation of the BFS strategy + */ VOID_TASK_1(bfs, set_t, set) { BDD visited = set->bdd; @@ -412,26 +610,77 @@ VOID_TASK_1(bfs, set_t, set) sylvan_unprotect(&deadlocks); } +/** + * Implementation of the Chaining strategy (does not support deadlock detection) + */ +VOID_TASK_1(chaining, set_t, set) +{ + BDD visited = set->bdd; + BDD next_level = visited; + BDD succ = sylvan_false; + + bdd_refs_pushptr(&visited); + bdd_refs_pushptr(&next_level); + bdd_refs_pushptr(&succ); + + int iteration = 1; + do { + // calculate successors in parallel + for (int i=0; ibdd, next[i]->variables); + next_level = sylvan_or(next_level, succ); + succ = sylvan_false; // reset, for gc + } + + // new = new - visited + // visited = visited + new + next_level = sylvan_diff(next_level, visited); + visited = sylvan_or(visited, next_level); + + if (report_table && report_levels) { + size_t filled, total; + sylvan_table_usage(&filled, &total); + INFO("Level %d done, %'0.0f states explored, table: %0.1f%% full (%'zu nodes)\n", + iteration, sylvan_satcount(visited, set->variables), + 100.0*(double)filled/total, filled); + } else if (report_table) { + size_t filled, total; + sylvan_table_usage(&filled, &total); + INFO("Level %d done, table: %0.1f%% full (%'zu nodes)\n", + iteration, + 100.0*(double)filled/total, filled); + } else if (report_levels) { + INFO("Level %d done, %'0.0f states explored\n", iteration, sylvan_satcount(visited, set->variables)); + } else { + INFO("Level %d done\n", iteration); + } + iteration++; + } while (next_level != sylvan_false); + + set->bdd = visited; + bdd_refs_popptr(3); +} + /** * Extend a transition relation to a larger domain (using s=s') */ #define extend_relation(rel, vars) CALL(extend_relation, rel, vars) -TASK_2(BDD, extend_relation, BDD, relation, BDDSET, variables) +TASK_2(BDD, extend_relation, MTBDD, relation, MTBDD, variables) { /* first determine which state BDD variables are in rel */ - int has[statebits]; - for (int i=0; i= (unsigned)statebits) break; // action labels + uint32_t v = sylvan_set_first(s); + if (v/2 >= (unsigned)totalbits) break; // action labels has[v/2] = 1; s = sylvan_set_next(s); } /* create "s=s'" for all variables not in rel */ BDD eq = sylvan_true; - for (int i=statebits-1; i>=0; i--) { + for (int i=totalbits-1; i>=0; i--) { if (has[i]) continue; BDD low = sylvan_makenode(2*i+1, eq, sylvan_false); bdd_refs_push(low); @@ -463,148 +712,209 @@ TASK_2(BDD, big_union, int, first, int, count) return result; } +/** + * Print one row of the transition matrix (for vars) + */ static void -print_matrix(BDD vars) +print_matrix_row(rel_t rel) { - for (int i=0; i= next_s) break; - } - } else { - fprintf(stdout, "-"); - } + int r_i = 0, w_i = 0; + for (int i=0; ir_k && rel->r_proj[r_i] == i) { + s |= 1; + r_i++; + } + if (w_i < rel->w_k && rel->w_proj[w_i] == i) { + s |= 2; + w_i++; } + if (s == 0) fprintf(stdout, "-"); + else if (s == 1) fprintf(stdout, "r"); + else if (s == 2) fprintf(stdout, "w"); + else if (s == 3) fprintf(stdout, "+"); } } VOID_TASK_0(gc_start) { - INFO("(GC) Starting garbage collection...\n"); + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("(GC) Starting garbage collection... (rss: %s)\n", buf); } VOID_TASK_0(gc_end) { - INFO("(GC) Garbage collection done.\n"); + char buf[32]; + to_h(getCurrentRSS(), buf); + INFO("(GC) Garbage collection done. (rss: %s)\n", buf); } int main(int argc, char **argv) { + /** + * Parse command line, set locale, set startup time for INFO messages. + */ argp_parse(&argp, argc, argv, 0, 0, 0); setlocale(LC_NUMERIC, "en_US.utf-8"); t_start = wctime(); - FILE *f = fopen(model_filename, "r"); - if (f == NULL) { - fprintf(stderr, "Cannot open file '%s'!\n", model_filename); - return -1; - } - - // Init Lace - lace_init(workers, 1000000); // auto-detect number of workers, use a 1,000,000 size task queue - lace_startup(0, NULL, NULL); // auto-detect program stack, do not use a callback for startup - + /** + * Initialize Lace. + * + * First: setup with given number of workers (0 for autodetect) and some large size task queue. + * Second: start all worker threads with default settings. + * Third: setup local variables using the LACE_ME macro. + */ + lace_init(workers, 1000000); + lace_startup(0, NULL, NULL); LACE_ME; - // Init Sylvan - // Nodes table size: 24 bytes * 2**N_nodes - // Cache table size: 36 bytes * 2**N_cache - // With: N_nodes=25, N_cache=24: 1.3 GB memory - sylvan_set_sizes(1LL<<21, 1LL<<27, 1LL<<20, 1LL<<26); + /** + * Initialize Sylvan. + * + * First: set memory limits + * - 2 GB memory, nodes table twice as big as cache, initial size halved 6x + * (that means it takes 6 garbage collections to get to the maximum nodes&cache size) + * Second: initialize package and subpackages + * Third: add hooks to report garbage collection + */ + sylvan_set_limits(2LL<<30, 1, 6); sylvan_init_package(); - sylvan_set_granularity(6); // granularity 6 is decent default value - 1 means "use cache for every operation" sylvan_init_bdd(); sylvan_gc_hook_pregc(TASK(gc_start)); sylvan_gc_hook_postgc(TASK(gc_end)); - /* Load domain information */ - if ((fread(&vector_size, sizeof(int), 1, f) != 1) || - (fread(&statebits, sizeof(int), 1, f) != 1) || - (fread(&actionbits, sizeof(int), 1, f) != 1)) { - Abort("Invalid input file!\n"); - } + /** + * Read the model from file + */ - bits_per_integer = statebits; - statebits *= vector_size; + /* Open the file */ + FILE *f = fopen(model_filename, "r"); + if (f == NULL) Abort("Cannot open file '%s'!\n", model_filename); - // Read initial state + /* Read domain data */ + if (fread(&vectorsize, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + statebits = (int*)malloc(sizeof(int[vectorsize])); + if (fread(statebits, sizeof(int), vectorsize, f) != (size_t)vectorsize) Abort("Invalid input file!\n"); + if (fread(&actionbits, sizeof(int), 1, f) != 1) Abort("Invalid input file!\n"); + totalbits = 0; + for (int i=0; ivariables); - fprintf(stdout, "\n"); + /** + * Pre-processing and some statistics reporting + */ + + if (strategy == 2 || strategy == 3) { + // for SAT and CHAINING, sort the transition relations (gnome sort because I like gnomes) + int i = 1, j = 2; + rel_t t; + while (i < next_count) { + rel_t *p = &next[i], *q = p-1; + if (sylvan_var((*q)->variables) > sylvan_var((*p)->variables)) { + t = *q; + *q = *p; + *p = t; + if (--i) continue; + } + i = j++; } } - // Report statistics INFO("Read file '%s'\n", model_filename); - INFO("%d integers per state, %d bits per integer, %d transition groups\n", vector_size, bits_per_integer, next_count); + INFO("%d integers per state, %d bits per state, %d transition groups\n", vectorsize, totalbits, next_count); - if (merge_relations) { - BDD prime_variables = sylvan_set_empty(); - for (int i=statebits-1; i>=0; i--) { - bdd_refs_push(prime_variables); - prime_variables = sylvan_set_add(prime_variables, i*2+1); - bdd_refs_pop(1); + /* if requested, print the transition matrix */ + if (print_transition_matrix) { + for (int i=0; i=0; i--) { + newvars = sylvan_set_add(newvars, i*2+1); + newvars = sylvan_set_add(newvars, i*2); + } INFO("Extending transition relations to full domain.\n"); for (int i=0; ibdd = extend_relation(next[i]->bdd, next[i]->variables); - next[i]->variables = prime_variables; + next[i]->variables = newvars; } + bdd_refs_popptr(1); + INFO("Taking union of all transition relations.\n"); next[0]->bdd = big_union(0, next_count); + + for (int i=1; ibdd = sylvan_false; + next[i]->variables = sylvan_true; + } next_count = 1; } if (report_nodes) { INFO("BDD nodes:\n"); INFO("Initial states: %zu BDD nodes\n", sylvan_nodecount(states->bdd)); - for (i=0; ibdd)); } } + print_memory_usage(); + #ifdef HAVE_PROFILER if (profile_filename != NULL) ProfilerStart(profile_filename); #endif - if (strategy == 1) { + + if (strategy == 0) { + double t1 = wctime(); + CALL(bfs, states); + double t2 = wctime(); + INFO("BFS Time: %f\n", t2-t1); + } else if (strategy == 1) { double t1 = wctime(); CALL(par, states); double t2 = wctime(); INFO("PAR Time: %f\n", t2-t1); - } else { + } else if (strategy == 2) { double t1 = wctime(); - CALL(bfs, states); + CALL(sat, states); double t2 = wctime(); - INFO("BFS Time: %f\n", t2-t1); + INFO("SAT Time: %f\n", t2-t1); + } else if (strategy == 3) { + double t1 = wctime(); + CALL(chaining, states); + double t2 = wctime(); + INFO("CHAINING Time: %f\n", t2-t1); + } else { + Abort("Invalid strategy set?!\n"); } + #ifdef HAVE_PROFILER if (profile_filename != NULL) ProfilerStop(); #endif @@ -615,6 +925,8 @@ main(int argc, char **argv) INFO("Final states: %'zu BDD nodes\n", sylvan_nodecount(states->bdd)); } + print_memory_usage(); + sylvan_stats_report(stdout); return 0; diff --git a/resources/3rdparty/sylvan/models/anderson.4.bdd b/resources/3rdparty/sylvan/models/anderson.4.bdd new file mode 100644 index 0000000000000000000000000000000000000000..317d7200db38105c7f716fd6d6b76deb579162b6 GIT binary patch literal 38400 zcmd^I1=l3UksQI;RA4PF5rJ2wk?6ppq96rcokl?oEb2-^;5BKGw3OJ%i;j7%-1C~uD|5+H8FO0Z zj$`^c@4h;YexIvjNJ)Dqt*_5@c^rK;);^ifvA^{ga^yA1mzE)N?(VDOxHkW(Ik)rU z?(@Z~d{{<$=`Sw7^%x${`+$7Qa$i^6-B)9-&3}k_Y+3S|ANQK4Enek=tH=ExIffj` zn_ILjw{LNGUyX}9&*8CU{~q_6r!DT~gR95=w;t0<2v-<%>Syk-bjB|5dh)8{b*&Cb z-(cM~&;4w5N&9**t<6)L*C|~G>*uZ9>B#93Lyg(l`qbs?Gv~g(O2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IN{s!N@$Yac zkAL?#anl#?fi->c9$3>C?}0Ua@g7*y7w>^JeeoU`F8Um=WA&)wukS`J{^R()$g_-} zz8e|8mpO0zULiJquM!)-*NBbZ>%`#q2CeaXGjR0a_g3N;Xc7N46TeN{_V>8w(Yu^C z{_hbR|M!WF{|Cgz|3hNq{}HkA|Ckv3KcO}L72i+kwfN2>ZuejJIkEBkg4phR3#NhWGt?~OlaP;8!L*mb95#JvZ%OJi#C4Pq%`}^m_GT7h0Bz}w* S9~%CeSZ0C$`aQ5Z^gjWfXp8dz literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/anderson.4.ldd b/resources/3rdparty/sylvan/models/anderson.4.ldd new file mode 100644 index 0000000000000000000000000000000000000000..42d5ad9c23abd8c519dac1a38e9e9df31096d01f GIT binary patch literal 4448 zcmcJRYlv1=6oyZhHcj3$5eXYqL_~%Vkq{9P2@w%d2`efQGf`2IE)q5lA~i`D5mOQo zk^V#x5#5N4pokE<5dDaVppX!xhzO#H@;vW8>zwynh4rTmXYKb{Ywfi!XU}(LTvb(n z)oone_qI`nSJnC&W8|2`eTn-Mk4-#2@x;WF6HiGzHSx5>)5S3hQC7@OX!NZ3y82xg;jW4?&x`aU*ta!*dI z*EMU8T>QB1Aq9?xpu7mN;$E1YF=AE z++s9+%pdGI#CT#%^yF{{;JhAcMqSn$WBw^G)_$d&8|xaqjh%X%;ZW-VV^%rSn3I@o z%nIfh6Q66$_yJ?&d}Hzljj4Bwc%Cf0K&lw(<@GMIIPz9w>Mu5?-V*UbS?Vp7Du#Sc zKN|VV11%z5Lh zs?)OU&2J3rJ)=l5tnaKb=kdIFedFaD+}nCrR8=qZhN~A7zhumMUN&aFSB#PD!Q1N& zwSLo>^}l6|eA}4$-Vwhl%l_Y$Du(fI7$e_L{DCp`J`}$v%lMC^ih*APG^-QsP#HSiFU!Ua@pRV{cS>iWYKJ$A%@d3qW$P%Av z`J9jE6Q85_Y+2%SEuZu9eB$#JpC?OvFy$Ysef57$@?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rFPp8fQA^gpEkE{ne3;@Mx1M?Wb2fGqkUi)X(*9{n%rf6AgCPVwb?@Q8XF zK~)?LW>2dBw{WT2iSpW87P{m2qgM$syU%>wj*U!3=#;o~;?s>OdZsb!*Top!-999>wAfN$g-ZjP1pJu6W=#+OX3T~ePl7MrjswPPk+G|)6p-I0q@i6g_M(=QW@l|^sLuxeEx3xj#{u$Z0vIwIRUzK=t;%gIMXUzVO zHKxMli6?+%GdsC*KXm#NU$mR`E<(%x$J~ z{X}D~zccaOiSHH9mgV|6ro-cn$@gI5hZ8@V_;K;vM(;d%@s;13lt;CnkD^*_LF39I zJe~NN#Lp&PV$A)p)R>Hm6Tc*WUY7lQIq8cMzn1t7@iJNVcX`qmCSH+vW#U!hH)S!a xlRiK3`-wkH{88dh#A{^P?{!JvQ}ucKH0hru{ygy)iN6%DZ}e`JH=WY;_75`k-7WwC literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/anderson.8.ldd b/resources/3rdparty/sylvan/models/anderson.8.ldd new file mode 100644 index 0000000000000000000000000000000000000000..8a96e89b3bcd9283a9ad94beafcde8ef927ccf1e GIT binary patch literal 9248 zcmeI0f6P~P7017b{D@EyAD$Qy5fKqFhr}2uF=i@CL_~yyh(tup7-P{0x4jd6P??whz@;{J)xPdp&;z{DMi^N0s0eMsV= ziH9W~o_Iv!k%>no9-Vkh;<4g)bwyF%QFg8@8%M6l1!d<-Tv&Flz(r+e=IGp!xGR1h zv7TKyah1{WiTgRkLL(k`jTn2oF}&UU=pEyW@o0{^k$FzIL6qcZp3|l5hJHvpO{~F^J9KI>3zyh&p5{X zLTlHTb7FpxAIF$q)Qz~$FJk1h>l5?qZhp*&rPYzsQec%rELj+~*fDa@zHY`E@rx=0~sd z%08&<_#9(g!JZRyiF4u@*92}iPU=Sw?nRvc-_D8obvJ)pseR_glj~c~81G{7CnTPj zc#<)z;ZkF+?qp*|KgF1*Y^pKmdp)EpOsC#e#?-r7e7P)duj%rtp3@ zG4e7)pYt-{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GSu6X65e<$ycnOCR$c~O(B3#ZvG>%tjY^6D%td3BDKygE-yUcE<4UR|IiuP)M( zSC?qXtIM?H)fHOSg{$-_Tq>+Xkvw~!?I%MAZf)rk<`3w1%r|Js!w>0W*8dSLdHFGY z#QHy>B~L%44_W_bwB+sQ^a1Ptf|fk~lHP~s2&_@U-?u*zr%R^m{Rh4g)z>`#I-W21 z*F`;H%DYW|n*V*ZcrYaeg7K$OWBh5=-SPKSYK%X< z8spEP#`rU;G5$p4Xko` diff --git a/resources/3rdparty/sylvan/models/at.6.8-rgs.bdd b/resources/3rdparty/sylvan/models/at.6.8-rgs.bdd deleted file mode 100755 index 71ef84a77c48033d3a1dd2db70756bf85eea2a2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50128 zcmZwQ1-Mnk+s5G$5EL>0wx|f$-Gz8mz*f4uOA))>pooe=H;RRV-Gzaz2-u3<-Q9lA zv(6gdA6(yD*EzH9nY9ml=6%=9-iv);wUp9I`dUL@@9GPsQXIeYUrS{LAHEf?;lnq= zHGTMcxRwuJ4X^0Km&3Jv_+q$@51+4oK02zHX>m#`7YF6H=TfRmKbz7j^wTNTqn}J^ zRr>LiR-+$HX?6OM>bdx@>7kU?{0};qpVC_N{VDyAzBi?{>AO=}hrTnVb?MtvT93Xp zu)Ys(4sYPY8^as=a9(&LA6_4>@54FajeU4ccoQF972ec`vr}r|I+x2++AJTto|#fZ zdU{HY=&30+rYEPgIXy9@E$HznZAp(!X)F5Dl(wcXPH7wZqLj9!FGy)S`uvo(r_W1i z2YO^mJJOZFPCh(4yt5C_4DaH@)5E*^@YL{bK0Ghb_a0`0%Lkp*}n!e3%c5Z`EywyDA=3?c&tp52^N%u8JpB?czrl zgQ)h=uBw)K3MpxlT2*&ff7hhqDW{|$v|+!3h9Rb;Ah%<`k^)nbl9H$c`-`NjZYZV_ z$=b=yNbX|lw}}UL@!?kCB2-(1yZNwjxCm{-a1S3gSSAHh+9ai3aY{<{mr0qFHcY7x z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v-vG5w*Fthn*VKV7R~=ot^XV=z2D6?tb%*5@>AI16=dG0s{2ot%cv}rr1u)A zO0SPvSLpR|36i-{J)27eP6G20_7Uj=3S;v|le}r|uEFr!6XZenb`hTAe ztor|{^0!#6@6VOPXnlXF{1sO5|Fv=$#s9a;zs1`1_jg$Nkn8Q&=byCe{A*)X{>8!c z`8TZd=k<{5`!D`1=r^Rme=xQ`L-5=F*Wu&Ht^C`B$s+fwZq)c~z|DU&Grq z|C*Io##;WZ1uOWBUlj4L6B@=1<9)08Y zbe7(GIcxmhm3POQ-uuAPBggmW=YF(ne70wP9#H2~YqTF&d4H_tKgioP|G|~_#aezI z0!#0lzyE%580{8+=ED(nKDEa6dt~LzhsN7A{;0}_V=expVXZGdmoXPb`*Ey~m!4UU z!*A<3zRq`o_t$(URz3!+cu(?n#d~t)L$P-MIt8}-*Qv1b>$KWm6!~>}<(;s4{-5FP zs-IbTl4>z$)%tkM(UvBv{l9Bns@I{3j~7d}9O=D8%aQ(zw;an~tnYWNi}u>f&$ TJPuX6M#hD;2Q0U5t)2e`!~tG6 literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/bakery.4.ldd b/resources/3rdparty/sylvan/models/bakery.4.ldd new file mode 100644 index 0000000000000000000000000000000000000000..98f797c4253730606aecdec0812651491daf0d6e GIT binary patch literal 27136 zcmb`Qf2fY#n#Z5n>wlW- zPtDKYUR}S%)}V?9SKM9kkcx*^Jgnm36_2QRWW}Q@?x}cm#bYWS3wOFITPyn8c9d2x zU#tE@^GmDAV~XwUP#&*iJ2i4lliK>5R8Ki|t-4MpKF8(xD*o@9U%Cr_-~7^iGw1pK zU$J>EIWE_$`%2T@{fFk4?rQeyzJD#Y?wjK}^|S}NAKHV?esuO%`5MdP>ix&&m*TUo z@y^~zmtX4|@ATErx~I6)yHiX1t~$AXXFi=C`l&IkLw=4`ey2~Trhaz%bmpTy*8b!< zcKRr$vv-|78q2ZD@AT=^)X#r!ew9lz%g?-4){8tItLo+nu#DN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EuV7R0=b(1hLo>C|MwId8CAbcNf%q+5~JqL!CS-g?6)OW zzwL<|Z0&$&x2Kg}3>r=G7IqR<`YY4*ccprY-EQEt%i8Nxg>q?q1K_{3^^Vs0_ene4`S-dy+&P~e{{PJX EUmAmSOaK4? literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/bakery.5.ldd b/resources/3rdparty/sylvan/models/bakery.5.ldd new file mode 100644 index 0000000000000000000000000000000000000000..242e735569ffda908e794185976fca8defc3926a GIT binary patch literal 200720 zcmagH4~Wn2`|tVs%sP%UJL}Au-yCbL@~ zR#o-?q+4hD|L?b!zhgC_!4n%isllxcZfo%52Ddl3qruGzr!?$S8$7MS(;Gaa!CeiW z+2C0Xp55R%@PDkeUFrXSoBsU|HET8{YZm`a`ls3X_vv4$m;d;zm->I?Kc1`fOX1aD zMNX|yGv7bTH6By?mbEKJtQG!u>EC$mrLL^~|IfdytMqN=ZPp;WcG3To{%QAU{z`7v z@c-rCtfBNR^Zuh6Wd9H8pLXcKG~|C&!$0%?M>Ukb<9%p-v~RRN<7+j({>mX;sh945 zO#gI6DW>$1tQxhJ<38f1k8I;}t2~nbk&kTSb?X0SjpFfI$NSYD(z=(mjMp!p@jW4( z#ywtN89(07xK96%_cLC%_K4QC9Lsn=@)=+A@qVN$eHB06&v;J#Ki<#yxU~ngZslBz z_amS2H68Cqy3$wi4fKabS) z=Kj}W&;751)wusPVPB8r`0T$Cts47p2<{8XyRyGvjb{_=`O5jWgjaL?Td{aldA_%y z&GS9jh#!FEzdbCzYMg%vt>SkS_FT_Sw3@G7NbWz+-yXEte=n@Y`FDqX7|Hc!|NUsy z*neN}fsj0Z2MgBxspj#U_UB>X2(9eqqp-$rJ_f6Q^Kn>>*{FOYh|ZVePomB7ryP)4 z$De@J|7j%mr&?`4gI4>~d=}Pxn$N*G|9M!A?W3^jxq##**LM+x`n!a5nO6Oo-RAsP zu&e*8NUk^6a~*B=zX7XpJ=em16X_PM8qeP$So3ikX)~?ry@NELR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Jh5U`APiSTKpSW=j9!i&r9Mz)Z*X6 zIv*dgd_EHYxfcHk)_M4Xb(nvTm-YTiug=FetnakifB$>N?6>#l2Y!wB6YCeP^vu8E z1~&O_@wfCT$}jzWE}x%?^lJb7eme=){+L@~t-rYq*7}+!!&*P{6jt8#P0XuMSaEGyBfe$QtPoci10)IS$a{qx||KOav03*gk>0jK^> zIQ4hIsed7y`e(zcw;L<Rke--lcHrT?VJ#<#6g<0jJ)TaOzzJr`{e| z>$w^$^|{`)^rpUEIQ6ZAQ(qsP`ugG2w;oP?190lw0H?k+u-0oMR_bwmo9RtGTj12Q z6;3_d;MB7nPCbKg>e&IOo=vdUV+bqbyPjcsGyX0(+{c|PBS^L)Dn=Xr4(&V9TC=ltJ=bN=qZIS=>Y?AHT0>-!MS`aXiQzSm*R z;jtqNKfzka-^Y;uDLnY!vi&b`ZK;)>=1_e-FG}{mfd8|Z|2NIhfqzo2UYg?{FZI15 z{&i6?J3{k&Q#|fF@b~_&TIIjP|Gq?--@;mt4_Lh?6t7n`U;GLGM_TE9#*)YS_J1wC z<}Zc670avjy}}y*M}?*N6CQ7_k4{uxny=^on<(XbJ}v*Q+Vnq<-!K|4#ZSNk^5+Q? zE3Dp06;^&LoUFRu?XHlIi)bs<7f$cBtyS*5F@V zqShA6`Mnj^es=#|a;4W-@ypX+VU4uD!ipdI$3Kt10slaW+K9ET@TOw9p3N1O-qzZD zwpRQaX~6s=>7kc|5w86 Bo+khR literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/blocks.2.ldd b/resources/3rdparty/sylvan/models/blocks.2.ldd index 1379ed1a39a5cbf1201f57a8f425df19c4985f6f..0048b17f63fc6413f26183debb3850af4896f329 100755 GIT binary patch literal 11036 zcmb{04fM|C9mny19zw*J<0x6kL(Hknm=q&3D#J)A-#`{@nynCEhTN6bgZf0&SW_?TXkwSdB znBRwO!ufB>R+25=Dy>KI%nCEg%G#ORn>(00iaB2=G3VRlk_Jbl7lqvyTo8&Rq2UJ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O?AL5lgN)Y`gQPbSgT&7#2H9^Wj%4@({gEth5qE?CzhETUm*}@3 z3BPQc8cF(<#7O3^CI+8hOROR&j;~Wiv3!FV#q>>T3;6t&ZEBGB?Zn{oI~9W(eee9; z9Cxw9_dWX248EV^cMSfGOEi-oa$Yo>9}%M&je~ldHe}DDeC%WlKi7TH!}b5iLV=dA ze69nb+m)V~QqLQgKR93$a( zq9+Ps3b6`>M*Ut8fuB}jIik>ZP8>Bdo&G4;U5KNgXAnoh?@FvjK%@Q}0X2$(cc+Sm zvIj954mmP6)*OO#I{pbb(tU6cSAT&V`T4}vpP8e*{V+v$Qp3-(t&YlP*;Ys8vn(1~ zt)p_4XoRXK)S2q1jP@F(vqJtXD^VI(Wk^c{Z5@yu^ literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/collision.4.ldd b/resources/3rdparty/sylvan/models/collision.4.ldd new file mode 100644 index 0000000000000000000000000000000000000000..13ff031ad393556d7fce63cb8aa9f22664c747a1 GIT binary patch literal 8148 zcmb`L52%;r6~}*b&fPh4=GQ?czk5h=hbV5fQnF z6A=*+k&BaXAx&h2xDW{$A`uZSVzX#NB!-I?E@DL6^Z7pS@%_HX-zwT3c+Y#j=X=h1 zp65J&-rv20yFD2cP0Ki3C~V= zPQr5&o@e+=MW1gNbwR>I2`@}|k?^-0>krGD3X_=@?|!x~7oLX(A38C?h0XcU!zafF z&zoF<@$YA22k^juqdctGo#lx*Y~biG>|qQ4|CRr$^~rd?Ql77s=Z^Bw*Eh=(_UJ1x zJpOqsUz8^wL&u8&bH{!i+kuTSc+k^Gx*7$mP0>{|GhP|IH#uIVmasBi1F$U&~p6eDo?-+;M zqMxwkJfFo!-H7+PMZTz8^c|Rf$c^3Og8wuw?gny%e~iO(aqfcW_6Em%hz(oR?Ek^X zJR>(b``Ka~;rA^Y5BeA3>5H!t@zH1C|7N3~wozFs>20wA_+jDvH47*1nYQ8Y-{ma@ zFKKDr^7kja)G+EY;qNw9&sJyYU#94Hd_# z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rdparty/sylvan/models/collision.5.9-rgs.bdd b/resources/3rdparty/sylvan/models/collision.5.9-rgs.bdd deleted file mode 100755 index 7c32c293ed278544cf3ace3a8584d05f3f2e6ff7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73760 zcmZwQ1-KQ}`}XlU3JOTujev8eEiHePgfRu=UqKK#{x=|$T?m)T)R8&Mggovcw zfh`tx$9vy%X8C;ozw2Gsb(s0AnSIXLGwXiV%&^fdvMj5ruiE;$woHFSE9I-#{MT8^ z*G7jo@D3xx8`>knmFz3SmFk7A-tn~Ot_xiKD?9NE?nPk6K-I)3OBS{hIh7`hj+1? zg?F`^hIg|M4exF@3GZPy4mYw74DV_0AKuH}H@vsKcX%Ir&+xwX9^w7$-NO6ZyMzz0 z8-@?G>xU1r>xCQJJA@Cmw+lD1w+SC&Zxue&-XeUMy;-=aT{nEVT|3;&t{FbUt{!e~ zR|~hWtAtzH8-QCWgy!u1sL!^e5`>+tbj{W5%lSHB3K=+)1{CwcXg@X22ND13@n*M>WK z_5JXvUVS&*$*XUNPxI=V;m%%tJ$$-XUk!Kh>dWD-UVSm#&8w@!XLxmGxVu-EhkJN+ zS-7WHmxgXh&xuTBbI;MED?!CoB~zR;^lB-WR^u ztM`O2@#1r=Z`Fg&Vzcl|P^1jk2FY;fy!ugNN-(-cyc#$8J3g^FCeh@2strz)0 zuW%GWNYK8N+o)3Zw-{?g?Xeyi^s(g@D_+~HiL0RGa(B^}(%z*hrHS@oDc0b;qhK=6`tVLmf?wBZ62QF)n?(zUTqql;?+aLQ@z?GJk6_( z!_&QbV0eaC_YcqX>b~JwUfnzVuvhmC&-Usb;W=L2Ej-t&yM!O{YQz6ZP$}P1KmRlT z<1znPFJI07nCCxt2tV%C?ZQuZb(`>$Ufn7@->X}MpYrNv;RRl;8-CiWwZqSNwPyHP zuT~G2d$n44p;xPf7kPD~@M5o43NP{M2I1$5)w1YPJt@ncr$?4yiqVD5`iPrtZ%e3w%UZHhA@hYwRiP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}^H&82u>l^F59I&s8%4gC@CYltJ>*Ahp(uOmjh*HT*$ z@9S+-N4#$!j(FcljCkKfZ9%+mwoM)JzJ)mAeJgRtLy_C4kk6LeX&|5Pu!9=;d}m_h z^IeIN&vz$Ayzfbjc;8#`71R&5#`|b~$Dcw4{yO?C;4eZf{(=JW7bVfF7f{)&7g3FqBL#GE+@eX>`!ied z7bzzGo@u?sU!-L3JNL8f7r{{~BWTa%`3P>Lyn_FHwu2mmSaLs)BCX&TsNf7&?;Gih zYzLnx!6pDNH6%XKrHO9_&&%}U;gBLtFo;(g>hbw``XgAc5`)h#P+Jh}*KAXRj4vhz zNv|gciC;<#vfoG?$?#?RBU#=g?nXwwLTy2kebqKKlJIMZk)&TwjAZ^sV(|IR#43W~ z_!dOV z!hSK?{FE4z(FCZsXhZfY%EwN|@OxkjX!*{sK&xl@&JRK-mMfI=LHMMC%P|sSGCfF? zZL(d7R2);NBH^|rj)dHfScyub{!I}QdWQnbF%o`9dZHkv601;X)bD}_{7wayBMNQj z#8D%=&>sc6D{&O`bmA!Z-H0_2(5QQGO%w(1K@}6qp2V1N$dS3RW)q~-@qOS(_rXD2 z{T*`T=Mz_dV~+Om!xY^~4c}#39hG<4R!8N#IwrJQN98Ip5vrb0XR4pl+M8I#QPi30 z2z93Vaer{A`Z10=+n&CtGu0F7O!edbs58}%G3soZZEDn6uZ~b>y*fgjseXJ8>dc}# z3Jz6As58}%JE6{Yw@r;YQ~lV7I#c}^N1dsLqR#eapIT=F?o@leL~ow@3$?dZIiZsp ZhgV-u{9-}t&5z)@$Ls5*{s;FS`F|MQz$yR$ literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/collision.5.ldd b/resources/3rdparty/sylvan/models/collision.5.ldd new file mode 100644 index 0000000000000000000000000000000000000000..e72ae4a9a4676c939519e2a2a4d9e9253af50aa9 GIT binary patch literal 8664 zcmb`L52%;b8OPu5oO5P&XXY*>p#?A)<8edOFzn-#m}{!t;|#6Vx8~v zm%fqjeJk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8SB0`8SH2`QH>b^KTNz`I&FCJnJM8TcqWFH}mz&+RV32+|0LK+|0K_ z9OuLMwme%UdFVT(<>%SVmmF!}-!1SVI6wIVvLX(eA2q-Khh$|D?@H@WT2(duI3jD)kE7z)5AxrW=ddI-j!9cw-yasn zv-uK!9}(I$n3;cXeqhY+qvOV?19c@X@JabkNV4BfNyD4{{(BJD8Tn63^1KE@{4iTN zu5>#g5&x;q zCxbCLU+QoF^jEH!=bL|z-BlLPFY`Sy&nNSJG5yT^=eFy^xYK5SCb62vH4UC$hg!0^ zj#63q28FeZ_@Ux0b$sjdA-iWVF)PC@pQI7S?EjJC{<>aB)``^EsGslmFBbnD1L`L? literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/collision.6.bdd b/resources/3rdparty/sylvan/models/collision.6.bdd new file mode 100644 index 0000000000000000000000000000000000000000..a781db6890df62374af59bf5a4ec0b4dbc55759b GIT binary patch literal 58532 zcmeHQ1=wBHmHh(=2}yw95G)A^F(No2NL+Dug1ft4+$j{7!V4BW&{9gB7N_p+?wz`K z)>`N8f3JHRhRl4-bf&}prg!hP&$;)Wv)4ZRocI1mW?)xWSC9ICeW91Y|CTfyHvMdO zyfiTVyx-g7IiaHu`~4kq1hh#d`{Ui7iv7Ainwa-@y_%R~=z2MEPns_#?nU$Y#7oiq zaN^!HpH19{<_8jUUS01?%z1RZCviWT&m`_o^XbIP(0nTKvNYeGcsZI+BpyKX@x;s1 zd^GV2G#^g9BFzUAuSD~K#4FRhFYzig?@7EW%}(OgXx^20b((i39!T@{#B0#JHSwA> zZ%(`x%^MT1P4lgZ*P(e`;z2a8O+1+9)rp7DyfX2+G%rs)l;)+0hta$^@p?2bOgx-s zm3Rcr^AeAwc~0U{G|x&rn&uga*Qa?};xRN&Nj#S3Nr}hNJR$LTn#U#HfaWoYH>7z~ z;*Dq?k$7X8hb7*G<{^nUrFl@|&1lX`ygAMN6HlPIZ{jUz?wxod%{>!uNpttaThZJ# z@zykVPP`4x9TQKYx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n@ zYiuQAD{w0l+nQU2ScQ>B{cmz&4Th{n!wT%`#I_~}5~DDa!{9D7n;@00{{tNAJ-CR= z|AidJ_{8P^at_yu!4_RfwZEInby&We%5_-&?uY_Xufy_`*f@ZC(SvoW^;cRO8<9A) zb*goUb*l9j{lRf#ud#Kib!h9fKkvah)%uJ3u}-!A0zcdOyCc?VV;y3hHr655sn%cI zZwCRbL*rQM5bIRyFZyGhYW)SqI$bqvYOGVOzwp^Q)jG6wsVRBO=I>6&~-y-r)) qYVF1=8g=kLSi4J<8!D+q@E*?-|2PPPF{UH=YgcXz-5 literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/collision.6.ldd b/resources/3rdparty/sylvan/models/collision.6.ldd new file mode 100644 index 0000000000000000000000000000000000000000..e7476b8a9cedfcc52a8c88fa72ee3a37ba17b90f GIT binary patch literal 10800 zcmb`M0jQ7r8OPsiW@mP;nVFfnC)cDinMpF)?Q|xYB_xF3= z-}|2b8C6x)f6^G0&W&S0Bdi7nJSgC%fCmTM9Pp5UhXy<>;Nby}2zX?`@s36Zz9rx> z0gnxMT)^W4ZVh;X!*3;hqQj_@0-hZ3lz^uS|G2icr!y-=W`>>nvwb7+91M8Vi80P> zo;TfmV!ZL3$z>S-{%mv*2mJTb!HWJM9TtZTY}Yfp+06fc<>^$*O+DXC$G6k*b~?V7 z4zBmZbQovXGYn5mtmo_U#96GL7p}om7UzZfsh210Tj?-tb8a@fPu9lU?0zhcJYIiO z-fCbz&}}}f4&yoZXS3^=U(EA5-sX*XKW~;V&Ko-rYs}8`opczs+RTQ%KbzHKapdv( zoAOoz_lq9q&3MjMhqu{v%og*!j<OucHJlEolPrO~z@R!-RP8rNBGwH{4 z2jFK2$1eqQVt+0JfB#MNyM)^ctv6(Qz%w02ohAH}+Um3AyY%&Py*affCuVo9!|dww z97dfV@B-nV)>fZAn_|9&A%0Q7i-mtyTUnPfK#g})RUM*#UOVxQDq}(l$n&>M#*fks zXS`f^ULRf|%=c2}R|>cG;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EDAv z5AscO@tCJOj5k6(vL3U8zu#~0pDTWj zBHq~ z(myMLe{Ztcz<-tam6G(=>frD9C;ZonUn5EXt#ke?;(CV@tTqV$vR>cD=Mz3Z8EAQb z+UVj5+T<`kn;qtRdy8;;ogWWB8qN6U{pnXV(YQZNOg#5!gZbO$u7|qaVUlz@Ox%uu zcMAWyzFy<~liyc>>uwiM&>n{qthxf;D@Y&rN?2^o2XJfp?{&=sRo_4{ zg8E(@B%I%prJljEmU^0n>4%(eh;XTIsBo!om~g3YxG?LH<3|WH-@ZO}w~=C+B zKG&NsW~L-fzd%~<-*Wv#qyfKB{QHvF7D?-YN@Hj~)sp9_%US4;C4G_kua(>x9kQ}M zOC1l+oxMy}#B#@@cBUhJ<;cqYtaQAvDqAHh>S}4-NlU*yrX%<7T3O5dtrITuw_Z5T zANe+jStCi#52WS4y1{u&sL$`1L1*flgs2DVroK%1dwR3O@cw-W-YR~JB>U5c!T)ZZ zn-l)q#cz|O-#df9|9t}go#J;$(hs|W|3J-eBGSNrkNDk^^lMk}Zw~(Z#P5}4J@yCx z;lcl)_ydxxS9kCq9sCcAKP1U|9tr;Ag8wn`M8mSpT3bZ{B( zCN;lbvW=iqE+5v@4zpjL5&pQ&@5r3umH2bch4}Nr{#OkG?f=R4J-S@kSl>2j7Zt_& zW!x*w`eb}bnEB86vM}?N@xS`57vq7NNow_OI<6`blz;udCY*mS$sLtBlhOZ%{PV9Y p_H}B$tdIYm#D2?Nk5Xe*f)={{je}f-C?4 literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/lifts.6.bdd b/resources/3rdparty/sylvan/models/lifts.6.bdd new file mode 100644 index 0000000000000000000000000000000000000000..a8bbabe1c5c36f450b3828a610cfad0d624be3ce GIT binary patch literal 394508 zcmeFa1^i#tk^cWp2np^QX!}W^I1wCzL`XsilHe8ygy8N{;Nop5rS3vo>h4etP;aRh zsqJocE4y{w?)Lw@=iK?8=iUZ3G<1LL{+SoKGtZoJ?>%>(Idjg(zHB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}l8T!!wbhJ^U|Cx-RrnY=^mROTQBj*|LV`_qp z6!3+F)BDiEm-Ifg@Fl$uEqqBeb>T~T9}2#_kgq2NzP#wz_;QJU5a} zY-;1nOT^&I%hVy@%ZI|I24Ac!sQ7~Nq2i0m3-G0(KLmVvC2VTri^><{3(A{{FV~2T zFV~5|mmAa};LFXhsf{nM6C?g_P=_G?7GlL;{i5CYg0A9=xzs;y0qW>t7(x;71w)ja z;}MI^9zlySmc(YZ+hWyJXc4m^Pu0HG`%okUOmPt;iFXRp2lICwTe3kYJIRP9Lf!ed zCqM&9b#8?6hqv#!xqGU&u?9kV)A)X%{9Alm1AWkU=;nf21XMHL12y{HUf<$2EoQrhk$_N!=?^`!c=Vr0{>^%a8uLx8Y%E)TEgjQ ze3?#<@nr_F@nt5l@nse<_%fS11bmqjHns6(F0t`t9x?bbpE?A5Sr9h0@ns<~__ByP z#Q3t9KJaBpv{8dEOC1|umeCKsEcbTs<$lM;mj~!KzN{cNzN{oRzNm%+UsSuXjRL-? zc1x(@i)uOWWmU9MBN0|L84_Pr^Pzu;YB}^@7Y=IlU!SpRKP2D{-hQ~$a8u|%R2m
    in the values table. + */ +MDD lddmc_ref(MDD dd); + +/** + * Delete the MDD
    from the values table. + */ +void lddmc_deref(MDD dd); -/* Return the number of external references */ +/** + * Compute the number of values in the values table. + */ size_t lddmc_count_refs(void); -/* Mark MDD for "notify on dead" */ -#define lddmc_notify_ondead(mdd) llmsset_notify_ondead(nodes, mdd) +/** + * Call mtbdd_gc_mark_rec for every mtbdd you want to keep in your custom mark functions. + */ +VOID_TASK_DECL_1(lddmc_gc_mark_rec, MDD) +#define lddmc_gc_mark_rec(mdd) CALL(lddmc_gc_mark_rec, mdd) /* Sanity check - returns depth of MDD including 'true' terminal or 0 for empty set */ #ifndef NDEBUG @@ -233,54 +262,49 @@ void lddmc_serialize_totext(FILE *out); void lddmc_serialize_tofile(FILE *out); void lddmc_serialize_fromfile(FILE *in); -/* Infrastructure for internal markings */ -typedef struct lddmc_refs_internal -{ - size_t r_size, r_count; - size_t s_size, s_count; - MDD *results; - Task **spawns; -} *lddmc_refs_internal_t; - -extern DECLARE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - -static inline MDD -lddmc_refs_push(MDD ldd) -{ - LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - if (lddmc_refs_key->r_count >= lddmc_refs_key->r_size) { - lddmc_refs_key->r_size *= 2; - lddmc_refs_key->results = (MDD*)realloc(lddmc_refs_key->results, sizeof(MDD) * lddmc_refs_key->r_size); - } - lddmc_refs_key->results[lddmc_refs_key->r_count++] = ldd; - return ldd; -} +/** + * Infrastructure for internal references. + * Every thread has its own reference stacks. There are three stacks: pointer, values, tasks stack. + * The pointers stack stores pointers to LDD variables, manipulated with pushptr and popptr. + * The values stack stores LDD, manipulated with push and pop. + * The tasks stack stores Lace tasks (that return LDD), manipulated with spawn and sync. + * + * It is recommended to use the pointers stack for local variables and the tasks stack for tasks. + */ -static inline void -lddmc_refs_pop(int amount) -{ - LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - lddmc_refs_key->r_count-=amount; -} +/** + * Push a LDD variable to the pointer reference stack. + * During garbage collection the variable will be inspected and the contents will be marked. + */ +void lddmc_refs_pushptr(const MDD *ptr); -static inline void -lddmc_refs_spawn(Task *t) -{ - LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - if (lddmc_refs_key->s_count >= lddmc_refs_key->s_size) { - lddmc_refs_key->s_size *= 2; - lddmc_refs_key->spawns = (Task**)realloc(lddmc_refs_key->spawns, sizeof(Task*) * lddmc_refs_key->s_size); - } - lddmc_refs_key->spawns[lddmc_refs_key->s_count++] = t; -} +/** + * Pop the last LDD variables from the pointer reference stack. + */ +void lddmc_refs_popptr(size_t amount); -static inline MDD -lddmc_refs_sync(MDD result) -{ - LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - lddmc_refs_key->s_count--; - return result; -} +/** + * Push an LDD to the values reference stack. + * During garbage collection the references LDD will be marked. + */ +MDD lddmc_refs_push(MDD dd); + +/** + * Pop the last LDD from the values reference stack. + */ +void lddmc_refs_pop(long amount); + +/** + * Push a Task that returns an LDD to the tasks reference stack. + * Usage: lddmc_refs_spawn(SPAWN(function, ...)); + */ +void lddmc_refs_spawn(Task *t); + +/** + * Pop a Task from the task reference stack. + * Usage: MDD result = lddmc_refs_sync(SYNC(function)); + */ +MDD lddmc_refs_sync(MDD dd); #ifdef __cplusplus } diff --git a/resources/3rdparty/sylvan/src/sylvan_ldd_int.h b/resources/3rdparty/sylvan/src/sylvan_ldd_int.h index d748c7291..7cf65e3ba 100755 --- a/resources/3rdparty/sylvan/src/sylvan_ldd_int.h +++ b/resources/3rdparty/sylvan/src/sylvan_ldd_int.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,24 +15,7 @@ * limitations under the License. */ -/*#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -*/ +/* Do not include this file directly. Instead, include sylvan_int.h */ /** * Internals for LDDs @@ -51,7 +34,11 @@ typedef struct __attribute__((packed)) mddnode { uint64_t a, b; } * mddnode_t; // 16 bytes -#define LDD_GETNODE(mdd) ((mddnode_t)llmsset_index_to_ptr(nodes, mdd)) +static inline mddnode_t +LDD_GETNODE(MDD mdd) +{ + return ((mddnode_t)llmsset_index_to_ptr(nodes, mdd)); +} static inline uint32_t __attribute__((unused)) mddnode_getvalue(mddnode_t n) diff --git a/resources/3rdparty/sylvan/src/sylvan_mt.c b/resources/3rdparty/sylvan/src/sylvan_mt.c index 05f1443a2..543a81e98 100755 --- a/resources/3rdparty/sylvan/src/sylvan_mt.c +++ b/resources/3rdparty/sylvan/src/sylvan_mt.c @@ -15,16 +15,11 @@ * limitations under the License. */ -#include +#include // for llmsset*, nodes, sylvan_register_quit -#include #include -#include #include -#include -#include // for llmsset*, nodes, sylvan_register_quit - /** * Handling of custom leaves "registry" */ diff --git a/resources/3rdparty/sylvan/src/sylvan_mt.h b/resources/3rdparty/sylvan/src/sylvan_mt.h index 516b450af..280bc620b 100755 --- a/resources/3rdparty/sylvan/src/sylvan_mt.h +++ b/resources/3rdparty/sylvan/src/sylvan_mt.h @@ -19,13 +19,11 @@ * This file contains declarations for custom Multi-Terminal support. */ +/* Do not include this file directly. Instead, include sylvan.h */ + #ifndef SYLVAN_MT_H #define SYLVAN_MT_H -#include -#include -#include - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd.c b/resources/3rdparty/sylvan/src/sylvan_mtbdd.c index a1a39fd28..1eef5fa19 100755 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd.c +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,26 +15,16 @@ * limitations under the License. */ -#include +#include -#include #include #include -#include -#include -#include -#include #include -#include -#include - #include #include #include -#define BDD MTBDD - /* Primitives */ int mtbdd_isleaf(MTBDD bdd) @@ -194,33 +184,77 @@ VOID_TASK_0(mtbdd_gc_mark_protected) } /* Infrastructure for internal markings */ +typedef struct mtbdd_refs_task +{ + Task *t; + void *f; +} *mtbdd_refs_task_t; + +typedef struct mtbdd_refs_internal +{ + const MTBDD **pbegin, **pend, **pcur; + MTBDD *rbegin, *rend, *rcur; + mtbdd_refs_task_t sbegin, send, scur; +} *mtbdd_refs_internal_t; + DECLARE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); -VOID_TASK_0(mtbdd_refs_mark_task) +VOID_TASK_2(mtbdd_refs_mark_p_par, const MTBDD**, begin, size_t, count) { - LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); - size_t i, j=0; - for (i=0; ir_count; i++) { - if (j >= 40) { - while (j--) SYNC(mtbdd_gc_mark_rec); - j=0; + if (count < 32) { + while (count) { + mtbdd_gc_mark_rec(**(begin++)); + count--; } - SPAWN(mtbdd_gc_mark_rec, mtbdd_refs_key->results[i]); - j++; - } - for (i=0; is_count; i++) { - Task *t = mtbdd_refs_key->spawns[i]; - if (!TASK_IS_STOLEN(t)) break; - if (TASK_IS_COMPLETED(t)) { - if (j >= 40) { - while (j--) SYNC(mtbdd_gc_mark_rec); - j=0; + } else { + SPAWN(mtbdd_refs_mark_p_par, begin, count / 2); + CALL(mtbdd_refs_mark_p_par, begin + (count / 2), count - count / 2); + SYNC(mtbdd_refs_mark_p_par); + } +} + +VOID_TASK_2(mtbdd_refs_mark_r_par, MTBDD*, begin, size_t, count) +{ + if (count < 32) { + while (count) { + mtbdd_gc_mark_rec(*begin++); + count--; + } + } else { + SPAWN(mtbdd_refs_mark_r_par, begin, count / 2); + CALL(mtbdd_refs_mark_r_par, begin + (count / 2), count - count / 2); + SYNC(mtbdd_refs_mark_r_par); + } +} + +VOID_TASK_2(mtbdd_refs_mark_s_par, mtbdd_refs_task_t, begin, size_t, count) +{ + if (count < 32) { + while (count > 0) { + Task *t = begin->t; + if (!TASK_IS_STOLEN(t)) return; + if (t->f == begin->f && TASK_IS_COMPLETED(t)) { + mtbdd_gc_mark_rec(*(MTBDD*)TASK_RESULT(t)); } - SPAWN(mtbdd_gc_mark_rec, *(BDD*)TASK_RESULT(t)); - j++; + begin += 1; + count -= 1; } + } else { + if (!TASK_IS_STOLEN(begin->t)) return; + SPAWN(mtbdd_refs_mark_s_par, begin, count / 2); + CALL(mtbdd_refs_mark_s_par, begin + (count / 2), count - count / 2); + SYNC(mtbdd_refs_mark_s_par); } - while (j--) SYNC(mtbdd_gc_mark_rec); +} + +VOID_TASK_0(mtbdd_refs_mark_task) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + SPAWN(mtbdd_refs_mark_p_par, mtbdd_refs_key->pbegin, mtbdd_refs_key->pcur-mtbdd_refs_key->pbegin); + SPAWN(mtbdd_refs_mark_r_par, mtbdd_refs_key->rbegin, mtbdd_refs_key->rcur-mtbdd_refs_key->rbegin); + CALL(mtbdd_refs_mark_s_par, mtbdd_refs_key->sbegin, mtbdd_refs_key->scur-mtbdd_refs_key->sbegin); + SYNC(mtbdd_refs_mark_r_par); + SYNC(mtbdd_refs_mark_p_par); } VOID_TASK_0(mtbdd_refs_mark) @@ -231,12 +265,12 @@ VOID_TASK_0(mtbdd_refs_mark) VOID_TASK_0(mtbdd_refs_init_task) { mtbdd_refs_internal_t s = (mtbdd_refs_internal_t)malloc(sizeof(struct mtbdd_refs_internal)); - s->r_size = 128; - s->r_count = 0; - s->s_size = 128; - s->s_count = 0; - s->results = (BDD*)malloc(sizeof(BDD) * 128); - s->spawns = (Task**)malloc(sizeof(Task*) * 128); + s->pcur = s->pbegin = (const MTBDD**)malloc(sizeof(MTBDD*) * 1024); + s->pend = s->pbegin + 1024; + s->rcur = s->rbegin = (MTBDD*)malloc(sizeof(MTBDD) * 1024); + s->rend = s->rbegin + 1024; + s->scur = s->sbegin = (mtbdd_refs_task_t)malloc(sizeof(struct mtbdd_refs_task) * 1024); + s->send = s->sbegin + 1024; SET_THREAD_LOCAL(mtbdd_refs_key, s); } @@ -247,6 +281,84 @@ VOID_TASK_0(mtbdd_refs_init) sylvan_gc_add_mark(TASK(mtbdd_refs_mark)); } +void +mtbdd_refs_ptrs_up(mtbdd_refs_internal_t mtbdd_refs_key) +{ + size_t cur = mtbdd_refs_key->pcur - mtbdd_refs_key->pbegin; + size_t size = mtbdd_refs_key->pend - mtbdd_refs_key->pbegin; + mtbdd_refs_key->pbegin = (const MTBDD**)realloc(mtbdd_refs_key->pbegin, sizeof(MTBDD*) * size * 2); + mtbdd_refs_key->pcur = mtbdd_refs_key->pbegin + cur; + mtbdd_refs_key->pend = mtbdd_refs_key->pbegin + (size * 2); +} + +MTBDD __attribute__((noinline)) +mtbdd_refs_refs_up(mtbdd_refs_internal_t mtbdd_refs_key, MTBDD res) +{ + long size = mtbdd_refs_key->rend - mtbdd_refs_key->rbegin; + mtbdd_refs_key->rbegin = (MTBDD*)realloc(mtbdd_refs_key->rbegin, sizeof(MTBDD) * size * 2); + mtbdd_refs_key->rcur = mtbdd_refs_key->rbegin + size; + mtbdd_refs_key->rend = mtbdd_refs_key->rbegin + (size * 2); + return res; +} + +void __attribute__((noinline)) +mtbdd_refs_tasks_up(mtbdd_refs_internal_t mtbdd_refs_key) +{ + long size = mtbdd_refs_key->send - mtbdd_refs_key->sbegin; + mtbdd_refs_key->sbegin = (mtbdd_refs_task_t)realloc(mtbdd_refs_key->sbegin, sizeof(struct mtbdd_refs_task) * size * 2); + mtbdd_refs_key->scur = mtbdd_refs_key->sbegin + size; + mtbdd_refs_key->send = mtbdd_refs_key->sbegin + (size * 2); +} + +void __attribute__((unused)) +mtbdd_refs_pushptr(const MTBDD *ptr) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + *mtbdd_refs_key->pcur++ = ptr; + if (mtbdd_refs_key->pcur == mtbdd_refs_key->pend) mtbdd_refs_ptrs_up(mtbdd_refs_key); +} + +void __attribute__((unused)) +mtbdd_refs_popptr(size_t amount) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + mtbdd_refs_key->pcur -= amount; +} + +MTBDD __attribute__((unused)) +mtbdd_refs_push(MTBDD mtbdd) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + *(mtbdd_refs_key->rcur++) = mtbdd; + if (mtbdd_refs_key->rcur == mtbdd_refs_key->rend) return mtbdd_refs_refs_up(mtbdd_refs_key, mtbdd); + else return mtbdd; +} + +void __attribute__((unused)) +mtbdd_refs_pop(long amount) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + mtbdd_refs_key->rcur -= amount; +} + +void +mtbdd_refs_spawn(Task *t) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + mtbdd_refs_key->scur->t = t; + mtbdd_refs_key->scur->f = t->f; + mtbdd_refs_key->scur += 1; + if (mtbdd_refs_key->scur == mtbdd_refs_key->send) mtbdd_refs_tasks_up(mtbdd_refs_key); +} + +MTBDD +mtbdd_refs_sync(MTBDD result) +{ + LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); + mtbdd_refs_key->scur -= 1; + return result; +} + /** * Initialize and quit functions */ @@ -394,6 +506,12 @@ mtbdd_makemapnode(uint32_t var, MTBDD low, MTBDD high) return index; } +MTBDD +mtbdd_ithvar(uint32_t var) +{ + return mtbdd_makenode(var, mtbdd_false, mtbdd_true); +} + /* Operations */ /** @@ -449,31 +567,6 @@ mtbdd_fraction(int64_t nom, uint64_t denom) return mtbdd_makeleaf(2, (nom<<32)|denom); } -/** - * Create the cube of variables in arr. - */ -MTBDD -mtbdd_fromarray(uint32_t* arr, size_t length) -{ - if (length == 0) return mtbdd_true; - else if (length == 1) return mtbdd_makenode(*arr, mtbdd_false, mtbdd_true); - else return mtbdd_makenode(*arr, mtbdd_false, mtbdd_fromarray(arr+1, length-1)); -} - -/** - * Given a cube of variables, write each variable to arr. - * WARNING: arr must be sufficiently long! - */ -void -mtbdd_toarray(MTBDD set, uint32_t *arr) -{ - while (set != mtbdd_true) { - mtbddnode_t n = MTBDD_GETNODE(set); - *arr++ = mtbddnode_getvariable(n); - set = node_gethigh(set, n); - } -} - /** * Create a MTBDD cube representing the conjunction of variables in their positive or negative * form depending on whether the cube[idx] equals 0 (negative), 1 (positive) or 2 (any). @@ -538,10 +631,10 @@ TASK_IMPL_4(MTBDD, mtbdd_union_cube, MTBDD, mtbdd, MTBDD, vars, uint8_t*, cube, if (va < v) { MTBDD low = node_getlow(mtbdd, na); MTBDD high = node_gethigh(mtbdd, na); - SPAWN(mtbdd_union_cube, high, vars, cube, terminal); + mtbdd_refs_spawn(SPAWN(mtbdd_union_cube, high, vars, cube, terminal)); BDD new_low = mtbdd_union_cube(low, vars, cube, terminal); mtbdd_refs_push(new_low); - BDD new_high = SYNC(mtbdd_union_cube); + BDD new_high = mtbdd_refs_sync(SYNC(mtbdd_union_cube)); mtbdd_refs_pop(1); if (new_low != low || new_high != high) return mtbdd_makenode(va, new_low, new_high); else return mtbdd; @@ -563,10 +656,10 @@ TASK_IMPL_4(MTBDD, mtbdd_union_cube, MTBDD, mtbdd, MTBDD, vars, uint8_t*, cube, } case 2: { - SPAWN(mtbdd_union_cube, high, node_gethigh(vars, nv), cube+1, terminal); + mtbdd_refs_spawn(SPAWN(mtbdd_union_cube, high, node_gethigh(vars, nv), cube+1, terminal)); MTBDD new_low = mtbdd_union_cube(low, node_gethigh(vars, nv), cube+1, terminal); mtbdd_refs_push(new_low); - MTBDD new_high = SYNC(mtbdd_union_cube); + MTBDD new_high = mtbdd_refs_sync(SYNC(mtbdd_union_cube)); mtbdd_refs_pop(1); if (new_low != low || new_high != high) return mtbdd_makenode(v, new_low, new_high); return mtbdd; @@ -592,10 +685,10 @@ TASK_IMPL_4(MTBDD, mtbdd_union_cube, MTBDD, mtbdd, MTBDD, vars, uint8_t*, cube, } case 2: { - SPAWN(mtbdd_union_cube, mtbdd, node_gethigh(vars, nv), cube+1, terminal); + mtbdd_refs_spawn(SPAWN(mtbdd_union_cube, mtbdd, node_gethigh(vars, nv), cube+1, terminal)); MTBDD new_low = mtbdd_union_cube(mtbdd, node_gethigh(vars, nv), cube+1, terminal); mtbdd_refs_push(new_low); - MTBDD new_high = SYNC(mtbdd_union_cube); + MTBDD new_high = mtbdd_refs_sync(SYNC(mtbdd_union_cube)); mtbdd_refs_pop(1); return mtbdd_makenode(v, new_low, new_high); } @@ -1272,6 +1365,36 @@ TASK_IMPL_2(MTBDD, mtbdd_op_max, MTBDD*, pa, MTBDD*, pb) return mtbdd_invalid; } +TASK_IMPL_2(MTBDD, mtbdd_op_cmpl, MTBDD, a, size_t, k) +{ + // if a is false, then it is a partial function. Keep partial! + if (a == mtbdd_false) return mtbdd_false; + + // a != constant + mtbddnode_t na = MTBDD_GETNODE(a); + + if (mtbddnode_isleaf(na)) { + if (mtbddnode_gettype(na) == 0) { + int64_t v = mtbdd_getint64(a); + if (v == 0) return mtbdd_int64(1); + else return mtbdd_int64(0); + } else if (mtbddnode_gettype(na) == 1) { + double d = mtbdd_getdouble(a); + if (d == 0.0) return mtbdd_double(1.0); + else return mtbdd_double(0.0); + } else if (mtbddnode_gettype(na) == 2) { + uint64_t v = mtbddnode_getvalue(na); + if (v == 1) return mtbdd_fraction(1, 1); + else return mtbdd_fraction(0, 1); + } else { + assert(0); // failure + } + } + + return mtbdd_invalid; + (void)k; // unused variable +} + TASK_IMPL_2(MTBDD, mtbdd_op_negate, MTBDD, a, size_t, k) { // if a is false, then it is a partial function. Keep partial! @@ -2347,7 +2470,17 @@ TASK_IMPL_2(double, mtbdd_satcount, MTBDD, dd, size_t, nvars) { /* Trivial cases */ if (dd == mtbdd_false) return 0.0; - if (mtbdd_isleaf(dd)) return powl(2.0L, nvars); + + if (mtbdd_isleaf(dd)) { + // test if 0 + mtbddnode_t dd_node = MTBDD_GETNODE(dd); + if (dd != mtbdd_true) { + if (mtbddnode_gettype(dd_node) == 0 && mtbdd_getint64(dd) == 0) return 0.0; + else if (mtbddnode_gettype(dd_node) == 1 && mtbdd_getdouble(dd) == 0.0) return 0.0; + else if (mtbddnode_gettype(dd_node) == 2 && mtbdd_getvalue(dd) == 1) return 0.0; + } + return powl(2.0L, nvars); + } /* Perhaps execute garbage collection */ sylvan_gc_test(); @@ -2726,8 +2859,6 @@ mtbdd_leafcount_more(const MTBDD *mtbdds, size_t count) static size_t mtbdd_nodecount_mark(MTBDD mtbdd) { - if (mtbdd == mtbdd_true) return 0; // do not count true/false leaf - if (mtbdd == mtbdd_false) return 0; // do not count true/false leaf mtbddnode_t n = MTBDD_GETNODE(mtbdd); if (mtbddnode_getmark(n)) return 0; mtbddnode_setmark(n, 1); @@ -3258,11 +3389,107 @@ TASK_IMPL_3(int, mtbdd_reader_frombinary, FILE*, in, MTBDD*, dds, int, count) } /** - * Implementation of convenience functions for handling variable sets, i.e., cubes. + * Implementation of variable sets, i.e., cubes of (positive) variables. */ +/** + * Create a set of variables, represented as the conjunction of (positive) variables. + */ +MTBDD +mtbdd_set_from_array(uint32_t* arr, size_t length) +{ + if (length == 0) return mtbdd_true; + else if (length == 1) return mtbdd_makenode(*arr, mtbdd_false, mtbdd_true); + else return mtbdd_set_add(mtbdd_fromarray(arr+1, length-1), *arr); +} + +/** + * Write all variables in a variable set to the given array. + * The array must be sufficiently large. + */ +void +mtbdd_set_to_array(MTBDD set, uint32_t *arr) +{ + while (set != mtbdd_true) { + mtbddnode_t n = MTBDD_GETNODE(set); + *arr++ = mtbddnode_getvariable(n); + set = node_gethigh(set, n); + } +} + +/** + * Add the variable to . + */ +MTBDD +mtbdd_set_add(MTBDD set, uint32_t var) +{ + if (set == mtbdd_true) return mtbdd_makenode(var, mtbdd_false, mtbdd_true); + + mtbddnode_t set_node = MTBDD_GETNODE(set); + uint32_t set_var = mtbddnode_getvariable(set_node); + if (var < set_var) return mtbdd_makenode(var, mtbdd_false, set); + else if (set_var == var) return set; + else { + MTBDD sub = mtbddnode_followhigh(set, set_node); + MTBDD res = mtbdd_set_add(sub, var); + res = sub == res ? set : mtbdd_makenode(set_var, mtbdd_false, res); + return res; + } +} + +/** + * Remove the variable from . + */ +MTBDD +mtbdd_set_remove(MTBDD set, uint32_t var) +{ + if (set == mtbdd_true) return mtbdd_true; + + mtbddnode_t set_node = MTBDD_GETNODE(set); + uint32_t set_var = mtbddnode_getvariable(set_node); + if (var < set_var) return set; + else if (set_var == var) return mtbddnode_followhigh(set, set_node); + else { + MTBDD sub = mtbddnode_followhigh(set, set_node); + MTBDD res = mtbdd_set_remove(sub, var); + res = sub == res ? set : mtbdd_makenode(set_var, mtbdd_false, res); + return res; + } +} + +/** + * Remove variables in from . + */ +TASK_IMPL_2(MTBDD, mtbdd_set_minus, MTBDD, set1, MTBDD, set2) +{ + if (set1 == mtbdd_true) return mtbdd_true; + if (set2 == mtbdd_true) return set1; + if (set1 == set2) return mtbdd_true; + + mtbddnode_t set1_node = MTBDD_GETNODE(set1); + mtbddnode_t set2_node = MTBDD_GETNODE(set2); + uint32_t set1_var = mtbddnode_getvariable(set1_node); + uint32_t set2_var = mtbddnode_getvariable(set2_node); + + if (set1_var == set2_var) { + return mtbdd_set_minus(mtbddnode_followhigh(set1, set1_node), mtbddnode_followhigh(set2, set2_node)); + } + + if (set1_var > set2_var) { + return mtbdd_set_minus(set1, mtbddnode_followhigh(set2, set2_node)); + } + + /* set1_var < set2_var */ + MTBDD sub = mtbddnode_followhigh(set1, set1_node); + MTBDD res = mtbdd_set_minus(sub, set2); + return res == sub ? set1 : mtbdd_makenode(set1_var, mtbdd_false, res); +} + +/** + * Return 1 if contains , 0 otherwise. + */ int -mtbdd_set_in(MTBDD set, uint32_t var) +mtbdd_set_contains(MTBDD set, uint32_t var) { while (set != mtbdd_true) { mtbddnode_t n = MTBDD_GETNODE(set); @@ -3274,6 +3501,9 @@ mtbdd_set_in(MTBDD set, uint32_t var) return 0; } +/** + * Compute the number of variables in a given set of variables. + */ size_t mtbdd_set_count(MTBDD set) { @@ -3285,6 +3515,10 @@ mtbdd_set_count(MTBDD set) return result; } +/** + * Sanity check if the given MTBDD is a conjunction of positive variables, + * and if all nodes are marked in the nodes table (detects violations after garbage collection). + */ void mtbdd_test_isset(MTBDD set) { @@ -3336,7 +3570,9 @@ mtbdd_map_count(MTBDDMAP map) MTBDDMAP mtbdd_map_add(MTBDDMAP map, uint32_t key, MTBDD value) { - if (mtbdd_map_isempty(map)) return mtbdd_makemapnode(key, mtbdd_map_empty(), value); + if (mtbdd_map_isempty(map)) { + return mtbdd_makemapnode(key, mtbdd_map_empty(), value); + } mtbddnode_t n = MTBDD_GETNODE(map); uint32_t k = mtbddnode_getvariable(n); @@ -3357,7 +3593,7 @@ mtbdd_map_add(MTBDDMAP map, uint32_t key, MTBDD value) * Add all values from map2 to map1, overwrites if key already in map1. */ MTBDDMAP -mtbdd_map_addall(MTBDDMAP map1, MTBDDMAP map2) +mtbdd_map_update(MTBDDMAP map1, MTBDDMAP map2) { if (mtbdd_map_isempty(map1)) return map2; if (mtbdd_map_isempty(map2)) return map1; @@ -3369,13 +3605,13 @@ mtbdd_map_addall(MTBDDMAP map1, MTBDDMAP map2) MTBDDMAP result; if (k1 < k2) { - MTBDDMAP low = mtbdd_map_addall(node_getlow(map1, n1), map2); + MTBDDMAP low = mtbdd_map_update(node_getlow(map1, n1), map2); result = mtbdd_makemapnode(k1, low, node_gethigh(map1, n1)); } else if (k1 > k2) { - MTBDDMAP low = mtbdd_map_addall(map1, node_getlow(map2, n2)); + MTBDDMAP low = mtbdd_map_update(map1, node_getlow(map2, n2)); result = mtbdd_makemapnode(k2, low, node_gethigh(map2, n2)); } else { - MTBDDMAP low = mtbdd_map_addall(node_getlow(map1, n1), node_getlow(map2, n2)); + MTBDDMAP low = mtbdd_map_update(node_getlow(map1, n1), node_getlow(map2, n2)); result = mtbdd_makemapnode(k2, low, node_gethigh(map2, n2)); } diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd.h b/resources/3rdparty/sylvan/src/sylvan_mtbdd.h index 6614fb870..41cb2528e 100755 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd.h +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,8 +39,6 @@ #ifndef SYLVAN_MTBDD_H #define SYLVAN_MTBDD_H -#include - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -48,29 +46,38 @@ extern "C" { /** * An MTBDD is a 64-bit value. The low 40 bits are an index into the unique table. * The highest 1 bit is the complement edge, indicating negation. - * For Boolean MTBDDs, this means "not X", for Integer and Real MTBDDs, this means "-X". + * + * Currently, negation using complement edges is only implemented for Boolean MTBDDs. + * For Integer/Real MTBDDs, negation is not well-defined, as "-0" = "0". + * + * A MTBDD node has 24 bits for the variable. + * A set of MTBDD variables is represented by the MTBDD of the conjunction of these variables. + * A MTBDDMAP uses special "MAP" nodes in the MTBDD nodes table. */ typedef uint64_t MTBDD; -typedef uint64_t BDD; typedef MTBDD MTBDDMAP; /** - * mtbdd_true is only used in Boolean MTBDDs. mtbdd_false has multiple roles (see above). + * mtbdd_true and mtbdd_false are the Boolean leaves representing True and False. + * False is also used in Integer/Real/Fraction MTBDDs for partially defined functions. */ -#define mtbdd_complement ((MTBDD)0x8000000000000000LL) -#define mtbdd_false ((MTBDD)0) -#define mtbdd_true (mtbdd_false|mtbdd_complement) -#define mtbdd_invalid ((MTBDD)0xffffffffffffffffLL) +static const MTBDD mtbdd_complement = 0x8000000000000000LL; +static const MTBDD mtbdd_false = 0; +static const MTBDD mtbdd_true = 0x8000000000000000LL; +static const MTBDD mtbdd_invalid = 0xffffffffffffffffLL; -/* Compatibility */ -// #define BDD MTBDD -#define BDDMAP MTBDDMAP -#define BDDSET MTBDD -#define BDDVAR uint32_t -#define sylvan_complement mtbdd_complement -#define sylvan_false mtbdd_false -#define sylvan_true mtbdd_true -#define sylvan_invalid mtbdd_invalid +/** + * Definitions for backward compatibility... + * We now consider BDDs to be a special case of MTBDDs. + */ +typedef MTBDD BDD; +typedef MTBDDMAP BDDMAP; +typedef MTBDD BDDSET; +typedef uint32_t BDDVAR; +static const MTBDD sylvan_complement = 0x8000000000000000LL; +static const MTBDD sylvan_false = 0; +static const MTBDD sylvan_true = 0x8000000000000000LL; +static const MTBDD sylvan_invalid = 0xffffffffffffffffLL; #define sylvan_init_bdd sylvan_init_mtbdd #define sylvan_ref mtbdd_ref #define sylvan_deref mtbdd_deref @@ -79,7 +86,9 @@ typedef MTBDD MTBDDMAP; #define sylvan_unprotect mtbdd_unprotect #define sylvan_count_protected mtbdd_count_protected #define sylvan_gc_mark_rec mtbdd_gc_mark_rec -#define sylvan_notify_ondead mtbdd_notify_ondead +#define sylvan_ithvar mtbdd_ithvar +#define bdd_refs_pushptr mtbdd_refs_pushptr +#define bdd_refs_popptr mtbdd_refs_popptr #define bdd_refs_push mtbdd_refs_push #define bdd_refs_pop mtbdd_refs_pop #define bdd_refs_spawn mtbdd_refs_spawn @@ -147,59 +156,199 @@ static inline MTBDD mtbdd_makenode(uint32_t var, MTBDD low, MTBDD high) } /** - * Returns 1 is the MTBDD is a terminal, or 0 otherwise. + * Return 1 if the MTBDD is a terminal, or 0 otherwise. */ int mtbdd_isleaf(MTBDD mtbdd); -#define mtbdd_isnode(mtbdd) (mtbdd_isleaf(mtbdd) ? 0 : 1) /** - * For MTBDD terminals, returns and + * Return 1 if the MTBDD is an internal node, or 0 otherwise. + */ +static inline int mtbdd_isnode(MTBDD mtbdd) { return mtbdd_isleaf(mtbdd) ? 0 : 1; } + +/** + * Return the field of the given leaf. + */ +uint32_t mtbdd_gettype(MTBDD leaf); + +/** + * Return the field of the given leaf. */ -uint32_t mtbdd_gettype(MTBDD terminal); -uint64_t mtbdd_getvalue(MTBDD terminal); +uint64_t mtbdd_getvalue(MTBDD leaf); /** - * For internal MTBDD nodes, returns , and + * Return the variable field of the given internal node. */ uint32_t mtbdd_getvar(MTBDD node); + +/** + * Follow the low/false edge of the given internal node. + * Also takes complement edges into account. + */ MTBDD mtbdd_getlow(MTBDD node); + +/** + * Follow the high/true edge of the given internal node. + * Also takes complement edges into account. + */ MTBDD mtbdd_gethigh(MTBDD node); /** - * Compute the complement of the MTBDD. - * For Boolean MTBDDs, this means "not X". + * Obtain the complement of the MTBDD. + * This is only valid for Boolean MTBDDs or custom implementations that support it. */ -#define mtbdd_hascomp(dd) ((dd & mtbdd_complement) ? 1 : 0) -#define mtbdd_comp(dd) (dd ^ mtbdd_complement) -#define mtbdd_not(dd) (dd ^ mtbdd_complement) + +static inline int +mtbdd_hascomp(MTBDD dd) +{ + return (dd & mtbdd_complement) ? 1 : 0; +} + +static inline MTBDD +mtbdd_comp(MTBDD dd) +{ + return dd ^ mtbdd_complement; +} + +static inline MTBDD +mtbdd_not(MTBDD dd) +{ + return dd ^ mtbdd_complement; +} /** - * Create terminals representing int64_t (type 0), double (type 1), or fraction (type 2) values + * Create an Integer leaf with the given value. */ MTBDD mtbdd_int64(int64_t value); + +/** + * Create a Real leaf with the given value. + */ MTBDD mtbdd_double(double value); + +/** + * Create a Fraction leaf with the given numerator and denominator. + */ MTBDD mtbdd_fraction(int64_t numer, uint64_t denom); /** - * Get the value of a terminal (for Integer, Real and Fraction terminals, types 0, 1 and 2) + * Obtain the value of an Integer leaf. */ int64_t mtbdd_getint64(MTBDD terminal); + +/** + * Obtain the value of a Real leaf. + */ double mtbdd_getdouble(MTBDD terminal); -#define mtbdd_getnumer(terminal) ((int32_t)(mtbdd_getvalue(terminal)>>32)) -#define mtbdd_getdenom(terminal) ((uint32_t)(mtbdd_getvalue(terminal)&0xffffffff)) /** - * Create the conjunction of variables in arr, - * i.e. arr[0] \and arr[1] \and ... \and arr[length-1] - * The variable in arr must be ordered. + * Obtain the numerator of a Fraction leaf. + */ +static inline int32_t +mtbdd_getnumer(MTBDD terminal) +{ + return (int32_t)(mtbdd_getvalue(terminal)>>32); +} + +/** + * Obtain the denominator of a Fraction leaf. + */ +static inline uint32_t +mtbdd_getdenom(MTBDD terminal) +{ + return (uint32_t)(mtbdd_getvalue(terminal)&0xffffffff); +} + +/** + * Create the Boolean MTBDD representing "if then True else False" + */ +MTBDD mtbdd_ithvar(uint32_t var); + +/** + * Functions to manipulate sets of MTBDD variables. + * + * A set of variables is represented by a cube/conjunction of (positive) variables. + */ +static inline MTBDD +mtbdd_set_empty() +{ + return mtbdd_true; +} + +static inline int +mtbdd_set_isempty(MTBDD set) +{ + return (set == mtbdd_true) ? 1 : 0; +} + +static inline uint32_t +mtbdd_set_first(MTBDD set) +{ + return mtbdd_getvar(set); +} + +static inline MTBDD +mtbdd_set_next(MTBDD set) +{ + return mtbdd_gethigh(set); +} + +/** + * Create a set of variables, represented as the conjunction of (positive) variables. + */ +MTBDD mtbdd_set_from_array(uint32_t* arr, size_t length); + +/** + * Write all variables in a variable set to the given array. + * The array must be sufficiently large. + */ +void mtbdd_set_to_array(MTBDD set, uint32_t *arr); + +/** + * Compute the number of variables in a given set of variables. + */ +size_t mtbdd_set_count(MTBDD set); + +/** + * Compute the union of and + */ +#define mtbdd_set_union(set1, set2) sylvan_and(set1, set2) + +/** + * Remove variables in from */ -MTBDD mtbdd_fromarray(uint32_t* arr, size_t length); +#define mtbdd_set_minus(set1, set2) CALL(mtbdd_set_minus, set1, set2) +TASK_DECL_2(MTBDD, mtbdd_set_minus, MTBDD, MTBDD); /** - * Given a cube of variables, write each variable to arr. - * WARNING: arr must be sufficiently long! + * Return 1 if contains , 0 otherwise. */ -void mtbdd_toarray(MTBDD set, uint32_t *arr); +int mtbdd_set_contains(MTBDD set, uint32_t var); + +/** + * Add the variable to . + */ +MTBDD mtbdd_set_add(MTBDD set, uint32_t var); + +/** + * Remove the variable from . + */ +MTBDD mtbdd_set_remove(MTBDD set, uint32_t var); + +/** + * Sanity check if the given MTBDD is a conjunction of positive variables, + * and if all nodes are marked in the nodes table (detects violations after garbage collection). + */ +void mtbdd_test_isset(MTBDD set); + +/** + * Definitions for backwards compatibility + */ +#define mtbdd_fromarray mtbdd_set_from_array +#define mtbdd_set_fromarray mtbdd_set_from_array +#define mtbdd_set_toarray mtbdd_set_to_array +#define mtbdd_set_addall mtbdd_set_union +#define mtbdd_set_removeall mtbdd_set_minus +#define mtbdd_set_in mtbdd_set_contains /** * Create a MTBDD cube representing the conjunction of variables in their positive or negative @@ -292,6 +441,12 @@ TASK_DECL_3(MTBDD, mtbdd_abstract, MTBDD, MTBDD, mtbdd_abstract_op); */ TASK_DECL_2(MTBDD, mtbdd_op_negate, MTBDD, size_t); +/** + * Unary opeation Complement. + * Supported domains: Integer, Real, Fraction + */ +TASK_DECL_2(MTBDD, mtbdd_op_cmpl, MTBDD, size_t); + /** * Binary operation Plus (for MTBDDs of same type) * Only for MTBDDs where either all leaves are Boolean, or Integer, or Double. @@ -336,9 +491,17 @@ TASK_DECL_3(MTBDD, mtbdd_abstract_op_max, MTBDD, MTBDD, int); /** * Compute -a + * (negation, where 0 stays 0, and x into -x) */ #define mtbdd_negate(a) mtbdd_uapply(a, TASK(mtbdd_op_negate), 0) +/** + * Compute ~a for partial MTBDDs. + * Does not negate Boolean True/False. + * (complement, where 0 is turned into 1, and non-0 into 0) + */ +#define mtbdd_cmpl(a) mtbdd_uapply(a, TASK(mtbdd_op_cmpl), 0) + /** * Compute a + b */ @@ -776,34 +939,39 @@ MTBDD mtbdd_reader_get(uint64_t* arr, uint64_t identifier); */ void mtbdd_reader_end(uint64_t *arr); -/** - * MTBDDSET - * Just some convenience functions for handling sets of variables represented as a - * cube (conjunction) of positive literals - */ -#define mtbdd_set_empty() mtbdd_true -#define mtbdd_set_isempty(set) (set == mtbdd_true) -#define mtbdd_set_add(set, var) sylvan_and(set, sylvan_ithvar(var)) -#define mtbdd_set_addall(set, set2) sylvan_and(set, set2) -#define mtbdd_set_remove(set, var) sylvan_exists(set, var) -#define mtbdd_set_removeall(set, set2) sylvan_exists(set, set2) -#define mtbdd_set_first(set) sylvan_var(set) -#define mtbdd_set_next(set) sylvan_high(set) -#define mtbdd_set_fromarray(arr, count) mtbdd_fromarray(arr, count) -#define mtbdd_set_toarray(set, arr) mtbdd_toarray(set, arr) -int mtbdd_set_in(BDDSET set, BDDVAR var); -size_t mtbdd_set_count(BDDSET set); -void mtbdd_test_isset(BDDSET set); - /** * MTBDDMAP, maps uint32_t variables to MTBDDs. * A MTBDDMAP node has variable level, low edge going to the next MTBDDMAP, high edge to the mapped MTBDD. */ -#define mtbdd_map_empty() mtbdd_false -#define mtbdd_map_isempty(map) (map == mtbdd_false ? 1 : 0) -#define mtbdd_map_key(map) mtbdd_getvar(map) -#define mtbdd_map_value(map) mtbdd_gethigh(map) -#define mtbdd_map_next(map) mtbdd_getlow(map) +static inline MTBDD +mtbdd_map_empty() +{ + return mtbdd_false; +} + +static inline int +mtbdd_map_isempty(MTBDD map) +{ + return (map == mtbdd_false) ? 1 : 0; +} + +static inline uint32_t +mtbdd_map_key(MTBDD map) +{ + return mtbdd_getvar(map); +} + +static inline MTBDD +mtbdd_map_value(MTBDD map) +{ + return mtbdd_gethigh(map); +} + +static inline MTBDD +mtbdd_map_next(MTBDD map) +{ + return mtbdd_getlow(map); +} /** * Return 1 if the map contains the key, 0 otherwise. @@ -823,7 +991,8 @@ MTBDDMAP mtbdd_map_add(MTBDDMAP map, uint32_t key, MTBDD value); /** * Add all values from map2 to map1, overwrites if key already in map1. */ -MTBDDMAP mtbdd_map_addall(MTBDDMAP map1, MTBDDMAP map2); +MTBDDMAP mtbdd_map_update(MTBDDMAP map1, MTBDDMAP map2); +#define mtbdd_map_addall mtbdd_map_update /** * Remove the key from the map and return the result @@ -850,85 +1019,87 @@ VOID_TASK_DECL_1(mtbdd_gc_mark_rec, MTBDD); #define mtbdd_gc_mark_rec(mtbdd) CALL(mtbdd_gc_mark_rec, mtbdd) /** - * Default external referencing. During garbage collection, MTBDDs marked with mtbdd_ref will - * be kept in the forest. - * It is recommended to prefer mtbdd_protect and mtbdd_unprotect. + * Infrastructure for external references using a hash table. + * Two hash tables store external references: a pointers table and a values table. + * The pointers table stores pointers to MTBDD variables, manipulated with protect and unprotect. + * The values table stores MTBDDs, manipulated with ref and deref. + * We strongly recommend using the pointers table whenever possible. */ -MTBDD mtbdd_ref(MTBDD a); -void mtbdd_deref(MTBDD a); -size_t mtbdd_count_refs(void); /** - * Default external pointer referencing. During garbage collection, the pointers are followed and the MTBDD - * that they refer to are kept in the forest. + * Store the pointer in the pointers table. */ void mtbdd_protect(MTBDD* ptr); + +/** + * Delete the pointer from the pointers table. + */ void mtbdd_unprotect(MTBDD* ptr); + +/** + * Compute the number of pointers in the pointers table. + */ size_t mtbdd_count_protected(void); /** - * If mtbdd_set_ondead is set to a callback, then this function marks MTBDDs (terminals). - * When they are dead after the mark phase in garbage collection, the callback is called for marked MTBDDs. - * The ondead callback can either perform cleanup or resurrect dead terminals. + * Store the MTBDD
    in the values table. */ -#define mtbdd_notify_ondead(dd) llmsset_notify_ondead(nodes, dd&~mtbdd_complement) +MTBDD mtbdd_ref(MTBDD dd); /** - * Infrastructure for internal references (per-thread, e.g. during MTBDD operations) - * Use mtbdd_refs_push and mtbdd_refs_pop to put MTBDDs on a thread-local reference stack. - * Use mtbdd_refs_spawn and mtbdd_refs_sync around SPAWN and SYNC operations when the result - * of the spawned Task is a MTBDD that must be kept during garbage collection. + * Delete the MTBDD
    from the values table. */ -typedef struct mtbdd_refs_internal -{ - size_t r_size, r_count; - size_t s_size, s_count; - MTBDD *results; - Task **spawns; -} *mtbdd_refs_internal_t; +void mtbdd_deref(MTBDD dd); -extern DECLARE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); +/** + * Compute the number of values in the values table. + */ +size_t mtbdd_count_refs(void); -static inline MTBDD -mtbdd_refs_push(MTBDD mtbdd) -{ - LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); - if (mtbdd_refs_key->r_count >= mtbdd_refs_key->r_size) { - mtbdd_refs_key->r_size *= 2; - mtbdd_refs_key->results = (MTBDD*)realloc(mtbdd_refs_key->results, sizeof(MTBDD) * mtbdd_refs_key->r_size); - } - mtbdd_refs_key->results[mtbdd_refs_key->r_count++] = mtbdd; - return mtbdd; -} +/** + * Infrastructure for internal references. + * Every thread has its own reference stacks. There are three stacks: pointer, values, tasks stack. + * The pointers stack stores pointers to MTBDD variables, manipulated with pushptr and popptr. + * The values stack stores MTBDDs, manipulated with push and pop. + * The tasks stack stores Lace tasks (that return MTBDDs), manipulated with spawn and sync. + * + * It is recommended to use the pointers stack for local variables and the tasks stack for tasks. + */ -static inline void -mtbdd_refs_pop(int amount) -{ - LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); - mtbdd_refs_key->r_count-=amount; -} +/** + * Push a MTBDD variable to the pointer reference stack. + * During garbage collection the variable will be inspected and the contents will be marked. + */ +void mtbdd_refs_pushptr(const MTBDD *ptr); -static inline void -mtbdd_refs_spawn(Task *t) -{ - LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); - if (mtbdd_refs_key->s_count >= mtbdd_refs_key->s_size) { - mtbdd_refs_key->s_size *= 2; - mtbdd_refs_key->spawns = (Task**)realloc(mtbdd_refs_key->spawns, sizeof(Task*) * mtbdd_refs_key->s_size); - } - mtbdd_refs_key->spawns[mtbdd_refs_key->s_count++] = t; -} +/** + * Pop the last MTBDD variables from the pointer reference stack. + */ +void mtbdd_refs_popptr(size_t amount); -static inline MTBDD -mtbdd_refs_sync(MTBDD result) -{ - LOCALIZE_THREAD_LOCAL(mtbdd_refs_key, mtbdd_refs_internal_t); - mtbdd_refs_key->s_count--; - return result; -} +/** + * Push an MTBDD to the values reference stack. + * During garbage collection the references MTBDD will be marked. + */ +MTBDD mtbdd_refs_push(MTBDD mtbdd); + +/** + * Pop the last MTBDDs from the values reference stack. + */ +void mtbdd_refs_pop(long amount); + +/** + * Push a Task that returns an MTBDD to the tasks reference stack. + * Usage: mtbdd_refs_spawn(SPAWN(function, ...)); + */ +void mtbdd_refs_spawn(Task *t); + +/** + * Pop a Task from the task reference stack. + * Usage: MTBDD result = mtbdd_refs_sync(SYNC(function)); + */ +MTBDD mtbdd_refs_sync(MTBDD mtbdd); -#include "sylvan_mtbdd_storm.h" - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd_int.h b/resources/3rdparty/sylvan/src/sylvan_mtbdd_int.h index 8c16eca43..4fefc47e4 100755 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd_int.h +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd_int.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +/* Do not include this file directly. Instead, include sylvan_int.h */ + /** * Internals for MTBDDs */ @@ -29,17 +31,48 @@ typedef struct __attribute__((packed)) mtbddnode { uint64_t a, b; } * mtbddnode_t; // 16 bytes -#define MTBDD_GETNODE(mtbdd) ((mtbddnode_t)llmsset_index_to_ptr(nodes, mtbdd&0x000000ffffffffff)) +static inline mtbddnode_t +MTBDD_GETNODE(MTBDD dd) +{ + return (mtbddnode_t)llmsset_index_to_ptr(nodes, dd&0x000000ffffffffff); +} /** * Complement handling macros */ -#define MTBDD_HASMARK(s) (s&mtbdd_complement?1:0) -#define MTBDD_TOGGLEMARK(s) (s^mtbdd_complement) -#define MTBDD_STRIPMARK(s) (s&~mtbdd_complement) -#define MTBDD_TRANSFERMARK(from, to) (to ^ (from & mtbdd_complement)) -// Equal under mark -#define MTBDD_EQUALM(a, b) ((((a)^(b))&(~mtbdd_complement))==0) + +static inline int +MTBDD_HASMARK(MTBDD dd) +{ + return (dd & mtbdd_complement) ? 1 : 0; +} + +static inline MTBDD +MTBDD_TOGGLEMARK(MTBDD dd) +{ + return dd ^ mtbdd_complement; +} + +static inline MTBDD +MTBDD_STRIPMARK(MTBDD dd) +{ + return dd & (~mtbdd_complement); +} + +static inline MTBDD +MTBDD_TRANSFERMARK(MTBDD from, MTBDD to) +{ + return (to ^ (from & mtbdd_complement)); +} + +/** + * Are two MTBDDs equal modulo mark? + */ +static inline int +MTBDD_EQUALM(MTBDD a, MTBDD b) +{ + return ((a^b)&(~mtbdd_complement)) ? 0 : 1; +} // Leaf: a = L=1, M, type; b = value // Node: a = L=0, C, M, high; b = variable, low diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c index 76792affe..873c116f4 100644 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c @@ -1,6 +1,9 @@ -#include +#include +#include +#include "sylvan_int.h" #include "storm_wrapper.h" +#include "sylvan_mtbdd_storm.h" // Import the types created for rational numbers and functions. extern uint32_t srn_type; @@ -554,11 +557,6 @@ int mtbdd_isnonzero(MTBDD dd) { return mtbdd_iszero(dd) ? 0 : 1; } -MTBDD -mtbdd_ithvar(uint32_t level) { - return mtbdd_makenode(level, mtbdd_false, mtbdd_true); -} - TASK_IMPL_2(MTBDD, mtbdd_op_complement, MTBDD, a, size_t, k) { // if a is false, then it is a partial function. Keep partial! diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.h b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.h index 33bfc9e4f..27066fe19 100644 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.h +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.h @@ -1,3 +1,7 @@ +#ifdef __cplusplus +extern "C" { +#endif + /** * Binary operation Divide (for MTBDDs of same type) * Only for MTBDDs where all leaves are Integer or Double. @@ -148,3 +152,7 @@ TASK_DECL_3(BDD, mtbdd_max_abstract_representative, MTBDD, MTBDD, uint32_t); TASK_DECL_3(MTBDD, mtbdd_uapply_nocache, MTBDD, mtbdd_uapply_op, size_t); #define mtbdd_uapply_nocache(dd, op, param) CALL(mtbdd_uapply_nocache, dd, op, param) + +#ifdef __cplusplus +} +#endif diff --git a/resources/3rdparty/sylvan/src/sylvan_obj_storm.cpp b/resources/3rdparty/sylvan/src/sylvan_obj_storm.cpp index 86d2afc85..5cbf27cc1 100644 --- a/resources/3rdparty/sylvan/src/sylvan_obj_storm.cpp +++ b/resources/3rdparty/sylvan/src/sylvan_obj_storm.cpp @@ -1,4 +1,5 @@ #include "storm_wrapper.h" +#include "sylvan_mtbdd_storm.h" #include "sylvan_storm_rational_number.h" #include "sylvan_storm_rational_function.h" diff --git a/resources/3rdparty/sylvan/src/sylvan_refs.c b/resources/3rdparty/sylvan/src/sylvan_refs.c index 54495d480..968721370 100755 --- a/resources/3rdparty/sylvan/src/sylvan_refs.c +++ b/resources/3rdparty/sylvan/src/sylvan_refs.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,13 @@ * limitations under the License. */ -#include +#include +#include -#include // for assert #include // for errno -#include // for fprintf -#include // for uint32_t etc -#include // for exit #include // for strerror #include // for mmap -#include - #ifndef compiler_barrier #define compiler_barrier() { asm volatile("" ::: "memory"); } #endif diff --git a/resources/3rdparty/sylvan/src/sylvan_refs.h b/resources/3rdparty/sylvan/src/sylvan_refs.h index fe02bb372..a0e20d90b 100755 --- a/resources/3rdparty/sylvan/src/sylvan_refs.h +++ b/resources/3rdparty/sylvan/src/sylvan_refs.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,7 @@ * limitations under the License. */ -#include -#include // for uint32_t etc +/* Do not include this file directly. Instead, include sylvan.h */ #ifndef REFS_INLINE_H #define REFS_INLINE_H diff --git a/resources/3rdparty/sylvan/src/sylvan_sl.c b/resources/3rdparty/sylvan/src/sylvan_sl.c index 39218f7b0..00045dfd9 100755 --- a/resources/3rdparty/sylvan/src/sylvan_sl.c +++ b/resources/3rdparty/sylvan/src/sylvan_sl.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,11 @@ * limitations under the License. */ -#include -#include -#include // for mmap, munmap, etc - #include #include +#include // for mmap, munmap, etc + /* A SL_DEPTH of 6 means 32 bytes per bucket, of 14 means 64 bytes per bucket. However, there is a very large performance drop with only 6 levels. */ #define SL_DEPTH 14 diff --git a/resources/3rdparty/sylvan/src/sylvan_sl.h b/resources/3rdparty/sylvan/src/sylvan_sl.h index dac0ec461..ad09c92a3 100755 --- a/resources/3rdparty/sylvan/src/sylvan_sl.h +++ b/resources/3rdparty/sylvan/src/sylvan_sl.h @@ -1,5 +1,5 @@ /* - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/resources/3rdparty/sylvan/src/sylvan_stats.c b/resources/3rdparty/sylvan/src/sylvan_stats.c index 1c9f52c9b..fb60d2be4 100755 --- a/resources/3rdparty/sylvan/src/sylvan_stats.c +++ b/resources/3rdparty/sylvan/src/sylvan_stats.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,13 @@ * limitations under the License. */ +#include + #include // for errno #include // memset -#include #include #include -#include - #if SYLVAN_STATS #ifdef __ELF__ @@ -31,9 +30,6 @@ __thread sylvan_stats_t sylvan_stats; pthread_key_t sylvan_stats_key; #endif -#include -static hwloc_topology_t topo; - /** * Instructions for sylvan_stats_report */ @@ -127,11 +123,8 @@ VOID_TASK_0(sylvan_stats_reset_perthread) fprintf(stderr, "sylvan_stats: Unable to allocate memory: %s!\n", strerror(errno)); exit(1); } - // Ensure the stats object is on our pu - hwloc_obj_t pu = hwloc_get_obj_by_type(topo, HWLOC_OBJ_PU, LACE_WORKER_PU); - hwloc_set_area_membind(topo, sylvan_stats, sizeof(sylvan_stats_t), pu->cpuset, HWLOC_MEMBIND_BIND, 0); - pthread_setspecific(sylvan_stats_key, sylvan_stats); } + pthread_setspecific(sylvan_stats_key, sylvan_stats); for (int i=0; icounters[i] = 0; } @@ -146,8 +139,6 @@ VOID_TASK_IMPL_0(sylvan_stats_init) #ifndef __ELF__ pthread_key_create(&sylvan_stats_key, NULL); #endif - hwloc_topology_init(&topo); - hwloc_topology_load(topo); TOGETHER(sylvan_stats_reset_perthread); } diff --git a/resources/3rdparty/sylvan/src/sylvan_stats.h b/resources/3rdparty/sylvan/src/sylvan_stats.h index 792e67baa..16c227a6a 100755 --- a/resources/3rdparty/sylvan/src/sylvan_stats.h +++ b/resources/3rdparty/sylvan/src/sylvan_stats.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,7 @@ * limitations under the License. */ -#include -#include +/* Do not include this file directly. Instead, include sylvan.h */ #ifndef SYLVAN_STATS_H #define SYLVAN_STATS_H @@ -93,6 +92,8 @@ typedef enum { SYLVAN_COUNTER_COUNTER } Sylvan_Counters; +#undef OPCOUNTER + typedef enum { SYLVAN_GC, @@ -134,10 +135,8 @@ void sylvan_stats_report(FILE* target); #if SYLVAN_STATS #ifdef __MACH__ -#include #define getabstime() mach_absolute_time() #else -#include static uint64_t getabstime(void) { @@ -153,7 +152,6 @@ getabstime(void) #ifdef __ELF__ extern __thread sylvan_stats_t sylvan_stats; #else -#include extern pthread_key_t sylvan_stats_key; #endif diff --git a/resources/3rdparty/sylvan/src/sylvan_table.c b/resources/3rdparty/sylvan/src/sylvan_table.c index 83d30b842..bead5e6f8 100755 --- a/resources/3rdparty/sylvan/src/sylvan_table.c +++ b/resources/3rdparty/sylvan/src/sylvan_table.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,23 +15,12 @@ * limitations under the License. */ -#include +#include #include // for errno -#include // for uint64_t etc -#include // for printf -#include #include // memset #include // for mmap -#include -#include -#include - -#include - -static hwloc_topology_t topo; - #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif @@ -120,15 +109,178 @@ is_custom_bucket(const llmsset_t dbs, uint64_t index) return (*ptr & mask) ? 1 : 0; } +/** + * This tricks the compiler into generating the bit-wise rotation instruction + */ +static uint64_t __attribute__((unused)) +rotr64 (uint64_t n, unsigned int c) +{ + return (n >> c) | (n << (64-c)); +} + +/** + * Pseudo-RNG for initializing the hashtab tables. + * Implementation of xorshift128+ by Vigna 2016, which is + * based on "Xorshift RNGs", Marsaglia 2003 + */ +static uint64_t __attribute__((unused)) +xor64(void) +{ + // For the initial state of s, we select two numbers: + // - the initializer of Marsaglia's original xorshift + // - the FNV-1a 64-bit offset basis + static uint64_t s[2] = {88172645463325252LLU, 14695981039346656037LLU}; + + uint64_t s1 = s[0]; + const uint64_t s0 = s[1]; + const uint64_t result = s0 + s1; + s[0] = s0; + s1 ^= s1 << 23; // a + s[1] = s1 ^ s0 ^ (s1 >> 18) ^ (s0 >> 5); // b, c + return result; +} + +/** + * The table for tabulation hashing + */ +static uint64_t hashtab[256*16]; + +/** + * Implementation of simple tabulation. + * Proposed by e.g. Thorup 2017 "Fast and Powerful Hashing using Tabulation" + */ +uint64_t +llmsset_tabhash(uint64_t a, uint64_t b, uint64_t seed) +{ + // we use the seed as base + uint64_t *t = hashtab; + for (int i=0; i<8; i++) { + seed ^= t[(uint8_t)a]; + t += 256; // next table + a >>= 8; + } + for (int i=0; i<8; i++) { + seed ^= t[(uint8_t)b]; + t += 256; // next table + b >>= 8; + } + return seed; +} + +/** + * Encoding of the prime 2^89-1 for CWhash + */ +static const uint64_t Prime89_0 = (((uint64_t)1)<<32)-1; +static const uint64_t Prime89_1 = (((uint64_t)1)<<32)-1; +static const uint64_t Prime89_2 = (((uint64_t)1)<<25)-1; +static const uint64_t Prime89_21 = (((uint64_t)1)<<57)-1; + +typedef uint64_t INT96[3]; + +/** + * Computes (r mod Prime89) mod 2ˆ64 + * (for CWhash, implementation by Thorup et al.) + */ +static uint64_t +Mod64Prime89(INT96 r) +{ + uint64_t r0, r1, r2; + r2 = r[2]; + r1 = r[1]; + r0 = r[0] + (r2>>25); + r2 &= Prime89_2; + return (r2 == Prime89_2 && r1 == Prime89_1 && r0 >= Prime89_0) ? (r0 - Prime89_0) : (r0 + (r1<<32)); +} + +/** + * Computes a 96-bit r such that r = ax+b (mod Prime89) + * (for CWhash, implementation by Thorup et al.) + */ +static void +MultAddPrime89(INT96 r, uint64_t x, const INT96 a, const INT96 b) +{ +#define LOW(x) ((x)&0xFFFFFFFF) +#define HIGH(x) ((x)>>32) + uint64_t x1, x0, c21, c20, c11, c10, c01, c00; + uint64_t d0, d1, d2, d3; + uint64_t s0, s1, carry; + x1 = HIGH(x); + x0 = LOW(x); + c21 = a[2]*x1; + c11 = a[1]*x1; + c01 = a[0]*x1; + c20 = a[2]*x0; + c10 = a[1]*x0; + c00 = a[0]*x0; + d0 = (c20>>25)+(c11>>25)+(c10>>57)+(c01>>57); + d1 = (c21<<7); + d2 = (c10&Prime89_21) + (c01&Prime89_21); + d3 = (c20&Prime89_2) + (c11&Prime89_2) + (c21>>57); + s0 = b[0] + LOW(c00) + LOW(d0) + LOW(d1); + r[0] = LOW(s0); + carry = HIGH(s0); + s1 = b[1] + HIGH(c00) + HIGH(d0) + HIGH(d1) + LOW(d2) + carry; + r[1] = LOW(s1); + carry = HIGH(s1); + r[2] = b[2] + HIGH(d2) + d3 + carry; +#undef LOW +#undef HIGH +} + +/** + * Compute Carter/Wegman k-independent hash + * Implementation by Thorup et al. + * - compute polynomial on prime field of 2^89-1 (10th Marsenne prime) + * - random coefficients from random.org + */ +static uint64_t +CWhash(uint64_t x) +{ + INT96 A = {0xcf90094b0ab9939e, 0x817f998697604ff3, 0x1a6e6f08b65440ea}; + INT96 B = {0xb989a05a5dcf57f1, 0x7c007611f28daee7, 0xd8bd809d68c26854}; + INT96 C = {0x1041070633a92679, 0xba9379fd71cd939d, 0x271793709e1cd781}; + INT96 D = {0x5c240a710b0c6beb, 0xc24ac3b68056ea1c, 0xd46c9c7f2adfaf71}; + INT96 E = {0xa527cea74b053a87, 0x69ba4a5e23f90577, 0x707b6e053c7741e7}; + INT96 F = {0xa6c0812cdbcdb982, 0x8cb0c8b73f701489, 0xee08c4dc1dbef243}; + INT96 G = {0xcf3ab0ec9d538853, 0x982a8457b6db03a9, 0x8659cf6b636c9d37}; + INT96 H = {0x905d5d14efefc0dd, 0x7e9870e018ead6a2, 0x47e2c9af0ea9325a}; + INT96 I = {0xc59351a9bf283b09, 0x4a39e35dbc280c7f, 0xc5f160732996be4f}; + INT96 J = {0x4d58e0b7a57ccddf, 0xc362a25c267d1db4, 0x7c79d2fcd89402b2}; + INT96 K = {0x62ac342c4393930c, 0xdb2fd2740ebef2a0, 0xc672fd5e72921377}; + INT96 L = {0xbdae267838862c6d, 0x0e0ee206fdbaf1d1, 0xc270e26fd8dfbae7}; + + INT96 r; + MultAddPrime89(r, x, A, B); + MultAddPrime89(r, x, r, C); + MultAddPrime89(r, x, r, D); + MultAddPrime89(r, x, r, E); + MultAddPrime89(r, x, r, F); + MultAddPrime89(r, x, r, G); + MultAddPrime89(r, x, r, H); + MultAddPrime89(r, x, r, I); + MultAddPrime89(r, x, r, J); + MultAddPrime89(r, x, r, K); + MultAddPrime89(r, x, r, L); + return Mod64Prime89(r); +} + +/** + * The well-known FNV-1a hash for 64 bits. + * Typical seed value (base offset) is 14695981039346656037LLU. + * + * NOTE: this particular hash is bad for certain nodes, resulting in + * early garbage collection and failure. We xor with shifted hash which + * suffices as a band-aid, but this is obviously not an ideal solution. + */ uint64_t -llmsset_hash(const uint64_t a, const uint64_t b, const uint64_t seed) +llmsset_fnvhash(const uint64_t a, const uint64_t b, const uint64_t seed) { // The FNV-1a hash for 64 bits const uint64_t prime = 1099511628211; uint64_t hash = seed; hash = (hash ^ a) * prime; hash = (hash ^ b) * prime; - return hash; + return hash ^ (hash>>32); } /* @@ -247,6 +399,7 @@ llmsset_rehash_bucket(const llmsset_t dbs, uint64_t d_idx) const int custom = is_custom_bucket(dbs, d_idx) ? 1 : 0; if (custom) hash_rehash = dbs->hash_cb(a, b, hash_rehash); else hash_rehash = llmsset_hash(a, b, hash_rehash); + const uint64_t step = (((hash_rehash >> 20) | 1) << 3); const uint64_t new_v = (hash_rehash & MASK_HASH) | d_idx; int i=0; @@ -271,8 +424,7 @@ llmsset_rehash_bucket(const llmsset_t dbs, uint64_t d_idx) } // go to next cache line in probe sequence - if (custom) hash_rehash = dbs->hash_cb(a, b, hash_rehash); - else hash_rehash = llmsset_hash(a, b, hash_rehash); + hash_rehash += step; #if LLMSSET_MASK last = idx = hash_rehash & dbs->mask; @@ -286,9 +438,6 @@ llmsset_rehash_bucket(const llmsset_t dbs, uint64_t d_idx) llmsset_t llmsset_create(size_t initial_size, size_t max_size) { - hwloc_topology_init(&topo); - hwloc_topology_load(topo); - llmsset_t dbs = NULL; if (posix_memalign((void**)&dbs, LINE_SIZE, sizeof(struct llmsset)) != 0) { fprintf(stderr, "llmsset_create: Unable to allocate memory!\n"); @@ -347,12 +496,6 @@ llmsset_create(size_t initial_size, size_t max_size) madvise(dbs->table, dbs->max_size * 8, MADV_RANDOM); #endif - hwloc_set_area_membind(topo, dbs->table, dbs->max_size * 8, hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_INTERLEAVE, 0); - hwloc_set_area_membind(topo, dbs->data, dbs->max_size * 16, hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_FIRSTTOUCH, 0); - hwloc_set_area_membind(topo, dbs->bitmap1, dbs->max_size / (512*8), hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_INTERLEAVE, 0); - hwloc_set_area_membind(topo, dbs->bitmap2, dbs->max_size / 8, hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_FIRSTTOUCH, 0); - hwloc_set_area_membind(topo, dbs->bitmapc, dbs->max_size / 8, hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_FIRSTTOUCH, 0); - // forbid first two positions (index 0 and 1) dbs->bitmap2[0] = 0xc000000000000000LL; @@ -369,6 +512,9 @@ llmsset_create(size_t initial_size, size_t max_size) INIT_THREAD_LOCAL(my_region); TOGETHER(llmsset_reset_region); + // initialize hashtab + for (int i=0; i<256*16; i++) hashtab[i] = CWhash(i); + return dbs; } @@ -392,13 +538,11 @@ VOID_TASK_IMPL_1(llmsset_clear, llmsset_t, dbs) VOID_TASK_IMPL_1(llmsset_clear_data, llmsset_t, dbs) { if (mmap(dbs->bitmap1, dbs->max_size / (512*8), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) != (void*)-1) { - hwloc_set_area_membind(topo, dbs->bitmap1, dbs->max_size / (512*8), hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_INTERLEAVE, 0); } else { memset(dbs->bitmap1, 0, dbs->max_size / (512*8)); } if (mmap(dbs->bitmap2, dbs->max_size / 8, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) != (void*)-1) { - hwloc_set_area_membind(topo, dbs->bitmap2, dbs->max_size / 8, hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_FIRSTTOUCH, 0); } else { memset(dbs->bitmap2, 0, dbs->max_size / 8); } @@ -416,7 +560,6 @@ VOID_TASK_IMPL_1(llmsset_clear_hashes, llmsset_t, dbs) #if defined(madvise) && defined(MADV_RANDOM) madvise(dbs->table, sizeof(uint64_t[dbs->max_size]), MADV_RANDOM); #endif - hwloc_set_area_membind(topo, dbs->table, sizeof(uint64_t[dbs->max_size]), hwloc_topology_get_allowed_cpuset(topo), HWLOC_MEMBIND_INTERLEAVE, 0); } else { // reallocate failed... expensive fallback memset(dbs->table, 0, dbs->max_size * 8); diff --git a/resources/3rdparty/sylvan/src/sylvan_table.h b/resources/3rdparty/sylvan/src/sylvan_table.h index 8f4c0642e..fe25d6de3 100755 --- a/resources/3rdparty/sylvan/src/sylvan_table.h +++ b/resources/3rdparty/sylvan/src/sylvan_table.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,24 +15,15 @@ * limitations under the License. */ -#include +/* Do not include this file directly. Instead, include sylvan_int.h */ -#include -#include - -#include - -#ifndef LLMSSET_H -#define LLMSSET_H +#ifndef SYLVAN_TABLE_H +#define SYLVAN_TABLE_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#ifndef LLMSSET_MASK -#define LLMSSET_MASK 0 // set to 1 to use bit mask instead of modulo -#endif - /** * Lockless hash table (set) to store 16-byte keys. * Each unique key is associated with a 42-bit number. @@ -210,9 +201,19 @@ VOID_TASK_DECL_1(llmsset_destroy_unmarked, llmsset_t); void llmsset_set_custom(const llmsset_t dbs, llmsset_hash_cb hash_cb, llmsset_equals_cb equals_cb, llmsset_create_cb create_cb, llmsset_destroy_cb destroy_cb); /** - * Default hashing function + * Default hashing functions. + */ +#define llmsset_hash llmsset_tabhash + +/** + * FNV-1a hash + */ +uint64_t llmsset_fnvhash(uint64_t a, uint64_t b, uint64_t seed); + +/** + * Twisted tabulation hash */ -uint64_t llmsset_hash(const uint64_t a, const uint64_t b, const uint64_t seed); +uint64_t llmsset_tabhash(uint64_t a, uint64_t b, uint64_t seed); #ifdef __cplusplus } diff --git a/resources/3rdparty/sylvan/src/sylvan_tls.h b/resources/3rdparty/sylvan/src/sylvan_tls.h index 80fdfe7e5..09958b2d3 100755 --- a/resources/3rdparty/sylvan/src/sylvan_tls.h +++ b/resources/3rdparty/sylvan/src/sylvan_tls.h @@ -5,7 +5,6 @@ * A platform independant wrapper around thread-local storage. On platforms that don't support * __thread variables (e.g. Mac OS X), we have to use the pthreads library for thread-local storage */ -#include #ifndef TLS_H #define TLS_H @@ -18,8 +17,6 @@ #else//!__ELF__ -#include - #define DECLARE_THREAD_LOCAL(name, type) pthread_key_t name##_KEY #define INIT_THREAD_LOCAL(name) \ diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp index 83a7f26b7..cb3bd74b2 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp @@ -213,7 +213,7 @@ namespace storm { uint_fast64_t InternalBdd::getNodeCount() const { // We have to add one to also count the false-leaf, which is the only leaf appearing in BDDs. - return static_cast(this->sylvanBdd.NodeCount()) + 1; + return static_cast(this->sylvanBdd.NodeCount()); } bool InternalBdd::isOne() const { diff --git a/src/storm/utility/sylvan.h b/src/storm/utility/sylvan.h index c068b6ab9..5f351b946 100644 --- a/src/storm/utility/sylvan.h +++ b/src/storm/utility/sylvan.h @@ -13,6 +13,7 @@ #pragma GCC system_header // Only way to suppress some warnings atm. #include "sylvan_obj.hpp" +#include "sylvan_mtbdd_storm.h" #include "sylvan_storm_rational_number.h" #include "sylvan_storm_rational_function.h" From 18ba906914b604589ff43597dd08f4d649471c77 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 4 Aug 2017 23:26:07 +0200 Subject: [PATCH 28/95] re-added gmp include directory to sylvan CMakeLists.txt --- resources/3rdparty/sylvan/src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/3rdparty/sylvan/src/CMakeLists.txt b/resources/3rdparty/sylvan/src/CMakeLists.txt index 7e36c6741..51fea96d0 100644 --- a/resources/3rdparty/sylvan/src/CMakeLists.txt +++ b/resources/3rdparty/sylvan/src/CMakeLists.txt @@ -50,6 +50,7 @@ add_library(sylvan ${SOURCES}) find_package(GMP REQUIRED) +include_directories(sylvan ${GMP_INCLUDE_DIR}) target_link_libraries(sylvan m pthread ${GMP_LIBRARIES}) if(UNIX AND NOT APPLE) From 653e5fc18405d44fc3d00d989f1c457dca98bcc5 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 5 Aug 2017 07:41:21 +0200 Subject: [PATCH 29/95] setting default native technique to jacobi again --- src/storm/settings/modules/NativeEquationSolverSettings.cpp | 2 +- src/storm/storage/SparseMatrix.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/storm/settings/modules/NativeEquationSolverSettings.cpp b/src/storm/settings/modules/NativeEquationSolverSettings.cpp index 26a15ea67..7803939bf 100644 --- a/src/storm/settings/modules/NativeEquationSolverSettings.cpp +++ b/src/storm/settings/modules/NativeEquationSolverSettings.cpp @@ -25,7 +25,7 @@ namespace storm { NativeEquationSolverSettings::NativeEquationSolverSettings() : ModuleSettings(moduleName) { std::vector methods = { "jacobi", "gaussseidel", "sor" }; - this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the native engine.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("gaussseidel").build()).build()); + this->addOption(storm::settings::OptionBuilder(moduleName, techniqueOptionName, true, "The method to be used for solving linear equation systems with the native engine.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the method to use.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(methods)).setDefaultValueString("jacobi").build()).build()); this->addOption(storm::settings::OptionBuilder(moduleName, maximalIterationsOptionName, false, "The maximal number of iterations to perform before iterative solving is aborted.").setShortName(maximalIterationsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count", "The maximal iteration count.").setDefaultValueUnsignedInteger(20000).build()).build()); diff --git a/src/storm/storage/SparseMatrix.h b/src/storm/storage/SparseMatrix.h index 6a613dd3d..bd8c1bad1 100644 --- a/src/storm/storage/SparseMatrix.h +++ b/src/storm/storage/SparseMatrix.h @@ -293,9 +293,6 @@ namespace storm { // Stores the currently active row group. This is used for correctly constructing the row grouping of the // matrix. index_type currentRowGroup; - - // A flag that stores whether the current row group does not yet contain an element. - bool currentRowGroupEmpty; }; /*! From cdf76b0c1567811a891c4f3a43182cacae99b7b0 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 6 Aug 2017 15:17:55 +0200 Subject: [PATCH 30/95] fixed DD-based quotient extraction in bisimulation --- resources/3rdparty/CMakeLists.txt | 8 ++- src/storm/cli/cli.cpp | 1 + .../storage/dd/BisimulationDecomposition.cpp | 1 + .../dd/bisimulation/MdpPartitionRefiner.cpp | 3 +- .../storage/dd/bisimulation/Partition.cpp | 1 + .../dd/bisimulation/PartitionRefiner.cpp | 2 + .../bisimulation/PreservationInformation.cpp | 8 +-- .../dd/bisimulation/QuotientExtractor.cpp | 51 ++++++++----------- .../dd/bisimulation/SignatureComputer.cpp | 2 + .../dd/sylvan/InternalSylvanDdManager.cpp | 4 +- .../expressions/LinearityCheckVisitor.cpp | 2 +- .../expressions/ToRationalNumberVisitor.cpp | 2 + 12 files changed, 46 insertions(+), 39 deletions(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index bb70f53b5..15d46c381 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -418,12 +418,18 @@ else() set(sylvan_dep lib_carl) endif() +if (STORM_DEBUG_SYLVAN) + set(SYLVAN_BUILD_TYPE "Debug") +else() + set(SYLVAN_BUILD_TYPE "Release") +endif() + ExternalProject_Add( sylvan DOWNLOAD_COMMAND "" PREFIX "sylvan" SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/sylvan - CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DGMP_LOCATION=${GMP_LIB_LOCATION} -DGMP_INCLUDE=${GMP_INCLUDE_DIR} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DSYLVAN_BUILD_DOCS=OFF -DSYLVAN_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DUSE_CARL=ON -Dcarl_INCLUDE_DIR=${carl_INCLUDE_DIR} -DSYLVAN_PORTABLE=${STORM_PORTABLE} -Dcarl_LIBRARIES=${carl_LIBRARIES} -DBUILD_SHARED_LIBS=OFF -DSYLVAN_BUILD_TESTS=OFF + CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DGMP_LOCATION=${GMP_LIB_LOCATION} -DGMP_INCLUDE=${GMP_INCLUDE_DIR} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DSYLVAN_BUILD_DOCS=OFF -DSYLVAN_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=${SYLVAN_BUILD_TYPE} -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DUSE_CARL=ON -Dcarl_INCLUDE_DIR=${carl_INCLUDE_DIR} -DSYLVAN_PORTABLE=${STORM_PORTABLE} -Dcarl_LIBRARIES=${carl_LIBRARIES} -DBUILD_SHARED_LIBS=OFF -DSYLVAN_BUILD_TESTS=OFF BINARY_DIR ${STORM_3RDPARTY_BINARY_DIR}/sylvan BUILD_IN_SOURCE 0 INSTALL_COMMAND "" diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index 5bab54a87..33826447f 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -514,6 +514,7 @@ namespace storm { result = preprocessDdModel(result.first->as>(), input); } + preprocessingWatch.stop(); if (result.second) { STORM_PRINT_AND_LOG(std::endl << "Time for model preprocessing: " << preprocessingWatch << "." << std::endl << std::endl); } diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index 77aa64f1d..e34a7ddf8 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -7,6 +7,7 @@ #include "storm/models/symbolic/Model.h" #include "storm/models/symbolic/Mdp.h" +#include "storm/models/symbolic/StandardRewardModel.h" #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 914656d89..d26cc4111 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -1,6 +1,7 @@ #include "storm/storage/dd/bisimulation/MdpPartitionRefiner.h" #include "storm/models/symbolic/Mdp.h" +#include "storm/models/symbolic/StandardRewardModel.h" namespace storm { namespace dd { @@ -9,8 +10,6 @@ namespace storm { template MdpPartitionRefiner::MdpPartitionRefiner(storm::models::symbolic::Mdp const& mdp, Partition const& initialStatePartition) : PartitionRefiner(mdp, initialStatePartition), choicePartition(Partition::createTrivialChoicePartition(mdp, initialStatePartition.getBlockVariables())), stateSignatureComputer(mdp.getQualitativeTransitionMatrix(), mdp.getColumnAndNondeterminismVariables(), SignatureMode::Qualitative, true), stateSignatureRefiner(mdp.getManager(), this->statePartition.getBlockVariable(), mdp.getRowVariables()) { // Intentionally left empty. - - mdp.getTransitionMatrix().exportToDot("fulltrans.dot"); } template diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index bde87a5b9..fb64f9381 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -9,6 +9,7 @@ #include "storm/logic/AtomicLabelFormula.h" #include "storm/models/symbolic/Mdp.h" +#include "storm/models/symbolic/StandardRewardModel.h" #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/BisimulationSettings.h" diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index 74a563363..cd064343f 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -1,5 +1,7 @@ #include "storm/storage/dd/bisimulation/PartitionRefiner.h" +#include "storm/models/symbolic/StandardRewardModel.h" + namespace storm { namespace dd { namespace bisimulation { diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp index 363e88fdd..5009fa371 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp @@ -2,6 +2,8 @@ #include "storm/logic/Formulas.h" +#include "storm/models/symbolic/StandardRewardModel.h" + #include "storm/utility/macros.h" #include "storm/exceptions/InvalidPropertyException.h" @@ -15,7 +17,7 @@ namespace storm { } template - PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const& bisimulationType) { + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& labels, storm::storage::BisimulationType const&) { for (auto const& label : labels) { this->addLabel(label); this->addExpression(model.getExpression(label)); @@ -23,14 +25,14 @@ namespace storm { } template - PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const& bisimulationType) { + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector const& expressions, storm::storage::BisimulationType const&) { for (auto const& e : expressions) { this->addExpression(e); } } template - PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) { + PreservationInformation::PreservationInformation(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const&) { if (formulas.empty()) { // Default to respect all labels if no formulas are given. for (auto const& label : model.getLabels()) { diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 3027badf0..32b9363b2 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -551,9 +551,6 @@ namespace storm { // Sanity checks. STORM_LOG_ASSERT(partition.getNumberOfStates() == model.getNumberOfStates(), "Mismatching partition size."); - partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()).exportToDot("partstates.dot"); - model.getReachableStates().exportToDot("origstates.dot"); - std::cout << "equal? " << (partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()).template toAdd().notZero() == model.getReachableStates().template toAdd().notZero()) << std::endl; STORM_LOG_ASSERT(partition.getStates().renameVariables(model.getColumnVariables(), model.getRowVariables()) == model.getReachableStates(), "Mismatching partition."); std::set blockVariableSet = {partition.getBlockVariable()}; @@ -567,36 +564,10 @@ namespace storm { partitionAsBdd = (representativePartition && partitionAsBddOverPrimedBlockVariable).existsAbstract(blockPrimeVariableSet); } - storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); - partitionAsAdd.exportToDot("partition.dot"); - model.getTransitionMatrix().sumAbstract(model.getColumnVariables()).exportToDot("origdist.dot"); auto start = std::chrono::high_resolution_clock::now(); - storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); - STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(model.getTransitionMatrix().sumAbstract(model.getColumnVariables()), ValueType(1e-6)), "Expected something else."); - quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).exportToDot("sanity.dot"); - quotientTransitionMatrix.exportToDot("trans-1.dot"); - partitionAsAdd = partitionAsAdd / partitionAsAdd.sumAbstract(model.getColumnVariables()); - quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); - quotientTransitionMatrix.exportToDot("quottrans.dot"); - auto partCount = partitionAsAdd.sumAbstract(model.getColumnVariables()); - partCount.exportToDot("partcount.dot"); - auto end = std::chrono::high_resolution_clock::now(); - - // Check quotient matrix for sanity. - auto quotdist = quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet); - quotdist.exportToDot("quotdists.dot"); - (quotdist / partCount).exportToDot("distcount.dot"); - STORM_LOG_ASSERT(quotientTransitionMatrix.greater(storm::utility::one()).isZero(), "Illegal entries in quotient matrix."); - STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(quotientTransitionMatrix.notZero().existsAbstract(blockPrimeVariableSet).template toAdd(), ValueType(1e-6)), "Illegal non-probabilistic matrix."); - - STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); - storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); - - start = std::chrono::high_resolution_clock::now(); storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()); storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables()); - storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; std::map> preservedLabelBdds; for (auto const& label : preservationInformation.getLabels()) { @@ -614,9 +585,29 @@ namespace storm { preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); } } - end = std::chrono::high_resolution_clock::now(); + auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); + start = std::chrono::high_resolution_clock::now(); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + + // Pick a representative from each block. + partitionAsBdd = partitionAsBdd.existsAbstractRepresentative(model.getColumnVariables()); + partitionAsAdd = partitionAsBdd.template toAdd(); + + quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); + end = std::chrono::high_resolution_clock::now(); + + // Check quotient matrix for sanity. + STORM_LOG_ASSERT(quotientTransitionMatrix.greater(storm::utility::one()).isZero(), "Illegal entries in quotient matrix."); + STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(quotientTransitionMatrix.notZero().existsAbstract(blockPrimeVariableSet).template toAdd(), ValueType(1e-6)), "Illegal non-probabilistic matrix."); + + STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + + storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); + storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; + if (modelType == storm::models::ModelType::Dtmc) { return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); } else if (modelType == storm::models::ModelType::Ctmc) { diff --git a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp index 682085468..b4336adc8 100644 --- a/src/storm/storage/dd/bisimulation/SignatureComputer.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureComputer.cpp @@ -2,6 +2,8 @@ #include "storm/storage/dd/DdManager.h" +#include "storm/models/symbolic/StandardRewardModel.h" + #include "storm/utility/macros.h" #include "storm/exceptions/OutOfRangeException.h" diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 11c7b09d6..4586e9890 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -67,8 +67,8 @@ namespace storm { maxTableSize >>= 1; } - uint64_t initialTableSize = 1ull << std::max(powerOfTwo - 4, 16ull); - uint64_t initialCacheSize = 1ull << std::max(powerOfTwo - 4, 16ull); + uint64_t initialTableSize = 1ull << std::max(powerOfTwo - 4, static_cast(16)); + uint64_t initialCacheSize = initialTableSize; STORM_LOG_DEBUG("Initializing sylvan. Initial/max table size: " << initialTableSize << "/" << maxTableSize << ", initial/max cache size: " << initialCacheSize << "/" << maxCacheSize << "."); sylvan::Sylvan::initPackage(initialTableSize, maxTableSize, initialCacheSize, maxCacheSize); diff --git a/src/storm/storage/expressions/LinearityCheckVisitor.cpp b/src/storm/storage/expressions/LinearityCheckVisitor.cpp index 18198ca0e..9eeb3ea56 100644 --- a/src/storm/storage/expressions/LinearityCheckVisitor.cpp +++ b/src/storm/storage/expressions/LinearityCheckVisitor.cpp @@ -125,7 +125,7 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Illegal unary numerical expression operator."); } - boost::any LinearityCheckVisitor::visit(BooleanLiteralExpression const& expression, boost::any const& data) { + boost::any LinearityCheckVisitor::visit(BooleanLiteralExpression const&, boost::any const& data) { bool booleanIsLinear = boost::any_cast(data); if (booleanIsLinear) { diff --git a/src/storm/storage/expressions/ToRationalNumberVisitor.cpp b/src/storm/storage/expressions/ToRationalNumberVisitor.cpp index f7aa3236d..15a8d61eb 100644 --- a/src/storm/storage/expressions/ToRationalNumberVisitor.cpp +++ b/src/storm/storage/expressions/ToRationalNumberVisitor.cpp @@ -119,6 +119,8 @@ namespace storm { return result; break; } + // Dummy return. + return result; } template From d0ec9a362f9a6228b87ae36213837e1098ec0a0d Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 7 Aug 2017 20:29:26 +0200 Subject: [PATCH 31/95] added time output to cli --- src/storm/cli/cli.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index 33826447f..166ab07cf 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -1,5 +1,10 @@ #include "storm/cli/cli.h" +#include +#include +#include +#include + #include "storm/storage/SymbolicModelDescription.h" #include "storm/models/ModelBase.h" @@ -82,6 +87,14 @@ namespace storm { return 0; } + std::string currentTimeAndDate() { + auto now = std::chrono::system_clock::now(); + auto in_time_t = std::chrono::system_clock::to_time_t(now); + + std::stringstream ss; + ss << std::put_time(std::localtime(&in_time_t), "%d/%m/%Y %X"); + return ss.str(); + } void printHeader(std::string const& name, const int argc, const char* argv[]) { STORM_PRINT(name << " " << storm::utility::StormVersion::shortVersionString() << std::endl << std::endl); @@ -96,7 +109,8 @@ namespace storm { if (!command.empty()) { STORM_PRINT("Command line arguments: " << commandStream.str() << std::endl); - STORM_PRINT("Current working directory: " << storm::utility::cli::getCurrentWorkingDirectory() << std::endl << std::endl); + STORM_PRINT("Current working directory: " << storm::utility::cli::getCurrentWorkingDirectory() << std::endl); + STORM_PRINT("Current date/time: " << currentTimeAndDate() << std::endl << std::endl); } } From 2441d9b8d717d27a881b06f0a4a8f48b8777914a Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 7 Aug 2017 20:32:02 +0200 Subject: [PATCH 32/95] removed conversion operator for Bdd --- src/storm/storage/dd/Add.cpp | 30 ++++++++++++------------- src/storm/storage/dd/Bdd.cpp | 43 ++++++++++++++++-------------------- src/storm/storage/dd/Bdd.h | 5 ----- 3 files changed, 34 insertions(+), 44 deletions(-) diff --git a/src/storm/storage/dd/Add.cpp b/src/storm/storage/dd/Add.cpp index 7a4956ce8..b76219624 100644 --- a/src/storm/storage/dd/Add.cpp +++ b/src/storm/storage/dd/Add.cpp @@ -154,31 +154,31 @@ namespace storm { template Add Add::sumAbstract(std::set const& metaVariables) const { Bdd cube = Bdd::getCube(this->getDdManager(), metaVariables); - return Add(this->getDdManager(), internalAdd.sumAbstract(cube), Dd::subtractMetaVariables(*this, cube)); + return Add(this->getDdManager(), internalAdd.sumAbstract(cube.getInternalBdd()), Dd::subtractMetaVariables(*this, cube)); } template Add Add::minAbstract(std::set const& metaVariables) const { Bdd cube = Bdd::getCube(this->getDdManager(), metaVariables); - return Add(this->getDdManager(), internalAdd.minAbstract(cube), Dd::subtractMetaVariables(*this, cube)); + return Add(this->getDdManager(), internalAdd.minAbstract(cube.getInternalBdd()), Dd::subtractMetaVariables(*this, cube)); } template Bdd Add::minAbstractRepresentative(std::set const& metaVariables) const { Bdd cube = Bdd::getCube(this->getDdManager(), metaVariables); - return Bdd(this->getDdManager(), internalAdd.minAbstractRepresentative(cube), this->getContainedMetaVariables()); + return Bdd(this->getDdManager(), internalAdd.minAbstractRepresentative(cube.getInternalBdd()), this->getContainedMetaVariables()); } template Add Add::maxAbstract(std::set const& metaVariables) const { Bdd cube = Bdd::getCube(this->getDdManager(), metaVariables); - return Add(this->getDdManager(), internalAdd.maxAbstract(cube), Dd::subtractMetaVariables(*this, cube)); + return Add(this->getDdManager(), internalAdd.maxAbstract(cube.getInternalBdd()), Dd::subtractMetaVariables(*this, cube)); } template Bdd Add::maxAbstractRepresentative(std::set const& metaVariables) const { Bdd cube = Bdd::getCube(this->getDdManager(), metaVariables); - return Bdd(this->getDdManager(), internalAdd.maxAbstractRepresentative(cube), this->getContainedMetaVariables()); + return Bdd(this->getDdManager(), internalAdd.maxAbstractRepresentative(cube.getInternalBdd()), this->getContainedMetaVariables()); } template @@ -195,14 +195,14 @@ namespace storm { STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename variable '" << metaVariable.getName() << "' that is not present."); DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { - fromBdds.push_back(ddVariable); + fromBdds.push_back(ddVariable.getInternalBdd()); } } for (auto const& metaVariable : to) { STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename to variable '" << metaVariable.getName() << "' that is already present."); DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { - toBdds.push_back(ddVariable); + toBdds.push_back(ddVariable.getInternalBdd()); } } @@ -240,10 +240,10 @@ namespace storm { } } for (auto const& ddVariable : variable1.getDdVariables()) { - from.push_back(ddVariable); + from.push_back(ddVariable.getInternalBdd()); } for (auto const& ddVariable : variable2.getDdVariables()) { - to.push_back(ddVariable); + to.push_back(ddVariable.getInternalBdd()); } } @@ -272,10 +272,10 @@ namespace storm { } for (auto const& ddVariable : variable1.getDdVariables()) { - from.push_back(ddVariable); + from.push_back(ddVariable.getInternalBdd()); } for (auto const& ddVariable : variable2.getDdVariables()) { - to.push_back(ddVariable); + to.push_back(ddVariable.getInternalBdd()); } } @@ -293,7 +293,7 @@ namespace storm { std::vector> summationDdVariables; for (auto const& metaVariable : summationMetaVariables) { for (auto const& ddVariable : this->getDdManager().getMetaVariable(metaVariable).getDdVariables()) { - summationDdVariables.push_back(ddVariable); + summationDdVariables.push_back(ddVariable.getInternalBdd()); } } @@ -310,7 +310,7 @@ namespace storm { std::vector> summationDdVariables; for (auto const& metaVariable : summationMetaVariables) { for (auto const& ddVariable : this->getDdManager().getMetaVariable(metaVariable).getDdVariables()) { - summationDdVariables.push_back(ddVariable); + summationDdVariables.push_back(ddVariable.getInternalBdd()); } } @@ -318,7 +318,7 @@ namespace storm { std::set containedMetaVariables; std::set_difference(unionOfMetaVariables.begin(), unionOfMetaVariables.end(), summationMetaVariables.begin(), summationMetaVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); - return Add(this->getDdManager(), internalAdd.multiplyMatrix(otherMatrix, summationDdVariables), containedMetaVariables); + return Add(this->getDdManager(), internalAdd.multiplyMatrix(otherMatrix.getInternalBdd(), summationDdVariables), containedMetaVariables); } template @@ -843,7 +843,7 @@ namespace storm { numberOfDdVariables += ddMetaVariable.getNumberOfDdVariables(); } - return internalAdd.begin(this->getDdManager(), Bdd::getCube(this->getDdManager(), this->getContainedMetaVariables()), numberOfDdVariables, this->getContainedMetaVariables(), enumerateDontCareMetaVariables); + return internalAdd.begin(this->getDdManager(), Bdd::getCube(this->getDdManager(), this->getContainedMetaVariables()).getInternalBdd(), numberOfDdVariables, this->getContainedMetaVariables(), enumerateDontCareMetaVariables); } template diff --git a/src/storm/storage/dd/Bdd.cpp b/src/storm/storage/dd/Bdd.cpp index 9e0b818fd..2f21a5ef4 100644 --- a/src/storm/storage/dd/Bdd.cpp +++ b/src/storm/storage/dd/Bdd.cpp @@ -141,19 +141,19 @@ namespace storm { template Bdd Bdd::existsAbstract(std::set const& metaVariables) const { Bdd cube = getCube(this->getDdManager(), metaVariables); - return Bdd(this->getDdManager(), internalBdd.existsAbstract(cube), Dd::subtractMetaVariables(*this, cube)); + return Bdd(this->getDdManager(), internalBdd.existsAbstract(cube.getInternalBdd()), Dd::subtractMetaVariables(*this, cube)); } template Bdd Bdd::existsAbstractRepresentative(std::set const& metaVariables) const { Bdd cube = getCube(this->getDdManager(), metaVariables); - return Bdd(this->getDdManager(), internalBdd.existsAbstractRepresentative(cube), this->getContainedMetaVariables()); + return Bdd(this->getDdManager(), internalBdd.existsAbstractRepresentative(cube.getInternalBdd()), this->getContainedMetaVariables()); } template Bdd Bdd::universalAbstract(std::set const& metaVariables) const { Bdd cube = getCube(this->getDdManager(), metaVariables); - return Bdd(this->getDdManager(), internalBdd.universalAbstract(cube), Dd::subtractMetaVariables(*this, cube)); + return Bdd(this->getDdManager(), internalBdd.universalAbstract(cube.getInternalBdd()), Dd::subtractMetaVariables(*this, cube)); } template @@ -165,17 +165,17 @@ namespace storm { std::set containedMetaVariables; std::set_difference(unionOfMetaVariables.begin(), unionOfMetaVariables.end(), existentialVariables.begin(), existentialVariables.end(), std::inserter(containedMetaVariables, containedMetaVariables.begin())); - return Bdd(this->getDdManager(), internalBdd.andExists(other, cube), containedMetaVariables); + return Bdd(this->getDdManager(), internalBdd.andExists(other.getInternalBdd(), cube.getInternalBdd()), containedMetaVariables); } template Bdd Bdd::constrain(Bdd const& constraint) const { - return Bdd(this->getDdManager(), internalBdd.constrain(constraint), Dd::joinMetaVariables(*this, constraint)); + return Bdd(this->getDdManager(), internalBdd.constrain(constraint.getInternalBdd()), Dd::joinMetaVariables(*this, constraint)); } template Bdd Bdd::restrict(Bdd const& constraint) const { - return Bdd(this->getDdManager(), internalBdd.restrict(constraint), Dd::joinMetaVariables(*this, constraint)); + return Bdd(this->getDdManager(), internalBdd.restrict(constraint.getInternalBdd()), Dd::joinMetaVariables(*this, constraint)); } template @@ -187,7 +187,7 @@ namespace storm { for (auto const& metaVariable : rowMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - rowVariables.push_back(ddVariable); + rowVariables.push_back(ddVariable.getInternalBdd()); } } @@ -195,11 +195,11 @@ namespace storm { for (auto const& metaVariable : columnMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - columnVariables.push_back(ddVariable); + columnVariables.push_back(ddVariable.getInternalBdd()); } } - return Bdd(this->getDdManager(), internalBdd.relationalProduct(relation, rowVariables, columnVariables), newMetaVariables); + return Bdd(this->getDdManager(), internalBdd.relationalProduct(relation.getInternalBdd(), rowVariables, columnVariables), newMetaVariables); } template @@ -211,7 +211,7 @@ namespace storm { for (auto const& metaVariable : rowMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - rowVariables.push_back(ddVariable); + rowVariables.push_back(ddVariable.getInternalBdd()); } } @@ -219,11 +219,11 @@ namespace storm { for (auto const& metaVariable : columnMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - columnVariables.push_back(ddVariable); + columnVariables.push_back(ddVariable.getInternalBdd()); } } - return Bdd(this->getDdManager(), internalBdd.inverseRelationalProduct(relation, rowVariables, columnVariables), newMetaVariables); + return Bdd(this->getDdManager(), internalBdd.inverseRelationalProduct(relation.getInternalBdd(), rowVariables, columnVariables), newMetaVariables); } template @@ -235,7 +235,7 @@ namespace storm { for (auto const& metaVariable : rowMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - rowVariables.push_back(ddVariable); + rowVariables.push_back(ddVariable.getInternalBdd()); } } @@ -243,11 +243,11 @@ namespace storm { for (auto const& metaVariable : columnMetaVariables) { DdMetaVariable const& variable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : variable.getDdVariables()) { - columnVariables.push_back(ddVariable); + columnVariables.push_back(ddVariable.getInternalBdd()); } } - return Bdd(this->getDdManager(), internalBdd.inverseRelationalProductWithExtendedRelation(relation, rowVariables, columnVariables), newMetaVariables); + return Bdd(this->getDdManager(), internalBdd.inverseRelationalProductWithExtendedRelation(relation.getInternalBdd(), rowVariables, columnVariables), newMetaVariables); } template @@ -278,10 +278,10 @@ namespace storm { } for (auto const& ddVariable : variable1.getDdVariables()) { - from.push_back(ddVariable); + from.emplace_back(ddVariable.getInternalBdd()); } for (auto const& ddVariable : variable2.getDdVariables()) { - to.push_back(ddVariable); + to.emplace_back(ddVariable.getInternalBdd()); } } @@ -301,14 +301,14 @@ namespace storm { STORM_LOG_THROW(this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename variable '" << metaVariable.getName() << "' that is not present."); DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { - fromBdds.push_back(ddVariable); + fromBdds.push_back(ddVariable.getInternalBdd()); } } for (auto const& metaVariable : to) { STORM_LOG_THROW(!this->containsMetaVariable(metaVariable), storm::exceptions::InvalidOperationException, "Cannot rename to variable '" << metaVariable.getName() << "' that is already present."); DdMetaVariable const& ddMetaVariable = this->getDdManager().getMetaVariable(metaVariable); for (auto const& ddVariable : ddMetaVariable.getDdVariables()) { - toBdds.push_back(ddVariable); + toBdds.push_back(ddVariable.getInternalBdd()); } } @@ -418,11 +418,6 @@ namespace storm { return result; } - template - Bdd::operator InternalBdd() const { - return internalBdd; - } - template class Bdd; template Bdd Bdd::fromVector(DdManager const& ddManager, std::vector const& explicitValues, storm::dd::Odd const& odd, std::set const& metaVariables, storm::logic::ComparisonType comparisonType, double value); diff --git a/src/storm/storage/dd/Bdd.h b/src/storm/storage/dd/Bdd.h index 4a6ae2309..b8ec614f6 100644 --- a/src/storm/storage/dd/Bdd.h +++ b/src/storm/storage/dd/Bdd.h @@ -384,11 +384,6 @@ namespace storm { friend struct FromVectorHelper; private: - /*! - * We provide a conversion operator from the BDD to its internal type to ease calling the internal functions. - */ - operator InternalBdd() const; - // The internal BDD that depends on the chosen library. InternalBdd internalBdd; }; From 51e5c11dfa8b22a545d13131d3f82bb630aaf737 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 7 Aug 2017 20:33:19 +0200 Subject: [PATCH 33/95] using refs in sylvan signature refinement --- src/storm/storage/dd/bisimulation/SignatureRefiner.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index e370a75bd..845eb45f7 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -405,7 +405,9 @@ namespace storm { } BDD thenResult = refine(partitionThen, signatureThen, offset == 0 ? sylvan_high(nondeterminismVariablesNode) : nondeterminismVariablesNode, sylvan_high(nonBlockVariablesNode)); + bdd_refs_push(thenResult); BDD elseResult = refine(partitionElse, signatureElse, offset == 0 ? sylvan_high(nondeterminismVariablesNode) : nondeterminismVariablesNode, sylvan_high(nonBlockVariablesNode)); + bdd_refs_push(elseResult); BDD result; if (thenResult == elseResult) { @@ -415,6 +417,9 @@ namespace storm { result = sylvan_makenode(sylvan_var(nonBlockVariablesNode) + offset, elseResult, thenResult); } + // Dispose of the intermediate results. + bdd_refs_pop(2); + // Store the result in the cache. signatureCache[nodePair] = result; From a71c0cb585e374905665a51c88c5a969e5c8ba71 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 7 Aug 2017 20:38:06 +0200 Subject: [PATCH 34/95] Made some sylvan Bdd creations explicit --- src/storm/storage/dd/InternalBdd.h | 6 +----- src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/storm/storage/dd/InternalBdd.h b/src/storm/storage/dd/InternalBdd.h index 9dfe22ca3..d59b03ffb 100644 --- a/src/storm/storage/dd/InternalBdd.h +++ b/src/storm/storage/dd/InternalBdd.h @@ -1,5 +1,4 @@ -#ifndef STORM_STORAGE_DD_INTERNALBDD_H_ -#define STORM_STORAGE_DD_INTERNALBDD_H_ +#pragma once #include "storm/storage/dd/DdType.h" @@ -9,6 +8,3 @@ namespace storm { class InternalBdd; } } - - -#endif /* STORM_STORAGE_DD_CUDD_INTERNALBDD_H_ */ diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index a6e3997c1..cf73720dd 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -611,7 +611,7 @@ namespace storm { summationVariables &= ddVariable; } - return InternalAdd(ddManager, this->sylvanMtbdd.AndExists(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); + return InternalAdd(ddManager, this->sylvanMtbdd.AndExists(sylvan::Bdd(otherMatrix.getSylvanBdd().GetBDD()), summationVariables.getSylvanBdd())); } #ifdef STORM_HAVE_CARL @@ -622,7 +622,7 @@ namespace storm { summationVariables &= ddVariable; } - return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRF(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); + return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRF(sylvan::Bdd(otherMatrix.getSylvanBdd().GetBDD()), summationVariables.getSylvanBdd())); } #endif @@ -633,7 +633,7 @@ namespace storm { summationVariables &= ddVariable; } - return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRN(otherMatrix.getSylvanBdd().GetBDD(), summationVariables.getSylvanBdd())); + return InternalAdd(ddManager, this->sylvanMtbdd.AndExistsRN(sylvan::Bdd(otherMatrix.getSylvanBdd().GetBDD()), summationVariables.getSylvanBdd())); } template From 27ffeb3a45212712fe394c9a16810c7324f1c7b2 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 9 Aug 2017 16:58:33 +0200 Subject: [PATCH 35/95] fixed a critical bug in symbolic bisimulation and started reworking sparse quotient extraction --- .../dd/bisimulation/PartitionRefiner.h | 2 + .../dd/bisimulation/QuotientExtractor.cpp | 222 ++++++++++-------- .../dd/bisimulation/SignatureRefiner.cpp | 3 - .../dd/bisimulation/SignatureRefiner.h | 3 - 4 files changed, 125 insertions(+), 105 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index 2bd090c3d..870c1f429 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -22,6 +22,8 @@ namespace storm { public: PartitionRefiner(storm::models::symbolic::Model const& model, Partition const& initialStatePartition); + virtual ~PartitionRefiner() = default; + /*! * Refines the partition. * diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 32b9363b2..5767cb448 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -33,15 +33,30 @@ namespace storm { template class InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& stateVariables) : manager(manager) { + InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : manager(manager) { + + // Initialize cubes. + stateVariablesCube = manager.getBddOne(); + allSourceVariablesCube = manager.getBddOne(); + nondeterminismVariablesCube = manager.getBddOne(); + + // Create cubes. for (auto const& variable : stateVariables) { auto const& ddMetaVariable = manager.getMetaVariable(variable); std::vector> indicesAndLevels = ddMetaVariable.getIndicesAndLevels(); - stateVariablesIndicesAndLevels.insert(stateVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); + sourceVariablesIndicesAndLevels.insert(sourceVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); + + allSourceVariablesCube &= ddMetaVariable.getCube(); + stateVariablesCube &= ddMetaVariable.getCube(); + } + for (auto const& variable : nondeterminismVariables) { + auto const& ddMetaVariable = manager.getMetaVariable(variable); + allSourceVariablesCube &= ddMetaVariable.getCube(); + nondeterminismVariablesCube &= ddMetaVariable.getCube(); } // Sort the indices by their levels. - std::sort(stateVariablesIndicesAndLevels.begin(), stateVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); + std::sort(sourceVariablesIndicesAndLevels.begin(), sourceVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); } protected: @@ -67,15 +82,28 @@ namespace storm { return builder.build(); } + // The manager responsible for the DDs. storm::dd::DdManager const& manager; - std::vector> stateVariablesIndicesAndLevels; + + // The indices and levels of all state variables. + std::vector> sourceVariablesIndicesAndLevels; + + // Useful cubes needed in the translation. + storm::dd::Bdd stateVariablesCube; + storm::dd::Bdd allSourceVariablesCube; + storm::dd::Bdd nondeterminismVariablesCube; + + // A hash map that stores the unique source state representative for each source block index. + spp::sparse_hash_map> uniqueSourceRepresentative; + + // The entries of the matrix that is built. std::vector>> entries; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables, nondeterminismVariables), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { // Intentionally left empty. } @@ -86,7 +114,7 @@ namespace storm { this->entries.resize(partition.getNumberOfBlocks()); STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); - storm::storage::BitVector encoding(this->stateVariablesIndicesAndLevels.size()); + storm::storage::BitVector encoding(this->sourceVariablesIndicesAndLevels.size()); extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, encoding); return this->createMatrixFromEntries(partition); @@ -96,7 +124,7 @@ namespace storm { STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); storm::storage::BitVector result(partition.getNumberOfBlocks()); - extractStatesRec(states.getInternalBdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, result); + extractStatesRec(states.getInternalBdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), this->stateVariablesCube.getInternalBdd().getCuddDdNode(), result); return result; } @@ -130,50 +158,49 @@ namespace storm { return result; } - void extractStatesRec(DdNode* statesNode, DdNode* partitionNode, uint64_t offset, storm::storage::BitVector& result) { + void extractStatesRec(DdNode* statesNode, DdNode* partitionNode, DdNode* stateVariablesNode, storm::storage::BitVector& result) { if (statesNode == Cudd_ReadLogicZero(ddman)) { return; } - // Determine the levels in the DDs. - uint64_t statesVariable = Cudd_NodeReadIndex(statesNode); - uint64_t partitionVariable = Cudd_NodeReadIndex(partitionNode) - 1; - - // See how many variables we skipped. - while (offset < this->stateVariablesIndicesAndLevels.size() && statesVariable != this->stateVariablesIndicesAndLevels[offset].first && partitionVariable != this->stateVariablesIndicesAndLevels[offset].first) { - ++offset; + bool skippedBoth = true; + DdNode* tStates; + DdNode* eStates; + DdNode* tPartition; + DdNode* ePartition; + bool negate = false; + while (skippedBoth && !Cudd_IsConstant(stateVariablesNode)) { + if (Cudd_NodeReadIndex(statesNode) == Cudd_NodeReadIndex(stateVariablesNode)) { + tStates = Cudd_T(statesNode); + eStates = Cudd_E(statesNode); + negate = Cudd_IsComplement(statesNode); + skippedBoth = false; + } else { + tStates = eStates = statesNode; + } + + if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(stateVariablesNode) + 1) { + tPartition = Cudd_T(partitionNode); + ePartition = Cudd_E(partitionNode); + skippedBoth = false; + } else { + tPartition = ePartition = partitionNode; + } + + if (skippedBoth) { + stateVariablesNode = Cudd_T(stateVariablesNode); + } } - - if (offset == this->stateVariablesIndicesAndLevels.size()) { + + if (Cudd_IsConstant(stateVariablesNode)) { + // If there is no more state variables, it means that we arrived at a block encoding in which there is a state in the state set. result.set(decodeBlockIndex(partitionNode)); return; - } - - uint64_t topVariable; - if (statesVariable == this->stateVariablesIndicesAndLevels[offset].first) { - topVariable = statesVariable; } else { - topVariable = partitionVariable; + // Otherwise, we need to recursively descend. + extractStatesRec(negate ? Cudd_Not(tStates) : tStates, tPartition, Cudd_T(stateVariablesNode), result); + extractStatesRec(negate ? Cudd_Not(eStates) : eStates, ePartition, Cudd_T(stateVariablesNode), result); } - - DdNode* tStates = statesNode; - DdNode* eStates = statesNode; - bool negate = false; - if (topVariable == statesVariable) { - tStates = Cudd_T(statesNode); - eStates = Cudd_E(statesNode); - negate = Cudd_IsComplement(statesNode); - } - - DdNode* tPartition = partitionNode; - DdNode* ePartition = partitionNode; - if (topVariable == partitionVariable) { - tPartition = Cudd_T(partitionNode); - ePartition = Cudd_E(partitionNode); - } - - extractStatesRec(negate ? Cudd_Not(tStates) : tStates, tPartition, offset, result); - extractStatesRec(negate ? Cudd_Not(eStates) : eStates, ePartition, offset, result); } void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { @@ -183,12 +210,12 @@ namespace storm { return; } - // If we have moved through all source variables, we must have arrived at a constant. + // If we have moved through all source variables, we must have arrived at a target block encoding. if (currentIndex == sourceState.size()) { // Decode the source block. uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); - std::unique_ptr& sourceRepresentative = uniqueSourceRepresentative[sourceBlockIndex]; + std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; if (sourceRepresentative && *sourceRepresentative != sourceState) { // In this case, we have picked a different representative and must not record any entries now. return; @@ -212,13 +239,13 @@ namespace storm { DdNode* te = transitionMatrixNode; DdNode* et = transitionMatrixNode; DdNode* ee = transitionMatrixNode; - STORM_LOG_ASSERT(transitionMatrixVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of transition matrix."); - if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(transitionMatrixVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of transition matrix."); + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { DdNode* t = Cudd_T(transitionMatrixNode); DdNode* e = Cudd_E(transitionMatrixNode); uint64_t tVariable = Cudd_NodeReadIndex(t); - if (tVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { tt = Cudd_T(t); te = Cudd_E(t); } else { @@ -226,14 +253,14 @@ namespace storm { } uint64_t eVariable = Cudd_NodeReadIndex(e); - if (eVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { et = Cudd_T(e); ee = Cudd_E(e); } else { et = ee = e; } } else { - if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { tt = et = Cudd_T(transitionMatrixNode); te = ee = Cudd_E(transitionMatrixNode); } else { @@ -244,8 +271,8 @@ namespace storm { // Move through partition (for source state). DdNode* sourceT; DdNode* sourceE; - STORM_LOG_ASSERT(sourcePartitionVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); - if (sourcePartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(sourcePartitionVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); + if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { sourceT = Cudd_T(sourcePartitionNode); sourceE = Cudd_E(sourcePartitionNode); } else { @@ -255,8 +282,8 @@ namespace storm { // Move through partition (for target state). DdNode* targetT; DdNode* targetE; - STORM_LOG_ASSERT(targetPartitionVariable >= this->stateVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); - if (targetPartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(targetPartitionVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); + if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { targetT = Cudd_T(targetPartitionNode); targetE = Cudd_E(targetPartitionNode); } else { @@ -275,14 +302,13 @@ namespace storm { ::DdManager* ddman; - spp::sparse_hash_map> uniqueSourceRepresentative; spp::sparse_hash_map> blockDecodeCache; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables) { + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables, nondeterminismVariables) { // Intentionally left empty. } @@ -292,7 +318,7 @@ namespace storm { // Create the number of rows necessary for the matrix. this->entries.resize(partition.getNumberOfBlocks()); - storm::storage::BitVector encoding(this->stateVariablesIndicesAndLevels.size()); + storm::storage::BitVector encoding(this->sourceVariablesIndicesAndLevels.size()); extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, encoding); return this->createMatrixFromEntries(partition); @@ -302,7 +328,7 @@ namespace storm { STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); storm::storage::BitVector result(partition.getNumberOfBlocks()); - extractStatesRec(states.getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, result); + extractStatesRec(states.getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->stateVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), result); return result; } @@ -331,48 +357,47 @@ namespace storm { return result; } - void extractStatesRec(BDD statesNode, BDD partitionNode, uint64_t offset, storm::storage::BitVector& result) { + void extractStatesRec(BDD statesNode, BDD partitionNode, BDD stateVariablesNode, storm::storage::BitVector& result) { if (statesNode == sylvan_false) { return; } - // Determine the levels in the DDs. - uint64_t statesVariable = sylvan_isconst(statesNode) ? 0xffffffff : sylvan_var(statesNode); - uint64_t partitionVariable = sylvan_var(partitionNode) - 1; - - // See how many variables we skipped. - while (offset < this->stateVariablesIndicesAndLevels.size() && statesVariable != this->stateVariablesIndicesAndLevels[offset].first && partitionVariable != this->stateVariablesIndicesAndLevels[offset].first) { - ++offset; + bool skippedBoth = true; + BDD tStates; + BDD eStates; + BDD tPartition; + BDD ePartition; + while (skippedBoth && !sylvan_isconst(stateVariablesNode)) { + if (sylvan_var(statesNode) == sylvan_var(stateVariablesNode)) { + tStates = sylvan_high(statesNode); + eStates = sylvan_low(statesNode); + skippedBoth = false; + } else { + tStates = eStates = statesNode; + } + + if (sylvan_var(partitionNode) == sylvan_var(stateVariablesNode) + 1) { + tPartition = sylvan_high(partitionNode); + ePartition = sylvan_low(partitionNode); + skippedBoth = false; + } else { + tPartition = ePartition = partitionNode; + } + + if (skippedBoth) { + stateVariablesNode = sylvan_high(stateVariablesNode); + } } - if (offset == this->stateVariablesIndicesAndLevels.size()) { + if (sylvan_isconst(stateVariablesNode)) { + // If there is no more state variables, it means that we arrived at a block encoding in which there is a state in the state set. result.set(decodeBlockIndex(partitionNode)); return; - } - - uint64_t topVariable; - if (statesVariable == this->stateVariablesIndicesAndLevels[offset].first) { - topVariable = statesVariable; } else { - topVariable = partitionVariable; + // Otherwise, we need to recursively descend. + extractStatesRec(tStates, tPartition, sylvan_high(stateVariablesNode), result); + extractStatesRec(eStates, ePartition, sylvan_high(stateVariablesNode), result); } - - BDD tStates = statesNode; - BDD eStates = statesNode; - if (topVariable == statesVariable) { - tStates = sylvan_high(statesNode); - eStates = sylvan_low(statesNode); - } - - BDD tPartition = partitionNode; - BDD ePartition = partitionNode; - if (topVariable == partitionVariable) { - tPartition = sylvan_high(partitionNode); - ePartition = sylvan_low(partitionNode); - } - - extractStatesRec(tStates, tPartition, offset, result); - extractStatesRec(eStates, ePartition, offset, result); } void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { @@ -382,12 +407,12 @@ namespace storm { return; } - // If we have moved through all source variables, we must have arrived at a constant. + // If we have moved through all source variables, we must have arrived at a target block encoding. if (currentIndex == sourceState.size()) { // Decode the source block. uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); - std::unique_ptr& sourceRepresentative = uniqueSourceRepresentative[sourceBlockIndex]; + std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; if (sourceRepresentative && *sourceRepresentative != sourceState) { // In this case, we have picked a different representative and must not record any entries now. return; @@ -411,12 +436,12 @@ namespace storm { MTBDD te = transitionMatrixNode; MTBDD et = transitionMatrixNode; MTBDD ee = transitionMatrixNode; - if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { MTBDD t = sylvan_high(transitionMatrixNode); MTBDD e = sylvan_low(transitionMatrixNode); uint64_t tVariable = sylvan_isconst(t) ? 0xffffffff : sylvan_var(t); - if (tVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { tt = sylvan_high(t); te = sylvan_low(t); } else { @@ -424,14 +449,14 @@ namespace storm { } uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); - if (eVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { et = sylvan_high(e); ee = sylvan_low(e); } else { et = ee = e; } } else { - if (transitionMatrixVariable == this->stateVariablesIndicesAndLevels[currentIndex].first + 1) { + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { tt = et = sylvan_high(transitionMatrixNode); te = ee = sylvan_low(transitionMatrixNode); } else { @@ -442,7 +467,7 @@ namespace storm { // Move through partition (for source state). MTBDD sourceT; MTBDD sourceE; - if (sourcePartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { sourceT = sylvan_high(sourcePartitionNode); sourceE = sylvan_low(sourcePartitionNode); } else { @@ -452,7 +477,7 @@ namespace storm { // Move through partition (for target state). MTBDD targetT; MTBDD targetE; - if (targetPartitionVariable == this->stateVariablesIndicesAndLevels[currentIndex].first) { + if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { targetT = sylvan_high(targetPartitionNode); targetE = sylvan_low(targetPartitionNode); } else { @@ -469,7 +494,6 @@ namespace storm { } } - spp::sparse_hash_map> uniqueSourceRepresentative; spp::sparse_hash_map> blockDecodeCache; }; @@ -499,7 +523,7 @@ namespace storm { template std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { - InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables()); + InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getNondeterminismVariables()); auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 845eb45f7..30cafe2cc 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -481,9 +481,6 @@ namespace storm { internalRefiner = std::make_unique>(manager, blockVariable, nondeterminismVariablesCube, nonBlockVariablesCube); } - template - SignatureRefiner::~SignatureRefiner() = default; - template Partition SignatureRefiner::refine(Partition const& oldPartition, Signature const& signature) { return internalRefiner->refine(oldPartition, signature); diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.h b/src/storm/storage/dd/bisimulation/SignatureRefiner.h index 64797bdd8..72498152c 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.h +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.h @@ -17,11 +17,8 @@ namespace storm { template class SignatureRefiner { public: - SignatureRefiner() = default; SignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, std::set const& stateVariables, std::set const& nondeterminismVariables = std::set()); - ~SignatureRefiner(); - Partition refine(Partition const& oldPartition, Signature const& signature); private: From 9a20aed7f9a597fede6ef5a610e6177a5384bb4b Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 9 Aug 2017 20:36:58 +0200 Subject: [PATCH 36/95] proper caching in all min/max/exists abstract representative functions --- .../3rdparty/cudd-3.0.0/cudd/cuddAddAbs.c | 16 ++++----- .../3rdparty/cudd-3.0.0/cudd/cuddBddAbs.c | 9 +++-- .../3rdparty/sylvan/src/sylvan_bdd_storm.c | 27 +++++++++------ .../3rdparty/sylvan/src/sylvan_mtbdd_storm.c | 34 +++++++++---------- .../dd/bisimulation/QuotientExtractor.cpp | 6 ++++ 5 files changed, 52 insertions(+), 40 deletions(-) diff --git a/resources/3rdparty/cudd-3.0.0/cudd/cuddAddAbs.c b/resources/3rdparty/cudd-3.0.0/cudd/cuddAddAbs.c index 1f8414017..a1d7e6105 100644 --- a/resources/3rdparty/cudd-3.0.0/cudd/cuddAddAbs.c +++ b/resources/3rdparty/cudd-3.0.0/cudd/cuddAddAbs.c @@ -1024,6 +1024,10 @@ cuddAddMinAbstractRepresentativeRecur( return(res1); } + if ((res = cuddCacheLookup2(manager, Cudd_addMinAbstractRepresentative, f, cube)) != NULL) { + return(res); + } + /* Abstract a variable that does not appear in f. */ if (cuddI(manager,f->index) > cuddI(manager,cube->index)) { res = cuddAddMinAbstractRepresentativeRecur(manager, f, cuddT(cube)); @@ -1044,10 +1048,6 @@ cuddAddMinAbstractRepresentativeRecur( return(res1); } - if ((res = cuddCacheLookup2(manager, Cudd_addMinAbstractRepresentative, f, cube)) != NULL) { - return(res); - } - E = cuddE(f); T = cuddT(f); @@ -1211,6 +1211,10 @@ cuddAddMaxAbstractRepresentativeRecur( } + if ((res = cuddCacheLookup2(manager, Cudd_addMaxAbstractRepresentative, f, cube)) != NULL) { + return(res); + } + /* Abstract a variable that does not appear in f. */ if (cuddI(manager,f->index) > cuddI(manager,cube->index)) { res = cuddAddMaxAbstractRepresentativeRecur(manager, f, cuddT(cube)); @@ -1231,10 +1235,6 @@ cuddAddMaxAbstractRepresentativeRecur( return(res1); } - if ((res = cuddCacheLookup2(manager, Cudd_addMaxAbstractRepresentative, f, cube)) != NULL) { - return(res); - } - E = cuddE(f); T = cuddT(f); diff --git a/resources/3rdparty/cudd-3.0.0/cudd/cuddBddAbs.c b/resources/3rdparty/cudd-3.0.0/cudd/cuddBddAbs.c index 8c3026b9d..d640d2147 100644 --- a/resources/3rdparty/cudd-3.0.0/cudd/cuddBddAbs.c +++ b/resources/3rdparty/cudd-3.0.0/cudd/cuddBddAbs.c @@ -563,6 +563,10 @@ cuddBddExistAbstractRepresentativeRecur( } /* From now on, cube and f are non-constant. */ + /* Check the cache. */ + if (F->ref != 1 && (res = cuddCacheLookup2(manager, Cudd_bddExistAbstractRepresentative, f, cube)) != NULL) { + return(res); + } /* Abstract a variable that does not appear in f. */ if (manager->perm[F->index] > manager->perm[cube->index]) { @@ -586,11 +590,6 @@ cuddBddExistAbstractRepresentativeRecur( return(res1); } - /* Check the cache. */ - if (F->ref != 1 && (res = cuddCacheLookup2(manager, Cudd_bddExistAbstractRepresentative, f, cube)) != NULL) { - return(res); - } - /* Compute the cofactors of f. */ T = cuddT(F); E = cuddE(F); if (f != F) { diff --git a/resources/3rdparty/sylvan/src/sylvan_bdd_storm.c b/resources/3rdparty/sylvan/src/sylvan_bdd_storm.c index 89f2c31a2..7e982cc1c 100644 --- a/resources/3rdparty/sylvan/src/sylvan_bdd_storm.c +++ b/resources/3rdparty/sylvan/src/sylvan_bdd_storm.c @@ -12,7 +12,6 @@ TASK_IMPL_3(BDD, sylvan_existsRepresentative, BDD, a, BDD, variables, BDDVAR, pr if (aRegular == sylvan_false) { if (aIsNegated) { if (sylvan_set_isempty(variables)) { - //printf("return in preprocessing...2\n"); return sylvan_true; } else { //printf("return in preprocessing...3\n"); @@ -35,18 +34,22 @@ TASK_IMPL_3(BDD, sylvan_existsRepresentative, BDD, a, BDD, variables, BDDVAR, pr return a; } } else if (sylvan_set_isempty(variables)) { - //printf("return in preprocessing...4\n"); return a; } + + BDD result; + if (cache_get3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, variables, (size_t)2, &result)) { + sylvan_stats_count(MTBDD_ABSTRACT_CACHED); + return result; + } + /* From now on, f and cube are non-constant. */ bddnode_t na = MTBDD_GETNODE(a); BDDVAR level = bddnode_getvariable(na); bddnode_t nv = MTBDD_GETNODE(variables); BDDVAR vv = bddnode_getvariable(nv); - - //printf("a level %i and cube level %i\n", level, vv); - + /* Abstract a variable that does not appear in f. */ if (level > vv) { BDD _v = sylvan_set_next(variables); @@ -64,7 +67,6 @@ TASK_IMPL_3(BDD, sylvan_existsRepresentative, BDD, a, BDD, variables, BDDVAR, pr } sylvan_deref(res); - //printf("return after abstr. var that does not appear in f...\n"); return res1; } @@ -128,13 +130,14 @@ TASK_IMPL_3(BDD, sylvan_existsRepresentative, BDD, a, BDD, variables, BDDVAR, pr return sylvan_invalid; } - // cuddCacheInsert2(manager, Cudd_bddExistAbstractRepresentative, f, cube, res); - // TODO: CACHING HERE + /* Store in cache */ + if (cache_put3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, variables, (size_t)2, res)) { + sylvan_stats_count(MTBDD_ABSTRACT_CACHEDPUT); + } sylvan_deref(res1Inf); sylvan_deref(res2Inf); - //printf("return properly computed result...\n"); return res; } else { /* if (level == vv) */ BDD res1 = CALL(sylvan_existsRepresentative, aLow, variables, level); @@ -162,7 +165,11 @@ TASK_IMPL_3(BDD, sylvan_existsRepresentative, BDD, a, BDD, variables, BDDVAR, pr sylvan_deref(res1); sylvan_deref(res2); - //printf("return of last case...\n"); + /* Store in cache */ + if (cache_put3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, variables, (size_t)2, res)) { + sylvan_stats_count(MTBDD_ABSTRACT_CACHEDPUT); + } + return res; } diff --git a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c index 873c116f4..39de0400b 100644 --- a/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c +++ b/resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c @@ -616,11 +616,18 @@ TASK_IMPL_3(BDD, mtbdd_min_abstract_representative, MTBDD, a, BDD, v, BDDVAR, pr return res1; } + /* Check cache */ + MTBDD result; + if (cache_get3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, v, (size_t)1, &result)) { + sylvan_stats_count(MTBDD_ABSTRACT_CACHED); + return result; + } + mtbddnode_t na = MTBDD_GETNODE(a); uint32_t va = mtbddnode_getvariable(na); bddnode_t nv = MTBDD_GETNODE(v); BDDVAR vv = bddnode_getvariable(nv); - + /* Abstract a variable that does not appear in a. */ if (va > vv) { BDD _v = sylvan_set_next(v); @@ -640,13 +647,6 @@ TASK_IMPL_3(BDD, mtbdd_min_abstract_representative, MTBDD, a, BDD, v, BDDVAR, pr return res1; } - /* Check cache */ - MTBDD result; - if (cache_get3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, v, (size_t)1, &result)) { - sylvan_stats_count(MTBDD_ABSTRACT_CACHED); - return result; - } - MTBDD E = mtbdd_getlow(a); MTBDD T = mtbdd_gethigh(a); @@ -796,12 +796,19 @@ TASK_IMPL_3(BDD, mtbdd_max_abstract_representative, MTBDD, a, MTBDD, v, uint32_t return res1; } - + + /* Check cache */ + MTBDD result; + if (cache_get3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, v, (size_t)0, &result)) { + sylvan_stats_count(MTBDD_ABSTRACT_CACHED); + return result; + } + mtbddnode_t na = MTBDD_GETNODE(a); uint32_t va = mtbddnode_getvariable(na); bddnode_t nv = MTBDD_GETNODE(v); BDDVAR vv = bddnode_getvariable(nv); - + /* Abstract a variable that does not appear in a. */ if (vv < va) { BDD _v = sylvan_set_next(v); @@ -821,13 +828,6 @@ TASK_IMPL_3(BDD, mtbdd_max_abstract_representative, MTBDD, a, MTBDD, v, uint32_t return res1; } - /* Check cache */ - MTBDD result; - if (cache_get3(CACHE_MTBDD_ABSTRACT_REPRESENTATIVE, a, v, (size_t)0, &result)) { - sylvan_stats_count(MTBDD_ABSTRACT_CACHED); - return result; - } - MTBDD E = mtbdd_getlow(a); MTBDD T = mtbdd_gethigh(a); diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 5767cb448..502885d7d 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -526,8 +526,12 @@ namespace storm { InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getNondeterminismVariables()); auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); + auto start = std::chrono::high_resolution_clock::now(); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); + auto end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + start = std::chrono::high_resolution_clock::now(); storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); quotientStateLabeling.addLabel("init", sparseExtractor.extractStates(model.getInitialStates(), partition)); quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); @@ -546,6 +550,8 @@ namespace storm { quotientStateLabeling.addLabel(stream.str(), sparseExtractor.extractStates(model.getStates(expression), partition)); } } + end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); std::shared_ptr> result; if (model.getType() == storm::models::ModelType::Dtmc) { From 115f7734ebb91727ee76316464f4f66a89507e0b Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 10 Aug 2017 14:53:55 +0200 Subject: [PATCH 37/95] more work on dd bisim --- src/storm/storage/SparseMatrix.cpp | 4 +- .../dd/bisimulation/QuotientExtractor.cpp | 183 ++++++++++++++---- .../dd/bisimulation/SignatureRefiner.cpp | 30 +-- src/storm/storage/dd/cudd/utility.h | 21 ++ src/storm/storage/dd/sylvan/utility.h | 31 +++ 5 files changed, 198 insertions(+), 71 deletions(-) create mode 100644 src/storm/storage/dd/cudd/utility.h create mode 100644 src/storm/storage/dd/sylvan/utility.h diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index b4c722797..79b53b408 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -1601,7 +1601,9 @@ namespace storm { bool SparseMatrix::isProbabilistic() const { storm::utility::ConstantsComparator comparator; for (index_type row = 0; row < this->rowCount; ++row) { - if (!comparator.isOne(getRowSum(row))) { + auto rowSum = getRowSum(row); + if (!comparator.isOne(rowSum)) { + std::cout << "row sum of row " << row << " is " << rowSum << std::endl; return false; } } diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 502885d7d..c1b1c06d5 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -1,5 +1,7 @@ #include "storm/storage/dd/bisimulation/QuotientExtractor.h" +#include + #include "storm/storage/dd/DdManager.h" #include "storm/models/symbolic/Dtmc.h" @@ -13,6 +15,9 @@ #include "storm/storage/dd/bisimulation/PreservationInformation.h" +#include "storm/storage/dd/cudd/utility.h" +#include "storm/storage/dd/sylvan/utility.h" + #include "storm/settings/SettingsManager.h" #include "storm/utility/macros.h" @@ -53,21 +58,78 @@ namespace storm { auto const& ddMetaVariable = manager.getMetaVariable(variable); allSourceVariablesCube &= ddMetaVariable.getCube(); nondeterminismVariablesCube &= ddMetaVariable.getCube(); + + std::vector> indicesAndLevels = ddMetaVariable.getIndicesAndLevels(); + nondeterminismVariablesIndicesAndLevels.insert(nondeterminismVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); } // Sort the indices by their levels. std::sort(sourceVariablesIndicesAndLevels.begin(), sourceVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); + std::sort(nondeterminismVariablesIndicesAndLevels.begin(), nondeterminismVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); } protected: storm::storage::SparseMatrix createMatrixFromEntries(Partition const& partition) { - for (auto& row : entries) { - std::sort(row.begin(), row.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { return a.getColumn() < b.getColumn(); } ); + if (!deterministicEntries.empty()) { + return createMatrixFromDeterministicEntries(partition); + } else { + return createMatrixFromNondeterministicEntries(partition); + } + } + + storm::storage::SparseMatrix createMatrixFromNondeterministicEntries(Partition const& partition) { + bool nontrivialRowGrouping = false; + uint64_t numberOfChoices = 0; + for (auto& group : nondeterministicEntries) { + for (auto& choice : group) { + auto& row = choice.second; + std::sort(row.begin(), row.end(), + [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { + return a.getColumn() < b.getColumn(); + }); + ++numberOfChoices; + } + nontrivialRowGrouping |= group.size() > 1; + } + + storm::storage::SparseMatrixBuilder builder(numberOfChoices, partition.getNumberOfBlocks(), 0, false, nontrivialRowGrouping); + uint64_t rowCounter = 0; + for (auto& group : nondeterministicEntries) { + for (auto& choice : group) { + auto& row = choice.second; + for (auto const& entry : row) { + builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); + } + + // Free storage for row. + row.clear(); + row.shrink_to_fit(); + + ++rowCounter; + } + + group.clear(); + + if (nontrivialRowGrouping) { + builder.newRowGroup(rowCounter); + } + } + nondeterministicEntries.clear(); + nondeterministicEntries.shrink_to_fit(); + return builder.build(); + } + + storm::storage::SparseMatrix createMatrixFromDeterministicEntries(Partition const& partition) { + for (auto& row : deterministicEntries) { + std::sort(row.begin(), row.end(), + [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { + return a.getColumn() < b.getColumn(); + }); } storm::storage::SparseMatrixBuilder builder(partition.getNumberOfBlocks(), partition.getNumberOfBlocks()); uint64_t rowCounter = 0; - for (auto& row : entries) { + for (auto& row : deterministicEntries) { for (auto const& entry : row) { builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); } @@ -79,15 +141,37 @@ namespace storm { ++rowCounter; } + deterministicEntries.clear(); + deterministicEntries.shrink_to_fit(); + return builder.build(); } + void addMatrixEntry(storm::storage::BitVector const& nondeterminismEncoding, uint64_t sourceBlockIndex, uint64_t targetBlockIndex, ValueType const& value) { + if (nondeterminismVariablesIndicesAndLevels.empty()) { + this->deterministicEntries[sourceBlockIndex].emplace_back(targetBlockIndex, value); + } else { + this->nondeterministicEntries[sourceBlockIndex][nondeterminismEncoding].emplace_back(targetBlockIndex, value); + } + } + + void reserveMatrixEntries(uint64_t numberOfStates) { + if (nondeterminismVariablesIndicesAndLevels.empty()) { + this->deterministicEntries.resize(numberOfStates); + } else { + this->nondeterministicEntries.resize(numberOfStates); + } + } + // The manager responsible for the DDs. storm::dd::DdManager const& manager; // The indices and levels of all state variables. std::vector> sourceVariablesIndicesAndLevels; - + + // The indices and levels of all state variables. + std::vector> nondeterminismVariablesIndicesAndLevels; + // Useful cubes needed in the translation. storm::dd::Bdd stateVariablesCube; storm::dd::Bdd allSourceVariablesCube; @@ -96,8 +180,11 @@ namespace storm { // A hash map that stores the unique source state representative for each source block index. spp::sparse_hash_map> uniqueSourceRepresentative; - // The entries of the matrix that is built. - std::vector>> entries; + // The entries of the matrix that is built if the model is deterministic (DTMC, CTMC). + std::vector>> deterministicEntries; + + // The entries of the matrix that is built if the model is nondeterministic (MDP). + std::vector>>> nondeterministicEntries; }; template @@ -111,11 +198,12 @@ namespace storm { STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); // Create the number of rows necessary for the matrix. - this->entries.resize(partition.getNumberOfBlocks()); + this->reserveMatrixEntries(partition.getNumberOfBlocks()); STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); - storm::storage::BitVector encoding(this->sourceVariablesIndicesAndLevels.size()); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, encoding); + storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); + storm::storage::BitVector nondeterminismEncoding(this->nondeterminismVariablesIndicesAndLevels.size()); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, stateEncoding, nondeterminismEncoding); return this->createMatrixFromEntries(partition); } @@ -203,7 +291,7 @@ namespace storm { } } - void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { + void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, uint64_t factor = 1) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (transitionMatrixNode == Cudd_ReadZero(ddman)) { @@ -211,23 +299,22 @@ namespace storm { } // If we have moved through all source variables, we must have arrived at a target block encoding. - if (currentIndex == sourceState.size()) { + if (sourceStateEncodingIndex == sourceStateEncoding.size()) { // Decode the source block. uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; - if (sourceRepresentative && *sourceRepresentative != sourceState) { + if (sourceRepresentative && *sourceRepresentative != sourceStateEncoding) { // In this case, we have picked a different representative and must not record any entries now. return; } // Otherwise, we record the new representative. - sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); + sourceRepresentative.reset(new storm::storage::BitVector(sourceStateEncoding)); - // Decode the target block. + // Decode the target block and add entry to matrix. uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); - - this->entries[sourceBlockIndex].emplace_back(targetBlockIndex, Cudd_V(transitionMatrixNode)); + this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * Cudd_V(transitionMatrixNode)); } else { // Determine the levels in the DDs. uint64_t transitionMatrixVariable = Cudd_NodeReadIndex(transitionMatrixNode); @@ -239,28 +326,27 @@ namespace storm { DdNode* te = transitionMatrixNode; DdNode* et = transitionMatrixNode; DdNode* ee = transitionMatrixNode; - STORM_LOG_ASSERT(transitionMatrixVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of transition matrix."); - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(transitionMatrixVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of transition matrix."); + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { DdNode* t = Cudd_T(transitionMatrixNode); - DdNode* e = Cudd_E(transitionMatrixNode); - uint64_t tVariable = Cudd_NodeReadIndex(t); - if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { + if (tVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { tt = Cudd_T(t); te = Cudd_E(t); } else { tt = te = t; } + DdNode* e = Cudd_E(transitionMatrixNode); uint64_t eVariable = Cudd_NodeReadIndex(e); - if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { + if (eVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { et = Cudd_T(e); ee = Cudd_E(e); } else { et = ee = e; } } else { - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { + if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { tt = et = Cudd_T(transitionMatrixNode); te = ee = Cudd_E(transitionMatrixNode); } else { @@ -269,34 +355,44 @@ namespace storm { } // Move through partition (for source state). + bool skippedInSourcePartition = false; DdNode* sourceT; DdNode* sourceE; - STORM_LOG_ASSERT(sourcePartitionVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); - if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(sourcePartitionVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of source partition."); + if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { sourceT = Cudd_T(sourcePartitionNode); sourceE = Cudd_E(sourcePartitionNode); } else { sourceT = sourceE = sourcePartitionNode; + skippedInSourcePartition = true; } // Move through partition (for target state). + bool skippedInTargetPartition = false; DdNode* targetT; DdNode* targetE; - STORM_LOG_ASSERT(targetPartitionVariable >= this->sourceVariablesIndicesAndLevels[currentIndex].first, "Illegal top variable of source partition."); - if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { + STORM_LOG_ASSERT(targetPartitionVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of source partition."); + if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { targetT = Cudd_T(targetPartitionNode); targetE = Cudd_E(targetPartitionNode); } else { targetT = targetE = targetPartitionNode; + skippedInTargetPartition = true; } - sourceState.set(currentIndex, true); - extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState); - extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState); + // If we skipped the variable in the source partition, we only have to choose one of the two representatives. + if (!skippedInSourcePartition) { + sourceStateEncoding.set(sourceStateEncodingIndex, true); + extractTransitionMatrixRec(tt, sourceT, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + extractTransitionMatrixRec(te, sourceT, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + } - sourceState.set(currentIndex, false); - extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState); - extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState); + sourceStateEncoding.set(sourceStateEncodingIndex, false); + // If we skipped the variable in the target partition, just count the one representative twice. + if (!skippedInTargetPartition) { + extractTransitionMatrixRec(et, sourceE, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + } + extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedInTargetPartition ? factor << 1 : factor); } } @@ -316,10 +412,11 @@ namespace storm { STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); // Create the number of rows necessary for the matrix. - this->entries.resize(partition.getNumberOfBlocks()); - - storm::storage::BitVector encoding(this->sourceVariablesIndicesAndLevels.size()); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, encoding); + this->reserveMatrixEntries(partition.getNumberOfBlocks()); + + storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); + storm::storage::BitVector nondeterminismEncoding; + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, stateEncoding, nondeterminismEncoding); return this->createMatrixFromEntries(partition); } @@ -400,7 +497,7 @@ namespace storm { } } - void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState) { + void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (mtbdd_iszero(transitionMatrixNode)) { @@ -424,7 +521,7 @@ namespace storm { // Decode the target block. uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); - this->entries[sourceBlockIndex].emplace_back(targetBlockIndex, storm::dd::InternalAdd::getValue(transitionMatrixNode)); + this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, storm::dd::InternalAdd::getValue(transitionMatrixNode)); } else { // Determine the levels in the DDs. uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); @@ -485,12 +582,12 @@ namespace storm { } sourceState.set(currentIndex, true); - extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState); - extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState); + extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding); + extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding); sourceState.set(currentIndex, false); - extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState); - extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState); + extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding); + extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding); } } diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 30cafe2cc..3e83e6782 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -7,6 +7,9 @@ #include "storm/storage/dd/cudd/InternalCuddDdManager.h" +#include "storm/storage/dd/cudd/utility.h" +#include "storm/storage/dd/sylvan/utility.h" + #include "storm/utility/macros.h" #include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/NotImplementedException.h" @@ -25,33 +28,6 @@ namespace storm { namespace dd { namespace bisimulation { - struct CuddPointerPairHash { - std::size_t operator()(std::pair const& pair) const { - std::size_t seed = std::hash()(pair.first); - spp::hash_combine(seed, pair.second); - return seed; - } - }; - - struct SylvanMTBDDPairHash { - std::size_t operator()(std::pair const& pair) const { - std::size_t seed = std::hash()(pair.first); - spp::hash_combine(seed, pair.second); - return seed; - } - }; - - struct SylvanMTBDDPairLess { - std::size_t operator()(std::pair const& a, std::pair const& b) const { - if (a.first < b.first) { - return true; - } else if (a.first == b.first && a.second < b.second) { - return true; - } - return false; - } - }; - template class InternalSignatureRefiner; diff --git a/src/storm/storage/dd/cudd/utility.h b/src/storm/storage/dd/cudd/utility.h new file mode 100644 index 000000000..3b7935890 --- /dev/null +++ b/src/storm/storage/dd/cudd/utility.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +// Include the C++-interface of CUDD. +#include "cuddObj.hh" + +namespace storm { + namespace dd { + + struct CuddPointerPairHash { + std::size_t operator()(std::pair const& pair) const { + std::hash hasher; + std::size_t seed = hasher(pair.first); + boost::hash_combine(seed, hasher(pair.second)); + return seed; + } + }; + + } +} diff --git a/src/storm/storage/dd/sylvan/utility.h b/src/storm/storage/dd/sylvan/utility.h new file mode 100644 index 000000000..02a06a3bf --- /dev/null +++ b/src/storm/storage/dd/sylvan/utility.h @@ -0,0 +1,31 @@ +#pragma once + +#include "storm/utility/sylvan.h" + +#include + +namespace storm { + namespace dd { + + struct SylvanMTBDDPairHash { + std::size_t operator()(std::pair const& pair) const { + std::hash hasher; + std::size_t seed = hasher(pair.first); + boost::hash_combine(seed, hasher(pair.second)); + return seed; + } + }; + + struct SylvanMTBDDPairLess { + std::size_t operator()(std::pair const& a, std::pair const& b) const { + if (a.first < b.first) { + return true; + } else if (a.first == b.first && a.second < b.second) { + return true; + } + return false; + } + }; + + } +} From 8ed3a8a6db42681fe72517469b0d86bd0843659b Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 11 Aug 2017 16:31:13 +0200 Subject: [PATCH 38/95] fixed some issues with meta variables in DDs --- ...ymbolicEliminationLinearEquationSolver.cpp | 6 +- src/storm/storage/dd/DdManager.cpp | 132 ++++++++---------- src/storm/storage/dd/DdManager.h | 18 +++ src/storm/storage/dd/DdMetaVariable.cpp | 27 +++- src/storm/storage/dd/DdMetaVariable.h | 24 +++- .../dd/bisimulation/QuotientExtractor.cpp | 4 +- 6 files changed, 122 insertions(+), 89 deletions(-) diff --git a/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp b/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp index 43fb7f0a2..bcbc41085 100644 --- a/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp @@ -29,11 +29,7 @@ namespace storm { ++counter; } - if (metaVariable.getType() == storm::dd::MetaVariableType::Bool) { - newMetaVariables = ddManager.addMetaVariable(newMetaVariableName + std::to_string(counter), 3); - } else { - newMetaVariables = ddManager.addMetaVariable(newMetaVariableName + std::to_string(counter), metaVariable.getLow(), metaVariable.getHigh(), 3); - } + newMetaVariables = ddManager.cloneVariable(metaVariablePair.first, newMetaVariableName + std::to_string(counter), 3); newRowVariables.insert(newMetaVariables[0]); newColumnVariables.insert(newMetaVariables[1]); diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index a27e86dea..58d6f20f6 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -7,6 +7,7 @@ #include "storm/exceptions/InvalidArgumentException.h" #include "storm/exceptions/NotSupportedException.h" +#include "storm/exceptions/InvalidOperationException.h" #include "storm-config.h" #include "storm/adapters/RationalFunctionAdapter.h" @@ -75,7 +76,7 @@ namespace storm { Bdd DdManager::getEncoding(storm::expressions::Variable const& variable, int_fast64_t value, bool mostSignificantBitAtTop) const { DdMetaVariable const& metaVariable = this->getMetaVariable(variable); - STORM_LOG_THROW(value >= metaVariable.getLow() && value <= metaVariable.getHigh(), storm::exceptions::InvalidArgumentException, "Illegal value " << value << " for meta variable '" << variable.getName() << "'."); + STORM_LOG_THROW(metaVariable.canRepresent(value), storm::exceptions::InvalidArgumentException, "Illegal value " << value << " for meta variable '" << variable.getName() << "'."); // Now compute the encoding relative to the low value of the meta variable. value -= metaVariable.getLow(); @@ -121,6 +122,7 @@ namespace storm { template Bdd DdManager::getRange(storm::expressions::Variable const& variable) const { storm::dd::DdMetaVariable const& metaVariable = this->getMetaVariable(variable); + STORM_LOG_THROW(metaVariable.hasHigh(), storm::exceptions::InvalidOperationException, "Cannot create range for meta variable."); Bdd result = this->getBddZero(); @@ -135,6 +137,7 @@ namespace storm { template Add DdManager::getIdentity(storm::expressions::Variable const& variable) const { storm::dd::DdMetaVariable const& metaVariable = this->getMetaVariable(variable); + STORM_LOG_THROW(metaVariable.hasHigh(), storm::exceptions::InvalidOperationException, "Cannot create identity for meta variable."); Add result = this->getAddZero(); for (int_fast64_t value = metaVariable.getLow(); value <= metaVariable.getHigh(); ++value) { @@ -158,6 +161,20 @@ namespace storm { return result; } + template + std::vector DdManager::cloneVariable(storm::expressions::Variable const& variable, std::string const& newMetaVariableName, boost::optional const& numberOfLayers) { + std::vector newMetaVariables; + auto const& ddMetaVariable = this->getMetaVariable(variable); + if (ddMetaVariable.getType() == storm::dd::MetaVariableType::Bool) { + newMetaVariables = this->addMetaVariable(newMetaVariableName, 3); + } else if (ddMetaVariable.getType() == storm::dd::MetaVariableType::Int) { + newMetaVariables = this->addMetaVariable(newMetaVariableName, ddMetaVariable.getLow(), ddMetaVariable.getHigh(), 3); + } else if (ddMetaVariable.getType() == storm::dd::MetaVariableType::BitVector) { + newMetaVariables = this->addBitVectorMetaVariable(newMetaVariableName, ddMetaVariable.getNumberOfDdVariables(), 3); + } + return newMetaVariables; + } + template std::pair DdManager::addMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, boost::optional> const& position) { std::vector result = addMetaVariable(name, low, high, 2, position); @@ -166,87 +183,33 @@ namespace storm { template std::vector DdManager::addMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, uint64_t numberOfLayers, boost::optional> const& position) { - // Check whether number of layers is legal. - STORM_LOG_THROW(numberOfLayers >= 1, storm::exceptions::InvalidArgumentException, "Layers must be at least 1."); - - // Check whether the variable name is legal. - STORM_LOG_THROW(name != "" && name.back() != '\'', storm::exceptions::InvalidArgumentException, "Illegal name of meta variable: '" << name << "'."); - - // Check whether a meta variable already exists. - STORM_LOG_THROW(!this->hasMetaVariable(name), storm::exceptions::InvalidArgumentException, "A meta variable '" << name << "' already exists."); - - // Check that the range is legal. - STORM_LOG_THROW(high >= low, storm::exceptions::InvalidArgumentException, "Illegal empty range for meta variable."); - - std::size_t numberOfBits = static_cast(std::ceil(std::log2(high - low + 1))); - - // If a specific position was requested, we compute it now. - boost::optional level; - if (position) { - storm::dd::DdMetaVariable beforeVariable = this->getMetaVariable(position.get().second); - level = position.get().first == MetaVariablePosition::Above ? std::numeric_limits::max() : std::numeric_limits::min(); - for (auto const& ddVariable : beforeVariable.getDdVariables()) { - level = position.get().first == MetaVariablePosition::Above ? std::min(level.get(), ddVariable.getLevel()) : std::max(level.get(), ddVariable.getLevel()); - } - if (position.get().first == MetaVariablePosition::Below) { - ++level.get(); - } - } - - // For the case where low and high coincide, we need to have a single bit. - if (numberOfBits == 0) { - ++numberOfBits; - } - - STORM_LOG_TRACE("Creating meta variable with " << numberOfBits << " bit(s) and " << numberOfLayers << " layer(s)."); - - std::stringstream tmp1; - std::vector result; - for (uint64 layer = 0; layer < numberOfLayers; ++layer) { - result.emplace_back(manager->declareBitVectorVariable(name + tmp1.str(), numberOfBits)); - tmp1 << "'"; - } - - std::vector>> variables(numberOfLayers); - - for (std::size_t i = 0; i < numberOfBits; ++i) { - std::vector> ddVariables = internalDdManager.createDdVariables(numberOfLayers, level); - for (uint64 layer = 0; layer < numberOfLayers; ++layer) { - variables[layer].emplace_back(Bdd(*this, ddVariables[layer], {result[layer]})); - } - - // If we are inserting the variable at a specific level, we need to prepare the level for the next pair - // of variables. - if (level) { - level.get() += numberOfLayers; - } - } - - std::stringstream tmp2; - for (uint64_t layer = 0; layer < numberOfLayers; ++layer) { - metaVariableMap.emplace(result[layer], DdMetaVariable(name + tmp2.str(), low, high, variables[layer])); - tmp2 << "'"; - } - - return result; + return this->addMetaVariableHelper(MetaVariableType::Int, name, std::max(static_cast(std::ceil(std::log2(high - low + 1))), 1ull), numberOfLayers, position, std::make_pair(low, high)); } template std::vector DdManager::addBitVectorMetaVariable(std::string const& variableName, uint64_t bits, uint64_t numberOfLayers, boost::optional> const& position) { - return this->addMetaVariable(variableName, 0, (1ull << bits) - 1, numberOfLayers, position); + return this->addMetaVariableHelper(MetaVariableType::BitVector, variableName, bits, numberOfLayers, position); } template std::pair DdManager::addMetaVariable(std::string const& name, boost::optional> const& position) { - std::vector result = addMetaVariable(name, 2, position); + std::vector result = this->addMetaVariableHelper(MetaVariableType::Bool, name, 1, 2, position); return std::make_pair(result[0], result[1]); } template std::vector DdManager::addMetaVariable(std::string const& name, uint64_t numberOfLayers, boost::optional> const& position) { + return this->addMetaVariableHelper(MetaVariableType::Bool, name, 1, numberOfLayers, position); + } + + template + std::vector DdManager::addMetaVariableHelper(MetaVariableType const& type, std::string const& name, uint64_t numberOfDdVariables, uint64_t numberOfLayers, boost::optional> const& position, boost::optional> const& bounds) { // Check whether number of layers is legal. STORM_LOG_THROW(numberOfLayers >= 1, storm::exceptions::InvalidArgumentException, "Layers must be at least 1."); - + + // Check that the number of DD variables is legal. + STORM_LOG_THROW(numberOfDdVariables >= 1, storm::exceptions::InvalidArgumentException, "Illegal number of DD variables."); + // Check whether the variable name is legal. STORM_LOG_THROW(name != "" && name.back() != '\'', storm::exceptions::InvalidArgumentException, "Illegal name of meta variable: '" << name << "'."); @@ -256,7 +219,6 @@ namespace storm { // If a specific position was requested, we compute it now. boost::optional level; if (position) { - STORM_LOG_THROW(this->supportsOrderedInsertion(), storm::exceptions::NotSupportedException, "Cannot add meta variable at position, because the manager does not support ordered insertion."); storm::dd::DdMetaVariable beforeVariable = this->getMetaVariable(position.get().second); level = position.get().first == MetaVariablePosition::Above ? std::numeric_limits::max() : std::numeric_limits::min(); for (auto const& ddVariable : beforeVariable.getDdVariables()) { @@ -267,27 +229,45 @@ namespace storm { } } + STORM_LOG_TRACE("Creating meta variable with " << numberOfDdVariables << " bit(s) and " << numberOfLayers << " layer(s)."); + std::stringstream tmp1; std::vector result; for (uint64 layer = 0; layer < numberOfLayers; ++layer) { - result.emplace_back(manager->declareBooleanVariable(name + tmp1.str())); + if (type == MetaVariableType::Int) { + result.emplace_back(manager->declareIntegerVariable(name + tmp1.str())); + } else if (type == MetaVariableType::Bool) { + result.emplace_back(manager->declareBooleanVariable(name + tmp1.str())); + } else if (type == MetaVariableType::BitVector) { + result.emplace_back(manager->declareBitVectorVariable(name + tmp1.str(), numberOfDdVariables)); + } tmp1 << "'"; } std::vector>> variables(numberOfLayers); - - std::vector> ddVariables = internalDdManager.createDdVariables(numberOfLayers, level); - - for (uint64_t layer = 0; layer < numberOfLayers; ++layer) { - variables[layer].emplace_back(Bdd(*this, ddVariables[layer], {result[layer]})); + for (std::size_t i = 0; i < numberOfDdVariables; ++i) { + std::vector> ddVariables = internalDdManager.createDdVariables(numberOfLayers, level); + for (uint64 layer = 0; layer < numberOfLayers; ++layer) { + variables[layer].emplace_back(Bdd(*this, ddVariables[layer], {result[layer]})); + } + + // If we are inserting the variable at a specific level, we need to prepare the level for the next pair + // of variables. + if (level) { + level.get() += numberOfLayers; + } } std::stringstream tmp2; for (uint64_t layer = 0; layer < numberOfLayers; ++layer) { - metaVariableMap.emplace(result[layer], DdMetaVariable(name + tmp2.str(), variables[layer])); + if (bounds) { + metaVariableMap.emplace(result[layer], DdMetaVariable(name + tmp2.str(), bounds.get().first, bounds.get().second, variables[layer])); + } else { + metaVariableMap.emplace(result[layer], DdMetaVariable(type, name + tmp2.str(), variables[layer])); + } tmp2 << "'"; } - + return result; } diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index 2d2405bb6..3332d1b88 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -147,6 +147,15 @@ namespace storm { */ Bdd getCube(std::set const& variables) const; + /*! + * Clones the given meta variable and optionally changes the number of layers of the variable. + * + * @param variable The variable to clone. + * @param newVariableName The name of the variable to crate. + * @param numberOfLayers The number of layers of the variable to crate + */ + std::vector cloneVariable(storm::expressions::Variable const& variable, std::string const& newVariableName, boost::optional const& numberOfLayers = boost::none); + /*! * Adds an integer meta variable with the given range with two layers (a 'normal' and a 'primed' one). * @@ -297,6 +306,15 @@ namespace storm { void debugCheck() const; private: + /*! + * Creates a meta variable with the given number of DD variables and layers. + * + * @param type The type of the meta variable to create. + * @param name The name of the variable. + * @param numberOfLayers The number of layers of this variable (must be greater or equal 1). + */ + std::vector addMetaVariableHelper(MetaVariableType const& type, std::string const& name, uint64_t numberOfDdVariables, uint64_t numberOfLayers, boost::optional> const& position = boost::none, boost::optional> const& bounds = boost::none); + /*! * Retrieves a list of names of the DD variables in the order of their index. * diff --git a/src/storm/storage/dd/DdMetaVariable.cpp b/src/storm/storage/dd/DdMetaVariable.cpp index 9cebd15cb..f05ad31b4 100644 --- a/src/storm/storage/dd/DdMetaVariable.cpp +++ b/src/storm/storage/dd/DdMetaVariable.cpp @@ -10,7 +10,16 @@ namespace storm { } template - DdMetaVariable::DdMetaVariable(std::string const& name, std::vector> const& ddVariables) : name(name), type(MetaVariableType::Bool), low(0), high(1), ddVariables(ddVariables) { + DdMetaVariable::DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector> const& ddVariables) : name(name), type(type), low(0), ddVariables(ddVariables) { + STORM_LOG_ASSERT(type == MetaVariableType::Bool || type == MetaVariableType::BitVector, "Cannot create this type of meta variable in this constructor."); + if (ddVariables.size() < 63) { + this->high = (1ull << ddVariables.size()) - 1; + } + + // Correct type in the case of boolean variables. + if (ddVariables.size() == 1) { + this->type = MetaVariableType::Bool; + } this->createCube(); } @@ -31,7 +40,21 @@ namespace storm { template int_fast64_t DdMetaVariable::getHigh() const { - return this->high; + return this->high.get(); + } + + template + bool DdMetaVariable::hasHigh() const { + return static_cast(this->high); + } + + template + bool DdMetaVariable::canRepresent(int_fast64_t value) const { + bool result = value >= this->low; + if (result && high) { + return value <= this->high; + } + return false; } template diff --git a/src/storm/storage/dd/DdMetaVariable.h b/src/storm/storage/dd/DdMetaVariable.h index c18f9fa44..3bb0144cc 100644 --- a/src/storm/storage/dd/DdMetaVariable.h +++ b/src/storm/storage/dd/DdMetaVariable.h @@ -16,7 +16,7 @@ namespace storm { class Add; // An enumeration for all legal types of meta variables. - enum class MetaVariableType { Bool, Int }; + enum class MetaVariableType { Bool, Int, BitVector }; // Declare DdMetaVariable class so we can then specialize it for the different DD types. template @@ -52,6 +52,13 @@ namespace storm { */ int_fast64_t getLow() const; + /*! + * Retrieves whether the variable has an upper bound. + * + * @return True iff the variable has an upper bound. + */ + bool hasHigh() const; + /*! * Retrieves the highest value of the range of the variable. * @@ -59,6 +66,14 @@ namespace storm { */ int_fast64_t getHigh() const; + /*! + * Retrieves whether the meta variable can represent the given value. + * + * @param value The value to check for legality. + * @return True iff the value is legal. + */ + bool canRepresent(int_fast64_t value) const; + /*! * Retrieves the number of DD variables for this meta variable. * @@ -99,14 +114,15 @@ namespace storm { * @param manager A pointer to the manager that is responsible for this meta variable. */ DdMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, std::vector> const& ddVariables); - + /*! * Creates a boolean meta variable with the given name. + * @param type The type of the meta variable. * @param name The name of the meta variable. * @param ddVariables The vector of variables used to encode this variable. * @param manager A pointer to the manager that is responsible for this meta variable. */ - DdMetaVariable(std::string const& name, std::vector> const& ddVariables); + DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector> const& ddVariables); /*! * Retrieves the variables used to encode the meta variable. @@ -130,7 +146,7 @@ namespace storm { int_fast64_t low; // The highest value of the range of the variable. - int_fast64_t high; + boost::optional high; // The vector of variables that are used to encode the meta variable. std::vector> ddVariables; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index c1b1c06d5..efd8f63b8 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -291,7 +291,7 @@ namespace storm { } } - void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, uint64_t factor = 1) { + void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, ValueType factor = 1) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (transitionMatrixNode == Cudd_ReadZero(ddman)) { @@ -392,7 +392,7 @@ namespace storm { if (!skippedInTargetPartition) { extractTransitionMatrixRec(et, sourceE, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); } - extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedInTargetPartition ? factor << 1 : factor); + extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedInTargetPartition ? 2 * factor : factor); } } From 75ec21b1d6b2bb4cb02df5a172c5f34b9de4624c Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 11 Aug 2017 16:31:42 +0200 Subject: [PATCH 39/95] remove USE_CARL variable and add option to take hint for carl directory --- CMakeLists.txt | 2 +- resources/3rdparty/CMakeLists.txt | 174 +++++++++++++++--------------- 2 files changed, 87 insertions(+), 89 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a824c2bb8..32e5ff8b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ MARK_AS_ADVANCED(STORM_FORCE_POPCNT) option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." OFF) option(STORM_USE_INTELTBB "Sets whether the Intel TBB libraries should be used." OFF) option(STORM_USE_GUROBI "Sets whether Gurobi should be used." OFF) -set(USE_CARL ON) +set(STORM_CARL_DIR_HINT "" CACHE STRING "A hint where the preferred CArL version can be found. If CArL cannot be found there, it is searched in the OS's default paths.") option(STORM_FORCE_SHIPPED_CARL "Sets whether the shipped version of carl is to be used no matter whether carl is found or not." OFF) MARK_AS_ADVANCED(STORM_FORCE_SHIPPED_CARL) option(USE_SMTRAT "Sets whether SMT-RAT should be included." OFF) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 15d46c381..1591fa464 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -210,109 +210,107 @@ set(STORM_HAVE_CARL OFF) set(CARL_MINYEAR 17) set(CARL_MINMONTH 06) set(CARL_MINPATCH 0) -if(USE_CARL) - if (NOT STORM_FORCE_SHIPPED_CARL) - find_package(carl QUIET) - endif() - if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL) - get_target_property(carlLOCATION lib_carl LOCATION) - if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND") - message(SEND_ERROR "Library location for carl is not found, did you build carl?") - elseif(EXISTS ${carlLOCATION}) - #empty on purpose - else() - message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?") - endif() - if(${carl_MINORYEARVERSION} LESS ${CARL_MINYEAR}) +if (NOT STORM_FORCE_SHIPPED_CARL) + if (NOT "${STORM_CARL_DIR_HINT}" STREQUAL "") + find_package(carl QUIET PATHS ${STORM_CARL_DIR_HINT} NO_DEFAULT_PATH) + endif() + if (NOT carl_FOUND) + find_package(carl QUIET) + endif() +endif() +if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL) + get_target_property(carlLOCATION lib_carl LOCATION) + if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND") + message(SEND_ERROR "Library location for carl is not found, did you build carl?") + elseif(EXISTS ${carlLOCATION}) + #empty on purpose + else() + message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?") + endif() + if(${carl_MINORYEARVERSION} LESS ${CARL_MINYEAR}) + message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}") + elseif(${carl_MINORYEARVERSION} EQUAL ${CARL_MINYEAR}) + if(${carl_MINORMONTHVERSION} LESS ${CARL_MINMONTH}) message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}") - elseif(${carl_MINORYEARVERSION} EQUAL ${CARL_MINYEAR}) - if(${carl_MINORMONTHVERSION} LESS ${CARL_MINMONTH}) + elseif(${carl_MINORMONTHVERSION} EQUAL ${CARL_MINMONTH}) + if(${carl_MAINTENANCEVERSION} LESS ${CARL_MINPATCH}) message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}") - elseif(${carl_MINORMONTHVERSION} EQUAL ${CARL_MINMONTH}) - if(${carl_MAINTENANCEVERSION} LESS ${CARL_MINPATCH}) - message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}") - endif() endif() endif() + endif() - set(STORM_SHIPPED_CARL OFF) - set(STORM_HAVE_CARL ON) - message(STATUS "Storm - Use system version of carl.") - message(STATUS "Storm - Linking with preinstalled carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).") - set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) - set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) - - else() - set(STORM_SHIPPED_CARL ON) - # The first external project will be built at *configure stage* - message("START CARL CONFIG PROCESS") - file(MAKE_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download) - execute_process( - COMMAND ${CMAKE_COMMAND} ${STORM_3RDPARTY_SOURCE_DIR}/carl "-DSTORM_3RDPARTY_BINARY_DIR=${STORM_3RDPARTY_BINARY_DIR}" "-DBoost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}" "-DBoost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}" + set(STORM_SHIPPED_CARL OFF) + set(STORM_HAVE_CARL ON) + message(STATUS "Storm - Use system version of carl.") + message(STATUS "Storm - Linking with preinstalled carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).") + set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) + set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) +else() + set(STORM_SHIPPED_CARL ON) + # The first external project will be built at *configure stage* + message("START CARL CONFIG PROCESS") + file(MAKE_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download) + execute_process( + COMMAND ${CMAKE_COMMAND} ${STORM_3RDPARTY_SOURCE_DIR}/carl "-DSTORM_3RDPARTY_BINARY_DIR=${STORM_3RDPARTY_BINARY_DIR}" "-DBoost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}" "-DBoost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}" + WORKING_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download + OUTPUT_VARIABLE carlconfig_out + RESULT_VARIABLE carlconfig_result) + + if(NOT carlconfig_result) + message("${carlconfig_out}") + endif() + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --target carl-config WORKING_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download OUTPUT_VARIABLE carlconfig_out - RESULT_VARIABLE carlconfig_result) - + RESULT_VARIABLE carlconfig_result + ) if(NOT carlconfig_result) - message("${carlconfig_out}") - endif() - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --target carl-config - WORKING_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download - OUTPUT_VARIABLE carlconfig_out - RESULT_VARIABLE carlconfig_result - ) - if(NOT carlconfig_result) - message("${carlconfig_out}") - endif() - message("END CARL CONFIG PROCESS") + message("${carlconfig_out}") + endif() + message("END CARL CONFIG PROCESS") - message(STATUS "Storm - Using shipped version of carl.") - ExternalProject_Add( - carl - SOURCE_DIR ${STORM_3RDPARTY_BINARY_DIR}/carl - CONFIGURE_COMMAND "" - BUILD_IN_SOURCE 1 - BUILD_COMMAND make lib_carl - INSTALL_COMMAND make install - LOG_BUILD ON - LOG_INSTALL ON - BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl${DYNAMIC_EXT} - ) - include(${STORM_3RDPARTY_BINARY_DIR}/carl/carlConfig.cmake) - - set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) - set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) - - add_dependencies(resources carl) - set(carl_INCLUDE_DIR "${STORM_3RDPARTY_BINARY_DIR}/carl/include/") - set(carl_LIBRARIES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl${DYNAMIC_EXT}) - set(STORM_HAVE_CARL ON) - - message(STATUS "Storm - Linking with shipped carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).") + message(STATUS "Storm - Using shipped version of carl.") + ExternalProject_Add( + carl + SOURCE_DIR ${STORM_3RDPARTY_BINARY_DIR}/carl + CONFIGURE_COMMAND "" + BUILD_IN_SOURCE 1 + BUILD_COMMAND make lib_carl + INSTALL_COMMAND make install + LOG_BUILD ON + LOG_INSTALL ON + BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl${DYNAMIC_EXT} + ) + include(${STORM_3RDPARTY_BINARY_DIR}/carl/carlConfig.cmake) - - # install the carl dynamic library if we build it - install(FILES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl.${carl_VERSION}${DYNAMIC_EXT} DESTINATION lib) - endif() + set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) + set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) - if(STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN) - message(FATAL_ERROR "Cannot use CLN numbers if carl is build without.") - endif() - if(STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC) - message(FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac.") - endif() + add_dependencies(resources carl) + set(carl_INCLUDE_DIR "${STORM_3RDPARTY_BINARY_DIR}/carl/include/") + set(carl_LIBRARIES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl${DYNAMIC_EXT}) + set(STORM_HAVE_CARL ON) + message(STATUS "Storm - Linking with shipped carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).") + + # install the carl dynamic library if we built it + install(FILES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl.${carl_VERSION}${DYNAMIC_EXT} DESTINATION lib) +endif() - #The library that needs symbols must be first, then the library that resolves the symbol. - - list(APPEND STORM_DEP_IMP_TARGETS lib_carl) - if(STORM_USE_CLN_EA OR STORM_USE_CLN_RF) - list(APPEND STORM_DEP_IMP_TARGETS GINAC_SHARED CLN_SHARED) - endif() - list(APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED) +if(STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN) + message(FATAL_ERROR "Cannot use CLN numbers if carl is build without.") +endif() +if(STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC) + message(FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac.") +endif() +# The library that needs symbols must be first, then the library that resolves the symbol. +list(APPEND STORM_DEP_IMP_TARGETS lib_carl) +if(STORM_USE_CLN_EA OR STORM_USE_CLN_RF) + list(APPEND STORM_DEP_IMP_TARGETS GINAC_SHARED CLN_SHARED) endif() +list(APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED) ############################################################# From 7e723b2b8f577367f0396e78f6af337dea6362dd Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 14 Aug 2017 14:35:18 +0200 Subject: [PATCH 40/95] faster block encoding for CUDD; optimizations in sparse quotient extraction --- src/storm/storage/dd/DdMetaVariable.cpp | 32 +++++++++-- src/storm/storage/dd/DdMetaVariable.h | 19 ++++++- .../dd/bisimulation/QuotientExtractor.cpp | 57 ++++++++++++++----- .../dd/bisimulation/SignatureRefiner.cpp | 40 ++++++++++--- 4 files changed, 119 insertions(+), 29 deletions(-) diff --git a/src/storm/storage/dd/DdMetaVariable.cpp b/src/storm/storage/dd/DdMetaVariable.cpp index f05ad31b4..393eea4af 100644 --- a/src/storm/storage/dd/DdMetaVariable.cpp +++ b/src/storm/storage/dd/DdMetaVariable.cpp @@ -5,12 +5,13 @@ namespace storm { namespace dd { template - DdMetaVariable::DdMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, std::vector> const& ddVariables) : name(name), type(MetaVariableType::Int), low(low), high(high), ddVariables(ddVariables) { + DdMetaVariable::DdMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, std::vector> const& ddVariables) : name(name), type(MetaVariableType::Int), low(low), high(high), ddVariables(ddVariables), lowestIndex(0) { this->createCube(); + this->precomputeLowestIndex(); } template - DdMetaVariable::DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector> const& ddVariables) : name(name), type(type), low(0), ddVariables(ddVariables) { + DdMetaVariable::DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector> const& ddVariables) : name(name), type(type), low(0), ddVariables(ddVariables), lowestIndex(0) { STORM_LOG_ASSERT(type == MetaVariableType::Bool || type == MetaVariableType::BitVector, "Cannot create this type of meta variable in this constructor."); if (ddVariables.size() < 63) { this->high = (1ull << ddVariables.size()) - 1; @@ -21,6 +22,7 @@ namespace storm { this->type = MetaVariableType::Bool; } this->createCube(); + this->precomputeLowestIndex(); } template @@ -54,7 +56,7 @@ namespace storm { if (result && high) { return value <= this->high; } - return false; + return result; } template @@ -73,9 +75,11 @@ namespace storm { } template - std::vector DdMetaVariable::getIndices() const { + std::vector DdMetaVariable::getIndices(bool sortedByLevel) const { std::vector> indicesAndLevels = this->getIndicesAndLevels(); - std::sort(indicesAndLevels.begin(), indicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; }); + if (sortedByLevel) { + std::sort(indicesAndLevels.begin(), indicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; }); + } std::vector indices; for (auto const& e : indicesAndLevels) { @@ -110,6 +114,11 @@ namespace storm { return result; } + template + uint64_t DdMetaVariable::getLowestIndex() const { + return lowestIndex; + } + template void DdMetaVariable::createCube() { STORM_LOG_ASSERT(!this->ddVariables.empty(), "The DD variables must not be empty."); @@ -121,6 +130,19 @@ namespace storm { } } + template + void DdMetaVariable::precomputeLowestIndex() { + bool first = true; + for (auto const& var : this->ddVariables) { + if (first) { + first = false; + this->lowestIndex = var.getIndex(); + } else { + this->lowestIndex = std::min(lowestIndex, var.getIndex()); + } + } + } + template class DdMetaVariable; template class DdMetaVariable; } diff --git a/src/storm/storage/dd/DdMetaVariable.h b/src/storm/storage/dd/DdMetaVariable.h index 3bb0144cc..6b1703796 100644 --- a/src/storm/storage/dd/DdMetaVariable.h +++ b/src/storm/storage/dd/DdMetaVariable.h @@ -88,15 +88,22 @@ namespace storm { */ Bdd const& getCube() const; + /*! + * Retrieves the highest index of all DD variables belonging to this meta variable. + */ + uint64_t getLowestIndex() const; + /*! * Retrieves the highest level of all DD variables belonging to this meta variable. */ uint64_t getHighestLevel() const; /*! - * Retrieves the indices of the DD variables associated with this meta variable sorted by level. + * Retrieves the indices of the DD variables associated with this meta variable. + * + * @param sortedByLevel If true, the indices are sorted by their level. */ - std::vector getIndices() const; + std::vector getIndices(bool sortedByLevel = true) const; /*! * Retrieves the indices and levels of the DD variables associated with this meta variable. @@ -124,6 +131,11 @@ namespace storm { */ DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector> const& ddVariables); + /*! + * Precomputes the lowest index of any DD variable associated with this meta variable. + */ + void precomputeLowestIndex(); + /*! * Retrieves the variables used to encode the meta variable. * @@ -153,6 +165,9 @@ namespace storm { // The cube consisting of all variables that encode the meta variable. Bdd cube; + + // The lowest index of any DD variable of this meta variable. + uint64_t lowestIndex; }; } } diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index efd8f63b8..5bde87f0a 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -197,6 +197,9 @@ namespace storm { storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); + transitionMatrix.exportToDot("trans.dot"); + partition.asAdd().exportToDot("part.dot"); + // Create the number of rows necessary for the matrix. this->reserveMatrixEntries(partition.getNumberOfBlocks()); STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); @@ -291,7 +294,7 @@ namespace storm { } } - void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, ValueType factor = 1) { + void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = 1) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (transitionMatrixNode == Cudd_ReadZero(ddman)) { @@ -322,6 +325,9 @@ namespace storm { uint64_t targetPartitionVariable = Cudd_NodeReadIndex(targetPartitionNode) - 1; // Move through transition matrix. + bool skippedSourceInMatrix = false; + bool skippedTargetTInMatrix = false; + bool skippedTargetEInMatrix = false; DdNode* tt = transitionMatrixNode; DdNode* te = transitionMatrixNode; DdNode* et = transitionMatrixNode; @@ -335,6 +341,7 @@ namespace storm { te = Cudd_E(t); } else { tt = te = t; + skippedTargetTInMatrix = true; } DdNode* e = Cudd_E(transitionMatrixNode); @@ -344,13 +351,16 @@ namespace storm { ee = Cudd_E(e); } else { et = ee = e; + skippedTargetEInMatrix = true; } } else { + skippedSourceInMatrix = true; if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { tt = et = Cudd_T(transitionMatrixNode); te = ee = Cudd_E(transitionMatrixNode); } else { tt = te = et = ee = transitionMatrixNode; + skippedTargetTInMatrix = skippedTargetEInMatrix = true; } } @@ -383,8 +393,10 @@ namespace storm { // If we skipped the variable in the source partition, we only have to choose one of the two representatives. if (!skippedInSourcePartition) { sourceStateEncoding.set(sourceStateEncodingIndex, true); - extractTransitionMatrixRec(tt, sourceT, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); - extractTransitionMatrixRec(te, sourceT, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + if (!skippedInTargetPartition) { + extractTransitionMatrixRec(tt, sourceT, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + } + extractTransitionMatrixRec(te, sourceT, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); } sourceStateEncoding.set(sourceStateEncodingIndex, false); @@ -392,7 +404,7 @@ namespace storm { if (!skippedInTargetPartition) { extractTransitionMatrixRec(et, sourceE, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); } - extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedInTargetPartition ? 2 * factor : factor); + extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); } } @@ -497,7 +509,7 @@ namespace storm { } } - void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding) { + void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = storm::utility::one()) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (mtbdd_iszero(transitionMatrixNode)) { @@ -518,10 +530,9 @@ namespace storm { // Otherwise, we record the new representative. sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); - // Decode the target block. + // Decode the target block and add matrix entry. uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); - - this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, storm::dd::InternalAdd::getValue(transitionMatrixNode)); + this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * storm::dd::InternalAdd::getValue(transitionMatrixNode)); } else { // Determine the levels in the DDs. uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); @@ -529,6 +540,9 @@ namespace storm { uint64_t targetPartitionVariable = sylvan_var(targetPartitionNode) - 1; // Move through transition matrix. + bool skippedSourceInMatrix = false; + bool skippedTargetTInMatrix = false; + bool skippedTargetEInMatrix = false; MTBDD tt = transitionMatrixNode; MTBDD te = transitionMatrixNode; MTBDD et = transitionMatrixNode; @@ -543,6 +557,7 @@ namespace storm { te = sylvan_low(t); } else { tt = te = t; + skippedTargetTInMatrix = true; } uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); @@ -551,17 +566,21 @@ namespace storm { ee = sylvan_low(e); } else { et = ee = e; + skippedTargetEInMatrix = true; } } else { + skippedSourceInMatrix = true; if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { tt = et = sylvan_high(transitionMatrixNode); te = ee = sylvan_low(transitionMatrixNode); } else { tt = te = et = ee = transitionMatrixNode; + skippedTargetTInMatrix = skippedTargetEInMatrix = true; } } // Move through partition (for source state). + bool skippedInSourcePartition = false; MTBDD sourceT; MTBDD sourceE; if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { @@ -569,9 +588,11 @@ namespace storm { sourceE = sylvan_low(sourcePartitionNode); } else { sourceT = sourceE = sourcePartitionNode; + skippedInSourcePartition = true; } // Move through partition (for target state). + bool skippedInTargetPartition = false; MTBDD targetT; MTBDD targetE; if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { @@ -579,15 +600,25 @@ namespace storm { targetE = sylvan_low(targetPartitionNode); } else { targetT = targetE = targetPartitionNode; + skippedInTargetPartition = true; } - sourceState.set(currentIndex, true); - extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding); - extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding); + // If we skipped the variable in the source partition, we only have to choose one of the two representatives. + if (!skippedInSourcePartition) { + sourceState.set(currentIndex, true); + // If we skipped the variable in the target partition, just count the one representative twice. + if (!skippedInTargetPartition) { + extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); + } + extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); + } sourceState.set(currentIndex, false); - extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding); - extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding); + // If we skipped the variable in the target partition, just count the one representative twice. + if (!skippedInTargetPartition) { + extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); + } + extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); } } diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 3e83e6782..73db85e4a 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -1,5 +1,7 @@ #include "storm/storage/dd/bisimulation/SignatureRefiner.h" +#include + #include #include @@ -57,7 +59,13 @@ namespace storm { class InternalSignatureRefiner { public: InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, storm::dd::Bdd const& nondeterminismVariables, storm::dd::Bdd const& nonBlockVariables) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), nondeterminismVariables(nondeterminismVariables), nonBlockVariables(nonBlockVariables), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { - // Intentionally left empty. + + // Initialize precomputed data. + auto const& ddMetaVariable = manager.getMetaVariable(blockVariable); + blockDdVariableIndices = ddMetaVariable.getIndices(); + + // Create initialized block encoding where all variables are "don't care". + blockEncoding = std::vector(static_cast(internalDdManager.getCuddManager().ReadSize()), static_cast(2)); } Partition refine(Partition const& oldPartition, Signature const& signature) { @@ -85,6 +93,21 @@ namespace storm { return newPartitionAdd; } + DdNodePtr encodeBlock(uint64_t blockIndex) { + for (auto const& blockDdVariableIndex : blockDdVariableIndices) { + blockEncoding[blockDdVariableIndex] = blockIndex & 1 ? 1 : 0; + blockIndex >>= 1; + } + ::DdManager* ddMan = internalDdManager.getCuddManager().getManager(); + DdNodePtr bddEncoding = Cudd_CubeArrayToBdd(ddMan, blockEncoding.data()); + Cudd_Ref(bddEncoding); + DdNodePtr result = Cudd_BddToAdd(ddMan, bddEncoding); + Cudd_Ref(result); + Cudd_RecursiveDeref(ddMan, bddEncoding); + Cudd_Deref(result); + return result; + } + DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode, DdNode* nondeterminismVariablesNode, DdNode* nonBlockVariablesNode) { ::DdManager* ddman = internalDdManager.getCuddManager().getManager(); @@ -112,15 +135,8 @@ namespace storm { signatureCache[nodePair] = partitionNode; return partitionNode; } else { - DdNode* result; - { - storm::dd::Add blockEncoding = manager.getEncoding(blockVariable, nextFreeBlockIndex, false).template toAdd(); - ++nextFreeBlockIndex; - result = blockEncoding.getInternalAdd().getCuddDdNode(); - Cudd_Ref(result); - } + DdNode* result = encodeBlock(nextFreeBlockIndex++); signatureCache[nodePair] = result; - Cudd_Deref(result); return result; } } else { @@ -207,6 +223,12 @@ namespace storm { storm::dd::Bdd nondeterminismVariables; storm::dd::Bdd nonBlockVariables; + // The indices of the DD variables associated with the block variable. + std::vector blockDdVariableIndices; + + // A vector used for encoding block indices. + std::vector blockEncoding; + // The current number of blocks of the new partition. uint64_t nextFreeBlockIndex; From 93f385a3991c50213bd7e73843900e7dec199bee Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 14 Aug 2017 14:53:25 +0200 Subject: [PATCH 41/95] remove debug output --- src/storm/storage/dd/bisimulation/QuotientExtractor.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 5bde87f0a..2a52fde56 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -197,9 +197,6 @@ namespace storm { storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); - transitionMatrix.exportToDot("trans.dot"); - partition.asAdd().exportToDot("part.dot"); - // Create the number of rows necessary for the matrix. this->reserveMatrixEntries(partition.getNumberOfBlocks()); STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); From d23547d99ffb29bca21e39291384b44d1c6cfa20 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 15 Aug 2017 13:38:15 +0200 Subject: [PATCH 42/95] started optimizing some DdManager methods --- resources/3rdparty/cudd-3.0.0/cudd/cudd.h | 3 ++ .../abstraction/AbstractionInformation.cpp | 2 +- src/storm/builder/DdJaniModelBuilder.cpp | 12 ++--- src/storm/builder/DdPrismModelBuilder.cpp | 12 ++--- src/storm/models/symbolic/Model.cpp | 2 +- src/storm/storage/dd/DdManager.cpp | 48 +++++++++++++++---- src/storm/storage/dd/DdManager.h | 17 +++++++ .../dd/bisimulation/SignatureRefiner.cpp | 7 +-- .../storage/dd/cudd/InternalCuddDdManager.cpp | 36 ++++++++++++++ .../storage/dd/cudd/InternalCuddDdManager.h | 10 ++++ .../dd/sylvan/InternalSylvanDdManager.cpp | 22 +++++++++ .../dd/sylvan/InternalSylvanDdManager.h | 10 ++++ src/storm/utility/dd.cpp | 23 +-------- src/test/storm/storage/CuddDdTest.cpp | 2 +- 14 files changed, 155 insertions(+), 51 deletions(-) diff --git a/resources/3rdparty/cudd-3.0.0/cudd/cudd.h b/resources/3rdparty/cudd-3.0.0/cudd/cudd.h index 20acf5854..6f63f7a70 100644 --- a/resources/3rdparty/cudd-3.0.0/cudd/cudd.h +++ b/resources/3rdparty/cudd-3.0.0/cudd/cudd.h @@ -503,6 +503,9 @@ typedef void (*DD_TOHFP)(DdManager *, void *); extern "C" { #endif +// Make this visible to the outside. +extern DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E); + extern DdNode * Cudd_addNewVar(DdManager *dd); extern DdNode * Cudd_addNewVarAtLevel(DdManager *dd, int level); extern DdNode * Cudd_bddNewVar(DdManager *dd); diff --git a/src/storm/abstraction/AbstractionInformation.cpp b/src/storm/abstraction/AbstractionInformation.cpp index c74cb60cb..5e25b5530 100644 --- a/src/storm/abstraction/AbstractionInformation.cpp +++ b/src/storm/abstraction/AbstractionInformation.cpp @@ -499,7 +499,7 @@ namespace storm { allSuccessorLocationVariables.insert(newMetaVariable.second); successorVariables.insert(newMetaVariable.second); extendedPredicateDdVariables.emplace_back(newMetaVariable); - allLocationIdentities &= ddManager->template getIdentity(newMetaVariable.first).equals(ddManager->template getIdentity(newMetaVariable.second)) && ddManager->getRange(newMetaVariable.first) && ddManager->getRange(newMetaVariable.second); + allLocationIdentities &= ddManager->getIdentity(newMetaVariable.first, newMetaVariable.second); return std::make_pair(locationVariablePairs.back(), locationVariablePairs.size() - 1); } diff --git a/src/storm/builder/DdJaniModelBuilder.cpp b/src/storm/builder/DdJaniModelBuilder.cpp index f019b2505..6f1e67252 100644 --- a/src/storm/builder/DdJaniModelBuilder.cpp +++ b/src/storm/builder/DdJaniModelBuilder.cpp @@ -368,8 +368,8 @@ namespace storm { // Add the identity and ranges of the location variables to the ones of the automaton. std::pair const& locationVariables = result.automatonToLocationDdVariableMap[automaton.getName()]; - storm::dd::Add variableIdentity = result.manager->template getIdentity(locationVariables.first).equals(result.manager->template getIdentity(locationVariables.second)).template toAdd() * result.manager->getRange(locationVariables.first).template toAdd() * result.manager->getRange(locationVariables.second).template toAdd(); - identity &= variableIdentity.toBdd(); + storm::dd::Bdd variableIdentity = result.manager->getIdentity(locationVariables.first, locationVariables.second); + identity &= variableIdentity; range &= result.manager->getRange(locationVariables.first); // Then create variables for the variables of the automaton. @@ -420,8 +420,8 @@ namespace storm { result.columnMetaVariables.insert(variablePair.second); result.variableToColumnMetaVariableMap->emplace(variable.getExpressionVariable(), variablePair.second); - storm::dd::Add variableIdentity = result.manager->template getIdentity(variablePair.first).equals(result.manager->template getIdentity(variablePair.second)).template toAdd() * result.manager->getRange(variablePair.first).template toAdd() * result.manager->getRange(variablePair.second).template toAdd(); - result.variableToIdentityMap.emplace(variable.getExpressionVariable(), variableIdentity); + storm::dd::Bdd variableIdentity = result.manager->getIdentity(variablePair.first, variablePair.second); + result.variableToIdentityMap.emplace(variable.getExpressionVariable(), variableIdentity.template toAdd()); result.rowColumnMetaVariablePairs.push_back(variablePair); result.variableToRangeMap.emplace(variablePair.first, result.manager->getRange(variablePair.first)); result.variableToRangeMap.emplace(variablePair.second, result.manager->getRange(variablePair.second)); @@ -440,8 +440,8 @@ namespace storm { result.columnMetaVariables.insert(variablePair.second); result.variableToColumnMetaVariableMap->emplace(variable.getExpressionVariable(), variablePair.second); - storm::dd::Add variableIdentity = result.manager->template getIdentity(variablePair.first).equals(result.manager->template getIdentity(variablePair.second)).template toAdd(); - result.variableToIdentityMap.emplace(variable.getExpressionVariable(), variableIdentity); + storm::dd::Bdd variableIdentity = result.manager->getIdentity(variablePair.first, variablePair.second); + result.variableToIdentityMap.emplace(variable.getExpressionVariable(), variableIdentity.template toAdd()); result.variableToRangeMap.emplace(variablePair.first, result.manager->getRange(variablePair.first)); result.variableToRangeMap.emplace(variablePair.second, result.manager->getRange(variablePair.second)); diff --git a/src/storm/builder/DdPrismModelBuilder.cpp b/src/storm/builder/DdPrismModelBuilder.cpp index 4bd31733a..149fc8936 100644 --- a/src/storm/builder/DdPrismModelBuilder.cpp +++ b/src/storm/builder/DdPrismModelBuilder.cpp @@ -189,8 +189,8 @@ namespace storm { columnMetaVariables.insert(variablePair.second); variableToColumnMetaVariableMap->emplace(integerVariable.getExpressionVariable(), variablePair.second); - storm::dd::Add variableIdentity = manager->template getIdentity(variablePair.first).equals(manager->template getIdentity(variablePair.second)).template toAdd() * manager->getRange(variablePair.first).template toAdd() * manager->getRange(variablePair.second).template toAdd(); - variableToIdentityMap.emplace(integerVariable.getExpressionVariable(), variableIdentity); + storm::dd::Bdd variableIdentity = manager->getIdentity(variablePair.first, variablePair.second); + variableToIdentityMap.emplace(integerVariable.getExpressionVariable(), variableIdentity.template toAdd()); rowColumnMetaVariablePairs.push_back(variablePair); allGlobalVariables.insert(integerVariable.getExpressionVariable()); @@ -206,8 +206,8 @@ namespace storm { columnMetaVariables.insert(variablePair.second); variableToColumnMetaVariableMap->emplace(booleanVariable.getExpressionVariable(), variablePair.second); - storm::dd::Add variableIdentity = manager->template getIdentity(variablePair.first).equals(manager->template getIdentity(variablePair.second)).template toAdd(); - variableToIdentityMap.emplace(booleanVariable.getExpressionVariable(), variableIdentity); + storm::dd::Bdd variableIdentity = manager->getIdentity(variablePair.first, variablePair.second); + variableToIdentityMap.emplace(booleanVariable.getExpressionVariable(), variableIdentity.template toAdd()); rowColumnMetaVariablePairs.push_back(variablePair); allGlobalVariables.insert(booleanVariable.getExpressionVariable()); @@ -230,7 +230,7 @@ namespace storm { columnMetaVariables.insert(variablePair.second); variableToColumnMetaVariableMap->emplace(integerVariable.getExpressionVariable(), variablePair.second); - storm::dd::Bdd variableIdentity = manager->template getIdentity(variablePair.first).equals(manager->template getIdentity(variablePair.second)) && manager->getRange(variablePair.first) && manager->getRange(variablePair.second); + storm::dd::Bdd variableIdentity = manager->getIdentity(variablePair.first, variablePair.second); variableToIdentityMap.emplace(integerVariable.getExpressionVariable(), variableIdentity.template toAdd()); moduleIdentity &= variableIdentity; moduleRange &= manager->getRange(variablePair.first); @@ -247,7 +247,7 @@ namespace storm { columnMetaVariables.insert(variablePair.second); variableToColumnMetaVariableMap->emplace(booleanVariable.getExpressionVariable(), variablePair.second); - storm::dd::Bdd variableIdentity = manager->template getIdentity(variablePair.first).equals(manager->template getIdentity(variablePair.second)) && manager->getRange(variablePair.first) && manager->getRange(variablePair.second); + storm::dd::Bdd variableIdentity = manager->getIdentity(variablePair.first, variablePair.second); variableToIdentityMap.emplace(booleanVariable.getExpressionVariable(), variableIdentity.template toAdd()); moduleIdentity &= variableIdentity; moduleRange &= manager->getRange(variablePair.first); diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 61f9932f4..686a1e9e5 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -208,7 +208,7 @@ namespace storm { template storm::dd::Add Model::getRowColumnIdentity() const { - return storm::utility::dd::getRowColumnDiagonal(this->getManager(), this->getRowColumnMetaVariablePairs()); + return (storm::utility::dd::getRowColumnDiagonal(this->getManager(), this->getRowColumnMetaVariablePairs()) && this->getReachableStates()).template toAdd(); } template diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index 58d6f20f6..dbba10a29 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -122,15 +122,20 @@ namespace storm { template Bdd DdManager::getRange(storm::expressions::Variable const& variable) const { storm::dd::DdMetaVariable const& metaVariable = this->getMetaVariable(variable); - STORM_LOG_THROW(metaVariable.hasHigh(), storm::exceptions::InvalidOperationException, "Cannot create range for meta variable."); - - Bdd result = this->getBddZero(); - - for (int_fast64_t value = metaVariable.getLow(); value <= metaVariable.getHigh(); ++value) { - result |= this->getEncoding(variable, value); + + if (metaVariable.hasHigh()) { + return Bdd(*this, internalDdManager.getBddEncodingLessOrEqualThan(static_cast(metaVariable.getHigh() - metaVariable.getLow()), metaVariable.getCube().getInternalBdd(), metaVariable.getNumberOfDdVariables()), {variable}); +// Bdd result = this->getBddZero(); +// for (int_fast64_t value = metaVariable.getLow(); value <= metaVariable.getHigh(); ++value) { +// result |= this->getEncoding(variable, value); +// } +// return result; + } else { + // If there is no upper bound on this variable, the whole range is valid. + Bdd result = this->getBddOne(); + result.addMetaVariable(variable); + return result; } - - return result; } template @@ -146,6 +151,33 @@ namespace storm { return result; } + template + Bdd DdManager::getIdentity(std::vector> const& variablePairs, bool restrictToFirstRange) const { + auto result = this->getBddOne(); + for (auto const& pair : variablePairs) { + result &= this->getIdentity(pair.first, pair.second, restrictToFirstRange); + } + return result; + } + + template + Bdd DdManager::getIdentity(storm::expressions::Variable const& first, storm::expressions::Variable const& second, bool restrictToFirstRange) const { + auto const& firstMetaVariable = this->getMetaVariable(first); + auto const& secondMetaVariable = this->getMetaVariable(second); + + STORM_LOG_THROW(firstMetaVariable.getNumberOfDdVariables() == secondMetaVariable.getNumberOfDdVariables(), storm::exceptions::InvalidOperationException, "Mismatching sizes of meta variables."); + + auto const& firstDdVariables = firstMetaVariable.getDdVariables(); + auto const& secondDdVariables = secondMetaVariable.getDdVariables(); + + auto result = restrictToFirstRange ? this->getRange(first) : this->getBddOne(); + for (auto it1 = firstDdVariables.begin(), it2 = secondDdVariables.begin(), ite1 = firstDdVariables.end(); it1 != ite1; ++it1, ++it2) { + result &= it1->iff(*it2); + } + + return result; + } + template Bdd DdManager::getCube(storm::expressions::Variable const& variable) const { return getCube({variable}); diff --git a/src/storm/storage/dd/DdManager.h b/src/storm/storage/dd/DdManager.h index 3332d1b88..055bbfb1a 100644 --- a/src/storm/storage/dd/DdManager.h +++ b/src/storm/storage/dd/DdManager.h @@ -131,6 +131,23 @@ namespace storm { template Add getIdentity(storm::expressions::Variable const& variable) const; + /*! + * Retrieves a BDD in which an encoding is mapped to true iff the meta variables of each pair encode the same value. + * + * @param variablePairs The variable pairs for which to compute the identity. + * @param restrictToFirstRange If set, the identity will be restricted to the legal range of the first variable. + */ + Bdd getIdentity(std::vector> const& variablePairs, bool restrictToFirstRange = true) const; + + /*! + * Retrieves a BDD in which an encoding is mapped to true iff the two meta variables encode the same value. + * + * @param first The first meta variable in the identity. + * @param second The second meta variable in the identity. + * @param restrictToFirstRange If set, the identity will be restricted to the legal range of the first variable. + */ + Bdd getIdentity(storm::expressions::Variable const& first, storm::expressions::Variable const& second, bool restrictToFirstRange = true) const; + /*! * Retrieves a BDD that is the cube of the variables representing the given meta variable. * diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 73db85e4a..5e5e3a3c8 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -198,18 +198,13 @@ namespace storm { result = thenResult; } else { // Get the node to connect the subresults. - DdNode* var = Cudd_addIthVar(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset); - Cudd_Ref(var); - result = Cudd_addIte(ddman, var, thenResult, elseResult); - Cudd_Ref(result); - Cudd_RecursiveDeref(ddman, var); + result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset, thenResult, elseResult); Cudd_Deref(thenResult); Cudd_Deref(elseResult); } // Store the result in the cache. signatureCache[nodePair] = result; - Cudd_Deref(result); return result; } diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index 952c7199c..58223d739 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -57,6 +57,42 @@ namespace storm { return InternalBdd(this, cuddManager.bddZero()); } + InternalBdd InternalDdManager::getBddEncodingLessOrEqualThan(uint64_t bound, InternalBdd const& cube, uint64_t numberOfDdVariables) const { + DdNodePtr node = this->getBddEncodingLessOrEqualThanRec(0, (1ull << numberOfDdVariables) - 1, bound, cube.getCuddDdNode(), numberOfDdVariables); + STORM_LOG_ASSERT(node != nullptr, "Wut?"); + FILE* fp = fopen("range.dot", "w"); + Cudd_DumpDot(cuddManager.getManager(), 1, &node, nullptr, nullptr, fp); + fclose(fp); + + auto tmp = cudd::BDD(cuddManager, node); + return InternalBdd(this, tmp); + } + + DdNodePtr InternalDdManager::getBddEncodingLessOrEqualThanRec(uint64_t minimalValue, uint64_t maximalValue, uint64_t bound, DdNodePtr cube, uint64_t remainingDdVariables) const { + std::cout << minimalValue << " / " << maximalValue << " -> " << bound << std::endl; + if (maximalValue <= bound) { + return Cudd_ReadOne(cuddManager.getManager()); + } else if (minimalValue > bound) { + return Cudd_ReadLogicZero(cuddManager.getManager()); + } + + STORM_LOG_ASSERT(remainingDdVariables > 0, "Expected more remaining DD variables."); + STORM_LOG_ASSERT(!Cudd_IsConstant(cube), "Expected non-constant cube."); + uint64_t newRemainingDdVariables = remainingDdVariables - 1; + DdNodePtr elseResult = getBddEncodingLessOrEqualThanRec(minimalValue, maximalValue & ~(1ull << newRemainingDdVariables), bound, Cudd_T(cube), newRemainingDdVariables); + Cudd_Ref(elseResult); + DdNodePtr thenResult = getBddEncodingLessOrEqualThanRec(minimalValue | (1ull << newRemainingDdVariables), maximalValue, bound, Cudd_T(cube), newRemainingDdVariables); + Cudd_Ref(thenResult); + STORM_LOG_ASSERT(thenResult != elseResult, "Expected different results."); + + std::cout << "creating " << Cudd_NodeReadIndex(cube) << " -> " << thenResult << " / " << elseResult << std::endl; + DdNodePtr result = cuddUniqueInter(cuddManager.getManager(), Cudd_NodeReadIndex(cube), thenResult, elseResult); + std::cout << "result " << result << std::endl; + Cudd_Deref(thenResult); + Cudd_Deref(elseResult); + return result; + } + template InternalAdd InternalDdManager::getAddZero() const { return InternalAdd(this, cuddManager.addZero()); diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.h b/src/storm/storage/dd/cudd/InternalCuddDdManager.h index 44efef0c5..3b1c74e16 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.h +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.h @@ -59,6 +59,13 @@ namespace storm { */ InternalBdd getBddZero() const; + /*! + * Retrieves a BDD that maps to true iff the encoding is less or equal than the given bound. + * + * @return A BDD with encodings corresponding to values less or equal than the bound. + */ + InternalBdd getBddEncodingLessOrEqualThan(uint64_t bound, InternalBdd const& cube, uint64_t numberOfDdVariables) const; + /*! * Retrieves an ADD representing the constant zero function. * @@ -146,6 +153,9 @@ namespace storm { cudd::Cudd const& getCuddManager() const; private: + // Helper function to create the BDD whose encodings are below a given bound. + DdNodePtr getBddEncodingLessOrEqualThanRec(uint64_t minimalValue, uint64_t maximalValue, uint64_t bound, DdNodePtr cube, uint64_t remainingDdVariables) const; + // The manager responsible for the DDs created/modified with this DdManager. cudd::Cudd cuddManager; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 4586e9890..29f9a3208 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -129,6 +129,28 @@ namespace storm { return InternalBdd(this, sylvan::Bdd::bddZero()); } + InternalBdd InternalDdManager::getBddEncodingLessOrEqualThan(uint64_t bound, InternalBdd const& cube, uint64_t numberOfDdVariables) const { + return InternalBdd(this, sylvan::Bdd(this->getBddEncodingLessOrEqualThanRec(0, (1ull << numberOfDdVariables) - 1, bound, cube.getSylvanBdd().GetBDD(), numberOfDdVariables))); + } + + BDD InternalDdManager::getBddEncodingLessOrEqualThanRec(uint64_t minimalValue, uint64_t maximalValue, uint64_t bound, BDD cube, uint64_t remainingDdVariables) const { + if (maximalValue <= bound) { + return sylvan_true; + } else if (minimalValue > bound) { + return sylvan_false; + } + + STORM_LOG_ASSERT(remainingDdVariables > 0, "Expected more remaining DD variables."); + uint64_t newRemainingDdVariables = remainingDdVariables - 1; + BDD elseResult = getBddEncodingLessOrEqualThanRec(minimalValue, maximalValue & ~(1ull << newRemainingDdVariables), bound, sylvan_high(cube), newRemainingDdVariables); + bdd_refs_push(elseResult); + BDD thenResult = getBddEncodingLessOrEqualThanRec(minimalValue | (1ull << newRemainingDdVariables), maximalValue, bound, sylvan_high(cube), newRemainingDdVariables); + bdd_refs_push(elseResult); + BDD result = sylvan_makenode(sylvan_var(cube), elseResult, thenResult); + bdd_refs_pop(2); + return result; + } + template<> InternalAdd InternalDdManager::getAddZero() const { return InternalAdd(this, sylvan::Mtbdd::doubleTerminal(storm::utility::zero())); diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h index c10915145..408817965 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.h @@ -60,6 +60,13 @@ namespace storm { */ InternalBdd getBddZero() const; + /*! + * Retrieves a BDD that maps to true iff the encoding is less or equal than the given bound. + * + * @return A BDD with encodings corresponding to values less or equal than the bound. + */ + InternalBdd getBddEncodingLessOrEqualThan(uint64_t bound, InternalBdd const& cube, uint64_t numberOfDdVariables) const; + /*! * Retrieves an ADD representing the constant zero function. * @@ -133,6 +140,9 @@ namespace storm { uint_fast64_t getNumberOfDdVariables() const; private: + // Helper function to create the BDD whose encodings are below a given bound. + BDD getBddEncodingLessOrEqualThanRec(uint64_t minimalValue, uint64_t maximalValue, uint64_t bound, BDD cube, uint64_t remainingDdVariables) const; + // A counter for the number of instances of this class. This is used to determine when to initialize and // quit the sylvan. This is because Sylvan does not know the concept of managers but implicitly has a // 'global' manager. diff --git a/src/storm/utility/dd.cpp b/src/storm/utility/dd.cpp index b4b74a19a..47d15347e 100644 --- a/src/storm/utility/dd.cpp +++ b/src/storm/utility/dd.cpp @@ -45,38 +45,17 @@ namespace storm { return reachableStates; } - template - storm::dd::Add getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs) { - storm::dd::Add result = ddManager.template getAddOne(); - for (auto const& pair : rowColumnMetaVariablePairs) { - result *= ddManager.template getIdentity(pair.first).equals(ddManager.template getIdentity(pair.second)).template toAdd(); - result *= ddManager.getRange(pair.first).template toAdd() * ddManager.getRange(pair.second).template toAdd(); - } - return result; - } - template storm::dd::Bdd getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs) { - storm::dd::Bdd diagonal = ddManager.getBddOne(); - for (auto const& pair : rowColumnMetaVariablePairs) { - diagonal &= ddManager.template getIdentity(pair.first).equals(ddManager.template getIdentity(pair.second)); - diagonal &= ddManager.getRange(pair.first) && ddManager.getRange(pair.second); - } - return diagonal; + return ddManager.getIdentity(rowColumnMetaVariablePairs); } template storm::dd::Bdd computeReachableStates(storm::dd::Bdd const& initialStates, storm::dd::Bdd const& transitions, std::set const& rowMetaVariables, std::set const& columnMetaVariables); template storm::dd::Bdd computeReachableStates(storm::dd::Bdd const& initialStates, storm::dd::Bdd const& transitions, std::set const& rowMetaVariables, std::set const& columnMetaVariables); - template storm::dd::Add getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); - template storm::dd::Add getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); - template storm::dd::Bdd getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); template storm::dd::Bdd getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); - template storm::dd::Add getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); - template storm::dd::Add getRowColumnDiagonal(storm::dd::DdManager const& ddManager, std::vector> const& rowColumnMetaVariablePairs); - } } } diff --git a/src/test/storm/storage/CuddDdTest.cpp b/src/test/storm/storage/CuddDdTest.cpp index 7cfac18a5..499be2a12 100644 --- a/src/test/storm/storage/CuddDdTest.cpp +++ b/src/test/storm/storage/CuddDdTest.cpp @@ -414,7 +414,7 @@ TEST(CuddDd, RangeTest) { storm::dd::Bdd range; ASSERT_NO_THROW(range = manager->getRange(x.first)); - + EXPECT_EQ(9ul, range.getNonZeroCount()); EXPECT_EQ(1ul, range.getLeafCount()); EXPECT_EQ(5ul, range.getNodeCount()); From 2f97684d6d4f5ca864df990a1431eaf8ef6abc49 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 15 Aug 2017 21:19:43 +0200 Subject: [PATCH 43/95] fixed bug in recent optimization (only CUDD-based implementation was faulty) --- .../dd/bisimulation/SignatureRefiner.cpp | 6 +++++- .../storage/dd/cudd/InternalCuddDdManager.cpp | 18 ++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 5e5e3a3c8..a67fa9962 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -198,7 +198,11 @@ namespace storm { result = thenResult; } else { // Get the node to connect the subresults. - result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset, thenResult, elseResult); + bool complemented = Cudd_IsComplement(thenResult); + result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset, Cudd_Regular(thenResult), complemented ? Cudd_Not(elseResult) : elseResult); + if (complemented) { + result = Cudd_Not(result); + } Cudd_Deref(thenResult); Cudd_Deref(elseResult); } diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index 58223d739..7dd5b75f6 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -58,18 +58,10 @@ namespace storm { } InternalBdd InternalDdManager::getBddEncodingLessOrEqualThan(uint64_t bound, InternalBdd const& cube, uint64_t numberOfDdVariables) const { - DdNodePtr node = this->getBddEncodingLessOrEqualThanRec(0, (1ull << numberOfDdVariables) - 1, bound, cube.getCuddDdNode(), numberOfDdVariables); - STORM_LOG_ASSERT(node != nullptr, "Wut?"); - FILE* fp = fopen("range.dot", "w"); - Cudd_DumpDot(cuddManager.getManager(), 1, &node, nullptr, nullptr, fp); - fclose(fp); - - auto tmp = cudd::BDD(cuddManager, node); - return InternalBdd(this, tmp); + return InternalBdd(this, cudd::BDD(cuddManager, this->getBddEncodingLessOrEqualThanRec(0, (1ull << numberOfDdVariables) - 1, bound, cube.getCuddDdNode(), numberOfDdVariables))); } DdNodePtr InternalDdManager::getBddEncodingLessOrEqualThanRec(uint64_t minimalValue, uint64_t maximalValue, uint64_t bound, DdNodePtr cube, uint64_t remainingDdVariables) const { - std::cout << minimalValue << " / " << maximalValue << " -> " << bound << std::endl; if (maximalValue <= bound) { return Cudd_ReadOne(cuddManager.getManager()); } else if (minimalValue > bound) { @@ -85,9 +77,11 @@ namespace storm { Cudd_Ref(thenResult); STORM_LOG_ASSERT(thenResult != elseResult, "Expected different results."); - std::cout << "creating " << Cudd_NodeReadIndex(cube) << " -> " << thenResult << " / " << elseResult << std::endl; - DdNodePtr result = cuddUniqueInter(cuddManager.getManager(), Cudd_NodeReadIndex(cube), thenResult, elseResult); - std::cout << "result " << result << std::endl; + bool complemented = Cudd_IsComplement(thenResult); + DdNodePtr result = cuddUniqueInter(cuddManager.getManager(), Cudd_NodeReadIndex(cube), Cudd_Regular(thenResult), complemented ? Cudd_Not(elseResult) : elseResult); + if (complemented) { + result = Cudd_Not(result); + } Cudd_Deref(thenResult); Cudd_Deref(elseResult); return result; From 5e2ccaeeb5750f9235b4f384a488f9a669664fc1 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 17 Aug 2017 20:37:11 +0200 Subject: [PATCH 44/95] started moving towards simpler sparse quotient extraction --- src/storm/storage/SparseMatrix.cpp | 1 - .../dd/bisimulation/QuotientExtractor.cpp | 253 +++++++++++++----- .../dd/bisimulation/QuotientExtractor.h | 1 - 3 files changed, 192 insertions(+), 63 deletions(-) diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 79b53b408..49d0cddad 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -1603,7 +1603,6 @@ namespace storm { for (index_type row = 0; row < this->rowCount; ++row) { auto rowSum = getRowSum(row); if (!comparator.isOne(rowSum)) { - std::cout << "row sum of row " << row << " is " << rowSum << std::endl; return false; } } diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 2a52fde56..fc6e289b1 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -32,6 +32,182 @@ namespace storm { namespace dd { namespace bisimulation { + template + class InternalRepresentativeComputer; + + template + class InternalRepresentativeComputerBase { + public: + InternalRepresentativeComputerBase(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : partition(partition), rowVariables(rowVariables), columnVariables(columnVariables) { + if (partition.storedAsAdd()) { + ddManager = &partition.asAdd().getDdManager(); + } else { + ddManager = &partition.asBdd().getDdManager(); + } + internalDdManager = &ddManager->getInternalDdManager(); + + // Create state variables cube. + this->columnVariablesCube = ddManager->getBddOne(); + for (auto const& var : columnVariables) { + auto const& metaVariable = ddManager->getMetaVariable(var); + this->columnVariablesCube &= metaVariable.getCube(); + } + } + + protected: + storm::dd::DdManager const* ddManager; + storm::dd::InternalDdManager const* internalDdManager; + + Partition const& partition; + std::set const& rowVariables; + std::set const& columnVariables; + storm::dd::Bdd columnVariablesCube; + }; + + template + class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { + public: + InternalRepresentativeComputer(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : InternalRepresentativeComputerBase(partition, rowVariables, columnVariables) { + this->ddman = this->internalDdManager->getCuddManager().getManager(); + } + + storm::dd::Bdd getRepresentatives() { + return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, cudd::BDD(this->internalDdManager->getCuddManager(), this->getRepresentativesRec(this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->columnVariablesCube.getInternalBdd().getCuddDdNode()))), this->rowVariables); + } + + private: + DdNodePtr getRepresentativesRec(DdNodePtr partitionNode, DdNodePtr stateVariablesCube) { + if (partitionNode == Cudd_ReadZero(ddman)) { + return Cudd_ReadLogicZero(ddman); + } + + // If we visited the node before, there is no block that we still need to cover. + if (visitedNodes.find(partitionNode) != visitedNodes.end()) { + return Cudd_ReadLogicZero(ddman); + } + + // If we hit a block variable and have not yet terminated the DFS earlier, it means we have a new representative. + if (Cudd_IsConstant(stateVariablesCube)) { + visitedNodes.emplace(partitionNode, true); + return Cudd_ReadOne(ddman); + } else { + bool skipped = false; + DdNodePtr elsePartitionNode; + DdNodePtr thenPartitionNode; + if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(stateVariablesCube)) { + elsePartitionNode = Cudd_E(partitionNode); + thenPartitionNode = Cudd_T(partitionNode); + } else { + elsePartitionNode = thenPartitionNode = partitionNode; + skipped = true; + } + + if (!skipped) { + visitedNodes.emplace(partitionNode, true); + } + + // Otherwise, recursively proceed with DFS. + DdNodePtr elseResult = getRepresentativesRec(elsePartitionNode, Cudd_T(stateVariablesCube)); + Cudd_Ref(elseResult); + + DdNodePtr thenResult = nullptr; + if (!skipped) { + thenResult = getRepresentativesRec(thenPartitionNode, Cudd_T(stateVariablesCube)); + Cudd_Ref(thenResult); + + if (thenResult == elseResult) { + Cudd_Deref(elseResult); + Cudd_Deref(thenResult); + return elseResult; + } else { + bool complement = Cudd_IsComplement(thenResult); + auto result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_Regular(thenResult), complement ? Cudd_Not(elseResult) : elseResult); + Cudd_Deref(elseResult); + Cudd_Deref(thenResult); + return complement ? Cudd_Not(result) : result; + } + } else { + auto result = Cudd_Not(cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_ReadOne(ddman), Cudd_Not(elseResult))); + Cudd_Deref(elseResult); + return result; + } + } + } + + ::DdManager* ddman; + spp::sparse_hash_map visitedNodes; + }; + + template + class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { + public: + InternalRepresentativeComputer(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : InternalRepresentativeComputerBase(partition, rowVariables, columnVariables) { + // Intentionally left empty. + } + + storm::dd::Bdd getRepresentatives() { + return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, sylvan::Bdd(this->getRepresentativesRec(this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->columnVariablesCube.getInternalBdd().getSylvanBdd().GetBDD()))), this->rowVariables); + } + + private: + BDD getRepresentativesRec(BDD partitionNode, BDD stateVariablesCube) { + if (partitionNode == sylvan_false) { + return sylvan_false; + } + + // If we visited the node before, there is no block that we still need to cover. + if (visitedNodes.find(partitionNode) != visitedNodes.end()) { + return sylvan_false; + } + + // If we hit a block variable and have not yet terminated the DFS earlier, it means we have a new representative. + if (sylvan_isconst(stateVariablesCube)) { + visitedNodes.emplace(partitionNode, true); + return sylvan_true; + } else { + bool skipped = false; + BDD elsePartitionNode; + BDD thenPartitionNode; + if (sylvan_var(partitionNode) == sylvan_var(stateVariablesCube)) { + elsePartitionNode = sylvan_low(partitionNode); + thenPartitionNode = sylvan_high(partitionNode); + } else { + elsePartitionNode = thenPartitionNode = partitionNode; + skipped = true; + } + + if (!skipped) { + visitedNodes.emplace(partitionNode, true); + } + + // Otherwise, recursively proceed with DFS. + BDD elseResult = getRepresentativesRec(elsePartitionNode, sylvan_high(stateVariablesCube)); + mtbdd_refs_push(elseResult); + + BDD thenResult; + if (!skipped) { + thenResult = getRepresentativesRec(thenPartitionNode, sylvan_high(stateVariablesCube)); + mtbdd_refs_push(thenResult); + + if (thenResult == elseResult) { + mtbdd_refs_pop(2); + return elseResult; + } else { + auto result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, thenResult); + mtbdd_refs_pop(2); + return result; + } + } else { + auto result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, sylvan_false); + mtbdd_refs_pop(1); + return result; + } + } + } + + spp::sparse_hash_map visitedNodes; + }; + template class InternalSparseQuotientExtractor; @@ -651,14 +827,23 @@ namespace storm { InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getNondeterminismVariables()); auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); + storm::dd::Bdd partitionAsBdd = partition.storedAsAdd() ? partition.asAdd().toBdd() : partition.asBdd(); + partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + partitionAsBdd.template toAdd().exportToDot("partition.dot"); + auto start = std::chrono::high_resolution_clock::now(); - storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix(), partition); + // FIXME: Use partition as BDD in representative computation. + auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); + representatives.template toAdd().exportToDot("repr.dot"); + (model.getTransitionMatrix() * representatives.template toAdd()).exportToDot("extract.dot"); + storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix() * representatives.template toAdd(), partition); auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); start = std::chrono::high_resolution_clock::now(); + storm::dd::Odd odd = representatives.createOdd(); storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); - quotientStateLabeling.addLabel("init", sparseExtractor.extractStates(model.getInitialStates(), partition)); + quotientStateLabeling.addLabel("init", ((model.getInitialStates() && partitionAsBdd).existsAbstract(model.getRowVariables()) && partitionAsBdd && representatives).existsAbstract({partition.getBlockVariable()}).toVector(odd)); quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); for (auto const& label : preservationInformation.getLabels()) { @@ -743,15 +928,15 @@ namespace storm { auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); - storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); start = std::chrono::high_resolution_clock::now(); - storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); // Pick a representative from each block. - partitionAsBdd = partitionAsBdd.existsAbstractRepresentative(model.getColumnVariables()); - partitionAsAdd = partitionAsBdd.template toAdd(); + auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); + partitionAsBdd = representatives && partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); - quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd.renameVariables(model.getColumnVariables(), model.getRowVariables()), model.getRowVariables()); + quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); end = std::chrono::high_resolution_clock::now(); // Check quotient matrix for sanity. @@ -776,61 +961,7 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot extract quotient for this model type."); } } - - template - std::shared_ptr> QuotientExtractor::extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { - auto modelType = model.getType(); - - if (modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Ctmc) { - std::set blockVariableSet = {partition.getBlockVariable()}; - std::set blockPrimeVariableSet = {partition.getPrimedBlockVariable()}; - std::vector> blockMetaVariablePairs = {std::make_pair(partition.getBlockVariable(), partition.getPrimedBlockVariable())}; - - storm::dd::Add partitionAsAdd = partition.storedAsBdd() ? partition.asBdd().template toAdd() : partition.asAdd(); - storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd, model.getColumnVariables()); - quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getColumnVariables()); - partitionAsAdd = partitionAsAdd / partitionAsAdd.sumAbstract(model.getColumnVariables()); - quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); - quotientTransitionMatrix = quotientTransitionMatrix.renameVariables(blockVariableSet, model.getRowVariables()); - storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); - - // Check quotient matrix for sanity. - STORM_LOG_ASSERT(quotientTransitionMatrix.greater(storm::utility::one()).isZero(), "Illegal entries in quotient matrix."); - STORM_LOG_ASSERT(quotientTransitionMatrix.sumAbstract(blockPrimeVariableSet).equalModuloPrecision(quotientTransitionMatrix.notZero().existsAbstract(blockPrimeVariableSet).template toAdd(), ValueType(1e-6)), "Illegal non-probabilistic matrix."); - - storm::dd::Bdd partitionAsBdd = partition.storedAsBdd() ? partition.asBdd() : partition.asAdd().notZero(); - storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); - storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()).renameVariables(blockVariableSet, model.getRowVariables()); - storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables())).existsAbstract(model.getRowVariables()).renameVariables(blockVariableSet, model.getRowVariables()); - storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(model.getColumnVariables()) && reachableStates; - - std::map> preservedLabelBdds; - for (auto const& label : preservationInformation.getLabels()) { - preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); - } - for (auto const& expression : preservationInformation.getExpressions()) { - std::stringstream stream; - stream << expression; - std::string expressionAsString = stream.str(); - auto it = preservedLabelBdds.find(expressionAsString); - if (it != preservedLabelBdds.end()) { - STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); - } else { - preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); - } - } - - if (modelType == storm::models::ModelType::Dtmc) { - return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, model.getRowVariables(), model.getColumnVariables(), model.getRowColumnMetaVariablePairs(), preservedLabelBdds, {})); - } else { - return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); - } - } else { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Cannot exctract quotient for this model type."); - } - } - template class QuotientExtractor; template class QuotientExtractor; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.h b/src/storm/storage/dd/bisimulation/QuotientExtractor.h index dda06a3d3..dcce31659 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.h +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.h @@ -28,7 +28,6 @@ namespace storm { std::shared_ptr> extractDdQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); std::shared_ptr> extractQuotientUsingBlockVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); - std::shared_ptr> extractQuotientUsingOriginalVariables(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation); bool useRepresentatives; storm::settings::modules::BisimulationSettings::QuotientFormat quotientFormat; From b7be027f7a6dd4d8307025bd3403bdbc8b03479b Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 18 Aug 2017 14:53:29 +0200 Subject: [PATCH 45/95] switching workplace --- src/storm/storage/dd/Odd.cpp | 29 +- src/storm/storage/dd/Odd.h | 3 +- .../dd/bisimulation/QuotientExtractor.cpp | 762 +++++++----------- src/storm/storage/dd/cudd/InternalCuddBdd.cpp | 51 +- src/storm/storage/dd/cudd/InternalCuddBdd.h | 3 +- 5 files changed, 316 insertions(+), 532 deletions(-) diff --git a/src/storm/storage/dd/Odd.cpp b/src/storm/storage/dd/Odd.cpp index af86aba1d..b94295f0e 100644 --- a/src/storm/storage/dd/Odd.cpp +++ b/src/storm/storage/dd/Odd.cpp @@ -13,7 +13,7 @@ namespace storm { namespace dd { Odd::Odd(std::shared_ptr elseNode, uint_fast64_t elseOffset, std::shared_ptr thenNode, uint_fast64_t thenOffset) : elseNode(elseNode), thenNode(thenNode), elseOffset(elseOffset), thenOffset(thenOffset) { - // Intentionally left empty. + STORM_LOG_ASSERT(this != elseNode.get() && this != thenNode.get(), "Cyclic ODD."); } Odd const& Odd::getThenSuccessor() const { @@ -105,30 +105,23 @@ namespace storm { dotFile << boost::join(levelNames, " -> ") << ";"; dotFile << "}" << std::endl; - std::map>> levelToOddNodesMap; + std::map> levelToOddNodesMap; this->addToLevelToOddNodesMap(levelToOddNodesMap); for (auto const& levelNodes : levelToOddNodesMap) { dotFile << "{ rank = same; \"" << levelNodes.first << "\"" << std::endl;; for (auto const& node : levelNodes.second) { - dotFile << "\"" << &node.get() << "\";" << std::endl; + dotFile << "\"" << node << "\";" << std::endl; } dotFile << "}" << std::endl; } - std::set printedNodes; for (auto const& levelNodes : levelToOddNodesMap) { for (auto const& node : levelNodes.second) { - if (printedNodes.find(&node.get()) != printedNodes.end()) { - continue; - } else { - printedNodes.insert(&node.get()); - } - - dotFile << "\"" << &node.get() << "\" [label=\"" << levelNodes.first << "\"];" << std::endl; - if (!node.get().isTerminalNode()) { - dotFile << "\"" << &node.get() << "\" -> \"" << &node.get().getElseSuccessor() << "\" [style=dashed, label=\"0\"];" << std::endl; - dotFile << "\"" << &node.get() << "\" -> \"" << &node.get().getThenSuccessor() << "\" [style=solid, label=\"" << node.get().getElseOffset() << "\"];" << std::endl; + dotFile << "\"" << node << "\" [label=\"" << node->getTotalOffset() << "\"];" << std::endl; + if (!node->isTerminalNode()) { + dotFile << "\"" << node << "\" -> \"" << &node->getElseSuccessor() << "\" [style=dashed, label=\"0\"];" << std::endl; + dotFile << "\"" << node << "\" -> \"" << &node->getThenSuccessor() << "\" [style=solid, label=\"" << node->getElseOffset() << "\"];" << std::endl; } } } @@ -137,11 +130,13 @@ namespace storm { storm::utility::closeFile(dotFile); } - void Odd::addToLevelToOddNodesMap(std::map>>& levelToOddNodesMap, uint_fast64_t level) const { - levelToOddNodesMap[level].push_back(*this); + void Odd::addToLevelToOddNodesMap(std::map>& levelToOddNodesMap, uint_fast64_t level) const { + levelToOddNodesMap[level].emplace(this); if (!this->isTerminalNode()) { this->getElseSuccessor().addToLevelToOddNodesMap(levelToOddNodesMap, level + 1); - this->getThenSuccessor().addToLevelToOddNodesMap(levelToOddNodesMap, level + 1); + if (this->thenNode != this->elseNode) { + this->getThenSuccessor().addToLevelToOddNodesMap(levelToOddNodesMap, level + 1); + } } } diff --git a/src/storm/storage/dd/Odd.h b/src/storm/storage/dd/Odd.h index 637e9ca6c..0cb4a307c 100644 --- a/src/storm/storage/dd/Odd.h +++ b/src/storm/storage/dd/Odd.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace storm { namespace dd { @@ -125,7 +126,7 @@ namespace storm { * @param levelToOddNodesMap A mapping of the level to the ODD node. * @param The level of the current node. */ - void addToLevelToOddNodesMap(std::map>>& levelToOddNodesMap, uint_fast64_t level = 0) const; + void addToLevelToOddNodesMap(std::map>& levelToOddNodesMap, uint_fast64_t level = 0) const; /*! * Adds the values of the old explicit values to the new explicit values where the positions in the old vector diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index fc6e289b1..5f4376ae7 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -214,89 +214,43 @@ namespace storm { template class InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : manager(manager) { - - // Initialize cubes. - stateVariablesCube = manager.getBddOne(); - allSourceVariablesCube = manager.getBddOne(); - nondeterminismVariablesCube = manager.getBddOne(); - + InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : manager(manager), partition(partition), representatives(representatives), odd(odd) { // Create cubes. - for (auto const& variable : stateVariables) { + rowVariablesCube = manager.getBddOne(); + for (auto const& variable : rowVariables) { auto const& ddMetaVariable = manager.getMetaVariable(variable); - std::vector> indicesAndLevels = ddMetaVariable.getIndicesAndLevels(); - sourceVariablesIndicesAndLevels.insert(sourceVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); - - allSourceVariablesCube &= ddMetaVariable.getCube(); - stateVariablesCube &= ddMetaVariable.getCube(); + rowVariablesCube &= ddMetaVariable.getCube(); + } + columnVariablesCube = manager.getBddOne(); + for (auto const& variable : columnVariables) { + auto const& ddMetaVariable = manager.getMetaVariable(variable); + columnVariablesCube &= ddMetaVariable.getCube(); } + nondeterminismVariablesCube = manager.getBddOne(); for (auto const& variable : nondeterminismVariables) { auto const& ddMetaVariable = manager.getMetaVariable(variable); - allSourceVariablesCube &= ddMetaVariable.getCube(); nondeterminismVariablesCube &= ddMetaVariable.getCube(); - - std::vector> indicesAndLevels = ddMetaVariable.getIndicesAndLevels(); - nondeterminismVariablesIndicesAndLevels.insert(nondeterminismVariablesIndicesAndLevels.end(), indicesAndLevels.begin(), indicesAndLevels.end()); } - - // Sort the indices by their levels. - std::sort(sourceVariablesIndicesAndLevels.begin(), sourceVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); - std::sort(nondeterminismVariablesIndicesAndLevels.begin(), nondeterminismVariablesIndicesAndLevels.end(), [] (std::pair const& a, std::pair const& b) { return a.second < b.second; } ); + allSourceVariablesCube = rowVariablesCube && nondeterminismVariablesCube; } protected: - storm::storage::SparseMatrix createMatrixFromEntries(Partition const& partition) { - if (!deterministicEntries.empty()) { - return createMatrixFromDeterministicEntries(partition); - } else { - return createMatrixFromNondeterministicEntries(partition); - } - } + // The manager responsible for the DDs. + storm::dd::DdManager const& manager; - storm::storage::SparseMatrix createMatrixFromNondeterministicEntries(Partition const& partition) { - bool nontrivialRowGrouping = false; - uint64_t numberOfChoices = 0; - for (auto& group : nondeterministicEntries) { - for (auto& choice : group) { - auto& row = choice.second; - std::sort(row.begin(), row.end(), - [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { - return a.getColumn() < b.getColumn(); - }); - ++numberOfChoices; - } - nontrivialRowGrouping |= group.size() > 1; - } - - storm::storage::SparseMatrixBuilder builder(numberOfChoices, partition.getNumberOfBlocks(), 0, false, nontrivialRowGrouping); - uint64_t rowCounter = 0; - for (auto& group : nondeterministicEntries) { - for (auto& choice : group) { - auto& row = choice.second; - for (auto const& entry : row) { - builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); - } - - // Free storage for row. - row.clear(); - row.shrink_to_fit(); - - ++rowCounter; - } - - group.clear(); - - if (nontrivialRowGrouping) { - builder.newRowGroup(rowCounter); - } - } - nondeterministicEntries.clear(); - nondeterministicEntries.shrink_to_fit(); - return builder.build(); - } - - storm::storage::SparseMatrix createMatrixFromDeterministicEntries(Partition const& partition) { - for (auto& row : deterministicEntries) { + // Useful cubes needed in the translation. + storm::dd::Bdd rowVariablesCube; + storm::dd::Bdd columnVariablesCube; + storm::dd::Bdd allSourceVariablesCube; + storm::dd::Bdd nondeterminismVariablesCube; + + // Information about the state partition. + Partition partition; + storm::dd::Bdd representatives; + storm::dd::Odd const& odd; + + storm::storage::SparseMatrix createMatrixFromEntries() { + for (auto& row : matrixEntries) { std::sort(row.begin(), row.end(), [] (storm::storage::MatrixEntry const& a, storm::storage::MatrixEntry const& b) { return a.getColumn() < b.getColumn(); @@ -305,7 +259,7 @@ namespace storm { storm::storage::SparseMatrixBuilder builder(partition.getNumberOfBlocks(), partition.getNumberOfBlocks()); uint64_t rowCounter = 0; - for (auto& row : deterministicEntries) { + for (auto& row : matrixEntries) { for (auto const& entry : row) { builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); } @@ -317,483 +271,332 @@ namespace storm { ++rowCounter; } - deterministicEntries.clear(); - deterministicEntries.shrink_to_fit(); + matrixEntries.clear(); + matrixEntries.shrink_to_fit(); return builder.build(); } - - void addMatrixEntry(storm::storage::BitVector const& nondeterminismEncoding, uint64_t sourceBlockIndex, uint64_t targetBlockIndex, ValueType const& value) { - if (nondeterminismVariablesIndicesAndLevels.empty()) { - this->deterministicEntries[sourceBlockIndex].emplace_back(targetBlockIndex, value); - } else { - this->nondeterministicEntries[sourceBlockIndex][nondeterminismEncoding].emplace_back(targetBlockIndex, value); - } + + void addMatrixEntry(uint64_t sourceBlockIndex, uint64_t targetBlockIndex, ValueType const& value) { + this->matrixEntries[sourceBlockIndex].emplace_back(targetBlockIndex, value); } void reserveMatrixEntries(uint64_t numberOfStates) { - if (nondeterminismVariablesIndicesAndLevels.empty()) { - this->deterministicEntries.resize(numberOfStates); - } else { - this->nondeterministicEntries.resize(numberOfStates); - } + this->matrixEntries.resize(numberOfStates); } - // The manager responsible for the DDs. - storm::dd::DdManager const& manager; - - // The indices and levels of all state variables. - std::vector> sourceVariablesIndicesAndLevels; - - // The indices and levels of all state variables. - std::vector> nondeterminismVariablesIndicesAndLevels; - - // Useful cubes needed in the translation. - storm::dd::Bdd stateVariablesCube; - storm::dd::Bdd allSourceVariablesCube; - storm::dd::Bdd nondeterminismVariablesCube; - - // A hash map that stores the unique source state representative for each source block index. - spp::sparse_hash_map> uniqueSourceRepresentative; - // The entries of the matrix that is built if the model is deterministic (DTMC, CTMC). - std::vector>> deterministicEntries; - - // The entries of the matrix that is built if the model is nondeterministic (MDP). - std::vector>>> nondeterministicEntries; + std::vector>> matrixEntries; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables, nondeterminismVariables), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { - // Intentionally left empty. + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { + + STORM_LOG_ASSERT(this->partition.storedAsAdd(), "Expected partition to be stored as an ADD."); + this->partition.asAdd().exportToDot("part.dot"); + odd.exportToDot("odd.dot"); + this->representatives.exportToDot("reprbdd.dot"); + this->representatives.template toAdd().exportToDot("repr.dot"); + this->createBlockToOffsetMapping(); } - storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { - STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); - + storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { // Create the number of rows necessary for the matrix. - this->reserveMatrixEntries(partition.getNumberOfBlocks()); - STORM_LOG_TRACE("Partition has " << partition.getNumberOfStates() << " states in " << partition.getNumberOfBlocks() << " blocks."); + this->reserveMatrixEntries(this->partition.getNumberOfBlocks()); + STORM_LOG_TRACE("Partition has " << this->partition.getNumberOfStates() << " states in " << this->partition.getNumberOfBlocks() << " blocks."); - storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); - storm::storage::BitVector nondeterminismEncoding(this->nondeterminismVariablesIndicesAndLevels.size()); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), 0, stateEncoding, nondeterminismEncoding); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->odd, 0, this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode()); - return this->createMatrixFromEntries(partition); + return this->createMatrixFromEntries(); } - storm::storage::BitVector extractStates(storm::dd::Bdd const& states, Partition const& partition) { - STORM_LOG_ASSERT(partition.storedAsAdd(), "Expected partition stored as ADD."); - - storm::storage::BitVector result(partition.getNumberOfBlocks()); - extractStatesRec(states.getInternalBdd().getCuddDdNode(), partition.asAdd().getInternalAdd().getCuddDdNode(), this->stateVariablesCube.getInternalBdd().getCuddDdNode(), result); - - return result; + private: + void createBlockToOffsetMapping() { + this->createBlockToOffsetMappingRec(this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->rowVariablesCube.getInternalBdd().getCuddDdNode(), this->odd, 0); + STORM_LOG_ASSERT(blockToOffset.size() == this->partition.getNumberOfBlocks(), "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->partition.getNumberOfBlocks() << "."); } - private: - uint64_t decodeBlockIndex(DdNode* blockEncoding) { - std::unique_ptr& blockCacheEntry = blockDecodeCache[blockEncoding]; - if (blockCacheEntry) { - return *blockCacheEntry; + void createBlockToOffsetMappingRec(DdNodePtr partitionNode, DdNodePtr representativesNode, DdNodePtr variables, storm::dd::Odd const& odd, uint64_t offset) { + if (representativesNode == Cudd_ReadLogicZero(ddman)) { + std::cout << "returning early" << std::endl; + return; } - -// FILE* fp = fopen("block.dot" , "w"); -// Cudd_DumpDot(ddman, 1, &blockEncoding, nullptr, nullptr, fp); -// fclose(fp); - uint64_t result = 0; - uint64_t offset = 0; - while (blockEncoding != Cudd_ReadOne(ddman)) { - DdNode* then = Cudd_T(blockEncoding); - if (then != Cudd_ReadZero(ddman)) { - blockEncoding = then; - result |= 1ull << offset; - } else { - blockEncoding = Cudd_E(blockEncoding); - } - ++offset; + if (representativesNode == Cudd_ReadOne(ddman)) { + std::cout << "repr is one" << std::endl; } - - blockCacheEntry.reset(new uint64_t(result)); - - return result; - } - - void extractStatesRec(DdNode* statesNode, DdNode* partitionNode, DdNode* stateVariablesNode, storm::storage::BitVector& result) { - if (statesNode == Cudd_ReadLogicZero(ddman)) { - return; + if (partitionNode == Cudd_ReadOne(ddman)) { + std::cout << "part is zero" << std::endl; + } else if (partitionNode == Cudd_ReadOne(ddman)) { + std::cout << "part is one" << std::endl; } - bool skippedBoth = true; - DdNode* tStates; - DdNode* eStates; - DdNode* tPartition; - DdNode* ePartition; - bool negate = false; - while (skippedBoth && !Cudd_IsConstant(stateVariablesNode)) { - if (Cudd_NodeReadIndex(statesNode) == Cudd_NodeReadIndex(stateVariablesNode)) { - tStates = Cudd_T(statesNode); - eStates = Cudd_E(statesNode); - negate = Cudd_IsComplement(statesNode); - skippedBoth = false; + std::cout << "got call " << partitionNode << ", " << representativesNode << ", " << variables << ", " << offset << ", " << Cudd_IsConstant(variables) << std::endl; + + if (Cudd_IsConstant(variables)) { + STORM_LOG_ASSERT(odd.isTerminalNode(), "Expected terminal node."); + std::cout << "inserting " << partitionNode << " -> " << offset << std::endl; + STORM_LOG_ASSERT(blockToOffset.find(partitionNode) == blockToOffset.end(), "Duplicate entry."); + blockToOffset[partitionNode] = offset; + } else { + STORM_LOG_ASSERT(!odd.isTerminalNode(), "Expected non-terminal node."); + DdNodePtr partitionT; + DdNodePtr partitionE; + if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(variables) + 1) { + partitionT = Cudd_T(partitionNode); + partitionE = Cudd_E(partitionNode); } else { - tStates = eStates = statesNode; + std::cout << "[1] skipped " << Cudd_NodeReadIndex(variables) << ", got " << Cudd_NodeReadIndex(partitionNode) << std::endl; + partitionT = partitionE = partitionNode; } - if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(stateVariablesNode) + 1) { - tPartition = Cudd_T(partitionNode); - ePartition = Cudd_E(partitionNode); - skippedBoth = false; + DdNodePtr representativesT; + DdNodePtr representativesE; + if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { + representativesT = Cudd_T(representativesNode); + representativesE = Cudd_E(representativesNode); } else { - tPartition = ePartition = partitionNode; + std::cout << "[2] skipped " << Cudd_NodeReadIndex(variables) << ", got " << Cudd_NodeReadIndex(representativesNode) << std::endl; + representativesT = representativesE = representativesNode; } - if (skippedBoth) { - stateVariablesNode = Cudd_T(stateVariablesNode); + if (representativesT != representativesE && Cudd_IsComplement(representativesNode)) { + representativesE = Cudd_Not(representativesE); + representativesT = Cudd_Not(representativesT); } + + std::cout << "else" << std::endl; + createBlockToOffsetMappingRec(partitionE, representativesE, Cudd_T(variables), odd.getElseSuccessor(), offset); + std::cout << "then with offset " << odd.getElseOffset() << std::endl; + createBlockToOffsetMappingRec(partitionT, representativesT, Cudd_T(variables), odd.getThenSuccessor(), offset + odd.getElseOffset()); } - - if (Cudd_IsConstant(stateVariablesNode)) { - // If there is no more state variables, it means that we arrived at a block encoding in which there is a state in the state set. - result.set(decodeBlockIndex(partitionNode)); - return; - } else { - // Otherwise, we need to recursively descend. - extractStatesRec(negate ? Cudd_Not(tStates) : tStates, tPartition, Cudd_T(stateVariablesNode), result); - extractStatesRec(negate ? Cudd_Not(eStates) : eStates, ePartition, Cudd_T(stateVariablesNode), result); - } + std::cout << "returning" << std::endl; } - void extractTransitionMatrixRec(DdNode* transitionMatrixNode, DdNode* sourcePartitionNode, DdNode* targetPartitionNode, uint64_t sourceStateEncodingIndex, storm::storage::BitVector& sourceStateEncoding, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = 1) { + void extractTransitionMatrixRec(DdNodePtr transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, DdNodePtr targetPartitionNode, DdNodePtr representativesNode, DdNodePtr variables) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. - if (transitionMatrixNode == Cudd_ReadZero(ddman)) { + if (transitionMatrixNode == Cudd_ReadZero(ddman) || representativesNode == Cudd_ReadLogicZero(ddman)) { return; } // If we have moved through all source variables, we must have arrived at a target block encoding. - if (sourceStateEncodingIndex == sourceStateEncoding.size()) { - // Decode the source block. - uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); - - std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; - if (sourceRepresentative && *sourceRepresentative != sourceStateEncoding) { - // In this case, we have picked a different representative and must not record any entries now. - return; - } - - // Otherwise, we record the new representative. - sourceRepresentative.reset(new storm::storage::BitVector(sourceStateEncoding)); - - // Decode the target block and add entry to matrix. - uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); - this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * Cudd_V(transitionMatrixNode)); + if (Cudd_IsConstant(variables)) { + STORM_LOG_ASSERT(Cudd_IsConstant(transitionMatrixNode), "Expected constant node."); + this->addMatrixEntry(sourceOffset, blockToOffset.at(targetPartitionNode), Cudd_V(transitionMatrixNode)); } else { - // Determine the levels in the DDs. - uint64_t transitionMatrixVariable = Cudd_NodeReadIndex(transitionMatrixNode); - uint64_t sourcePartitionVariable = Cudd_NodeReadIndex(sourcePartitionNode) - 1; - uint64_t targetPartitionVariable = Cudd_NodeReadIndex(targetPartitionNode) - 1; + DdNodePtr t; + DdNodePtr tt; + DdNodePtr te; + DdNodePtr e; + DdNodePtr et; + DdNodePtr ee; + if (Cudd_NodeReadIndex(transitionMatrixNode) == Cudd_NodeReadIndex(variables)) { + // Source node was not skipped in transition matrix. + t = Cudd_T(transitionMatrixNode); + e = Cudd_E(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } - // Move through transition matrix. - bool skippedSourceInMatrix = false; - bool skippedTargetTInMatrix = false; - bool skippedTargetEInMatrix = false; - DdNode* tt = transitionMatrixNode; - DdNode* te = transitionMatrixNode; - DdNode* et = transitionMatrixNode; - DdNode* ee = transitionMatrixNode; - STORM_LOG_ASSERT(transitionMatrixVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of transition matrix."); - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { - DdNode* t = Cudd_T(transitionMatrixNode); - uint64_t tVariable = Cudd_NodeReadIndex(t); - if (tVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { - tt = Cudd_T(t); - te = Cudd_E(t); - } else { - tt = te = t; - skippedTargetTInMatrix = true; - } - - DdNode* e = Cudd_E(transitionMatrixNode); - uint64_t eVariable = Cudd_NodeReadIndex(e); - if (eVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { + if (Cudd_NodeReadIndex(t) == Cudd_NodeReadIndex(variables) + 1) { + // Target node was not skipped in transition matrix. + tt = Cudd_T(t); + te = Cudd_E(t); + } else { + // Target node was skipped in transition matrix. + tt = te = t; + } + if (t != e) { + if (Cudd_NodeReadIndex(e) == Cudd_NodeReadIndex(variables) + 1) { + // Target node was not skipped in transition matrix. et = Cudd_T(e); ee = Cudd_E(e); } else { + // Target node was skipped in transition matrix. et = ee = e; - skippedTargetEInMatrix = true; } } else { - skippedSourceInMatrix = true; - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first + 1) { - tt = et = Cudd_T(transitionMatrixNode); - te = ee = Cudd_E(transitionMatrixNode); - } else { - tt = te = et = ee = transitionMatrixNode; - skippedTargetTInMatrix = skippedTargetEInMatrix = true; - } - } - - // Move through partition (for source state). - bool skippedInSourcePartition = false; - DdNode* sourceT; - DdNode* sourceE; - STORM_LOG_ASSERT(sourcePartitionVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of source partition."); - if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { - sourceT = Cudd_T(sourcePartitionNode); - sourceE = Cudd_E(sourcePartitionNode); - } else { - sourceT = sourceE = sourcePartitionNode; - skippedInSourcePartition = true; + et = tt; + ee = te; } - // Move through partition (for target state). - bool skippedInTargetPartition = false; - DdNode* targetT; - DdNode* targetE; - STORM_LOG_ASSERT(targetPartitionVariable >= this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first, "Illegal top variable of source partition."); - if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[sourceStateEncodingIndex].first) { + DdNodePtr targetT; + DdNodePtr targetE; + if (Cudd_NodeReadIndex(targetPartitionNode) == Cudd_NodeReadIndex(variables) + 1) { + // Node was not skipped in target partition. targetT = Cudd_T(targetPartitionNode); targetE = Cudd_E(targetPartitionNode); } else { + // Node was skipped in target partition. targetT = targetE = targetPartitionNode; - skippedInTargetPartition = true; } - // If we skipped the variable in the source partition, we only have to choose one of the two representatives. - if (!skippedInSourcePartition) { - sourceStateEncoding.set(sourceStateEncodingIndex, true); - if (!skippedInTargetPartition) { - extractTransitionMatrixRec(tt, sourceT, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); - } - extractTransitionMatrixRec(te, sourceT, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); + DdNodePtr representativesT; + DdNodePtr representativesE; + if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { + // Node was not skipped in representatives. + representativesT = Cudd_T(representativesNode); + representativesE = Cudd_E(representativesNode); + } else { + // Node was skipped in representatives. + representativesT = representativesE = representativesNode; } - sourceStateEncoding.set(sourceStateEncodingIndex, false); - // If we skipped the variable in the target partition, just count the one representative twice. - if (!skippedInTargetPartition) { - extractTransitionMatrixRec(et, sourceE, targetT, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, factor); + if (representativesT != representativesE && Cudd_IsComplement(representativesNode)) { + representativesT = Cudd_Not(representativesT); + representativesE = Cudd_Not(representativesE); } - extractTransitionMatrixRec(ee, sourceE, targetE, sourceStateEncodingIndex + 1, sourceStateEncoding, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); + + extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, Cudd_T(variables)); + extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, Cudd_T(variables)); + extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, Cudd_T(variables)); + extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, Cudd_T(variables)); } } ::DdManager* ddman; - spp::sparse_hash_map> blockDecodeCache; + // A mapping from blocks (stored in terms of a DD node) to the offset of the corresponding block. + spp::sparse_hash_map blockToOffset; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& stateVariables, std::set const& nondeterminismVariables) : InternalSparseQuotientExtractorBase(manager, stateVariables, nondeterminismVariables) { - // Intentionally left empty. - } - - storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix, Partition const& partition) { - STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); + InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd) { - // Create the number of rows necessary for the matrix. - this->reserveMatrixEntries(partition.getNumberOfBlocks()); - - storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); - storm::storage::BitVector nondeterminismEncoding; - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, stateEncoding, nondeterminismEncoding); - - return this->createMatrixFromEntries(partition); - } - - storm::storage::BitVector extractStates(storm::dd::Bdd const& states, Partition const& partition) { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Möööp"); STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); - - storm::storage::BitVector result(partition.getNumberOfBlocks()); - extractStatesRec(states.getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->stateVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), result); - - return result; - } - - private: - uint64_t decodeBlockIndex(BDD blockEncoding) { - std::unique_ptr& blockCacheEntry = blockDecodeCache[blockEncoding]; - if (blockCacheEntry) { - return *blockCacheEntry; - } - - uint64_t result = 0; - uint64_t offset = 0; - while (blockEncoding != sylvan_true) { - if (sylvan_high(blockEncoding) != sylvan_false) { - blockEncoding = sylvan_high(blockEncoding); - result |= 1ull << offset; - } else { - blockEncoding = sylvan_low(blockEncoding); - } - ++offset; - } - - blockCacheEntry.reset(new uint64_t(result)); - - return result; } - void extractStatesRec(BDD statesNode, BDD partitionNode, BDD stateVariablesNode, storm::storage::BitVector& result) { - if (statesNode == sylvan_false) { - return; - } - - bool skippedBoth = true; - BDD tStates; - BDD eStates; - BDD tPartition; - BDD ePartition; - while (skippedBoth && !sylvan_isconst(stateVariablesNode)) { - if (sylvan_var(statesNode) == sylvan_var(stateVariablesNode)) { - tStates = sylvan_high(statesNode); - eStates = sylvan_low(statesNode); - skippedBoth = false; - } else { - tStates = eStates = statesNode; - } - - if (sylvan_var(partitionNode) == sylvan_var(stateVariablesNode) + 1) { - tPartition = sylvan_high(partitionNode); - ePartition = sylvan_low(partitionNode); - skippedBoth = false; - } else { - tPartition = ePartition = partitionNode; - } - - if (skippedBoth) { - stateVariablesNode = sylvan_high(stateVariablesNode); - } - } - - if (sylvan_isconst(stateVariablesNode)) { - // If there is no more state variables, it means that we arrived at a block encoding in which there is a state in the state set. - result.set(decodeBlockIndex(partitionNode)); - return; - } else { - // Otherwise, we need to recursively descend. - extractStatesRec(tStates, tPartition, sylvan_high(stateVariablesNode), result); - extractStatesRec(eStates, ePartition, sylvan_high(stateVariablesNode), result); - } + storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Möööp"); +// // Create the number of rows necessary for the matrix. +// this->reserveMatrixEntries(partition.getNumberOfBlocks()); +// +// storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); +// storm::storage::BitVector nondeterminismEncoding; +// extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, stateEncoding, nondeterminismEncoding); +// +// return this->createMatrixFromEntries(partition); } - void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = storm::utility::one()) { - // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero - // as all states of the model have to be contained. - if (mtbdd_iszero(transitionMatrixNode)) { - return; - } - - // If we have moved through all source variables, we must have arrived at a target block encoding. - if (currentIndex == sourceState.size()) { - // Decode the source block. - uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); - - std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; - if (sourceRepresentative && *sourceRepresentative != sourceState) { - // In this case, we have picked a different representative and must not record any entries now. - return; - } - - // Otherwise, we record the new representative. - sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); - - // Decode the target block and add matrix entry. - uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); - this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * storm::dd::InternalAdd::getValue(transitionMatrixNode)); - } else { - // Determine the levels in the DDs. - uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); - uint64_t sourcePartitionVariable = sylvan_var(sourcePartitionNode) - 1; - uint64_t targetPartitionVariable = sylvan_var(targetPartitionNode) - 1; - - // Move through transition matrix. - bool skippedSourceInMatrix = false; - bool skippedTargetTInMatrix = false; - bool skippedTargetEInMatrix = false; - MTBDD tt = transitionMatrixNode; - MTBDD te = transitionMatrixNode; - MTBDD et = transitionMatrixNode; - MTBDD ee = transitionMatrixNode; - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { - MTBDD t = sylvan_high(transitionMatrixNode); - MTBDD e = sylvan_low(transitionMatrixNode); - - uint64_t tVariable = sylvan_isconst(t) ? 0xffffffff : sylvan_var(t); - if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { - tt = sylvan_high(t); - te = sylvan_low(t); - } else { - tt = te = t; - skippedTargetTInMatrix = true; - } - - uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); - if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { - et = sylvan_high(e); - ee = sylvan_low(e); - } else { - et = ee = e; - skippedTargetEInMatrix = true; - } - } else { - skippedSourceInMatrix = true; - if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { - tt = et = sylvan_high(transitionMatrixNode); - te = ee = sylvan_low(transitionMatrixNode); - } else { - tt = te = et = ee = transitionMatrixNode; - skippedTargetTInMatrix = skippedTargetEInMatrix = true; - } - } - - // Move through partition (for source state). - bool skippedInSourcePartition = false; - MTBDD sourceT; - MTBDD sourceE; - if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { - sourceT = sylvan_high(sourcePartitionNode); - sourceE = sylvan_low(sourcePartitionNode); - } else { - sourceT = sourceE = sourcePartitionNode; - skippedInSourcePartition = true; - } - - // Move through partition (for target state). - bool skippedInTargetPartition = false; - MTBDD targetT; - MTBDD targetE; - if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { - targetT = sylvan_high(targetPartitionNode); - targetE = sylvan_low(targetPartitionNode); - } else { - targetT = targetE = targetPartitionNode; - skippedInTargetPartition = true; - } - - // If we skipped the variable in the source partition, we only have to choose one of the two representatives. - if (!skippedInSourcePartition) { - sourceState.set(currentIndex, true); - // If we skipped the variable in the target partition, just count the one representative twice. - if (!skippedInTargetPartition) { - extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); - } - extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); - } - - sourceState.set(currentIndex, false); - // If we skipped the variable in the target partition, just count the one representative twice. - if (!skippedInTargetPartition) { - extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); - } - extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); - } - } + private: +// void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = storm::utility::one()) { +// // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero +// // as all states of the model have to be contained. +// if (mtbdd_iszero(transitionMatrixNode)) { +// return; +// } +// +// // If we have moved through all source variables, we must have arrived at a target block encoding. +// if (currentIndex == sourceState.size()) { +// // Decode the source block. +// uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); +// +// std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; +// if (sourceRepresentative && *sourceRepresentative != sourceState) { +// // In this case, we have picked a different representative and must not record any entries now. +// return; +// } +// +// // Otherwise, we record the new representative. +// sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); +// +// // Decode the target block and add matrix entry. +// uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); +// this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * storm::dd::InternalAdd::getValue(transitionMatrixNode)); +// } else { +// // Determine the levels in the DDs. +// uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); +// uint64_t sourcePartitionVariable = sylvan_var(sourcePartitionNode) - 1; +// uint64_t targetPartitionVariable = sylvan_var(targetPartitionNode) - 1; +// +// // Move through transition matrix. +// bool skippedSourceInMatrix = false; +// bool skippedTargetTInMatrix = false; +// bool skippedTargetEInMatrix = false; +// MTBDD tt = transitionMatrixNode; +// MTBDD te = transitionMatrixNode; +// MTBDD et = transitionMatrixNode; +// MTBDD ee = transitionMatrixNode; +// if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { +// MTBDD t = sylvan_high(transitionMatrixNode); +// MTBDD e = sylvan_low(transitionMatrixNode); +// +// uint64_t tVariable = sylvan_isconst(t) ? 0xffffffff : sylvan_var(t); +// if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { +// tt = sylvan_high(t); +// te = sylvan_low(t); +// } else { +// tt = te = t; +// skippedTargetTInMatrix = true; +// } +// +// uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); +// if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { +// et = sylvan_high(e); +// ee = sylvan_low(e); +// } else { +// et = ee = e; +// skippedTargetEInMatrix = true; +// } +// } else { +// skippedSourceInMatrix = true; +// if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { +// tt = et = sylvan_high(transitionMatrixNode); +// te = ee = sylvan_low(transitionMatrixNode); +// } else { +// tt = te = et = ee = transitionMatrixNode; +// skippedTargetTInMatrix = skippedTargetEInMatrix = true; +// } +// } +// +// // Move through partition (for source state). +// bool skippedInSourcePartition = false; +// MTBDD sourceT; +// MTBDD sourceE; +// if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { +// sourceT = sylvan_high(sourcePartitionNode); +// sourceE = sylvan_low(sourcePartitionNode); +// } else { +// sourceT = sourceE = sourcePartitionNode; +// skippedInSourcePartition = true; +// } +// +// // Move through partition (for target state). +// bool skippedInTargetPartition = false; +// MTBDD targetT; +// MTBDD targetE; +// if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { +// targetT = sylvan_high(targetPartitionNode); +// targetE = sylvan_low(targetPartitionNode); +// } else { +// targetT = targetE = targetPartitionNode; +// skippedInTargetPartition = true; +// } +// +// // If we skipped the variable in the source partition, we only have to choose one of the two representatives. +// if (!skippedInSourcePartition) { +// sourceState.set(currentIndex, true); +// // If we skipped the variable in the target partition, just count the one representative twice. +// if (!skippedInTargetPartition || !skippedTargetTInMatrix) { +// extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); +// } +// extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); +// } +// +// sourceState.set(currentIndex, false); +// // If we skipped the variable in the target partition, just count the one representative twice. +// if (!skippedInTargetPartition || !skippedTargetEInMatrix) { +// extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); +// } +// extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); +// } +// } spp::sparse_hash_map> blockDecodeCache; }; @@ -824,30 +627,29 @@ namespace storm { template std::shared_ptr> QuotientExtractor::extractSparseQuotient(storm::models::symbolic::Model const& model, Partition const& partition, PreservationInformation const& preservationInformation) { - InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getNondeterminismVariables()); auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); storm::dd::Bdd partitionAsBdd = partition.storedAsAdd() ? partition.asAdd().toBdd() : partition.asBdd(); partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); - partitionAsBdd.template toAdd().exportToDot("partition.dot"); auto start = std::chrono::high_resolution_clock::now(); // FIXME: Use partition as BDD in representative computation. auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); - representatives.template toAdd().exportToDot("repr.dot"); - (model.getTransitionMatrix() * representatives.template toAdd()).exportToDot("extract.dot"); - storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix() * representatives.template toAdd(), partition); + STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); + storm::dd::Odd odd = representatives.createOdd(); + STORM_LOG_ASSERT(odd.getTotalOffset() == representatives.getNonZeroCount(), "Mismatching ODD."); + InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), partition, representatives, odd); + storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix()); auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); start = std::chrono::high_resolution_clock::now(); - storm::dd::Odd odd = representatives.createOdd(); storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); quotientStateLabeling.addLabel("init", ((model.getInitialStates() && partitionAsBdd).existsAbstract(model.getRowVariables()) && partitionAsBdd && representatives).existsAbstract({partition.getBlockVariable()}).toVector(odd)); - quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractStates(model.getDeadlockStates(), partition)); + quotientStateLabeling.addLabel("deadlock", ((model.getDeadlockStates() && partitionAsBdd).existsAbstract(model.getRowVariables()) && partitionAsBdd && representatives).existsAbstract({partition.getBlockVariable()}).toVector(odd)); for (auto const& label : preservationInformation.getLabels()) { - quotientStateLabeling.addLabel(label, sparseExtractor.extractStates(model.getStates(label), partition)); + quotientStateLabeling.addLabel(label, (model.getStates(label) && representatives).toVector(odd)); } for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; @@ -857,7 +659,7 @@ namespace storm { if (quotientStateLabeling.containsLabel(expressionAsString)) { STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); } else { - quotientStateLabeling.addLabel(stream.str(), sparseExtractor.extractStates(model.getStates(expression), partition)); + quotientStateLabeling.addLabel(stream.str(), (model.getStates(expression) && representatives).toVector(odd)); } } end = std::chrono::high_resolution_clock::now(); diff --git a/src/storm/storage/dd/cudd/InternalCuddBdd.cpp b/src/storm/storage/dd/cudd/InternalCuddBdd.cpp index acdd67e63..8d8264dd7 100644 --- a/src/storm/storage/dd/cudd/InternalCuddBdd.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddBdd.cpp @@ -313,10 +313,10 @@ namespace storm { Odd InternalBdd::createOdd(std::vector const& ddVariableIndices) const { // Prepare a unique table for each level that keeps the constructed ODD nodes unique. - std::vector, std::shared_ptr, HashFunctor>> uniqueTableForLevels(ddVariableIndices.size() + 1); + std::vector>> uniqueTableForLevels(ddVariableIndices.size() + 1); // Now construct the ODD structure from the BDD. - std::shared_ptr rootOdd = createOddRec(Cudd_Regular(this->getCuddDdNode()), ddManager->getCuddManager(), 0, Cudd_IsComplement(this->getCuddDdNode()), ddVariableIndices.size(), ddVariableIndices, uniqueTableForLevels); + std::shared_ptr rootOdd = createOddRec(this->getCuddDdNode(), ddManager->getCuddManager(), 0, ddVariableIndices.size(), ddVariableIndices, uniqueTableForLevels); // Return a copy of the root node to remove the shared_ptr encapsulation. return Odd(*rootOdd); @@ -329,57 +329,44 @@ namespace storm { return result; } - std::shared_ptr InternalBdd::createOddRec(DdNode const* dd, cudd::Cudd const& manager, uint_fast64_t currentLevel, bool complement, uint_fast64_t maxLevel, std::vector const& ddVariableIndices, std::vector, std::shared_ptr, HashFunctor>>& uniqueTableForLevels) { + std::shared_ptr InternalBdd::createOddRec(DdNode const* dd, cudd::Cudd const& manager, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector const& ddVariableIndices, std::vector>>& uniqueTableForLevels) { // Check whether the ODD for this node has already been computed (for this level) and if so, return this instead. - auto const& iterator = uniqueTableForLevels[currentLevel].find(std::make_pair(dd, complement)); - if (iterator != uniqueTableForLevels[currentLevel].end()) { - return iterator->second; + auto it = uniqueTableForLevels[currentLevel].find(dd); + if (it != uniqueTableForLevels[currentLevel].end()) { + return it->second; } else { // Otherwise, we need to recursively compute the ODD. // If we are already at the maximal level that is to be considered, we can simply create an Odd without // successors if (currentLevel == maxLevel) { - uint_fast64_t elseOffset = 0; - uint_fast64_t thenOffset = 0; - - // If the DD is not the zero leaf, then the then-offset is 1. - if (dd != Cudd_ReadZero(manager.getManager())) { - thenOffset = 1; - } - - // If we need to complement the 'terminal' node, we need to negate its offset. - if (complement) { - thenOffset = 1 - thenOffset; - } - - auto oddNode = std::make_shared(nullptr, elseOffset, nullptr, thenOffset); - uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); + auto oddNode = std::make_shared(nullptr, 0, nullptr, dd != Cudd_ReadLogicZero(manager.getManager()) ? 1 : 0); + uniqueTableForLevels[currentLevel].emplace(dd, oddNode); return oddNode; } else if (ddVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) { // If we skipped the level in the DD, we compute the ODD just for the else-successor and use the same // node for the then-successor as well. - std::shared_ptr elseNode = createOddRec(dd, manager, currentLevel + 1, complement, maxLevel, ddVariableIndices, uniqueTableForLevels); + std::shared_ptr elseNode = createOddRec(dd, manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels); std::shared_ptr thenNode = elseNode; - uint_fast64_t totalOffset = elseNode->getElseOffset() + elseNode->getThenOffset(); - auto oddNode = std::make_shared(elseNode, totalOffset, thenNode, totalOffset); - uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); + auto oddNode = std::make_shared(elseNode, elseNode->getTotalOffset(), thenNode, elseNode->getTotalOffset()); + uniqueTableForLevels[currentLevel].emplace(dd, oddNode); return oddNode; } else { // Otherwise, we compute the ODDs for both the then- and else successors. DdNode const* thenDdNode = Cudd_T_const(dd); DdNode const* elseDdNode = Cudd_E_const(dd); - // Determine whether we have to evaluate the successors as if they were complemented. - bool elseComplemented = Cudd_IsComplement(elseDdNode) ^ complement; - bool thenComplemented = Cudd_IsComplement(thenDdNode) ^ complement; + if (Cudd_IsComplement(dd)) { + thenDdNode = Cudd_Not(thenDdNode); + elseDdNode = Cudd_Not(elseDdNode); + } - std::shared_ptr elseNode = createOddRec(Cudd_Regular(elseDdNode), manager, currentLevel + 1, elseComplemented, maxLevel, ddVariableIndices, uniqueTableForLevels); - std::shared_ptr thenNode = createOddRec(Cudd_Regular(thenDdNode), manager, currentLevel + 1, thenComplemented, maxLevel, ddVariableIndices, uniqueTableForLevels); + std::shared_ptr elseNode = createOddRec(elseDdNode, manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels); + std::shared_ptr thenNode = createOddRec(thenDdNode, manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels); - auto oddNode = std::make_shared(elseNode, elseNode->getElseOffset() + elseNode->getThenOffset(), thenNode, thenNode->getElseOffset() + thenNode->getThenOffset()); - uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); + auto oddNode = std::make_shared(elseNode, elseNode->getTotalOffset(), thenNode, thenNode->getTotalOffset()); + uniqueTableForLevels[currentLevel].emplace(dd, oddNode); return oddNode; } } diff --git a/src/storm/storage/dd/cudd/InternalCuddBdd.h b/src/storm/storage/dd/cudd/InternalCuddBdd.h index 005404e8e..36a200a56 100644 --- a/src/storm/storage/dd/cudd/InternalCuddBdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddBdd.h @@ -443,14 +443,13 @@ namespace storm { * @param dd The DD for which to build the ODD. * @param manager The manager responsible for the DD. * @param currentLevel The currently considered level in the DD. - * @param complement A flag indicating whether or not the given node is to be considered as complemented. * @param maxLevel The number of levels that need to be considered. * @param ddVariableIndices The (sorted) indices of all DD variables that need to be considered. * @param uniqueTableForLevels A vector of unique tables, one for each level to be considered, that keeps * ODD nodes for the same DD and level unique. * @return A pointer to the constructed ODD for the given arguments. */ - static std::shared_ptr createOddRec(DdNode const* dd, cudd::Cudd const& manager, uint_fast64_t currentLevel, bool complement, uint_fast64_t maxLevel, std::vector const& ddVariableIndices, std::vector, std::shared_ptr, HashFunctor>>& uniqueTableForLevels); + static std::shared_ptr createOddRec(DdNode const* dd, cudd::Cudd const& manager, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector const& ddVariableIndices, std::vector>>& uniqueTableForLevels); /*! * Adds the selected values the target vector. From eaee50f0778be8da78c4a1573abedb09c4cf1930 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 18 Aug 2017 19:06:23 +0200 Subject: [PATCH 46/95] fixed bug, implemented new sparse quotient extraction for sylvan --- .../3rdparty/cudd-3.0.0/cudd/cuddExport.c | 60 ++-- .../dd/bisimulation/QuotientExtractor.cpp | 284 +++++++++--------- 2 files changed, 171 insertions(+), 173 deletions(-) diff --git a/resources/3rdparty/cudd-3.0.0/cudd/cuddExport.c b/resources/3rdparty/cudd-3.0.0/cudd/cuddExport.c index 4107b2d8b..e1e76bbdd 100644 --- a/resources/3rdparty/cudd-3.0.0/cudd/cuddExport.c +++ b/resources/3rdparty/cudd-3.0.0/cudd/cuddExport.c @@ -448,8 +448,9 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,scan)) { - retval = fprintf(fp,"\"%#" PRIxPTR "\";\n", - ((mask & (ptruint) scan) / sizeof(DdNode))); +// retval = fprintf(fp,"\"%#" PRIxPTR "\";\n", +// ((mask & (ptruint) scan) / sizeof(DdNode))); + retval = fprintf(fp,"\"%p\";\n", (ptruint) scan); if (retval == EOF) goto failure; } scan = scan->next; @@ -470,8 +471,9 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,scan)) { - retval = fprintf(fp,"\"%#" PRIxPTR "\";\n", - ((mask & (ptruint) scan) / sizeof(DdNode))); +// retval = fprintf(fp,"\"%#" PRIxPTR "\";\n", +// ((mask & (ptruint) scan) / sizeof(DdNode))); + retval = fprintf(fp,"\"%p\";\n", Cudd_Regular(scan)); if (retval == EOF) goto failure; } scan = scan->next; @@ -491,11 +493,13 @@ Cudd_DumpDot( if (retval == EOF) goto failure; /* Account for the possible complement on the root. */ if (Cudd_IsComplement(f[i])) { - retval = fprintf(fp," -> \"%#" PRIxPTR "\" [style = dotted];\n", - ((mask & (ptruint) f[i]) / sizeof(DdNode))); +// retval = fprintf(fp," -> \"%#" PRIxPTR "\" [style = dotted];\n", +// ((mask & (ptruint) f[i]) / sizeof(DdNode))); + retval = fprintf(fp," -> \"%p\" [style = dotted];\n", (ptruint)Cudd_Regular(f[i])); } else { - retval = fprintf(fp," -> \"%#" PRIxPTR "\" [style = solid];\n", - ((mask & (ptruint) f[i]) / sizeof(DdNode))); +// retval = fprintf(fp," -> \"%p#" PRIxPTR "\" [style = solid];\n", +// ((mask & (ptruint) f[i]) / sizeof(DdNode))); + retval = fprintf(fp," -> \"%p\" [style = solid];\n", (ptruint)Cudd_Regular(f[i])); } if (retval == EOF) goto failure; } @@ -509,25 +513,28 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,scan)) { - retval = fprintf(fp, - "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR "\";\n", - ((mask & (ptruint) scan) / sizeof(DdNode)), - ((mask & (ptruint) cuddT(scan)) / sizeof(DdNode))); +// retval = fprintf(fp, +// "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR "\";\n", +// ((mask & (ptruint) scan) / sizeof(DdNode)), +// ((mask & (ptruint) cuddT(scan)) / sizeof(DdNode))); + retval = fprintf(fp, "\"%p\" -> \"%p\";\n", (ptruint)Cudd_Regular(scan), (ptruint)Cudd_Regular(cuddT(scan))); if (retval == EOF) goto failure; if (Cudd_IsComplement(cuddE(scan))) { - retval = fprintf(fp, - "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR - "\" [style = dotted];\n", - ((mask & (ptruint) scan) / sizeof(DdNode)), - ((mask & (ptruint) cuddE(scan)) / - sizeof(DdNode))); +// retval = fprintf(fp, +// "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR +// "\" [style = dotted];\n", +// ((mask & (ptruint) scan) / sizeof(DdNode)), +// ((mask & (ptruint) cuddE(scan)) / +// sizeof(DdNode))); + retval = fprintf(fp, "\"%p\" -> \"%p\" [style = dotted];\n", (ptruint)Cudd_Regular(scan), (ptruint)Cudd_Regular(cuddE(scan))); } else { - retval = fprintf(fp, - "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR - "\" [style = dashed];\n", - ((mask & (ptruint) scan) / sizeof(DdNode)), - ((mask & (ptruint) cuddE(scan)) / - sizeof(DdNode))); +// retval = fprintf(fp, +// "\"%#" PRIxPTR "\" -> \"%#" PRIxPTR +// "\" [style = dashed];\n", +// ((mask & (ptruint) scan) / sizeof(DdNode)), +// ((mask & (ptruint) cuddE(scan)) / +// sizeof(DdNode))); + retval = fprintf(fp, "\"%p\" -> \"%p\" [style = dashed];\n", (ptruint)Cudd_Regular(scan), (ptruint)Cudd_Regular(cuddE(scan))); } if (retval == EOF) goto failure; } @@ -544,8 +551,9 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,scan)) { - retval = fprintf(fp,"\"%#" PRIxPTR "\" [label = \"%g\"];\n", - ((mask & (ptruint) scan) / sizeof(DdNode)), cuddV(scan)); +// retval = fprintf(fp,"\"%#" PRIxPTR "\" [label = \"%g\"];\n", +// ((mask & (ptruint) scan) / sizeof(DdNode)), cuddV(scan)); + retval = fprintf(fp,"\"%p\" [label = \"%g\"];\n", (ptruint)Cudd_Regular(scan), cuddV(scan)); if (retval == EOF) goto failure; } scan = scan->next; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 5f4376ae7..20c74449b 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -127,7 +127,12 @@ namespace storm { return complement ? Cudd_Not(result) : result; } } else { - auto result = Cudd_Not(cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_ReadOne(ddman), Cudd_Not(elseResult))); + DdNodePtr result; + if (elseResult == Cudd_ReadLogicZero(ddman)) { + result = elseResult; + } else { + result = Cudd_Not(cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_ReadOne(ddman), Cudd_Not(elseResult))); + } Cudd_Deref(elseResult); return result; } @@ -198,7 +203,12 @@ namespace storm { return result; } } else { - auto result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, sylvan_false); + BDD result; + if (elseResult == sylvan_false) { + result = elseResult; + } else { + result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, sylvan_false); + } mtbdd_refs_pop(1); return result; } @@ -295,10 +305,6 @@ namespace storm { InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { STORM_LOG_ASSERT(this->partition.storedAsAdd(), "Expected partition to be stored as an ADD."); - this->partition.asAdd().exportToDot("part.dot"); - odd.exportToDot("odd.dot"); - this->representatives.exportToDot("reprbdd.dot"); - this->representatives.template toAdd().exportToDot("repr.dot"); this->createBlockToOffsetMapping(); } @@ -319,25 +325,13 @@ namespace storm { } void createBlockToOffsetMappingRec(DdNodePtr partitionNode, DdNodePtr representativesNode, DdNodePtr variables, storm::dd::Odd const& odd, uint64_t offset) { + STORM_LOG_ASSERT(partitionNode != Cudd_ReadZero(ddman) || representativesNode == Cudd_ReadLogicZero(ddman), "Expected representative to be zero if the partition is zero."); if (representativesNode == Cudd_ReadLogicZero(ddman)) { - std::cout << "returning early" << std::endl; return; } - if (representativesNode == Cudd_ReadOne(ddman)) { - std::cout << "repr is one" << std::endl; - } - if (partitionNode == Cudd_ReadOne(ddman)) { - std::cout << "part is zero" << std::endl; - } else if (partitionNode == Cudd_ReadOne(ddman)) { - std::cout << "part is one" << std::endl; - } - - std::cout << "got call " << partitionNode << ", " << representativesNode << ", " << variables << ", " << offset << ", " << Cudd_IsConstant(variables) << std::endl; - if (Cudd_IsConstant(variables)) { STORM_LOG_ASSERT(odd.isTerminalNode(), "Expected terminal node."); - std::cout << "inserting " << partitionNode << " -> " << offset << std::endl; STORM_LOG_ASSERT(blockToOffset.find(partitionNode) == blockToOffset.end(), "Duplicate entry."); blockToOffset[partitionNode] = offset; } else { @@ -348,7 +342,6 @@ namespace storm { partitionT = Cudd_T(partitionNode); partitionE = Cudd_E(partitionNode); } else { - std::cout << "[1] skipped " << Cudd_NodeReadIndex(variables) << ", got " << Cudd_NodeReadIndex(partitionNode) << std::endl; partitionT = partitionE = partitionNode; } @@ -358,7 +351,6 @@ namespace storm { representativesT = Cudd_T(representativesNode); representativesE = Cudd_E(representativesNode); } else { - std::cout << "[2] skipped " << Cudd_NodeReadIndex(variables) << ", got " << Cudd_NodeReadIndex(representativesNode) << std::endl; representativesT = representativesE = representativesNode; } @@ -367,12 +359,9 @@ namespace storm { representativesT = Cudd_Not(representativesT); } - std::cout << "else" << std::endl; createBlockToOffsetMappingRec(partitionE, representativesE, Cudd_T(variables), odd.getElseSuccessor(), offset); - std::cout << "then with offset " << odd.getElseOffset() << std::endl; createBlockToOffsetMappingRec(partitionT, representativesT, Cudd_T(variables), odd.getThenSuccessor(), offset + odd.getElseOffset()); } - std::cout << "returning" << std::endl; } void extractTransitionMatrixRec(DdNodePtr transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, DdNodePtr targetPartitionNode, DdNodePtr representativesNode, DdNodePtr variables) { @@ -468,137 +457,137 @@ namespace storm { public: InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd) { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Möööp"); STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); + this->createBlockToOffsetMapping(); } storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Möööp"); -// // Create the number of rows necessary for the matrix. -// this->reserveMatrixEntries(partition.getNumberOfBlocks()); -// -// storm::storage::BitVector stateEncoding(this->sourceVariablesIndicesAndLevels.size()); -// storm::storage::BitVector nondeterminismEncoding; -// extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), 0, stateEncoding, nondeterminismEncoding); -// -// return this->createMatrixFromEntries(partition); + // Create the number of rows necessary for the matrix. + this->reserveMatrixEntries(this->partition.getNumberOfBlocks()); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->odd, 0, this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD()); + return this->createMatrixFromEntries(); } private: -// void extractTransitionMatrixRec(MTBDD transitionMatrixNode, BDD sourcePartitionNode, BDD targetPartitionNode, uint64_t currentIndex, storm::storage::BitVector& sourceState, storm::storage::BitVector const& nondeterminismEncoding, ValueType const& factor = storm::utility::one()) { -// // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero -// // as all states of the model have to be contained. -// if (mtbdd_iszero(transitionMatrixNode)) { -// return; -// } -// -// // If we have moved through all source variables, we must have arrived at a target block encoding. -// if (currentIndex == sourceState.size()) { -// // Decode the source block. -// uint64_t sourceBlockIndex = decodeBlockIndex(sourcePartitionNode); -// -// std::unique_ptr& sourceRepresentative = this->uniqueSourceRepresentative[sourceBlockIndex]; -// if (sourceRepresentative && *sourceRepresentative != sourceState) { -// // In this case, we have picked a different representative and must not record any entries now. -// return; -// } -// -// // Otherwise, we record the new representative. -// sourceRepresentative.reset(new storm::storage::BitVector(sourceState)); -// -// // Decode the target block and add matrix entry. -// uint64_t targetBlockIndex = decodeBlockIndex(targetPartitionNode); -// this->addMatrixEntry(nondeterminismEncoding, sourceBlockIndex, targetBlockIndex, factor * storm::dd::InternalAdd::getValue(transitionMatrixNode)); -// } else { -// // Determine the levels in the DDs. -// uint64_t transitionMatrixVariable = sylvan_isconst(transitionMatrixNode) ? 0xffffffff : sylvan_var(transitionMatrixNode); -// uint64_t sourcePartitionVariable = sylvan_var(sourcePartitionNode) - 1; -// uint64_t targetPartitionVariable = sylvan_var(targetPartitionNode) - 1; -// -// // Move through transition matrix. -// bool skippedSourceInMatrix = false; -// bool skippedTargetTInMatrix = false; -// bool skippedTargetEInMatrix = false; -// MTBDD tt = transitionMatrixNode; -// MTBDD te = transitionMatrixNode; -// MTBDD et = transitionMatrixNode; -// MTBDD ee = transitionMatrixNode; -// if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { -// MTBDD t = sylvan_high(transitionMatrixNode); -// MTBDD e = sylvan_low(transitionMatrixNode); -// -// uint64_t tVariable = sylvan_isconst(t) ? 0xffffffff : sylvan_var(t); -// if (tVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { -// tt = sylvan_high(t); -// te = sylvan_low(t); -// } else { -// tt = te = t; -// skippedTargetTInMatrix = true; -// } -// -// uint64_t eVariable = sylvan_isconst(e) ? 0xffffffff : sylvan_var(e); -// if (eVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { -// et = sylvan_high(e); -// ee = sylvan_low(e); -// } else { -// et = ee = e; -// skippedTargetEInMatrix = true; -// } -// } else { -// skippedSourceInMatrix = true; -// if (transitionMatrixVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first + 1) { -// tt = et = sylvan_high(transitionMatrixNode); -// te = ee = sylvan_low(transitionMatrixNode); -// } else { -// tt = te = et = ee = transitionMatrixNode; -// skippedTargetTInMatrix = skippedTargetEInMatrix = true; -// } -// } -// -// // Move through partition (for source state). -// bool skippedInSourcePartition = false; -// MTBDD sourceT; -// MTBDD sourceE; -// if (sourcePartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { -// sourceT = sylvan_high(sourcePartitionNode); -// sourceE = sylvan_low(sourcePartitionNode); -// } else { -// sourceT = sourceE = sourcePartitionNode; -// skippedInSourcePartition = true; -// } -// -// // Move through partition (for target state). -// bool skippedInTargetPartition = false; -// MTBDD targetT; -// MTBDD targetE; -// if (targetPartitionVariable == this->sourceVariablesIndicesAndLevels[currentIndex].first) { -// targetT = sylvan_high(targetPartitionNode); -// targetE = sylvan_low(targetPartitionNode); -// } else { -// targetT = targetE = targetPartitionNode; -// skippedInTargetPartition = true; -// } -// -// // If we skipped the variable in the source partition, we only have to choose one of the two representatives. -// if (!skippedInSourcePartition) { -// sourceState.set(currentIndex, true); -// // If we skipped the variable in the target partition, just count the one representative twice. -// if (!skippedInTargetPartition || !skippedTargetTInMatrix) { -// extractTransitionMatrixRec(tt, sourceT, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); -// } -// extractTransitionMatrixRec(te, sourceT, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetTInMatrix && skippedInTargetPartition ? 2 * factor : factor); -// } -// -// sourceState.set(currentIndex, false); -// // If we skipped the variable in the target partition, just count the one representative twice. -// if (!skippedInTargetPartition || !skippedTargetEInMatrix) { -// extractTransitionMatrixRec(et, sourceE, targetT, currentIndex + 1, sourceState, nondeterminismEncoding, factor); -// } -// extractTransitionMatrixRec(ee, sourceE, targetE, currentIndex + 1, sourceState, nondeterminismEncoding, skippedTargetEInMatrix && skippedInTargetPartition ? 2 * factor : factor); -// } -// } + void createBlockToOffsetMapping() { + this->createBlockToOffsetMappingRec(this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->rowVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->odd, 0); + STORM_LOG_ASSERT(blockToOffset.size() == this->partition.getNumberOfBlocks(), "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->partition.getNumberOfBlocks() << "."); + } + + void createBlockToOffsetMappingRec(BDD partitionNode, BDD representativesNode, BDD variables, storm::dd::Odd const& odd, uint64_t offset) { + STORM_LOG_ASSERT(partitionNode != sylvan_false || representativesNode == sylvan_false, "Expected representative to be zero if the partition is zero."); + if (representativesNode == sylvan_false) { + return; + } + + if (sylvan_isconst(variables)) { + STORM_LOG_ASSERT(odd.isTerminalNode(), "Expected terminal node."); + STORM_LOG_ASSERT(blockToOffset.find(partitionNode) == blockToOffset.end(), "Duplicate entry."); + blockToOffset[partitionNode] = offset; + } else { + STORM_LOG_ASSERT(!odd.isTerminalNode(), "Expected non-terminal node."); + BDD partitionT; + BDD partitionE; + if (sylvan_var(partitionNode) == sylvan_var(variables) + 1) { + partitionT = sylvan_high(partitionNode); + partitionE = sylvan_low(partitionNode); + } else { + partitionT = partitionE = partitionNode; + } + + BDD representativesT; + BDD representativesE; + if (sylvan_var(representativesNode) == sylvan_var(variables)) { + representativesT = sylvan_high(representativesNode); + representativesE = sylvan_low(representativesNode); + } else { + representativesT = representativesE = representativesNode; + } + + createBlockToOffsetMappingRec(partitionE, representativesE, sylvan_high(variables), odd.getElseSuccessor(), offset); + createBlockToOffsetMappingRec(partitionT, representativesT, sylvan_high(variables), odd.getThenSuccessor(), offset + odd.getElseOffset()); + } + } + + void extractTransitionMatrixRec(MTBDD transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, BDD targetPartitionNode, BDD representativesNode, BDD variables) { + // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero + // as all states of the model have to be contained. + if (mtbdd_iszero(transitionMatrixNode) || representativesNode == sylvan_false) { + return; + } + + // If we have moved through all source variables, we must have arrived at a target block encoding. + if (sylvan_isconst(variables)) { + STORM_LOG_ASSERT(sylvan_isconst(transitionMatrixNode), "Expected constant node."); + this->addMatrixEntry(sourceOffset, blockToOffset.at(targetPartitionNode), storm::dd::InternalAdd::getValue(transitionMatrixNode)); + } else { + MTBDD t; + MTBDD tt; + MTBDD te; + MTBDD e; + MTBDD et; + MTBDD ee; + if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { + // Source node was not skipped in transition matrix. + t = sylvan_high(transitionMatrixNode); + e = sylvan_low(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } + + if (sylvan_var(t) == sylvan_var(variables) + 1) { + // Target node was not skipped in transition matrix. + tt = sylvan_high(t); + te = sylvan_low(t); + } else { + // Target node was skipped in transition matrix. + tt = te = t; + } + if (t != e) { + if (sylvan_var(e) == sylvan_var(variables) + 1) { + // Target node was not skipped in transition matrix. + et = sylvan_high(e); + ee = sylvan_low(e); + } else { + // Target node was skipped in transition matrix. + et = ee = e; + } + } else { + et = tt; + ee = te; + } + + BDD targetT; + BDD targetE; + if (sylvan_var(targetPartitionNode) == sylvan_var(variables) + 1) { + // Node was not skipped in target partition. + targetT = sylvan_high(targetPartitionNode); + targetE = sylvan_low(targetPartitionNode); + } else { + // Node was skipped in target partition. + targetT = targetE = targetPartitionNode; + } + + BDD representativesT; + BDD representativesE; + if (sylvan_var(representativesNode) == sylvan_var(variables)) { + // Node was not skipped in representatives. + representativesT = sylvan_high(representativesNode); + representativesE = sylvan_low(representativesNode); + } else { + // Node was skipped in representatives. + representativesT = representativesE = representativesNode; + } + + extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, sylvan_high(variables)); + extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, sylvan_high(variables)); + extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, sylvan_high(variables)); + extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, sylvan_high(variables)); + } + } - spp::sparse_hash_map> blockDecodeCache; + // A mapping from blocks (stored in terms of a DD node) to the offset of the corresponding block. + spp::sparse_hash_map blockToOffset; }; template @@ -636,6 +625,7 @@ namespace storm { // FIXME: Use partition as BDD in representative computation. auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); + STORM_LOG_ASSERT((representatives && partitionAsBdd).existsAbstract(model.getRowVariables()) == partitionAsBdd.existsAbstract(model.getRowVariables()), "Representatives do not cover all blocks."); storm::dd::Odd odd = representatives.createOdd(); STORM_LOG_ASSERT(odd.getTotalOffset() == representatives.getNonZeroCount(), "Mismatching ODD."); InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), partition, representatives, odd); From f96403de9e97bbb5b2eb86f327db31870c390e7a Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 18 Aug 2017 20:02:11 +0200 Subject: [PATCH 47/95] added reduction to state-based rewards to symbolic (reward) models --- src/storm/api/bisimulation.h | 4 ++++ src/storm/models/ModelBase.h | 8 +++++++ src/storm/models/sparse/Model.h | 11 +-------- .../models/symbolic/DeterministicModel.cpp | 7 ++++++ .../models/symbolic/DeterministicModel.h | 2 ++ src/storm/models/symbolic/Model.cpp | 7 +++++- src/storm/models/symbolic/Model.h | 1 + .../models/symbolic/NondeterministicModel.cpp | 7 ++++++ .../models/symbolic/NondeterministicModel.h | 2 ++ .../models/symbolic/StandardRewardModel.cpp | 24 +++++++++++++++++++ .../models/symbolic/StandardRewardModel.h | 10 ++++++++ 11 files changed, 72 insertions(+), 11 deletions(-) diff --git a/src/storm/api/bisimulation.h b/src/storm/api/bisimulation.h index 825b8e4c8..aaaa67618 100644 --- a/src/storm/api/bisimulation.h +++ b/src/storm/api/bisimulation.h @@ -43,6 +43,7 @@ namespace storm { STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc) || model->isOfType(storm::models::ModelType::Mdp), storm::exceptions::NotSupportedException, "Bisimulation minimization is currently only available for DTMCs, CTMCs and MDPs."); + // Try to get rid of non state-rewards to easy bisimulation computation. model->reduceToStateBasedRewards(); if (model->isOfType(storm::models::ModelType::Dtmc)) { @@ -60,6 +61,9 @@ namespace storm { STORM_LOG_THROW(model->isOfType(storm::models::ModelType::Dtmc) || model->isOfType(storm::models::ModelType::Ctmc) || model->isOfType(storm::models::ModelType::Mdp), storm::exceptions::NotSupportedException, "Symbolic bisimulation minimization is currently only available for DTMCs and CTMCs."); STORM_LOG_THROW(bisimulationType == storm::storage::BisimulationType::Strong, storm::exceptions::NotSupportedException, "Currently only strong bisimulation is supported."); + // Try to get rid of non state-rewards to easy bisimulation computation. + model->reduceToStateBasedRewards(); + storm::dd::BisimulationDecomposition decomposition(*model, formulas, bisimulationType); decomposition.compute(mode); return decomposition.getQuotient(); diff --git a/src/storm/models/ModelBase.h b/src/storm/models/ModelBase.h index e6fb3f52f..614ebdcd5 100644 --- a/src/storm/models/ModelBase.h +++ b/src/storm/models/ModelBase.h @@ -122,6 +122,14 @@ namespace storm { */ virtual bool isExact() const; + /*! + * Converts the transition rewards of all reward models to state-based rewards. For deterministic models, + * this reduces the rewards to state rewards only. For nondeterminstic models, the reward models will + * contain state rewards and state-action rewards. Note that this transformation does not preserve all + * properties, but it preserves expected rewards. + */ + virtual void reduceToStateBasedRewards() = 0; + private: // The type of the model. ModelType modelType; diff --git a/src/storm/models/sparse/Model.h b/src/storm/models/sparse/Model.h index 1ae4f1619..5e52a9e12 100644 --- a/src/storm/models/sparse/Model.h +++ b/src/storm/models/sparse/Model.h @@ -292,16 +292,7 @@ namespace storm { * @return The choice origins, if they're saved. */ boost::optional>& getOptionalChoiceOrigins(); - - - /*! - * Converts the transition rewards of all reward models to state-based rewards. For deterministic models, - * this reduces the rewards to state rewards only. For nondeterminstic models, the reward models will - * contain state rewards and state-action rewards. Note that this transformation does not preserve all - * properties, but it preserves expected rewards. - */ - virtual void reduceToStateBasedRewards() = 0; - + /*! * Prints information about the model to the specified stream. * diff --git a/src/storm/models/symbolic/DeterministicModel.cpp b/src/storm/models/symbolic/DeterministicModel.cpp index 3555dcaff..5eba1bbc9 100644 --- a/src/storm/models/symbolic/DeterministicModel.cpp +++ b/src/storm/models/symbolic/DeterministicModel.cpp @@ -45,6 +45,13 @@ namespace storm { // Intentionally left empty. } + template + void DeterministicModel::reduceToStateBasedRewards() { + for (auto& rewardModel : this->getRewardModels()) { + rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), this->getRowVariables(), this->getColumnVariables(), true); + } + } + // Explicitly instantiate the template class. template class DeterministicModel; template class DeterministicModel; diff --git a/src/storm/models/symbolic/DeterministicModel.h b/src/storm/models/symbolic/DeterministicModel.h index 83d25fe0d..a8fde85b4 100644 --- a/src/storm/models/symbolic/DeterministicModel.h +++ b/src/storm/models/symbolic/DeterministicModel.h @@ -80,6 +80,8 @@ namespace storm { std::vector> const& rowColumnMetaVariablePairs, std::map> labelToBddMap = std::map>(), std::unordered_map const& rewardModels = std::unordered_map()); + + virtual void reduceToStateBasedRewards() override; }; } // namespace symbolic diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 686a1e9e5..505241dbc 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -255,11 +255,16 @@ namespace storm { return !this->rewardModels.empty(); } + template + std::unordered_map::RewardModelType>& Model::getRewardModels() { + return this->rewardModels; + } + template std::unordered_map::RewardModelType> const& Model::getRewardModels() const { return this->rewardModels; } - + template void Model::printModelInformationToStream(std::ostream& out) const { this->printModelInformationHeaderToStream(out); diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index 1f0aee439..89e447640 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -298,6 +298,7 @@ namespace storm { */ bool hasRewardModel() const; + std::unordered_map& getRewardModels(); std::unordered_map const& getRewardModels() const; /*! diff --git a/src/storm/models/symbolic/NondeterministicModel.cpp b/src/storm/models/symbolic/NondeterministicModel.cpp index 6545e27c0..25cea032d 100644 --- a/src/storm/models/symbolic/NondeterministicModel.cpp +++ b/src/storm/models/symbolic/NondeterministicModel.cpp @@ -90,6 +90,13 @@ namespace storm { out << ", nondeterminism: " << this->getNondeterminismVariables().size() << " meta variables (" << nondeterminismVariableCount << " DD variables)"; } + template + void NondeterministicModel::reduceToStateBasedRewards() { + for (auto& rewardModel : this->getRewardModels()) { + rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), this->getRowVariables(), this->getColumnVariables(), false); + } + } + template void NondeterministicModel::createIllegalMask() { // Prepare the mask of illegal nondeterministic choices. diff --git a/src/storm/models/symbolic/NondeterministicModel.h b/src/storm/models/symbolic/NondeterministicModel.h index ecbc2af94..c75874644 100644 --- a/src/storm/models/symbolic/NondeterministicModel.h +++ b/src/storm/models/symbolic/NondeterministicModel.h @@ -124,6 +124,8 @@ namespace storm { virtual void printModelInformationToStream(std::ostream& out) const override; + virtual void reduceToStateBasedRewards() override; + protected: virtual void printDdVariableInformationToStream(std::ostream& out) const override; diff --git a/src/storm/models/symbolic/StandardRewardModel.cpp b/src/storm/models/symbolic/StandardRewardModel.cpp index a91040069..8fe296308 100644 --- a/src/storm/models/symbolic/StandardRewardModel.cpp +++ b/src/storm/models/symbolic/StandardRewardModel.cpp @@ -6,6 +6,8 @@ #include "storm/adapters/RationalFunctionAdapter.h" +#include "storm/exceptions/InvalidOperationException.h" + namespace storm { namespace models { namespace symbolic { @@ -157,6 +159,28 @@ namespace storm { return StandardRewardModel(modifiedStateRewardVector, this->optionalStateActionRewardVector, this->optionalTransitionRewardMatrix); } + template + void StandardRewardModel::reduceToStateBasedRewards(storm::dd::Add const& transitionMatrix, std::set const& rowVariables, std::set const& columnVariables, bool reduceToStateRewards) { + if (this->hasTransitionRewards()) { + if (this->hasStateActionRewards()) { + this->optionalStateActionRewardVector.get() += transitionMatrix.multiplyMatrix(this->getTransitionRewardMatrix(), columnVariables); + this->optionalTransitionRewardMatrix = boost::none; + } else { + this->optionalStateActionRewardVector = transitionMatrix.multiplyMatrix(this->getTransitionRewardMatrix(), columnVariables); + } + } + + if (reduceToStateRewards && this->hasStateActionRewards()) { + STORM_LOG_THROW(this->getStateActionRewardVector().getContainedMetaVariables() == rowVariables, storm::exceptions::InvalidOperationException, "The reduction to state rewards is only possible if the state-action rewards do not depend on nondeterminism variables."); + if (this->hasStateRewards()) { + this->optionalStateRewardVector = this->optionalStateRewardVector.get() + this->getStateActionRewardVector(); + } else { + this->optionalStateRewardVector = this->getStateActionRewardVector(); + } + this->optionalStateActionRewardVector = boost::none; + } + } + template class StandardRewardModel; template class StandardRewardModel; diff --git a/src/storm/models/symbolic/StandardRewardModel.h b/src/storm/models/symbolic/StandardRewardModel.h index a4e9fb573..a7ab321f4 100644 --- a/src/storm/models/symbolic/StandardRewardModel.h +++ b/src/storm/models/symbolic/StandardRewardModel.h @@ -189,6 +189,16 @@ namespace storm { */ StandardRewardModel divideStateRewardVector(storm::dd::Add const& divisor) const; + /*! + * Reduces the transition-based rewards to state-action rewards by taking the average of each row. If + * the corresponding flag is set, the state-action rewards and the state rewards are summed so the model + * only has a state reward vector left. Note that this transformation only preserves expected rewards, + * but not all reward-based properties. + * + * @param transitionMatrix The transition matrix that is used to weight the rewards in the reward matrix. + */ + void reduceToStateBasedRewards(storm::dd::Add const& transitionMatrix, std::set const& rowVariables, std::set const& columnVariables, bool reduceToStateRewards); + private: // The state reward vector. boost::optional> optionalStateRewardVector; From b31fb7ab5e5f805960da80a342534fd25bb5ec93 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 21 Aug 2017 14:38:00 +0200 Subject: [PATCH 48/95] first working version of sparse MDP quotient extraction of dd bisimulation --- .../dd/bisimulation/QuotientExtractor.cpp | 406 +++++++++++------- 1 file changed, 252 insertions(+), 154 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 20c74449b..77a99303e 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -1,6 +1,6 @@ #include "storm/storage/dd/bisimulation/QuotientExtractor.h" -#include +#include #include "storm/storage/dd/DdManager.h" @@ -11,6 +11,7 @@ #include "storm/models/sparse/Dtmc.h" #include "storm/models/sparse/Ctmc.h" +#include "storm/models/sparse/Mdp.h" #include "storm/models/sparse/StandardRewardModel.h" #include "storm/storage/dd/bisimulation/PreservationInformation.h" @@ -224,41 +225,38 @@ namespace storm { template class InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractorBase(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : manager(manager), partition(partition), representatives(representatives), odd(odd) { + InternalSparseQuotientExtractorBase(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : manager(model.getManager()), isNondeterministic(false), partition(partition), representatives(representatives), matrixEntriesCreated(false) { // Create cubes. rowVariablesCube = manager.getBddOne(); - for (auto const& variable : rowVariables) { + for (auto const& variable : model.getRowVariables()) { auto const& ddMetaVariable = manager.getMetaVariable(variable); rowVariablesCube &= ddMetaVariable.getCube(); } columnVariablesCube = manager.getBddOne(); - for (auto const& variable : columnVariables) { + for (auto const& variable : model.getColumnVariables()) { auto const& ddMetaVariable = manager.getMetaVariable(variable); columnVariablesCube &= ddMetaVariable.getCube(); } nondeterminismVariablesCube = manager.getBddOne(); - for (auto const& variable : nondeterminismVariables) { + for (auto const& variable : model.getNondeterminismVariables()) { auto const& ddMetaVariable = manager.getMetaVariable(variable); nondeterminismVariablesCube &= ddMetaVariable.getCube(); } allSourceVariablesCube = rowVariablesCube && nondeterminismVariablesCube; + isNondeterministic = !nondeterminismVariablesCube.isOne(); + + // Create ODDs. + this->odd = representatives.createOdd(); + if (this->isNondeterministic) { + this->nondeterminismOdd = (model.getQualitativeTransitionMatrix().existsAbstract(model.getColumnVariables()) && this->representatives).createOdd(); + } } - protected: - // The manager responsible for the DDs. - storm::dd::DdManager const& manager; - - // Useful cubes needed in the translation. - storm::dd::Bdd rowVariablesCube; - storm::dd::Bdd columnVariablesCube; - storm::dd::Bdd allSourceVariablesCube; - storm::dd::Bdd nondeterminismVariablesCube; - - // Information about the state partition. - Partition partition; - storm::dd::Bdd representatives; - storm::dd::Odd const& odd; + storm::dd::Odd const& getOdd() const { + return this->odd; + } + protected: storm::storage::SparseMatrix createMatrixFromEntries() { for (auto& row : matrixEntries) { std::sort(row.begin(), row.end(), @@ -267,9 +265,26 @@ namespace storm { }); } - storm::storage::SparseMatrixBuilder builder(partition.getNumberOfBlocks(), partition.getNumberOfBlocks()); + std::vector rowPermutation(matrixEntries.size()); + std::iota(rowPermutation.begin(), rowPermutation.end(), 0ull); + if (this->isNondeterministic) { + std::sort(rowPermutation.begin(), rowPermutation.end(), [this] (uint64_t first, uint64_t second) { return this->rowToState[first] < this->rowToState[second]; } ); + } + uint64_t rowCounter = 0; - for (auto& row : matrixEntries) { + uint64_t lastState = this->isNondeterministic ? rowToState[rowPermutation.front()] : 0; + storm::storage::SparseMatrixBuilder builder(matrixEntries.size(), partition.getNumberOfBlocks(), 0, true, this->isNondeterministic); + if (this->isNondeterministic) { + builder.newRowGroup(0); + } + for (auto& rowIdx : rowPermutation) { + // For nondeterministic models, open a new row group. + if (this->isNondeterministic && rowToState[rowIdx] != lastState) { + builder.newRowGroup(rowCounter); + lastState = rowToState[rowIdx]; + } + + auto& row = matrixEntries[rowIdx]; for (auto const& entry : row) { builder.addNextValue(rowCounter, entry.getColumn(), entry.getValue()); } @@ -287,22 +302,59 @@ namespace storm { return builder.build(); } - void addMatrixEntry(uint64_t sourceBlockIndex, uint64_t targetBlockIndex, ValueType const& value) { - this->matrixEntries[sourceBlockIndex].emplace_back(targetBlockIndex, value); + void addMatrixEntry(uint64_t row, uint64_t column, ValueType const& value) { + this->matrixEntries[row].emplace_back(column, value); } - void reserveMatrixEntries(uint64_t numberOfStates) { - this->matrixEntries.resize(numberOfStates); + void createMatrixEntryStorage() { + if (matrixEntriesCreated) { + matrixEntries.clear(); + if (isNondeterministic) { + rowToState.clear(); + } + } + matrixEntries.resize(this->isNondeterministic ? nondeterminismOdd.getTotalOffset() : odd.getTotalOffset()); + if (isNondeterministic) { + rowToState.resize(matrixEntries.size()); + } + } + + void assignRowToState(uint64_t row, uint64_t state) { + rowToState[row] = state; } - // The entries of the matrix that is built if the model is deterministic (DTMC, CTMC). + // The manager responsible for the DDs. + storm::dd::DdManager const& manager; + + // A flag that stores whether we need to take care of nondeterminism. + bool isNondeterministic; + + // Useful cubes needed in the translation. + storm::dd::Bdd rowVariablesCube; + storm::dd::Bdd columnVariablesCube; + storm::dd::Bdd allSourceVariablesCube; + storm::dd::Bdd nondeterminismVariablesCube; + + // Information about the state partition. + Partition partition; + storm::dd::Bdd representatives; + storm::dd::Odd odd; + storm::dd::Odd nondeterminismOdd; + + // A flag that stores whether the underlying storage for matrix entries has been created. + bool matrixEntriesCreated; + + // The entries of the quotient matrix that is built. std::vector>> matrixEntries; + + // A vector storing for each row which state it belongs to. + std::vector rowToState; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partition, representatives), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { STORM_LOG_ASSERT(this->partition.storedAsAdd(), "Expected partition to be stored as an ADD."); this->createBlockToOffsetMapping(); @@ -310,11 +362,9 @@ namespace storm { storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { // Create the number of rows necessary for the matrix. - this->reserveMatrixEntries(this->partition.getNumberOfBlocks()); STORM_LOG_TRACE("Partition has " << this->partition.getNumberOfStates() << " states in " << this->partition.getNumberOfBlocks() << " blocks."); - - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->odd, 0, this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode()); - + this->createMatrixEntryStorage(); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode(), this->nondeterminismVariablesCube.getInternalBdd().getCuddDdNode(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } @@ -364,7 +414,7 @@ namespace storm { } } - void extractTransitionMatrixRec(DdNodePtr transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, DdNodePtr targetPartitionNode, DdNodePtr representativesNode, DdNodePtr variables) { + void extractTransitionMatrixRec(DdNodePtr transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, DdNodePtr targetPartitionNode, DdNodePtr representativesNode, DdNodePtr variables, DdNodePtr nondeterminismVariables, storm::dd::Odd const* stateOdd, uint64_t stateOffset) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (transitionMatrixNode == Cudd_ReadZero(ddman) || representativesNode == Cudd_ReadLogicZero(ddman)) { @@ -375,74 +425,97 @@ namespace storm { if (Cudd_IsConstant(variables)) { STORM_LOG_ASSERT(Cudd_IsConstant(transitionMatrixNode), "Expected constant node."); this->addMatrixEntry(sourceOffset, blockToOffset.at(targetPartitionNode), Cudd_V(transitionMatrixNode)); - } else { - DdNodePtr t; - DdNodePtr tt; - DdNodePtr te; - DdNodePtr e; - DdNodePtr et; - DdNodePtr ee; - if (Cudd_NodeReadIndex(transitionMatrixNode) == Cudd_NodeReadIndex(variables)) { - // Source node was not skipped in transition matrix. - t = Cudd_T(transitionMatrixNode); - e = Cudd_E(transitionMatrixNode); - } else { - t = e = transitionMatrixNode; + if (stateOdd) { + this->assignRowToState(sourceOffset, stateOffset); } + } else { + // Determine whether the next variable is a nondeterminism variable. + bool nextVariableIsNondeterminismVariable = !Cudd_IsConstant(nondeterminismVariables) && Cudd_NodeReadIndex(nondeterminismVariables) == Cudd_NodeReadIndex(variables); - if (Cudd_NodeReadIndex(t) == Cudd_NodeReadIndex(variables) + 1) { - // Target node was not skipped in transition matrix. - tt = Cudd_T(t); - te = Cudd_E(t); + if (nextVariableIsNondeterminismVariable) { + DdNodePtr t; + DdNodePtr e; + + // Determine whether the variable was skipped in the matrix. + if (Cudd_NodeReadIndex(transitionMatrixNode) == Cudd_NodeReadIndex(variables)) { + t = Cudd_T(transitionMatrixNode); + e = Cudd_E(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } + + STORM_LOG_ASSERT(stateOdd, "Expected separate state ODD."); + extractTransitionMatrixRec(e, sourceOdd.getElseSuccessor(), sourceOffset, targetPartitionNode, representativesNode, Cudd_T(variables), Cudd_T(nondeterminismVariables), stateOdd, stateOffset); + extractTransitionMatrixRec(t, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetPartitionNode, representativesNode, Cudd_T(variables), Cudd_T(nondeterminismVariables), stateOdd, stateOffset); } else { - // Target node was skipped in transition matrix. - tt = te = t; - } - if (t != e) { - if (Cudd_NodeReadIndex(e) == Cudd_NodeReadIndex(variables) + 1) { + DdNodePtr t; + DdNodePtr tt; + DdNodePtr te; + DdNodePtr e; + DdNodePtr et; + DdNodePtr ee; + if (Cudd_NodeReadIndex(transitionMatrixNode) == Cudd_NodeReadIndex(variables)) { + // Source node was not skipped in transition matrix. + t = Cudd_T(transitionMatrixNode); + e = Cudd_E(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } + + if (Cudd_NodeReadIndex(t) == Cudd_NodeReadIndex(variables) + 1) { // Target node was not skipped in transition matrix. - et = Cudd_T(e); - ee = Cudd_E(e); + tt = Cudd_T(t); + te = Cudd_E(t); } else { // Target node was skipped in transition matrix. - et = ee = e; + tt = te = t; } - } else { - et = tt; - ee = te; - } - - DdNodePtr targetT; - DdNodePtr targetE; - if (Cudd_NodeReadIndex(targetPartitionNode) == Cudd_NodeReadIndex(variables) + 1) { - // Node was not skipped in target partition. - targetT = Cudd_T(targetPartitionNode); - targetE = Cudd_E(targetPartitionNode); - } else { - // Node was skipped in target partition. - targetT = targetE = targetPartitionNode; - } - - DdNodePtr representativesT; - DdNodePtr representativesE; - if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { - // Node was not skipped in representatives. - representativesT = Cudd_T(representativesNode); - representativesE = Cudd_E(representativesNode); - } else { - // Node was skipped in representatives. - representativesT = representativesE = representativesNode; - } - - if (representativesT != representativesE && Cudd_IsComplement(representativesNode)) { - representativesT = Cudd_Not(representativesT); - representativesE = Cudd_Not(representativesE); + if (t != e) { + if (Cudd_NodeReadIndex(e) == Cudd_NodeReadIndex(variables) + 1) { + // Target node was not skipped in transition matrix. + et = Cudd_T(e); + ee = Cudd_E(e); + } else { + // Target node was skipped in transition matrix. + et = ee = e; + } + } else { + et = tt; + ee = te; + } + + DdNodePtr targetT; + DdNodePtr targetE; + if (Cudd_NodeReadIndex(targetPartitionNode) == Cudd_NodeReadIndex(variables) + 1) { + // Node was not skipped in target partition. + targetT = Cudd_T(targetPartitionNode); + targetE = Cudd_E(targetPartitionNode); + } else { + // Node was skipped in target partition. + targetT = targetE = targetPartitionNode; + } + + DdNodePtr representativesT; + DdNodePtr representativesE; + if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { + // Node was not skipped in representatives. + representativesT = Cudd_T(representativesNode); + representativesE = Cudd_E(representativesNode); + } else { + // Node was skipped in representatives. + representativesT = representativesE = representativesNode; + } + + if (representativesT != representativesE && Cudd_IsComplement(representativesNode)) { + representativesT = Cudd_Not(representativesT); + representativesE = Cudd_Not(representativesE); + } + + extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, Cudd_T(variables), nondeterminismVariables, stateOdd ? &stateOdd->getElseSuccessor() : stateOdd, stateOffset); + extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, Cudd_T(variables), nondeterminismVariables, stateOdd ? &stateOdd->getElseSuccessor() : stateOdd, stateOffset); + extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, Cudd_T(variables), nondeterminismVariables, stateOdd ? &stateOdd->getThenSuccessor() : stateOdd, stateOffset + (stateOdd ? stateOdd->getElseOffset() : 0)); + extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, Cudd_T(variables), nondeterminismVariables, stateOdd ? &stateOdd->getThenSuccessor() : stateOdd, stateOffset + (stateOdd ? stateOdd->getElseOffset() : 0)); } - - extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, Cudd_T(variables)); - extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, Cudd_T(variables)); - extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, Cudd_T(variables)); - extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, Cudd_T(variables)); } } @@ -455,7 +528,7 @@ namespace storm { template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::dd::DdManager const& manager, std::set const& rowVariables, std::set const& columnVariables, std::set const& nondeterminismVariables, Partition const& partition, storm::dd::Bdd const& representatives, storm::dd::Odd const& odd) : InternalSparseQuotientExtractorBase(manager, rowVariables, columnVariables, nondeterminismVariables, partition, representatives, odd) { + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partition, representatives) { STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); this->createBlockToOffsetMapping(); @@ -463,8 +536,8 @@ namespace storm { storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { // Create the number of rows necessary for the matrix. - this->reserveMatrixEntries(this->partition.getNumberOfBlocks()); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->odd, 0, this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD()); + this->createMatrixEntryStorage(); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->nondeterminismVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } @@ -509,7 +582,7 @@ namespace storm { } } - void extractTransitionMatrixRec(MTBDD transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, BDD targetPartitionNode, BDD representativesNode, BDD variables) { + void extractTransitionMatrixRec(MTBDD transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, BDD targetPartitionNode, BDD representativesNode, BDD variables, BDD nondeterminismVariables, storm::dd::Odd const* stateOdd, uint64_t stateOffset) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (mtbdd_iszero(transitionMatrixNode) || representativesNode == sylvan_false) { @@ -518,71 +591,94 @@ namespace storm { // If we have moved through all source variables, we must have arrived at a target block encoding. if (sylvan_isconst(variables)) { - STORM_LOG_ASSERT(sylvan_isconst(transitionMatrixNode), "Expected constant node."); + STORM_LOG_ASSERT(mtbdd_isleaf(transitionMatrixNode), "Expected constant node."); this->addMatrixEntry(sourceOffset, blockToOffset.at(targetPartitionNode), storm::dd::InternalAdd::getValue(transitionMatrixNode)); - } else { - MTBDD t; - MTBDD tt; - MTBDD te; - MTBDD e; - MTBDD et; - MTBDD ee; - if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { - // Source node was not skipped in transition matrix. - t = sylvan_high(transitionMatrixNode); - e = sylvan_low(transitionMatrixNode); - } else { - t = e = transitionMatrixNode; + if (stateOdd) { + this->assignRowToState(sourceOffset, stateOffset); } + } else { + // Determine whether the next variable is a nondeterminism variable. + bool nextVariableIsNondeterminismVariable = !sylvan_isconst(nondeterminismVariables) && sylvan_var(nondeterminismVariables) == sylvan_var(variables); - if (sylvan_var(t) == sylvan_var(variables) + 1) { - // Target node was not skipped in transition matrix. - tt = sylvan_high(t); - te = sylvan_low(t); + if (nextVariableIsNondeterminismVariable) { + MTBDD t; + MTBDD e; + + // Determine whether the variable was skipped in the matrix. + if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { + t = sylvan_high(transitionMatrixNode); + e = sylvan_low(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } + + STORM_LOG_ASSERT(stateOdd, "Expected separate state ODD."); + extractTransitionMatrixRec(e, sourceOdd.getElseSuccessor(), sourceOffset, targetPartitionNode, representativesNode, sylvan_high(variables), sylvan_high(nondeterminismVariables), stateOdd, stateOffset); + extractTransitionMatrixRec(t, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetPartitionNode, representativesNode, sylvan_high(variables), sylvan_high(nondeterminismVariables), stateOdd, stateOffset); } else { - // Target node was skipped in transition matrix. - tt = te = t; - } - if (t != e) { - if (sylvan_var(e) == sylvan_var(variables) + 1) { + MTBDD t; + MTBDD tt; + MTBDD te; + MTBDD e; + MTBDD et; + MTBDD ee; + if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { + // Source node was not skipped in transition matrix. + t = sylvan_high(transitionMatrixNode); + e = sylvan_low(transitionMatrixNode); + } else { + t = e = transitionMatrixNode; + } + + if (sylvan_var(t) == sylvan_var(variables) + 1) { // Target node was not skipped in transition matrix. - et = sylvan_high(e); - ee = sylvan_low(e); + tt = sylvan_high(t); + te = sylvan_low(t); } else { // Target node was skipped in transition matrix. - et = ee = e; + tt = te = t; } - } else { - et = tt; - ee = te; - } - - BDD targetT; - BDD targetE; - if (sylvan_var(targetPartitionNode) == sylvan_var(variables) + 1) { - // Node was not skipped in target partition. - targetT = sylvan_high(targetPartitionNode); - targetE = sylvan_low(targetPartitionNode); - } else { - // Node was skipped in target partition. - targetT = targetE = targetPartitionNode; - } - - BDD representativesT; - BDD representativesE; - if (sylvan_var(representativesNode) == sylvan_var(variables)) { - // Node was not skipped in representatives. - representativesT = sylvan_high(representativesNode); - representativesE = sylvan_low(representativesNode); - } else { - // Node was skipped in representatives. - representativesT = representativesE = representativesNode; + if (t != e) { + if (sylvan_var(e) == sylvan_var(variables) + 1) { + // Target node was not skipped in transition matrix. + et = sylvan_high(e); + ee = sylvan_low(e); + } else { + // Target node was skipped in transition matrix. + et = ee = e; + } + } else { + et = tt; + ee = te; + } + + BDD targetT; + BDD targetE; + if (sylvan_var(targetPartitionNode) == sylvan_var(variables) + 1) { + // Node was not skipped in target partition. + targetT = sylvan_high(targetPartitionNode); + targetE = sylvan_low(targetPartitionNode); + } else { + // Node was skipped in target partition. + targetT = targetE = targetPartitionNode; + } + + BDD representativesT; + BDD representativesE; + if (sylvan_var(representativesNode) == sylvan_var(variables)) { + // Node was not skipped in representatives. + representativesT = sylvan_high(representativesNode); + representativesE = sylvan_low(representativesNode); + } else { + // Node was skipped in representatives. + representativesT = representativesE = representativesNode; + } + + extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, sylvan_high(variables), nondeterminismVariables, stateOdd ? &stateOdd->getElseSuccessor() : stateOdd, stateOffset); + extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, sylvan_high(variables), nondeterminismVariables, stateOdd ? &stateOdd->getElseSuccessor() : stateOdd, stateOffset); + extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, sylvan_high(variables), nondeterminismVariables, stateOdd ? &stateOdd->getThenSuccessor() : stateOdd, stateOffset + (stateOdd ? stateOdd->getElseOffset() : 0)); + extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, sylvan_high(variables), nondeterminismVariables, stateOdd ? &stateOdd->getThenSuccessor() : stateOdd, stateOffset + (stateOdd ? stateOdd->getElseOffset() : 0)); } - - extractTransitionMatrixRec(ee, sourceOdd.getElseSuccessor(), sourceOffset, targetE, representativesE, sylvan_high(variables)); - extractTransitionMatrixRec(et, sourceOdd.getElseSuccessor(), sourceOffset, targetT, representativesE, sylvan_high(variables)); - extractTransitionMatrixRec(te, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetE, representativesT, sylvan_high(variables)); - extractTransitionMatrixRec(tt, sourceOdd.getThenSuccessor(), sourceOffset + sourceOdd.getElseOffset(), targetT, representativesT, sylvan_high(variables)); } } @@ -626,9 +722,9 @@ namespace storm { auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); STORM_LOG_ASSERT((representatives && partitionAsBdd).existsAbstract(model.getRowVariables()) == partitionAsBdd.existsAbstract(model.getRowVariables()), "Representatives do not cover all blocks."); - storm::dd::Odd odd = representatives.createOdd(); + InternalSparseQuotientExtractor sparseExtractor(model, partition, representatives); + storm::dd::Odd const& odd = sparseExtractor.getOdd(); STORM_LOG_ASSERT(odd.getTotalOffset() == representatives.getNonZeroCount(), "Mismatching ODD."); - InternalSparseQuotientExtractor sparseExtractor(model.getManager(), model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), partition, representatives, odd); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix()); auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); @@ -660,6 +756,8 @@ namespace storm { result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); } else if (model.getType() == storm::models::ModelType::Ctmc) { result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + } else if (model.getType() == storm::models::ModelType::Mdp) { + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); } return result; From 34e23f94fcbc473a4d3b662a8806706192a5af80 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 21 Aug 2017 19:47:02 +0200 Subject: [PATCH 49/95] started on reward model preservation in DD bisimulation --- src/storm/models/symbolic/Model.cpp | 6 ++++ src/storm/models/symbolic/Model.h | 7 ++++ .../bisimulation/PreservationInformation.cpp | 33 ++++++++++++++----- .../dd/bisimulation/PreservationInformation.h | 3 ++ 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/storm/models/symbolic/Model.cpp b/src/storm/models/symbolic/Model.cpp index 505241dbc..f468cc377 100644 --- a/src/storm/models/symbolic/Model.cpp +++ b/src/storm/models/symbolic/Model.cpp @@ -239,6 +239,12 @@ namespace storm { return this->rewardModels.cbegin()->second; } + template + std::string const& Model::getUniqueRewardModelName() const { + STORM_LOG_THROW(this->hasUniqueRewardModel(), storm::exceptions::InvalidOperationException, "Cannot retrieve name of unique reward model, because there is no unique one."); + return this->rewardModels.cbegin()->first; + } + template typename Model::RewardModelType& Model::getUniqueRewardModel() { STORM_LOG_THROW(this->hasUniqueRewardModel(), storm::exceptions::InvalidOperationException, "Cannot retrieve unique reward model, because there is no unique one."); diff --git a/src/storm/models/symbolic/Model.h b/src/storm/models/symbolic/Model.h index 89e447640..1bebd7fe5 100644 --- a/src/storm/models/symbolic/Model.h +++ b/src/storm/models/symbolic/Model.h @@ -277,6 +277,13 @@ namespace storm { */ RewardModelType const& getUniqueRewardModel() const; + /*! + * Retrieves the name of the unique reward model, if there exists exactly one. Otherwise, an exception is thrown. + * + * @return The name of the unique reward model. + */ + std::string const& getUniqueRewardModelName() const; + /*! * Retrieves the unique reward model, if there exists exactly one. Otherwise, an exception is thrown. * diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp index 5009fa371..0569df104 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.cpp +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.cpp @@ -39,10 +39,10 @@ namespace storm { this->addLabel(label); this->addExpression(model.getExpression(label)); } + for (auto const& rewardModel : model.getRewardModels()) { + this->addRewardModel(rewardModel.first); + } } else { - std::set labels; - std::set expressions; - for (auto const& formula : formulas) { for (auto const& expressionFormula : formula->getAtomicExpressionFormulas()) { this->addExpression(expressionFormula->getExpression()); @@ -53,11 +53,18 @@ namespace storm { STORM_LOG_THROW(model.hasLabel(label), storm::exceptions::InvalidPropertyException, "Property refers to illegal label '" << label << "'."); this->addExpression(model.getExpression(label)); } - } - - std::vector expressionVector; - for (auto const& expression : expressions) { - expressionVector.emplace_back(expression); + for (auto const& rewardModel : formula->getReferencedRewardModels()) { + if (rewardModel == "") { + if (model.hasRewardModel("")) { + this->addRewardModel(rewardModel); + } else { + STORM_LOG_THROW(model.hasUniqueRewardModel(), storm::exceptions::InvalidPropertyException, "Property refers to the default reward model, but it does not exist or is not unique."); + this->addRewardModel(model.getUniqueRewardModelName()); + } + } else { + this->addRewardModel(rewardModel); + } + } } } } @@ -72,6 +79,11 @@ namespace storm { expressions.insert(expression); } + template + void PreservationInformation::addRewardModel(std::string const& name) { + rewardModelNames.insert(name); + } + template std::set const& PreservationInformation::getLabels() const { return labels; @@ -82,6 +94,11 @@ namespace storm { return expressions; } + template + std::set const& PreservationInformation::getRewardModelNames() const { + return rewardModelNames; + } + template class PreservationInformation; template class PreservationInformation; diff --git a/src/storm/storage/dd/bisimulation/PreservationInformation.h b/src/storm/storage/dd/bisimulation/PreservationInformation.h index a5bfbc3d1..2286e9bc6 100644 --- a/src/storm/storage/dd/bisimulation/PreservationInformation.h +++ b/src/storm/storage/dd/bisimulation/PreservationInformation.h @@ -28,13 +28,16 @@ namespace storm { void addLabel(std::string const& label); void addExpression(storm::expressions::Expression const& expression); + void addRewardModel(std::string const& name); std::set const& getLabels() const; std::set const& getExpressions() const; + std::set const& getRewardModelNames() const; private: std::set labels; std::set expressions; + std::set rewardModelNames; }; } From 722cb3109c99615d79930844b01f91dbb5da6f2b Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 11:12:08 +0200 Subject: [PATCH 50/95] dd quotient extraction of reward models in dd bisimulation --- .../csl/helper/SparseCtmcCslHelper.cpp | 4 +- src/storm/models/sparse/Ctmc.cpp | 7 ++++ src/storm/models/sparse/Ctmc.h | 2 + .../models/sparse/DeterministicModel.cpp | 7 ---- src/storm/models/sparse/DeterministicModel.h | 2 - src/storm/models/sparse/Dtmc.cpp | 6 +++ src/storm/models/sparse/Dtmc.h | 1 + .../models/sparse/StandardRewardModel.cpp | 41 ++++++++++++------- src/storm/models/sparse/StandardRewardModel.h | 10 +++-- .../dd/bisimulation/MdpPartitionRefiner.cpp | 7 +++- .../dd/bisimulation/MdpPartitionRefiner.h | 2 + .../dd/bisimulation/PartitionRefiner.cpp | 33 +++++++++++++++ .../dd/bisimulation/PartitionRefiner.h | 9 ++++ .../dd/bisimulation/QuotientExtractor.cpp | 23 +++++++++-- 14 files changed, 120 insertions(+), 34 deletions(-) diff --git a/src/storm/modelchecker/csl/helper/SparseCtmcCslHelper.cpp b/src/storm/modelchecker/csl/helper/SparseCtmcCslHelper.cpp index e0cd132ee..b574cabd1 100644 --- a/src/storm/modelchecker/csl/helper/SparseCtmcCslHelper.cpp +++ b/src/storm/modelchecker/csl/helper/SparseCtmcCslHelper.cpp @@ -264,7 +264,7 @@ namespace storm { storm::storage::SparseMatrix uniformizedMatrix = computeUniformizedMatrix(rateMatrix, storm::storage::BitVector(numberOfStates, true), uniformizationRate, exitRateVector); // Compute the total state reward vector. - std::vector totalRewardVector = rewardModel.getTotalRewardVector(rateMatrix, exitRateVector, false); + std::vector totalRewardVector = rewardModel.getTotalRewardVector(rateMatrix, exitRateVector); // Finally, compute the transient probabilities. return computeTransientProbabilities(uniformizedMatrix, nullptr, timeBound, uniformizationRate, totalRewardVector, linearEquationSolverFactory); @@ -359,7 +359,7 @@ namespace storm { // Only compute the result if the model has a state-based reward model. STORM_LOG_THROW(!rewardModel.empty(), storm::exceptions::InvalidPropertyException, "Missing reward model for formula. Skipping formula."); - return computeLongRunAverageRewards(probabilityMatrix, rewardModel.getTotalRewardVector(probabilityMatrix, *exitRateVector, true), exitRateVector, linearEquationSolverFactory); + return computeLongRunAverageRewards(probabilityMatrix, rewardModel.getTotalRewardVector(probabilityMatrix, *exitRateVector), exitRateVector, linearEquationSolverFactory); } template diff --git a/src/storm/models/sparse/Ctmc.cpp b/src/storm/models/sparse/Ctmc.cpp index bdfb406bb..9b36ded21 100644 --- a/src/storm/models/sparse/Ctmc.cpp +++ b/src/storm/models/sparse/Ctmc.cpp @@ -72,6 +72,13 @@ namespace storm { return exitRates; } + template + void Ctmc::reduceToStateBasedRewards() { + for (auto& rewardModel : this->getRewardModels()) { + rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), true, &exitRates); + } + } + template class Ctmc; #ifdef STORM_HAVE_CARL diff --git a/src/storm/models/sparse/Ctmc.h b/src/storm/models/sparse/Ctmc.h index c6afaac16..ed5a46329 100644 --- a/src/storm/models/sparse/Ctmc.h +++ b/src/storm/models/sparse/Ctmc.h @@ -62,6 +62,8 @@ namespace storm { */ std::vector& getExitRateVector(); + virtual void reduceToStateBasedRewards() override; + private: /*! * Computes the exit rate vector based on the given rate matrix. diff --git a/src/storm/models/sparse/DeterministicModel.cpp b/src/storm/models/sparse/DeterministicModel.cpp index 27c923bfa..5e2b85fe4 100644 --- a/src/storm/models/sparse/DeterministicModel.cpp +++ b/src/storm/models/sparse/DeterministicModel.cpp @@ -59,13 +59,6 @@ namespace storm { } } - template - void DeterministicModel::reduceToStateBasedRewards() { - for (auto& rewardModel : this->getRewardModels()) { - rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), true); - } - } - template class DeterministicModel; #ifdef STORM_HAVE_CARL template class DeterministicModel; diff --git a/src/storm/models/sparse/DeterministicModel.h b/src/storm/models/sparse/DeterministicModel.h index f2dd82e12..13486ef5c 100644 --- a/src/storm/models/sparse/DeterministicModel.h +++ b/src/storm/models/sparse/DeterministicModel.h @@ -29,8 +29,6 @@ namespace storm { DeterministicModel(DeterministicModel&& other) = default; DeterministicModel& operator=(DeterministicModel&& model) = default; - - virtual void reduceToStateBasedRewards() override; virtual void writeDotToStream(std::ostream& outStream, bool includeLabeling = true, storm::storage::BitVector const* subsystem = nullptr, std::vector const* firstValue = nullptr, std::vector const* secondValue = nullptr, std::vector const* stateColoring = nullptr, std::vector const* colors = nullptr, std::vector* scheduler = nullptr, bool finalizeOutput = true) const override; }; diff --git a/src/storm/models/sparse/Dtmc.cpp b/src/storm/models/sparse/Dtmc.cpp index 2fa945420..29b31babe 100644 --- a/src/storm/models/sparse/Dtmc.cpp +++ b/src/storm/models/sparse/Dtmc.cpp @@ -35,6 +35,12 @@ namespace storm { // Intentionally left empty } + template + void Dtmc::reduceToStateBasedRewards() { + for (auto& rewardModel : this->getRewardModels()) { + rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), true); + } + } template class Dtmc; diff --git a/src/storm/models/sparse/Dtmc.h b/src/storm/models/sparse/Dtmc.h index ecc3ecba8..6809b686c 100644 --- a/src/storm/models/sparse/Dtmc.h +++ b/src/storm/models/sparse/Dtmc.h @@ -50,6 +50,7 @@ namespace storm { Dtmc(Dtmc&& dtmc) = default; Dtmc& operator=(Dtmc&& dtmc) = default; + virtual void reduceToStateBasedRewards() override; }; diff --git a/src/storm/models/sparse/StandardRewardModel.cpp b/src/storm/models/sparse/StandardRewardModel.cpp index 721608047..4385c46e1 100644 --- a/src/storm/models/sparse/StandardRewardModel.cpp +++ b/src/storm/models/sparse/StandardRewardModel.cpp @@ -165,7 +165,7 @@ namespace storm { template template - void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards) { + void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights) { if (this->hasTransitionRewards()) { if (this->hasStateActionRewards()) { storm::utility::vector::addVectors(this->getStateActionRewardVector(), transitionMatrix.getPointwiseProductRowSumVector(this->getTransitionRewardMatrix()), this->getStateActionRewardVector()); @@ -177,10 +177,21 @@ namespace storm { if (reduceToStateRewards && this->hasStateActionRewards()) { STORM_LOG_THROW(transitionMatrix.getRowGroupCount() == this->getStateActionRewardVector().size(), storm::exceptions::InvalidOperationException, "The reduction to state rewards is only possible if the size of the action reward vector equals the number of states."); - if (this->hasStateRewards()) { - storm::utility::vector::addVectors(this->getStateActionRewardVector(), this->getStateRewardVector(), this->getStateRewardVector()); + if (weights) { + if (this->hasStateRewards()) { + storm::utility::vector::applyPointwise(this->getStateActionRewardVector(), *weights, this->getStateRewardVector(), + [] (ValueType const& sar, MatrixValueType const& w, ValueType const& sr) -> ValueType { + return sr + w * sar; }); + } else { + this->optionalStateRewardVector = std::move(this->optionalStateActionRewardVector); + storm::utility::vector::applyPointwise(this->optionalStateRewardVector.get(), *weights, this->optionalStateRewardVector.get(), [] (ValueType const& r, MatrixValueType const& w) { return w * r; } ); + } } else { - this->optionalStateRewardVector = std::move(this->optionalStateActionRewardVector); + if (this->hasStateRewards()) { + storm::utility::vector::addVectors(this->getStateActionRewardVector(), this->getStateRewardVector(), this->getStateRewardVector()); + } else { + this->optionalStateRewardVector = std::move(this->optionalStateActionRewardVector); + } } this->optionalStateActionRewardVector = boost::none; } @@ -201,7 +212,7 @@ namespace storm { template template - std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const { + std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const { std::vector result; if (this->hasTransitionRewards()) { result = transitionMatrix.getPointwiseProductRowSumVector(this->getTransitionRewardMatrix()); @@ -382,13 +393,13 @@ namespace storm { // Explicitly instantiate the class. template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix) const; template std::vector StandardRewardModel::getTotalRewardVector(uint_fast64_t numberOfRows, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& filter) const; - template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; template std::vector StandardRewardModel::getTotalActionRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& stateRewardWeights) const; template storm::storage::BitVector StandardRewardModel::getStatesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template storm::storage::BitVector StandardRewardModel::getChoicesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template double StandardRewardModel::getTotalStateActionReward(uint_fast64_t stateIndex, uint_fast64_t choiceIndex, storm::storage::SparseMatrix const& transitionMatrix, double const& stateRewardWeight, double const& actionRewardWeight) const; - template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards); + template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights); template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, double const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, double const & newValue); template class StandardRewardModel; @@ -396,9 +407,9 @@ namespace storm { template std::vector StandardRewardModel::getTotalRewardVector(uint_fast64_t numberOfRows, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& filter) const; template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix) const; - template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; template std::vector StandardRewardModel::getTotalActionRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& stateRewardWeights) const; - template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards); + template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights); template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, float const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, float const & newValue); template class StandardRewardModel; @@ -407,12 +418,12 @@ namespace storm { #ifdef STORM_HAVE_CARL template std::vector StandardRewardModel::getTotalRewardVector(uint_fast64_t numberOfRows, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& filter) const; template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix) const; - template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; template std::vector StandardRewardModel::getTotalActionRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& stateRewardWeights) const; template storm::storage::BitVector StandardRewardModel::getStatesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template storm::storage::BitVector StandardRewardModel::getChoicesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template storm::RationalNumber StandardRewardModel::getTotalStateActionReward(uint_fast64_t stateIndex, uint_fast64_t choiceIndex, storm::storage::SparseMatrix const& transitionMatrix, storm::RationalNumber const& stateRewardWeight, storm::RationalNumber const& actionRewardWeight) const; - template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards); + template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights); template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, storm::RationalNumber const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, storm::RationalNumber const & newValue); template class StandardRewardModel; @@ -420,13 +431,13 @@ namespace storm { template std::vector StandardRewardModel::getTotalRewardVector(uint_fast64_t numberOfRows, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& filter) const; template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix) const; - template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; template storm::storage::BitVector StandardRewardModel::getStatesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template storm::storage::BitVector StandardRewardModel::getChoicesWithZeroReward(storm::storage::SparseMatrix const& transitionMatrix) const; template std::vector StandardRewardModel::getTotalActionRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& stateRewardWeights) const; template storm::RationalFunction StandardRewardModel::getTotalStateActionReward(uint_fast64_t stateIndex, uint_fast64_t choiceIndex, storm::storage::SparseMatrix const& transitionMatrix, storm::RationalFunction const& stateRewardWeight, storm::RationalFunction const& actionRewardWeight) const; - template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards); + template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights); template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, storm::RationalFunction const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, storm::RationalFunction const & newValue); template class StandardRewardModel; @@ -434,13 +445,13 @@ namespace storm { template std::vector StandardRewardModel::getTotalRewardVector(uint_fast64_t numberOfRows, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& filter) const; template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix) const; - template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + template std::vector StandardRewardModel::getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; template std::vector StandardRewardModel::getTotalActionRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& stateRewardWeights) const; template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, double const & newValue); template void StandardRewardModel::setStateActionReward(uint_fast64_t choiceIndex, storm::Interval const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, double const & newValue); template void StandardRewardModel::setStateReward(uint_fast64_t state, storm::Interval const & newValue); - template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards); + template void StandardRewardModel::reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards, std::vector const* weights); template class StandardRewardModel; template std::ostream& operator<<(std::ostream& out, StandardRewardModel const& rewardModel); #endif diff --git a/src/storm/models/sparse/StandardRewardModel.h b/src/storm/models/sparse/StandardRewardModel.h index c58f38312..410d9f448 100644 --- a/src/storm/models/sparse/StandardRewardModel.h +++ b/src/storm/models/sparse/StandardRewardModel.h @@ -191,9 +191,13 @@ namespace storm { * but not all reward-based properties. * * @param transitionMatrix The transition matrix that is used to weight the rewards in the reward matrix. + * @param reduceToStateRewards If set, the state-action rewards and the state rewards are summed so the + * model only has a state reward vector left. + * @param weights If given and if the reduction to state rewards only is enabled, this vector is used to + * weight the state-action and transition rewards */ template - void reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards = false); + void reduceToStateBasedRewards(storm::storage::SparseMatrix const& transitionMatrix, bool reduceToStateRewards = false, std::vector const* weights = nullptr); /*! * Creates a vector representing the complete reward vector based on the state-, state-action- and @@ -211,12 +215,10 @@ namespace storm { * * @param transitionMatrix The matrix that is used to weight the values of the transition reward matrix. * @param weights A vector used for scaling the entries of transition and/or state-action rewards (if present). - * @param scaleTransAndActions If true both transition rewards and state-action rewards are scaled by the - * weights. Otherwise, only the state-action rewards are scaled. * @return The full state-action reward vector. */ template - std::vector getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights, bool scaleTransAndActions) const; + std::vector getTotalRewardVector(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& weights) const; /*! * Creates a vector representing the complete reward vector based on the state-, state-action- and diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index d26cc4111..5ce9fc504 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -21,7 +21,7 @@ namespace storm { // For this, we use the signature computer/refiner of this class. STORM_LOG_TRACE("Refining choice partition."); - Partition newChoicePartition = this->internalRefine(this->signatureComputer, this->signatureRefiner, choicePartition, this->statePartition, mode); + Partition newChoicePartition = this->internalRefine(this->signatureComputer, this->signatureRefiner, this->choicePartition, this->statePartition, mode); if (newChoicePartition == choicePartition) { this->status = Status::FixedPoint; @@ -48,6 +48,11 @@ namespace storm { return choicePartition; } + template + bool MdpPartitionRefiner::refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) { + Partition newChoicePartition = this->signatureRefiner.refine(this->choicePartition, Signature(stateActionRewards)); + } + template class MdpPartitionRefiner; template class MdpPartitionRefiner; diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h index c513386ee..e5511e939 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h @@ -32,6 +32,8 @@ namespace storm { Partition const& getChoicePartition() const; private: + virtual bool refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) override; + // The choice partition in the refinement process. Partition choicePartition; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index cd064343f..422f4175b 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -2,6 +2,9 @@ #include "storm/models/symbolic/StandardRewardModel.h" +#include "storm/utility/macros.h" +#include "storm/exceptions/NotSupportedException.h" + namespace storm { namespace dd { namespace bisimulation { @@ -69,6 +72,36 @@ namespace storm { } } + template + bool PartitionRefiner::refineWrtRewardModel(storm::models::symbolic::Model const& model, storm::models::symbolic::StandardRewardModel const& rewardModel) { + STORM_LOG_THROW(rewardModel.hasTransitionRewards(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support transition rewards."); + bool result = false; + if (rewardModel.hasStateActionRewards()) { + result |= refineWrtStateActionRewards(model, rewardModel.getStateActionRewardVector()); + } + if (rewardModel.hasStateRewards()) { + result |= refineWrtStateRewards(model, rewardModel.getStateActionRewardVector()); + } + return result; + } + + template + bool PartitionRefiner::refineWrtStateRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateRewards) { + Partition newPartition = signatureRefiner.refine(statePartition, Signature(stateRewards)); + if (newPartition == statePartition) { + return false; + } else { + this->statePartition = newPartition; + return true; + } + } + + template + bool PartitionRefiner::refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) { + // By default, we treat state-action rewards just like state-rewards, which works for DTMCs and CTMCs. + return refineWrtStateRewards(model, stateActionRewards); + } + template Partition const& PartitionRefiner::getStatePartition() const { return statePartition; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index 870c1f429..d8236d6e8 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -32,6 +32,12 @@ namespace storm { */ virtual bool refine(SignatureMode const& mode = SignatureMode::Eager); + /*! + * Refines the partition wrt. to the reward model. + * @return True iff the partition is stable and no refinement was actually performed. + */ + bool refineWrtRewardModel(storm::models::symbolic::Model const& model, storm::models::symbolic::StandardRewardModel const& rewardModel); + /*! * Retrieves the current state partition in the refinement process. */ @@ -45,6 +51,9 @@ namespace storm { protected: Partition internalRefine(SignatureComputer& stateSignatureComputer, SignatureRefiner& signatureRefiner, Partition const& oldPartition, Partition const& targetPartition, SignatureMode const& mode = SignatureMode::Eager); + virtual bool refineWrtStateRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateRewards); + virtual bool refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards); + // The current status. Status status; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 77a99303e..c28b328e3 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -838,12 +838,29 @@ namespace storm { storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; + std::unordered_map> quotientRewardModels; + for (auto const& rewardModelName : preservationInformation.getRewardModelNames()) { + auto const& rewardModel = model.getRewardModel(rewardModelName); + + boost::optional> quotientStateRewards; + if (rewardModel.hasStateRewards()) { + quotientStateRewards = rewardModel.getStateRewardVector().multiplyMatrix(partitionAsAdd, model.getRowVariables()); + } + + boost::optional> quotientStateActionRewards; + if (rewardModel.hasStateActionRewards()) { + quotientStateActionRewards = rewardModel.getStateActionRewardVector().multiplyMatrix(partitionAsAdd, model.getRowVariables()); + } + + quotientRewardModels.emplace(rewardModelName, storm::models::symbolic::StandardRewardModel(quotientStateRewards, quotientStateActionRewards, boost::none)); + } + if (modelType == storm::models::ModelType::Dtmc) { - return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, quotientRewardModels)); } else if (modelType == storm::models::ModelType::Ctmc) { - return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, {})); + return std::shared_ptr>(new storm::models::symbolic::Ctmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, quotientRewardModels)); } else if (modelType == storm::models::ModelType::Mdp) { - return std::shared_ptr>(new storm::models::symbolic::Mdp(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, model.getNondeterminismVariables(), preservedLabelBdds, {})); + return std::shared_ptr>(new storm::models::symbolic::Mdp(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, model.getNondeterminismVariables(), preservedLabelBdds, quotientRewardModels)); } else { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Unsupported quotient type."); } From f55fab0924d58cca517d7342429695bda083d24c Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 12:45:58 +0200 Subject: [PATCH 51/95] lifted representative generation from ADDs to BDDs --- .../dd/bisimulation/QuotientExtractor.cpp | 77 ++++++++++--------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index c28b328e3..24b290168 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -33,25 +33,21 @@ namespace storm { namespace dd { namespace bisimulation { - template + template class InternalRepresentativeComputer; - template + template class InternalRepresentativeComputerBase { public: - InternalRepresentativeComputerBase(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : partition(partition), rowVariables(rowVariables), columnVariables(columnVariables) { - if (partition.storedAsAdd()) { - ddManager = &partition.asAdd().getDdManager(); - } else { - ddManager = &partition.asBdd().getDdManager(); - } + InternalRepresentativeComputerBase(storm::dd::Bdd const& partitionBdd, std::set const& rowVariables) : rowVariables(rowVariables), partitionBdd(partitionBdd) { + ddManager = &partitionBdd.getDdManager(); internalDdManager = &ddManager->getInternalDdManager(); // Create state variables cube. - this->columnVariablesCube = ddManager->getBddOne(); - for (auto const& var : columnVariables) { + this->rowVariablesCube = ddManager->getBddOne(); + for (auto const& var : rowVariables) { auto const& metaVariable = ddManager->getMetaVariable(var); - this->columnVariablesCube &= metaVariable.getCube(); + this->rowVariablesCube &= metaVariable.getCube(); } } @@ -59,27 +55,27 @@ namespace storm { storm::dd::DdManager const* ddManager; storm::dd::InternalDdManager const* internalDdManager; - Partition const& partition; std::set const& rowVariables; - std::set const& columnVariables; - storm::dd::Bdd columnVariablesCube; + storm::dd::Bdd rowVariablesCube; + + storm::dd::Bdd partitionBdd; }; - template - class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { + template <> + class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { public: - InternalRepresentativeComputer(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : InternalRepresentativeComputerBase(partition, rowVariables, columnVariables) { + InternalRepresentativeComputer(storm::dd::Bdd const& partitionBdd, std::set const& rowVariables) : InternalRepresentativeComputerBase(partitionBdd, rowVariables) { this->ddman = this->internalDdManager->getCuddManager().getManager(); } storm::dd::Bdd getRepresentatives() { - return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, cudd::BDD(this->internalDdManager->getCuddManager(), this->getRepresentativesRec(this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->columnVariablesCube.getInternalBdd().getCuddDdNode()))), this->rowVariables); + return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, cudd::BDD(this->internalDdManager->getCuddManager(), this->getRepresentativesRec(this->partitionBdd.getInternalBdd().getCuddDdNode(), this->rowVariablesCube.getInternalBdd().getCuddDdNode()))), this->rowVariables); } private: DdNodePtr getRepresentativesRec(DdNodePtr partitionNode, DdNodePtr stateVariablesCube) { - if (partitionNode == Cudd_ReadZero(ddman)) { - return Cudd_ReadLogicZero(ddman); + if (partitionNode == Cudd_ReadLogicZero(ddman)) { + return partitionNode; } // If we visited the node before, there is no block that we still need to cover. @@ -98,6 +94,11 @@ namespace storm { if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(stateVariablesCube)) { elsePartitionNode = Cudd_E(partitionNode); thenPartitionNode = Cudd_T(partitionNode); + + if (Cudd_IsComplement(partitionNode)) { + elsePartitionNode = Cudd_Not(elsePartitionNode); + thenPartitionNode = Cudd_Not(thenPartitionNode); + } } else { elsePartitionNode = thenPartitionNode = partitionNode; skipped = true; @@ -122,7 +123,7 @@ namespace storm { return elseResult; } else { bool complement = Cudd_IsComplement(thenResult); - auto result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_Regular(thenResult), complement ? Cudd_Not(elseResult) : elseResult); + auto result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube), Cudd_Regular(thenResult), complement ? Cudd_Not(elseResult) : elseResult); Cudd_Deref(elseResult); Cudd_Deref(thenResult); return complement ? Cudd_Not(result) : result; @@ -132,7 +133,7 @@ namespace storm { if (elseResult == Cudd_ReadLogicZero(ddman)) { result = elseResult; } else { - result = Cudd_Not(cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube) - 1, Cudd_ReadOne(ddman), Cudd_Not(elseResult))); + result = Cudd_Not(cuddUniqueInter(ddman, Cudd_NodeReadIndex(stateVariablesCube), Cudd_ReadOne(ddman), Cudd_Not(elseResult))); } Cudd_Deref(elseResult); return result; @@ -144,15 +145,15 @@ namespace storm { spp::sparse_hash_map visitedNodes; }; - template - class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { + template<> + class InternalRepresentativeComputer : public InternalRepresentativeComputerBase { public: - InternalRepresentativeComputer(Partition const& partition, std::set const& rowVariables, std::set const& columnVariables) : InternalRepresentativeComputerBase(partition, rowVariables, columnVariables) { + InternalRepresentativeComputer(storm::dd::Bdd const& partitionBdd, std::set const& rowVariables) : InternalRepresentativeComputerBase(partitionBdd, rowVariables) { // Intentionally left empty. } storm::dd::Bdd getRepresentatives() { - return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, sylvan::Bdd(this->getRepresentativesRec(this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->columnVariablesCube.getInternalBdd().getSylvanBdd().GetBDD()))), this->rowVariables); + return storm::dd::Bdd(*this->ddManager, storm::dd::InternalBdd(this->internalDdManager, sylvan::Bdd(this->getRepresentativesRec(this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->rowVariablesCube.getInternalBdd().getSylvanBdd().GetBDD()))), this->rowVariables); } private: @@ -199,7 +200,7 @@ namespace storm { mtbdd_refs_pop(2); return elseResult; } else { - auto result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, thenResult); + auto result = sylvan_makenode(sylvan_var(stateVariablesCube), elseResult, thenResult); mtbdd_refs_pop(2); return result; } @@ -208,7 +209,7 @@ namespace storm { if (elseResult == sylvan_false) { result = elseResult; } else { - result = sylvan_makenode(sylvan_var(stateVariablesCube) - 1, elseResult, sylvan_false); + result = sylvan_makenode(sylvan_var(stateVariablesCube), elseResult, sylvan_false); } mtbdd_refs_pop(1); return result; @@ -718,8 +719,8 @@ namespace storm { partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); auto start = std::chrono::high_resolution_clock::now(); - // FIXME: Use partition as BDD in representative computation. - auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); + auto representatives = InternalRepresentativeComputer(partitionAsBdd, model.getRowVariables()).getRepresentatives(); + representatives.template toAdd().exportToDot("repr.dot"); STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); STORM_LOG_ASSERT((representatives && partitionAsBdd).existsAbstract(model.getRowVariables()) == partitionAsBdd.existsAbstract(model.getRowVariables()), "Representatives do not cover all blocks."); InternalSparseQuotientExtractor sparseExtractor(model, partition, representatives); @@ -795,13 +796,13 @@ namespace storm { } auto start = std::chrono::high_resolution_clock::now(); - storm::dd::Bdd partitionAsBddOverRowVariables = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); - storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getColumnVariables()); - storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables()); + partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + storm::dd::Bdd reachableStates = partitionAsBdd.existsAbstract(model.getRowVariables()); + storm::dd::Bdd initialStates = (model.getInitialStates() && partitionAsBdd).existsAbstract(model.getRowVariables()); std::map> preservedLabelBdds; for (auto const& label : preservationInformation.getLabels()) { - preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + preservedLabelBdds.emplace(label, (model.getStates(label) && partitionAsBdd).existsAbstract(model.getRowVariables())); } for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; @@ -812,18 +813,18 @@ namespace storm { if (it != preservedLabelBdds.end()) { STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); } else { - preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBddOverRowVariables).existsAbstract(model.getRowVariables())); + preservedLabelBdds.emplace(stream.str(), (model.getStates(expression) && partitionAsBdd).existsAbstract(model.getRowVariables())); } } auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); start = std::chrono::high_resolution_clock::now(); - storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet), model.getColumnVariables()); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet).renameVariables(model.getRowVariables(), model.getColumnVariables()), model.getColumnVariables()); // Pick a representative from each block. - auto representatives = InternalRepresentativeComputer(partition, model.getRowVariables(), model.getColumnVariables()).getRepresentatives(); - partitionAsBdd = representatives && partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); + auto representatives = InternalRepresentativeComputer(partitionAsBdd, model.getRowVariables()).getRepresentatives(); + partitionAsBdd &= representatives; storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); From 334ed077fd1ef39f66d3fa41f8a02a25434e386e Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 13:14:53 +0200 Subject: [PATCH 52/95] lifted quotient extractor from ADDs to BDDs --- .../dd/bisimulation/QuotientExtractor.cpp | 63 ++++++++++--------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 24b290168..7748ec0a7 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -226,7 +226,7 @@ namespace storm { template class InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractorBase(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : manager(model.getManager()), isNondeterministic(false), partition(partition), representatives(representatives), matrixEntriesCreated(false) { + InternalSparseQuotientExtractorBase(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : manager(model.getManager()), isNondeterministic(false), partitionBdd(partitionBdd), numberOfBlocks(numberOfBlocks), representatives(representatives), matrixEntriesCreated(false) { // Create cubes. rowVariablesCube = manager.getBddOne(); for (auto const& variable : model.getRowVariables()) { @@ -251,6 +251,8 @@ namespace storm { if (this->isNondeterministic) { this->nondeterminismOdd = (model.getQualitativeTransitionMatrix().existsAbstract(model.getColumnVariables()) && this->representatives).createOdd(); } + + STORM_LOG_TRACE("Partition has " << partitionBdd.existsAbstract(model.getRowVariables()).getNonZeroCount() << " states in " << this->numberOfBlocks << " blocks."); } storm::dd::Odd const& getOdd() const { @@ -274,7 +276,7 @@ namespace storm { uint64_t rowCounter = 0; uint64_t lastState = this->isNondeterministic ? rowToState[rowPermutation.front()] : 0; - storm::storage::SparseMatrixBuilder builder(matrixEntries.size(), partition.getNumberOfBlocks(), 0, true, this->isNondeterministic); + storm::storage::SparseMatrixBuilder builder(matrixEntries.size(), this->numberOfBlocks, 0, true, this->isNondeterministic); if (this->isNondeterministic) { builder.newRowGroup(0); } @@ -337,7 +339,8 @@ namespace storm { storm::dd::Bdd nondeterminismVariablesCube; // Information about the state partition. - Partition partition; + storm::dd::Bdd partitionBdd; + uint64_t numberOfBlocks; storm::dd::Bdd representatives; storm::dd::Odd odd; storm::dd::Odd nondeterminismOdd; @@ -355,28 +358,25 @@ namespace storm { template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partition, representatives), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { - - STORM_LOG_ASSERT(this->partition.storedAsAdd(), "Expected partition to be stored as an ADD."); + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : InternalSparseQuotientExtractorBase(model, partitionBdd, representatives, numberOfBlocks), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { this->createBlockToOffsetMapping(); } storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { // Create the number of rows necessary for the matrix. - STORM_LOG_TRACE("Partition has " << this->partition.getNumberOfStates() << " states in " << this->partition.getNumberOfBlocks() << " blocks."); this->createMatrixEntryStorage(); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode(), this->nondeterminismVariablesCube.getInternalBdd().getCuddDdNode(), this->isNondeterministic ? &this->odd : nullptr, 0); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode(), this->nondeterminismVariablesCube.getInternalBdd().getCuddDdNode(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } private: void createBlockToOffsetMapping() { - this->createBlockToOffsetMappingRec(this->partition.asAdd().getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->rowVariablesCube.getInternalBdd().getCuddDdNode(), this->odd, 0); - STORM_LOG_ASSERT(blockToOffset.size() == this->partition.getNumberOfBlocks(), "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->partition.getNumberOfBlocks() << "."); + this->createBlockToOffsetMappingRec(this->partitionBdd.getInternalBdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->rowVariablesCube.getInternalBdd().getCuddDdNode(), this->odd, 0); + STORM_LOG_ASSERT(blockToOffset.size() == this->numberOfBlocks, "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->numberOfBlocks << "."); } void createBlockToOffsetMappingRec(DdNodePtr partitionNode, DdNodePtr representativesNode, DdNodePtr variables, storm::dd::Odd const& odd, uint64_t offset) { - STORM_LOG_ASSERT(partitionNode != Cudd_ReadZero(ddman) || representativesNode == Cudd_ReadLogicZero(ddman), "Expected representative to be zero if the partition is zero."); + STORM_LOG_ASSERT(partitionNode != Cudd_ReadLogicZero(ddman) || representativesNode == Cudd_ReadLogicZero(ddman), "Expected representative to be zero if the partition is zero."); if (representativesNode == Cudd_ReadLogicZero(ddman)) { return; } @@ -389,9 +389,14 @@ namespace storm { STORM_LOG_ASSERT(!odd.isTerminalNode(), "Expected non-terminal node."); DdNodePtr partitionT; DdNodePtr partitionE; - if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(variables) + 1) { + if (Cudd_NodeReadIndex(partitionNode) == Cudd_NodeReadIndex(variables)) { partitionT = Cudd_T(partitionNode); partitionE = Cudd_E(partitionNode); + + if (Cudd_IsComplement(partitionNode)) { + partitionE = Cudd_Not(partitionE); + partitionT = Cudd_Not(partitionT); + } } else { partitionT = partitionE = partitionNode; } @@ -401,15 +406,15 @@ namespace storm { if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { representativesT = Cudd_T(representativesNode); representativesE = Cudd_E(representativesNode); + + if (Cudd_IsComplement(representativesNode)) { + representativesE = Cudd_Not(representativesE); + representativesT = Cudd_Not(representativesT); + } } else { representativesT = representativesE = representativesNode; } - if (representativesT != representativesE && Cudd_IsComplement(representativesNode)) { - representativesE = Cudd_Not(representativesE); - representativesT = Cudd_Not(representativesT); - } - createBlockToOffsetMappingRec(partitionE, representativesE, Cudd_T(variables), odd.getElseSuccessor(), offset); createBlockToOffsetMappingRec(partitionT, representativesT, Cudd_T(variables), odd.getThenSuccessor(), offset + odd.getElseOffset()); } @@ -487,10 +492,15 @@ namespace storm { DdNodePtr targetT; DdNodePtr targetE; - if (Cudd_NodeReadIndex(targetPartitionNode) == Cudd_NodeReadIndex(variables) + 1) { + if (Cudd_NodeReadIndex(targetPartitionNode) == Cudd_NodeReadIndex(variables)) { // Node was not skipped in target partition. targetT = Cudd_T(targetPartitionNode); targetE = Cudd_E(targetPartitionNode); + + if (Cudd_IsComplement(targetPartitionNode)) { + targetT = Cudd_Not(targetT); + targetE = Cudd_Not(targetE); + } } else { // Node was skipped in target partition. targetT = targetE = targetPartitionNode; @@ -529,23 +539,21 @@ namespace storm { template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, Partition const& partition, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partition, representatives) { - - STORM_LOG_ASSERT(partition.storedAsBdd(), "Expected partition stored as BDD."); + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : InternalSparseQuotientExtractorBase(model, partitionBdd, representatives, numberOfBlocks) { this->createBlockToOffsetMapping(); } storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { // Create the number of rows necessary for the matrix. this->createMatrixEntryStorage(); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->nondeterminismVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->isNondeterministic ? &this->odd : nullptr, 0); + extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->nondeterminismVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } private: void createBlockToOffsetMapping() { - this->createBlockToOffsetMappingRec(this->partition.asBdd().getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->rowVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->odd, 0); - STORM_LOG_ASSERT(blockToOffset.size() == this->partition.getNumberOfBlocks(), "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->partition.getNumberOfBlocks() << "."); + this->createBlockToOffsetMappingRec(this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->rowVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->odd, 0); + STORM_LOG_ASSERT(blockToOffset.size() == this->numberOfBlocks, "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->numberOfBlocks << "."); } void createBlockToOffsetMappingRec(BDD partitionNode, BDD representativesNode, BDD variables, storm::dd::Odd const& odd, uint64_t offset) { @@ -562,7 +570,7 @@ namespace storm { STORM_LOG_ASSERT(!odd.isTerminalNode(), "Expected non-terminal node."); BDD partitionT; BDD partitionE; - if (sylvan_var(partitionNode) == sylvan_var(variables) + 1) { + if (sylvan_var(partitionNode) == sylvan_var(variables)) { partitionT = sylvan_high(partitionNode); partitionE = sylvan_low(partitionNode); } else { @@ -655,7 +663,7 @@ namespace storm { BDD targetT; BDD targetE; - if (sylvan_var(targetPartitionNode) == sylvan_var(variables) + 1) { + if (sylvan_var(targetPartitionNode) == sylvan_var(variables)) { // Node was not skipped in target partition. targetT = sylvan_high(targetPartitionNode); targetE = sylvan_low(targetPartitionNode); @@ -720,10 +728,9 @@ namespace storm { auto start = std::chrono::high_resolution_clock::now(); auto representatives = InternalRepresentativeComputer(partitionAsBdd, model.getRowVariables()).getRepresentatives(); - representatives.template toAdd().exportToDot("repr.dot"); STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); STORM_LOG_ASSERT((representatives && partitionAsBdd).existsAbstract(model.getRowVariables()) == partitionAsBdd.existsAbstract(model.getRowVariables()), "Representatives do not cover all blocks."); - InternalSparseQuotientExtractor sparseExtractor(model, partition, representatives); + InternalSparseQuotientExtractor sparseExtractor(model, partitionAsBdd, representatives, partition.getNumberOfBlocks()); storm::dd::Odd const& odd = sparseExtractor.getOdd(); STORM_LOG_ASSERT(odd.getTotalOffset() == representatives.getNonZeroCount(), "Mismatching ODD."); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix()); From ad456916e96835c6cf5d417105adbbce47322219 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 14:43:33 +0200 Subject: [PATCH 53/95] first working version of sparse reward model quotienting --- src/storm/models/sparse/StandardRewardModel.h | 12 +- .../dd/bisimulation/QuotientExtractor.cpp | 197 +++++++++++++++--- 2 files changed, 176 insertions(+), 33 deletions(-) diff --git a/src/storm/models/sparse/StandardRewardModel.h b/src/storm/models/sparse/StandardRewardModel.h index 410d9f448..33303f380 100644 --- a/src/storm/models/sparse/StandardRewardModel.h +++ b/src/storm/models/sparse/StandardRewardModel.h @@ -23,9 +23,9 @@ namespace storm { * @param optionalStateActionRewardVector The reward values associated with state-action pairs. * @param optionalTransitionRewardMatrix The reward values associated with the transitions of the model. */ - StandardRewardModel(boost::optional> const& optionalStateRewardVector = boost::optional>(), - boost::optional> const& optionalStateActionRewardVector = boost::optional>(), - boost::optional> const& optionalTransitionRewardMatrix = boost::optional>()); + StandardRewardModel(boost::optional> const& optionalStateRewardVector = boost::none, + boost::optional> const& optionalStateActionRewardVector = boost::none, + boost::optional> const& optionalTransitionRewardMatrix = boost::none); /*! * Constructs a reward model by moving the given data. @@ -34,9 +34,9 @@ namespace storm { * @param optionalStateActionRewardVector The reward values associated with state-action pairs. * @param optionalTransitionRewardMatrix The reward values associated with the transitions of the model. */ - StandardRewardModel(boost::optional>&& optionalStateRewardVector = boost::optional>(), - boost::optional>&& optionalStateActionRewardVector = boost::optional>(), - boost::optional>&& optionalTransitionRewardMatrix = boost::optional>()); + StandardRewardModel(boost::optional>&& optionalStateRewardVector = boost::none, + boost::optional>&& optionalStateActionRewardVector = boost::none, + boost::optional>&& optionalTransitionRewardMatrix = boost::none); StandardRewardModel(StandardRewardModel const& dtmc) = default; StandardRewardModel& operator=(StandardRewardModel const& dtmc) = default; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 7748ec0a7..63ba5d63a 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -226,7 +226,7 @@ namespace storm { template class InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractorBase(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : manager(model.getManager()), isNondeterministic(false), partitionBdd(partitionBdd), numberOfBlocks(numberOfBlocks), representatives(representatives), matrixEntriesCreated(false) { + InternalSparseQuotientExtractorBase(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t numberOfBlocks, storm::dd::Bdd const& representatives) : model(model), manager(model.getManager()), isNondeterministic(false), partitionBdd(partitionBdd), numberOfBlocks(numberOfBlocks), blockVariable(blockVariable), representatives(representatives), matrixEntriesCreated(false) { // Create cubes. rowVariablesCube = manager.getBddOne(); for (auto const& variable : model.getRowVariables()) { @@ -251,15 +251,52 @@ namespace storm { if (this->isNondeterministic) { this->nondeterminismOdd = (model.getQualitativeTransitionMatrix().existsAbstract(model.getColumnVariables()) && this->representatives).createOdd(); } - + STORM_LOG_TRACE("Partition has " << partitionBdd.existsAbstract(model.getRowVariables()).getNonZeroCount() << " states in " << this->numberOfBlocks << " blocks."); } - storm::dd::Odd const& getOdd() const { - return this->odd; + storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { + return extractMatrixInternal(transitionMatrix); } + std::vector extractStateVector(storm::dd::Add const& vector) { + return extractVectorInternal(vector, this->rowVariablesCube, this->odd); + } + + std::vector extractStateActionVector(storm::dd::Add const& vector) { + if (!this->isNondeterministic) { + return extractStateVector(vector); + } else { + STORM_LOG_ASSERT(!this->rowPermutation.empty(), "Expected proper row permutation."); + std::vector valueVector = extractVectorInternal(vector, this->allSourceVariablesCube, this->nondeterminismOdd); + + // Reorder the values according to the known row permutation. + for (uint64_t position = 0; position < valueVector.size(); ) { + if (rowPermutation[position] != position) { + std::swap(valueVector[position], valueVector[rowPermutation[position]]); + std::swap(rowPermutation[position], rowPermutation[rowPermutation[position]]); + } else { + ++position; + } + } + + return valueVector; + } + } + + storm::storage::BitVector extractSetAll(storm::dd::Bdd const& set) { + return (set && representatives).toVector(this->odd); + } + + storm::storage::BitVector extractSetExists(storm::dd::Bdd const& set) { + return ((set && partitionBdd).existsAbstract(model.getRowVariables()) && partitionBdd && representatives).existsAbstract({this->blockVariable}).toVector(this->odd); + } + protected: + virtual storm::storage::SparseMatrix extractMatrixInternal(storm::dd::Add const& matrix) = 0; + + virtual std::vector extractVectorInternal(storm::dd::Add const& vector, storm::dd::Bdd const& variablesCube, storm::dd::Odd const& odd) = 0; + storm::storage::SparseMatrix createMatrixFromEntries() { for (auto& row : matrixEntries) { std::sort(row.begin(), row.end(), @@ -268,7 +305,7 @@ namespace storm { }); } - std::vector rowPermutation(matrixEntries.size()); + rowPermutation = std::vector(matrixEntries.size()); std::iota(rowPermutation.begin(), rowPermutation.end(), 0ull); if (this->isNondeterministic) { std::sort(rowPermutation.begin(), rowPermutation.end(), [this] (uint64_t first, uint64_t second) { return this->rowToState[first] < this->rowToState[second]; } ); @@ -299,6 +336,8 @@ namespace storm { ++rowCounter; } + rowToState.clear(); + rowToState.shrink_to_fit(); matrixEntries.clear(); matrixEntries.shrink_to_fit(); @@ -326,6 +365,8 @@ namespace storm { rowToState[row] = state; } + storm::models::symbolic::Model const& model; + // The manager responsible for the DDs. storm::dd::DdManager const& manager; @@ -341,6 +382,7 @@ namespace storm { // Information about the state partition. storm::dd::Bdd partitionBdd; uint64_t numberOfBlocks; + storm::expressions::Variable blockVariable; storm::dd::Bdd representatives; storm::dd::Odd odd; storm::dd::Odd nondeterminismOdd; @@ -353,23 +395,31 @@ namespace storm { // A vector storing for each row which state it belongs to. std::vector rowToState; + + // A vector storing the row permutation for nondeterministic models. + std::vector rowPermutation; }; template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : InternalSparseQuotientExtractorBase(model, partitionBdd, representatives, numberOfBlocks), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t numberOfBlocks, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partitionBdd, blockVariable, numberOfBlocks, representatives), ddman(this->manager.getInternalDdManager().getCuddManager().getManager()) { this->createBlockToOffsetMapping(); } - - storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { - // Create the number of rows necessary for the matrix. + + private: + virtual storm::storage::SparseMatrix extractMatrixInternal(storm::dd::Add const& matrix) override { this->createMatrixEntryStorage(); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getCuddDdNode(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode(), this->nondeterminismVariablesCube.getInternalBdd().getCuddDdNode(), this->isNondeterministic ? &this->odd : nullptr, 0); + extractTransitionMatrixRec(matrix.getInternalAdd().getCuddDdNode(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->allSourceVariablesCube.getInternalBdd().getCuddDdNode(), this->nondeterminismVariablesCube.getInternalBdd().getCuddDdNode(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } - private: + virtual std::vector extractVectorInternal(storm::dd::Add const& vector, storm::dd::Bdd const& variablesCube, storm::dd::Odd const& odd) override { + std::vector result(odd.getTotalOffset()); + extractVectorRec(vector.getInternalAdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), variablesCube.getInternalBdd().getCuddDdNode(), odd, 0, result); + return result; + } + void createBlockToOffsetMapping() { this->createBlockToOffsetMappingRec(this->partitionBdd.getInternalBdd().getCuddDdNode(), this->representatives.getInternalBdd().getCuddDdNode(), this->rowVariablesCube.getInternalBdd().getCuddDdNode(), this->odd, 0); STORM_LOG_ASSERT(blockToOffset.size() == this->numberOfBlocks, "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->numberOfBlocks << "."); @@ -420,6 +470,42 @@ namespace storm { } } + void extractVectorRec(DdNodePtr vector, DdNodePtr representativesNode, DdNodePtr variables, storm::dd::Odd const& odd, uint64_t offset, std::vector& result) { + if (representativesNode == Cudd_ReadLogicZero(ddman)) { + return; + } + + if (Cudd_IsConstant(variables)) { + result[offset] = Cudd_V(vector); + } else { + DdNodePtr vectorT; + DdNodePtr vectorE; + if (Cudd_NodeReadIndex(vector) == Cudd_NodeReadIndex(variables)) { + vectorT = Cudd_T(vector); + vectorE = Cudd_E(vector); + } else { + vectorT = vectorE = vector; + } + + DdNodePtr representativesT; + DdNodePtr representativesE; + if (Cudd_NodeReadIndex(representativesNode) == Cudd_NodeReadIndex(variables)) { + representativesT = Cudd_T(representativesNode); + representativesE = Cudd_E(representativesNode); + + if (Cudd_IsComplement(representativesNode)) { + representativesT = Cudd_Not(representativesT); + representativesE = Cudd_Not(representativesE); + } + } else { + representativesT = representativesE = representativesNode; + } + + extractVectorRec(vectorE, representativesE, Cudd_T(variables), odd.getElseSuccessor(), offset, result); + extractVectorRec(vectorT, representativesT, Cudd_T(variables), odd.getThenSuccessor(), offset + odd.getElseOffset(), result); + } + } + void extractTransitionMatrixRec(DdNodePtr transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, DdNodePtr targetPartitionNode, DdNodePtr representativesNode, DdNodePtr variables, DdNodePtr nondeterminismVariables, storm::dd::Odd const* stateOdd, uint64_t stateOffset) { // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. @@ -539,18 +625,54 @@ namespace storm { template class InternalSparseQuotientExtractor : public InternalSparseQuotientExtractorBase { public: - InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::dd::Bdd const& representatives, uint64_t numberOfBlocks) : InternalSparseQuotientExtractorBase(model, partitionBdd, representatives, numberOfBlocks) { + InternalSparseQuotientExtractor(storm::models::symbolic::Model const& model, storm::dd::Bdd const& partitionBdd, storm::expressions::Variable const& blockVariable, uint64_t numberOfBlocks, storm::dd::Bdd const& representatives) : InternalSparseQuotientExtractorBase(model, partitionBdd, blockVariable, numberOfBlocks, representatives) { this->createBlockToOffsetMapping(); } - storm::storage::SparseMatrix extractTransitionMatrix(storm::dd::Add const& transitionMatrix) { - // Create the number of rows necessary for the matrix. + private: + virtual storm::storage::SparseMatrix extractMatrixInternal(storm::dd::Add const& matrix) override { this->createMatrixEntryStorage(); - extractTransitionMatrixRec(transitionMatrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->nondeterminismVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->isNondeterministic ? &this->odd : nullptr, 0); + extractTransitionMatrixRec(matrix.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->isNondeterministic ? this->nondeterminismOdd : this->odd, 0, this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->allSourceVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->nondeterminismVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->isNondeterministic ? &this->odd : nullptr, 0); return this->createMatrixFromEntries(); } - private: + virtual std::vector extractVectorInternal(storm::dd::Add const& vector, storm::dd::Bdd const& variablesCube, storm::dd::Odd const& odd) override { + std::vector result(odd.getTotalOffset()); + extractVectorRec(vector.getInternalAdd().getSylvanMtbdd().GetMTBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), variablesCube.getInternalBdd().getSylvanBdd().GetBDD(), odd, 0, result); + return result; + } + + void extractVectorRec(MTBDD vector, BDD representativesNode, BDD variables, storm::dd::Odd const& odd, uint64_t offset, std::vector& result) { + if (representativesNode == sylvan_false) { + return; + } + + if (sylvan_isconst(variables)) { + result[offset] = storm::dd::InternalAdd::getValue(vector); + } else { + MTBDD vectorT; + MTBDD vectorE; + if (sylvan_var(vector) == sylvan_var(variables)) { + vectorT = sylvan_high(vector); + vectorE = sylvan_low(vector); + } else { + vectorT = vectorE = vector; + } + + BDD representativesT; + BDD representativesE; + if (sylvan_var(representativesNode) == sylvan_var(variables)) { + representativesT = sylvan_high(representativesNode); + representativesE = sylvan_low(representativesNode); + } else { + representativesT = representativesE = representativesNode; + } + + extractVectorRec(vectorE, representativesE, sylvan_high(variables), odd.getElseSuccessor(), offset, result); + extractVectorRec(vectorT, representativesT, sylvan_high(variables), odd.getThenSuccessor(), offset + odd.getElseOffset(), result); + } + } + void createBlockToOffsetMapping() { this->createBlockToOffsetMappingRec(this->partitionBdd.getInternalBdd().getSylvanBdd().GetBDD(), this->representatives.getInternalBdd().getSylvanBdd().GetBDD(), this->rowVariablesCube.getInternalBdd().getSylvanBdd().GetBDD(), this->odd, 0); STORM_LOG_ASSERT(blockToOffset.size() == this->numberOfBlocks, "Mismatching block-to-offset mapping: " << blockToOffset.size() << " vs. " << this->numberOfBlocks << "."); @@ -730,20 +852,18 @@ namespace storm { auto representatives = InternalRepresentativeComputer(partitionAsBdd, model.getRowVariables()).getRepresentatives(); STORM_LOG_ASSERT(representatives.getNonZeroCount() == partition.getNumberOfBlocks(), "Representatives size does not match that of the partition: " << representatives.getNonZeroCount() << " vs. " << partition.getNumberOfBlocks() << "."); STORM_LOG_ASSERT((representatives && partitionAsBdd).existsAbstract(model.getRowVariables()) == partitionAsBdd.existsAbstract(model.getRowVariables()), "Representatives do not cover all blocks."); - InternalSparseQuotientExtractor sparseExtractor(model, partitionAsBdd, representatives, partition.getNumberOfBlocks()); - storm::dd::Odd const& odd = sparseExtractor.getOdd(); - STORM_LOG_ASSERT(odd.getTotalOffset() == representatives.getNonZeroCount(), "Mismatching ODD."); + InternalSparseQuotientExtractor sparseExtractor(model, partitionAsBdd, partition.getBlockVariable(), partition.getNumberOfBlocks(), representatives); storm::storage::SparseMatrix quotientTransitionMatrix = sparseExtractor.extractTransitionMatrix(model.getTransitionMatrix()); auto end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient transition matrix extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); start = std::chrono::high_resolution_clock::now(); storm::models::sparse::StateLabeling quotientStateLabeling(partition.getNumberOfBlocks()); - quotientStateLabeling.addLabel("init", ((model.getInitialStates() && partitionAsBdd).existsAbstract(model.getRowVariables()) && partitionAsBdd && representatives).existsAbstract({partition.getBlockVariable()}).toVector(odd)); - quotientStateLabeling.addLabel("deadlock", ((model.getDeadlockStates() && partitionAsBdd).existsAbstract(model.getRowVariables()) && partitionAsBdd && representatives).existsAbstract({partition.getBlockVariable()}).toVector(odd)); + quotientStateLabeling.addLabel("init", sparseExtractor.extractSetExists(model.getInitialStates())); + quotientStateLabeling.addLabel("deadlock", sparseExtractor.extractSetExists(model.getDeadlockStates())); for (auto const& label : preservationInformation.getLabels()) { - quotientStateLabeling.addLabel(label, (model.getStates(label) && representatives).toVector(odd)); + quotientStateLabeling.addLabel(label, sparseExtractor.extractSetAll(model.getStates(label))); } for (auto const& expression : preservationInformation.getExpressions()) { std::stringstream stream; @@ -753,19 +873,39 @@ namespace storm { if (quotientStateLabeling.containsLabel(expressionAsString)) { STORM_LOG_WARN("Duplicate label '" << expressionAsString << "', dropping second label definition."); } else { - quotientStateLabeling.addLabel(stream.str(), (model.getStates(expression) && representatives).toVector(odd)); + quotientStateLabeling.addLabel(stream.str(), sparseExtractor.extractSetAll(model.getStates(expression))); } } end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + start = std::chrono::high_resolution_clock::now(); + std::unordered_map> quotientRewardModels; + for (auto const& rewardModelName : preservationInformation.getRewardModelNames()) { + auto const& rewardModel = model.getRewardModel(rewardModelName); + + boost::optional> quotientStateRewards; + if (rewardModel.hasStateRewards()) { + quotientStateRewards = sparseExtractor.extractStateVector(rewardModel.getStateRewardVector()); + } + + boost::optional> quotientStateActionRewards; + if (rewardModel.hasStateActionRewards()) { + quotientStateActionRewards = sparseExtractor.extractStateActionVector(rewardModel.getStateActionRewardVector()); + } + + quotientRewardModels.emplace(rewardModelName, storm::models::sparse::StandardRewardModel(std::move(quotientStateRewards), std::move(quotientStateActionRewards), boost::none)); + } + start = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Reward models extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + std::shared_ptr> result; if (model.getType() == storm::models::ModelType::Dtmc) { - result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling), std::move(quotientRewardModels)); } else if (model.getType() == storm::models::ModelType::Ctmc) { - result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling), std::move(quotientRewardModels)); } else if (model.getType() == storm::models::ModelType::Mdp) { - result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling)); + result = std::make_shared>(std::move(quotientTransitionMatrix), std::move(quotientStateLabeling), std::move(quotientRewardModels)); } return result; @@ -846,6 +986,7 @@ namespace storm { storm::dd::Bdd quotientTransitionMatrixBdd = quotientTransitionMatrix.notZero(); storm::dd::Bdd deadlockStates = !quotientTransitionMatrixBdd.existsAbstract(blockPrimeVariableSet) && reachableStates; + start = std::chrono::high_resolution_clock::now(); std::unordered_map> quotientRewardModels; for (auto const& rewardModelName : preservationInformation.getRewardModelNames()) { auto const& rewardModel = model.getRewardModel(rewardModelName); @@ -862,7 +1003,9 @@ namespace storm { quotientRewardModels.emplace(rewardModelName, storm::models::symbolic::StandardRewardModel(quotientStateRewards, quotientStateActionRewards, boost::none)); } - + end = std::chrono::high_resolution_clock::now(); + STORM_LOG_TRACE("Reward models extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); + if (modelType == storm::models::ModelType::Dtmc) { return std::shared_ptr>(new storm::models::symbolic::Dtmc(model.getManager().asSharedPointer(), reachableStates, initialStates, deadlockStates, quotientTransitionMatrix, blockVariableSet, blockPrimeVariableSet, blockMetaVariablePairs, preservedLabelBdds, quotientRewardModels)); } else if (modelType == storm::models::ModelType::Ctmc) { From 9a6abf7eec18285f9c1e54b76e707c1b00ce7c8c Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 20:15:49 +0200 Subject: [PATCH 54/95] fixed a bug in dd-based reward model building --- src/storm/api/builder.h | 10 ++++++++++ src/storm/builder/DdJaniModelBuilder.cpp | 8 +++++++- src/storm/builder/DdPrismModelBuilder.cpp | 2 +- src/storm/storage/prism/ToJaniConverter.cpp | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/storm/api/builder.h b/src/storm/api/builder.h index 868c47bba..1be905837 100644 --- a/src/storm/api/builder.h +++ b/src/storm/api/builder.h @@ -39,6 +39,11 @@ namespace storm { typename storm::builder::DdPrismModelBuilder::Options options; options = typename storm::builder::DdPrismModelBuilder::Options(formulas); + if (storm::settings::getModule().isBuildFullModelSet()) { + options.buildAllLabels = true; + options.buildAllRewardModels = true; + } + storm::builder::DdPrismModelBuilder builder; return builder.build(model.asPrismProgram(), options); } else { @@ -46,6 +51,11 @@ namespace storm { typename storm::builder::DdJaniModelBuilder::Options options; options = typename storm::builder::DdJaniModelBuilder::Options(formulas); + if (storm::settings::getModule().isBuildFullModelSet()) { + options.buildAllLabels = true; + options.buildAllRewardModels = true; + } + storm::builder::DdJaniModelBuilder builder; return builder.build(model.asJaniModel(), options); } diff --git a/src/storm/builder/DdJaniModelBuilder.cpp b/src/storm/builder/DdJaniModelBuilder.cpp index 6f1e67252..f5ae8e13a 100644 --- a/src/storm/builder/DdJaniModelBuilder.cpp +++ b/src/storm/builder/DdJaniModelBuilder.cpp @@ -1854,6 +1854,7 @@ namespace storm { } } else { auto const& globalVariables = model.getGlobalVariables(); + for (auto const& rewardModelName : options.getRewardModelNames()) { if (globalVariables.hasVariable(rewardModelName)) { result.push_back(globalVariables.getVariable(rewardModelName).getExpressionVariable()); @@ -1866,7 +1867,12 @@ namespace storm { // If no reward model was yet added, but there was one that was given in the options, we try to build the // standard reward model. if (result.empty() && !options.getRewardModelNames().empty()) { - result.push_back(globalVariables.getTransientVariables().front().getExpressionVariable()); + for (auto const& variable : globalVariables.getTransientVariables()) { + if (variable.isRealVariable() || variable.isUnboundedIntegerVariable()) { + result.push_back(variable.getExpressionVariable()); + break; + } + } } } diff --git a/src/storm/builder/DdPrismModelBuilder.cpp b/src/storm/builder/DdPrismModelBuilder.cpp index 149fc8936..b67fc9705 100644 --- a/src/storm/builder/DdPrismModelBuilder.cpp +++ b/src/storm/builder/DdPrismModelBuilder.cpp @@ -1239,7 +1239,7 @@ namespace storm { stateActionDd = transitionMatrix.notZero().existsAbstract(generationInfo.columnMetaVariables).template toAdd(); } stateActionRewardDd *= stateActionDd.get(); - } else if (generationInfo.program.getModelType() == storm::prism::Program::ModelType::CTMC) { + } else if (generationInfo.program.getModelType() == storm::prism::Program::ModelType::DTMC || generationInfo.program.getModelType() == storm::prism::Program::ModelType::CTMC) { // For CTMCs, we need to multiply the entries with the exit rate of the corresponding action. stateActionRewardDd *= actionDd.transitionsDd.sumAbstract(generationInfo.columnMetaVariables); } diff --git a/src/storm/storage/prism/ToJaniConverter.cpp b/src/storm/storage/prism/ToJaniConverter.cpp index 6bc39b83c..7719b08e5 100644 --- a/src/storm/storage/prism/ToJaniConverter.cpp +++ b/src/storm/storage/prism/ToJaniConverter.cpp @@ -113,7 +113,7 @@ namespace storm { // edges and transient assignments that are added to the locations. std::map> transientEdgeAssignments; for (auto const& rewardModel : program.getRewardModels()) { - auto newExpressionVariable = manager->declareRationalVariable(rewardModel.getName().empty() ? "default" : rewardModel.getName()); + auto newExpressionVariable = manager->declareRationalVariable(rewardModel.getName().empty() ? "default_reward_model" : rewardModel.getName()); storm::jani::RealVariable const& newTransientVariable = janiModel.addVariable(storm::jani::RealVariable(rewardModel.getName().empty() ? "default" : rewardModel.getName(), newExpressionVariable, manager->rational(0.0), true)); if (rewardModel.hasStateRewards()) { From 36554b5b877f72ba744ee3d336b0add0e731abdb Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 22 Aug 2017 21:17:30 +0200 Subject: [PATCH 55/95] fixed some issues with reward preservation in dd-based bisimulation --- src/storm/builder/DdPrismModelBuilder.cpp | 2 +- .../storage/dd/BisimulationDecomposition.cpp | 14 ++++++++++--- .../storage/dd/BisimulationDecomposition.h | 2 ++ src/storm/storage/dd/Dd.cpp | 2 +- .../dd/bisimulation/MdpPartitionRefiner.cpp | 8 ++++++- .../dd/bisimulation/MdpPartitionRefiner.h | 2 +- .../dd/bisimulation/PartitionRefiner.cpp | 21 +++++++++++-------- .../dd/bisimulation/PartitionRefiner.h | 6 +++--- 8 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/storm/builder/DdPrismModelBuilder.cpp b/src/storm/builder/DdPrismModelBuilder.cpp index b67fc9705..23f856c58 100644 --- a/src/storm/builder/DdPrismModelBuilder.cpp +++ b/src/storm/builder/DdPrismModelBuilder.cpp @@ -1240,7 +1240,7 @@ namespace storm { } stateActionRewardDd *= stateActionDd.get(); } else if (generationInfo.program.getModelType() == storm::prism::Program::ModelType::DTMC || generationInfo.program.getModelType() == storm::prism::Program::ModelType::CTMC) { - // For CTMCs, we need to multiply the entries with the exit rate of the corresponding action. + // For DTMCs and CTMC, we need to multiply the entries with the multiplicity/exit rate of the corresponding action. stateActionRewardDd *= actionDd.transitionsDd.sumAbstract(generationInfo.columnMetaVariables); } diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index e34a7ddf8..57190ff23 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -29,17 +29,17 @@ namespace storm { template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { - // Intentionally left empty. + this->refineWrtRewardModels(); } template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, formulas, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { - // Intentionally left empty. + this->refineWrtRewardModels(); } template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition, bisimulation::PreservationInformation const& preservationInformation) : model(model), preservationInformation(preservationInformation), refiner(createRefiner(model, initialPartition)) { - STORM_LOG_THROW(!model.hasRewardModel(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support preserving rewards."); + this->refineWrtRewardModels(); } template @@ -79,6 +79,14 @@ namespace storm { return quotient; } + template + void BisimulationDecomposition::refineWrtRewardModels() { + for (auto const& rewardModelName : this->preservationInformation.getRewardModelNames()) { + auto const& rewardModel = this->model.getRewardModel(rewardModelName); + refiner->refineWrtRewardModel(rewardModel); + } + } + template class BisimulationDecomposition; template class BisimulationDecomposition; diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index efc5a0a7f..66e562bea 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -50,6 +50,8 @@ namespace storm { std::shared_ptr> getQuotient() const; private: + void refineWrtRewardModels(); + // The model for which to compute the bisimulation decomposition. storm::models::symbolic::Model const& model; diff --git a/src/storm/storage/dd/Dd.cpp b/src/storm/storage/dd/Dd.cpp index f0619c633..52aaceac2 100644 --- a/src/storm/storage/dd/Dd.cpp +++ b/src/storm/storage/dd/Dd.cpp @@ -78,7 +78,7 @@ namespace storm { template std::set Dd::subtractMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second) { bool includesAllMetaVariables = std::includes(first.getContainedMetaVariables().begin(), first.getContainedMetaVariables().end(), second.getContainedMetaVariables().begin(), second.getContainedMetaVariables().end()); - STORM_LOG_THROW(includesAllMetaVariables, storm::exceptions::InvalidArgumentException, "Cannot subtract meta variables that are not contained in the DD."); + STORM_LOG_WARN_COND(includesAllMetaVariables, "Subtracting from meta variables that are not contained in the DD."); std::set metaVariables; 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/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 5ce9fc504..80ef0761a 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -49,8 +49,14 @@ namespace storm { } template - bool MdpPartitionRefiner::refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) { + bool MdpPartitionRefiner::refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards) { Partition newChoicePartition = this->signatureRefiner.refine(this->choicePartition, Signature(stateActionRewards)); + if (newChoicePartition == this->choicePartition) { + return false; + } else { + this->choicePartition = newChoicePartition; + return true; + } } template class MdpPartitionRefiner; diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h index e5511e939..bafd9d97f 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.h @@ -32,7 +32,7 @@ namespace storm { Partition const& getChoicePartition() const; private: - virtual bool refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) override; + virtual bool refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards) override; // The choice partition in the refinement process. Partition choicePartition; diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index 422f4175b..2cf1cce76 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -73,20 +73,22 @@ namespace storm { } template - bool PartitionRefiner::refineWrtRewardModel(storm::models::symbolic::Model const& model, storm::models::symbolic::StandardRewardModel const& rewardModel) { - STORM_LOG_THROW(rewardModel.hasTransitionRewards(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support transition rewards."); + bool PartitionRefiner::refineWrtRewardModel(storm::models::symbolic::StandardRewardModel const& rewardModel) { + STORM_LOG_THROW(!rewardModel.hasTransitionRewards(), storm::exceptions::NotSupportedException, "Symbolic bisimulation currently does not support transition rewards."); + STORM_LOG_TRACE("Refining with respect to reward model."); bool result = false; - if (rewardModel.hasStateActionRewards()) { - result |= refineWrtStateActionRewards(model, rewardModel.getStateActionRewardVector()); - } if (rewardModel.hasStateRewards()) { - result |= refineWrtStateRewards(model, rewardModel.getStateActionRewardVector()); + result |= refineWrtStateRewards(rewardModel.getStateRewardVector()); + } + if (rewardModel.hasStateActionRewards()) { + result |= refineWrtStateRewards(rewardModel.getStateActionRewardVector()); } return result; } template - bool PartitionRefiner::refineWrtStateRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateRewards) { + bool PartitionRefiner::refineWrtStateRewards(storm::dd::Add const& stateRewards) { + STORM_LOG_TRACE("Refining with respect to state rewards."); Partition newPartition = signatureRefiner.refine(statePartition, Signature(stateRewards)); if (newPartition == statePartition) { return false; @@ -97,9 +99,10 @@ namespace storm { } template - bool PartitionRefiner::refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards) { + bool PartitionRefiner::refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards) { + STORM_LOG_TRACE("Refining with respect to state-action rewards."); // By default, we treat state-action rewards just like state-rewards, which works for DTMCs and CTMCs. - return refineWrtStateRewards(model, stateActionRewards); + return refineWrtStateRewards(stateActionRewards); } template diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.h b/src/storm/storage/dd/bisimulation/PartitionRefiner.h index d8236d6e8..5ae860201 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.h +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.h @@ -36,7 +36,7 @@ namespace storm { * Refines the partition wrt. to the reward model. * @return True iff the partition is stable and no refinement was actually performed. */ - bool refineWrtRewardModel(storm::models::symbolic::Model const& model, storm::models::symbolic::StandardRewardModel const& rewardModel); + bool refineWrtRewardModel(storm::models::symbolic::StandardRewardModel const& rewardModel); /*! * Retrieves the current state partition in the refinement process. @@ -51,8 +51,8 @@ namespace storm { protected: Partition internalRefine(SignatureComputer& stateSignatureComputer, SignatureRefiner& signatureRefiner, Partition const& oldPartition, Partition const& targetPartition, SignatureMode const& mode = SignatureMode::Eager); - virtual bool refineWrtStateRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateRewards); - virtual bool refineWrtStateActionRewards(storm::models::symbolic::Model const& model, storm::dd::Add const& stateActionRewards); + virtual bool refineWrtStateRewards(storm::dd::Add const& stateRewards); + virtual bool refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards); // The current status. Status status; From 11d2ee2fdab3136a049037b4ba8445599d3a7685 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 23 Aug 2017 09:18:05 +0200 Subject: [PATCH 56/95] making sure to add meta variables to transition matrix DD to make sure one can abstract from them later --- src/storm/builder/DdPrismModelBuilder.cpp | 23 +++++++++++++------ src/storm/builder/DdPrismModelBuilder.h | 8 ++++++- src/storm/storage/dd/Dd.cpp | 2 +- .../dd/bisimulation/QuotientExtractor.cpp | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/storm/builder/DdPrismModelBuilder.cpp b/src/storm/builder/DdPrismModelBuilder.cpp index 23f856c58..eea14d863 100644 --- a/src/storm/builder/DdPrismModelBuilder.cpp +++ b/src/storm/builder/DdPrismModelBuilder.cpp @@ -1057,10 +1057,21 @@ namespace storm { } template - storm::dd::Add DdPrismModelBuilder::createSystemFromModule(GenerationInformation& generationInfo, ModuleDecisionDiagram const& module) { + storm::dd::Add DdPrismModelBuilder::createSystemFromModule(GenerationInformation& generationInfo, ModuleDecisionDiagram& module) { + storm::dd::Add result; + + // Make sure all actions contain all necessary meta variables. + module.independentAction.ensureContainsVariables(generationInfo.rowMetaVariables, generationInfo.columnMetaVariables); + for (auto& synchronizingAction : module.synchronizingActionToDecisionDiagramMap) { + synchronizingAction.second.ensureContainsVariables(generationInfo.rowMetaVariables, generationInfo.columnMetaVariables); + } + + + + // If the model is an MDP, we need to encode the nondeterminism using additional variables. if (generationInfo.program.getModelType() == storm::prism::Program::ModelType::MDP) { - storm::dd::Add result = generationInfo.manager->template getAddZero(); + result = generationInfo.manager->template getAddZero(); // First, determine the highest number of nondeterminism variables that is used in any action and make // all actions use the same amout of nondeterminism variables. @@ -1080,6 +1091,7 @@ namespace storm { for (uint_fast64_t i = module.independentAction.numberOfUsedNondeterminismVariables; i < numberOfUsedNondeterminismVariables; ++i) { nondeterminismEncoding *= generationInfo.manager->getEncoding(generationInfo.nondeterminismMetaVariables[i], 0).template toAdd(); } + result = identityEncoding * module.independentAction.transitionsDd * nondeterminismEncoding; // Add variables to synchronized action DDs. @@ -1112,8 +1124,6 @@ namespace storm { for (auto const& synchronizingAction : synchronizingActionToDdMap) { result += synchronizingAction.second; } - - return result; } else if (generationInfo.program.getModelType() == storm::prism::Program::ModelType::DTMC || generationInfo.program.getModelType() == storm::prism::Program::ModelType::CTMC) { // Simply add all actions, but make sure to include the missing global variable identities. @@ -1126,8 +1136,7 @@ namespace storm { identityEncoding *= generationInfo.variableToIdentityMap.at(variable); } - storm::dd::Add result = identityEncoding * module.independentAction.transitionsDd; - + result = identityEncoding * module.independentAction.transitionsDd; for (auto const& synchronizingAction : module.synchronizingActionToDecisionDiagramMap) { // Compute missing global variable identities in synchronizing actions. missingIdentities = std::set(); @@ -1140,10 +1149,10 @@ namespace storm { result += identityEncoding * synchronizingAction.second.transitionsDd; } - return result; } else { STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Illegal model type."); } + return result; } template diff --git a/src/storm/builder/DdPrismModelBuilder.h b/src/storm/builder/DdPrismModelBuilder.h index f3b7adc31..57d990b23 100644 --- a/src/storm/builder/DdPrismModelBuilder.h +++ b/src/storm/builder/DdPrismModelBuilder.h @@ -130,6 +130,12 @@ namespace storm { // Intentionally left empty. } + void ensureContainsVariables(std::set const& rowMetaVariables, std::set const& columnMetaVariables) { + guardDd.addMetaVariables(rowMetaVariables); + transitionsDd.addMetaVariables(rowMetaVariables); + transitionsDd.addMetaVariables(columnMetaVariables); + } + ActionDecisionDiagram(ActionDecisionDiagram const& other) = default; ActionDecisionDiagram& operator=(ActionDecisionDiagram const& other) = default; @@ -228,7 +234,7 @@ namespace storm { static storm::dd::Add getSynchronizationDecisionDiagram(GenerationInformation& generationInfo, uint_fast64_t actionIndex = 0); - static storm::dd::Add createSystemFromModule(GenerationInformation& generationInfo, ModuleDecisionDiagram const& module); + static storm::dd::Add createSystemFromModule(GenerationInformation& generationInfo, ModuleDecisionDiagram& module); static std::unordered_map> createRewardModelDecisionDiagrams(std::vector> const& selectedRewardModels, SystemResult& system, GenerationInformation& generationInfo, ModuleDecisionDiagram const& globalModule, storm::dd::Add const& reachableStatesAdd, storm::dd::Add const& transitionMatrix); diff --git a/src/storm/storage/dd/Dd.cpp b/src/storm/storage/dd/Dd.cpp index 52aaceac2..f0619c633 100644 --- a/src/storm/storage/dd/Dd.cpp +++ b/src/storm/storage/dd/Dd.cpp @@ -78,7 +78,7 @@ namespace storm { template std::set Dd::subtractMetaVariables(storm::dd::Dd const& first, storm::dd::Dd const& second) { bool includesAllMetaVariables = std::includes(first.getContainedMetaVariables().begin(), first.getContainedMetaVariables().end(), second.getContainedMetaVariables().begin(), second.getContainedMetaVariables().end()); - STORM_LOG_WARN_COND(includesAllMetaVariables, "Subtracting from meta variables that are not contained in the DD."); + STORM_LOG_THROW(includesAllMetaVariables, storm::exceptions::InvalidArgumentException, "Cannot subtract meta variables that are not contained in the DD."); std::set metaVariables; 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/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 63ba5d63a..0e6e310f5 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -896,7 +896,7 @@ namespace storm { quotientRewardModels.emplace(rewardModelName, storm::models::sparse::StandardRewardModel(std::move(quotientStateRewards), std::move(quotientStateActionRewards), boost::none)); } - start = std::chrono::high_resolution_clock::now(); + end = std::chrono::high_resolution_clock::now(); STORM_LOG_TRACE("Reward models extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); std::shared_ptr> result; From a7dcdcd84d450061470915d51f105e5651459e5b Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 23 Aug 2017 14:45:19 +0200 Subject: [PATCH 57/95] started on tests and added a ton of debug output --- resources/examples/testfiles/mdp/leader3.nm | 3 + .../dd/bisimulation/MdpPartitionRefiner.cpp | 2 +- .../dd/bisimulation/QuotientExtractor.cpp | 1 + .../dd/bisimulation/SignatureRefiner.cpp | 36 +++-- .../SymbolicBisimulationDecompositionTest.cpp | 146 ++++++++++++++++++ 5 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp diff --git a/resources/examples/testfiles/mdp/leader3.nm b/resources/examples/testfiles/mdp/leader3.nm index 96339dd96..b8f365984 100644 --- a/resources/examples/testfiles/mdp/leader3.nm +++ b/resources/examples/testfiles/mdp/leader3.nm @@ -84,6 +84,9 @@ module process2=process1[s1=s2,p1=p2,c1=c2,sent1=sent2,receive1=receive2,p12=p23 module process3=process1[s1=s3,p1=p3,c1=c3,sent1=sent3,receive1=receive3,p12=p31,p31=p23,c12=c31,c31=c23,p3=p2,c3=c2] endmodule //---------------------------------------------------------------------------------------------------------------------------- +rewards "rounds" + [c12] true : 1; +endrewards //---------------------------------------------------------------------------------------------------------------------------- formula leaders = (s1=4?1:0)+(s2=4?1:0)+(s3=4?1:0); diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 80ef0761a..5381fa915 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -32,7 +32,7 @@ namespace storm { // If the choice partition changed, refine the state partition. Use qualitative mode we must properly abstract from choice counts. STORM_LOG_TRACE("Refining state partition."); Partition newStatePartition = this->internalRefine(this->stateSignatureComputer, this->stateSignatureRefiner, this->statePartition, this->choicePartition, SignatureMode::Qualitative); - + if (newStatePartition == this->statePartition) { this->status = Status::FixedPoint; return false; diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 0e6e310f5..83201cfbe 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -846,6 +846,7 @@ namespace storm { auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); storm::dd::Bdd partitionAsBdd = partition.storedAsAdd() ? partition.asAdd().toBdd() : partition.asBdd(); + partitionAsBdd.exportToDot("part.dot"); partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); auto start = std::chrono::high_resolution_clock::now(); diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index a67fa9962..bf7c0037a 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -26,6 +26,9 @@ #include "sylvan_table.h" #include "sylvan_int.h" +// FIXME: remove +#include "storm/storage/dd/DdManager.h" + namespace storm { namespace dd { namespace bisimulation { @@ -58,7 +61,7 @@ namespace storm { template class InternalSignatureRefiner { public: - InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, storm::dd::Bdd const& nondeterminismVariables, storm::dd::Bdd const& nonBlockVariables) : manager(manager), internalDdManager(manager.getInternalDdManager()), blockVariable(blockVariable), nondeterminismVariables(nondeterminismVariables), nonBlockVariables(nonBlockVariables), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { + InternalSignatureRefiner(storm::dd::DdManager const& manager, storm::expressions::Variable const& blockVariable, storm::dd::Bdd const& nondeterminismVariables, storm::dd::Bdd const& nonBlockVariables) : manager(manager), internalDdManager(manager.getInternalDdManager()), ddman(internalDdManager.getCuddManager().getManager()), blockVariable(blockVariable), nondeterminismVariables(nondeterminismVariables), nonBlockVariables(nonBlockVariables), nextFreeBlockIndex(0), numberOfRefinements(0), lastNumberOfVisitedNodes(10000), signatureCache(lastNumberOfVisitedNodes), reuseBlocksCache(lastNumberOfVisitedNodes) { // Initialize precomputed data. auto const& ddMetaVariable = manager.getMetaVariable(blockVariable); @@ -81,6 +84,7 @@ namespace storm { // Clear the caches. signatureCache.clear(); reuseBlocksCache.clear(); + std::cout << "clearing reuse, " << reuseBlocksCache.size() << std::endl; nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); // Perform the actual recursive refinement step. @@ -98,22 +102,20 @@ namespace storm { blockEncoding[blockDdVariableIndex] = blockIndex & 1 ? 1 : 0; blockIndex >>= 1; } - ::DdManager* ddMan = internalDdManager.getCuddManager().getManager(); - DdNodePtr bddEncoding = Cudd_CubeArrayToBdd(ddMan, blockEncoding.data()); + DdNodePtr bddEncoding = Cudd_CubeArrayToBdd(ddman, blockEncoding.data()); Cudd_Ref(bddEncoding); - DdNodePtr result = Cudd_BddToAdd(ddMan, bddEncoding); + DdNodePtr result = Cudd_BddToAdd(ddman, bddEncoding); Cudd_Ref(result); - Cudd_RecursiveDeref(ddMan, bddEncoding); + Cudd_RecursiveDeref(ddman, bddEncoding); Cudd_Deref(result); return result; } DdNodePtr refine(DdNode* partitionNode, DdNode* signatureNode, DdNode* nondeterminismVariablesNode, DdNode* nonBlockVariablesNode) { - ::DdManager* ddman = internalDdManager.getCuddManager().getManager(); - // If we arrived at the constant zero node, then this was an illegal state encoding (we require // all states to be non-deadlock). if (partitionNode == Cudd_ReadZero(ddman)) { + std::cout << "returning zero " << partitionNode << std::endl; return partitionNode; } @@ -121,6 +123,7 @@ namespace storm { auto nodePair = std::make_pair(signatureNode, partitionNode); auto it = signatureCache.find(nodePair); if (it != signatureCache.end()) { + std::cout << "cache hit " << it->second << std::endl; // If so, we return the corresponding result. return it->second; } @@ -129,13 +132,18 @@ namespace storm { if (Cudd_IsConstant(nonBlockVariablesNode)) { // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. + std::cout << "reuse size: " << reuseBlocksCache.size() << std::endl; auto& reuseEntry = reuseBlocksCache[partitionNode]; + std::cout << "reused? " << reuseEntry.isReused() << std::endl; if (!reuseEntry.isReused()) { reuseEntry.setReused(); + std::cout << "setting " << partitionNode << " to being reused" << std::endl; signatureCache[nodePair] = partitionNode; + std::cout << "reuse cache hit " << partitionNode << std::endl; return partitionNode; } else { DdNode* result = encodeBlock(nextFreeBlockIndex++); + std::cout << "block encoding " << result << std::endl; signatureCache[nodePair] = result; return result; } @@ -190,7 +198,10 @@ namespace storm { Cudd_Ref(thenResult); DdNode* elseResult = refine(partitionElse, signatureElse, offset == 0 ? Cudd_T(nondeterminismVariablesNode) : nondeterminismVariablesNode, Cudd_T(nonBlockVariablesNode)); Cudd_Ref(elseResult); - + + std::cout << "got then " << thenResult << std::endl; + std::cout << "got else " << elseResult << std::endl; + DdNode* result; if (thenResult == elseResult) { Cudd_Deref(thenResult); @@ -200,6 +211,7 @@ namespace storm { // Get the node to connect the subresults. bool complemented = Cudd_IsComplement(thenResult); result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset, Cudd_Regular(thenResult), complemented ? Cudd_Not(elseResult) : elseResult); + std::cout << "got " << result << " as a result node, idx " << (Cudd_NodeReadIndex(nonBlockVariablesNode) + offset) << " and children " << Cudd_NodeReadIndex(thenResult) << " [" << Cudd_IsConstant(thenResult) << "] (" << thenResult << ") and " << Cudd_NodeReadIndex(elseResult) << " [" << Cudd_IsConstant(elseResult) << "] (" << elseResult << ")" << std::endl; if (complemented) { result = Cudd_Not(result); } @@ -210,12 +222,14 @@ namespace storm { // Store the result in the cache. signatureCache[nodePair] = result; + std::cout << "returning " << result << " with index " << Cudd_NodeReadIndex(result) << ", const? " << Cudd_IsConstant(result) << std::endl; return result; } } storm::dd::DdManager const& manager; storm::dd::InternalDdManager const& internalDdManager; + ::DdManager* ddman; storm::expressions::Variable const& blockVariable; // The cubes representing all non-block and all nondeterminism variables, respectively. @@ -480,7 +494,11 @@ namespace storm { template Partition SignatureRefiner::refine(Partition const& oldPartition, Signature const& signature) { - return internalRefiner->refine(oldPartition, signature); + oldPartition.asAdd().getDdManager().debugCheck(); + oldPartition.asAdd().exportToDot("lastpart.dot"); + Partition result = internalRefiner->refine(oldPartition, signature); + oldPartition.asAdd().getDdManager().debugCheck(); + return result; } template class SignatureRefiner; diff --git a/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp b/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp new file mode 100644 index 000000000..df250bc59 --- /dev/null +++ b/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp @@ -0,0 +1,146 @@ +#include "gtest/gtest.h" +#include "storm-config.h" + +#include "storm/parser/PrismParser.h" +#include "storm/parser/FormulaParser.h" + +#include "storm/builder/DdPrismModelBuilder.h" + +#include "storm/storage/dd/BisimulationDecomposition.h" +#include "storm/storage/SymbolicModelDescription.h" + +#include "storm/models/sparse/Mdp.h" +#include "storm/models/sparse/StandardRewardModel.h" + +#include "storm/models/symbolic/Mdp.h" +#include "storm/models/symbolic/StandardRewardModel.h" + +TEST(SymbolicModelBisimulationDecomposition, Die_Cudd) { + storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/die.pm"); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(program); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::storage::BisimulationType::Strong); + decomposition.compute(); + std::shared_ptr> quotient = decomposition.getQuotient(); + + EXPECT_EQ(11ul, quotient->getNumberOfStates()); + EXPECT_EQ(17ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Dtmc, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + + storm::parser::FormulaParser formulaParser; + std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("P=? [F \"two\"]"); + + std::vector> formulas; + formulas.push_back(formula); + + storm::dd::BisimulationDecomposition decomposition2(*model, formulas, storm::storage::BisimulationType::Strong); + decomposition2.compute(); + quotient = decomposition2.getQuotient(); + + EXPECT_EQ(5ul, quotient->getNumberOfStates()); + EXPECT_EQ(8ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Dtmc, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); +} + +TEST(SymbolicModelBisimulationDecomposition, Crowds_Cudd) { + storm::storage::SymbolicModelDescription smd = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/crowds5_5.pm"); + + // Preprocess model to substitute all constants. + smd = smd.preprocess(); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(smd.asPrismProgram()); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::storage::BisimulationType::Strong); + decomposition.compute(); + std::shared_ptr> quotient = decomposition.getQuotient(); + + EXPECT_EQ(2007ul, quotient->getNumberOfStates()); + EXPECT_EQ(3738ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Dtmc, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + + storm::parser::FormulaParser formulaParser; + std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("P=? [F \"observe0Greater1\"]"); + + std::vector> formulas; + formulas.push_back(formula); + + storm::dd::BisimulationDecomposition decomposition2(*model, formulas, storm::storage::BisimulationType::Strong); + decomposition2.compute(); + quotient = decomposition2.getQuotient(); + + EXPECT_EQ(65ul, quotient->getNumberOfStates()); + EXPECT_EQ(105ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Dtmc, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); +} + +TEST(SymbolicModelBisimulationDecomposition, TwoDice_Cudd) { + storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/two_dice.nm"); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(program); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::storage::BisimulationType::Strong); + decomposition.compute(); + std::shared_ptr> quotient = decomposition.getQuotient(); + + EXPECT_EQ(77ul, quotient->getNumberOfStates()); + EXPECT_EQ(210ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Mdp, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + EXPECT_EQ(116ul, (quotient->as>()->getNumberOfChoices())); + + storm::parser::FormulaParser formulaParser; + std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("Pmin=? [F \"two\"]"); + + std::vector> formulas; + formulas.push_back(formula); + + storm::dd::BisimulationDecomposition decomposition2(*model, formulas, storm::storage::BisimulationType::Strong); + decomposition2.compute(); + quotient = decomposition2.getQuotient(); + + EXPECT_EQ(19ul, quotient->getNumberOfStates()); + EXPECT_EQ(58ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Mdp, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + EXPECT_EQ(34ul, (quotient->as>()->getNumberOfChoices())); +} + +TEST(SymbolicModelBisimulationDecomposition, AsynchronousLeader_Cudd) { + storm::storage::SymbolicModelDescription smd = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/leader4.nm"); + + // Preprocess model to substitute all constants. + smd = smd.preprocess(); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(smd.asPrismProgram()); + + storm::dd::BisimulationDecomposition decomposition(*model, storm::storage::BisimulationType::Strong); + decomposition.compute(); + std::shared_ptr> quotient = decomposition.getQuotient(); + + EXPECT_EQ(252ul, quotient->getNumberOfStates()); + EXPECT_EQ(624ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Mdp, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + EXPECT_EQ(500ul, (quotient->as>()->getNumberOfChoices())); + + storm::parser::FormulaParser formulaParser; + std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); + + std::vector> formulas; + formulas.push_back(formula); + + storm::dd::BisimulationDecomposition decomposition2(*model, formulas, storm::storage::BisimulationType::Strong); + decomposition2.compute(); + quotient = decomposition2.getQuotient(); + + EXPECT_EQ(19ul, quotient->getNumberOfStates()); + EXPECT_EQ(58ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(storm::models::ModelType::Mdp, quotient->getType()); + EXPECT_TRUE(quotient->isSymbolicModel()); + EXPECT_EQ(34ul, (quotient->as>()->getNumberOfChoices())); +} From d2a493a92d1715bddd0ac41ae729fb25f83b9fdd Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 23 Aug 2017 18:37:37 +0200 Subject: [PATCH 58/95] fixed several crucial bugs related to dd bisimulation, tests now passing --- src/storm/storage/dd/Add.cpp | 4 ++-- src/storm/storage/dd/Add.h | 2 +- src/storm/storage/dd/Bdd.cpp | 4 ++-- src/storm/storage/dd/Bdd.h | 2 +- src/storm/storage/dd/Dd.h | 2 +- .../dd/bisimulation/MdpPartitionRefiner.cpp | 3 +++ src/storm/storage/dd/bisimulation/Partition.cpp | 2 +- .../storage/dd/bisimulation/PartitionRefiner.cpp | 2 +- .../storage/dd/bisimulation/SignatureRefiner.cpp | 16 ---------------- src/storm/storage/dd/cudd/InternalCuddAdd.cpp | 8 ++++++-- src/storm/storage/dd/cudd/InternalCuddAdd.h | 2 +- src/storm/storage/dd/cudd/InternalCuddBdd.cpp | 8 ++++++-- src/storm/storage/dd/cudd/InternalCuddBdd.h | 2 +- .../storage/dd/sylvan/InternalSylvanAdd.cpp | 2 +- src/storm/storage/dd/sylvan/InternalSylvanAdd.h | 2 +- .../storage/dd/sylvan/InternalSylvanBdd.cpp | 2 +- src/storm/storage/dd/sylvan/InternalSylvanBdd.h | 2 +- .../SymbolicBisimulationDecompositionTest.cpp | 14 +++++++------- 18 files changed, 37 insertions(+), 42 deletions(-) diff --git a/src/storm/storage/dd/Add.cpp b/src/storm/storage/dd/Add.cpp index b76219624..0a1d25553 100644 --- a/src/storm/storage/dd/Add.cpp +++ b/src/storm/storage/dd/Add.cpp @@ -831,8 +831,8 @@ namespace storm { } template - void Add::exportToDot(std::string const& filename) const { - internalAdd.exportToDot(filename, this->getDdManager().getDdVariableNames()); + void Add::exportToDot(std::string const& filename, bool showVariablesIfPossible) const { + internalAdd.exportToDot(filename, this->getDdManager().getDdVariableNames(), showVariablesIfPossible); } template diff --git a/src/storm/storage/dd/Add.h b/src/storm/storage/dd/Add.h index c3d32ab0c..ebd0cb9b3 100644 --- a/src/storm/storage/dd/Add.h +++ b/src/storm/storage/dd/Add.h @@ -618,7 +618,7 @@ namespace storm { * * @param filename The name of the file to which the DD is to be exported. */ - void exportToDot(std::string const& filename) const override; + void exportToDot(std::string const& filename, bool showVariablesIfPossible = true) const override; /*! * Retrieves an iterator that points to the first meta variable assignment with a non-zero function value. diff --git a/src/storm/storage/dd/Bdd.cpp b/src/storm/storage/dd/Bdd.cpp index 2f21a5ef4..3303cc983 100644 --- a/src/storm/storage/dd/Bdd.cpp +++ b/src/storm/storage/dd/Bdd.cpp @@ -380,8 +380,8 @@ namespace storm { } template - void Bdd::exportToDot(std::string const& filename) const { - internalBdd.exportToDot(filename, this->getDdManager().getDdVariableNames()); + void Bdd::exportToDot(std::string const& filename, bool showVariablesIfPossible) const { + internalBdd.exportToDot(filename, this->getDdManager().getDdVariableNames(), showVariablesIfPossible); } template diff --git a/src/storm/storage/dd/Bdd.h b/src/storm/storage/dd/Bdd.h index b8ec614f6..41d6b2b86 100644 --- a/src/storm/storage/dd/Bdd.h +++ b/src/storm/storage/dd/Bdd.h @@ -337,7 +337,7 @@ namespace storm { virtual uint_fast64_t getLevel() const override; - virtual void exportToDot(std::string const& filename) const override; + virtual void exportToDot(std::string const& filename, bool showVariablesIfPossible = true) const override; /*! * Retrieves the cube of all given meta variables. diff --git a/src/storm/storage/dd/Dd.h b/src/storm/storage/dd/Dd.h index 765416bfe..e3f7890fb 100644 --- a/src/storm/storage/dd/Dd.h +++ b/src/storm/storage/dd/Dd.h @@ -102,7 +102,7 @@ namespace storm { * * @param filename The name of the file to which the DD is to be exported. */ - virtual void exportToDot(std::string const& filename) const = 0; + virtual void exportToDot(std::string const& filename, bool showVariablesIfPossible = true) const = 0; /*! * Retrieves the manager that is responsible for this DD. diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index 5381fa915..bda068db9 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -50,6 +50,9 @@ namespace storm { template bool MdpPartitionRefiner::refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards) { + STORM_LOG_TRACE("Refining with respect to state-action rewards."); + stateActionRewards.exportToDot("stateactrew.dot", false); + this->choicePartition.asAdd().exportToDot("choicepart.dot"); Partition newChoicePartition = this->signatureRefiner.refine(this->choicePartition, Signature(stateActionRewards)); if (newChoicePartition == this->choicePartition) { return false; diff --git a/src/storm/storage/dd/bisimulation/Partition.cpp b/src/storm/storage/dd/bisimulation/Partition.cpp index fb64f9381..0fa4dffd4 100644 --- a/src/storm/storage/dd/bisimulation/Partition.cpp +++ b/src/storm/storage/dd/bisimulation/Partition.cpp @@ -100,7 +100,7 @@ namespace storm { template Partition Partition::createTrivialChoicePartition(storm::models::symbolic::NondeterministicModel const& model, std::pair const& blockVariables) { - storm::dd::Bdd choicePartitionBdd = !model.getIllegalSuccessorMask() && model.getManager().getEncoding(blockVariables.first, 0, false); + storm::dd::Bdd choicePartitionBdd = !model.getIllegalMask().renameVariables(model.getRowVariables(), model.getColumnVariables()) && model.getManager().getEncoding(blockVariables.first, 0, false); // Store the partition as an ADD only in the case of CUDD. if (DdType == storm::dd::DdType::CUDD) { diff --git a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp index 2cf1cce76..e06d9db41 100644 --- a/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/PartitionRefiner.cpp @@ -81,7 +81,7 @@ namespace storm { result |= refineWrtStateRewards(rewardModel.getStateRewardVector()); } if (rewardModel.hasStateActionRewards()) { - result |= refineWrtStateRewards(rewardModel.getStateActionRewardVector()); + result |= refineWrtStateActionRewards(rewardModel.getStateActionRewardVector()); } return result; } diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index bf7c0037a..59ea80db0 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -84,7 +84,6 @@ namespace storm { // Clear the caches. signatureCache.clear(); reuseBlocksCache.clear(); - std::cout << "clearing reuse, " << reuseBlocksCache.size() << std::endl; nextFreeBlockIndex = oldPartition.getNextFreeBlockIndex(); // Perform the actual recursive refinement step. @@ -115,7 +114,6 @@ namespace storm { // If we arrived at the constant zero node, then this was an illegal state encoding (we require // all states to be non-deadlock). if (partitionNode == Cudd_ReadZero(ddman)) { - std::cout << "returning zero " << partitionNode << std::endl; return partitionNode; } @@ -123,7 +121,6 @@ namespace storm { auto nodePair = std::make_pair(signatureNode, partitionNode); auto it = signatureCache.find(nodePair); if (it != signatureCache.end()) { - std::cout << "cache hit " << it->second << std::endl; // If so, we return the corresponding result. return it->second; } @@ -132,18 +129,13 @@ namespace storm { if (Cudd_IsConstant(nonBlockVariablesNode)) { // If this is the first time (in this traversal) that we encounter this signature, we check // whether we can assign the old block number to it. - std::cout << "reuse size: " << reuseBlocksCache.size() << std::endl; auto& reuseEntry = reuseBlocksCache[partitionNode]; - std::cout << "reused? " << reuseEntry.isReused() << std::endl; if (!reuseEntry.isReused()) { reuseEntry.setReused(); - std::cout << "setting " << partitionNode << " to being reused" << std::endl; signatureCache[nodePair] = partitionNode; - std::cout << "reuse cache hit " << partitionNode << std::endl; return partitionNode; } else { DdNode* result = encodeBlock(nextFreeBlockIndex++); - std::cout << "block encoding " << result << std::endl; signatureCache[nodePair] = result; return result; } @@ -199,9 +191,6 @@ namespace storm { DdNode* elseResult = refine(partitionElse, signatureElse, offset == 0 ? Cudd_T(nondeterminismVariablesNode) : nondeterminismVariablesNode, Cudd_T(nonBlockVariablesNode)); Cudd_Ref(elseResult); - std::cout << "got then " << thenResult << std::endl; - std::cout << "got else " << elseResult << std::endl; - DdNode* result; if (thenResult == elseResult) { Cudd_Deref(thenResult); @@ -211,7 +200,6 @@ namespace storm { // Get the node to connect the subresults. bool complemented = Cudd_IsComplement(thenResult); result = cuddUniqueInter(ddman, Cudd_NodeReadIndex(nonBlockVariablesNode) + offset, Cudd_Regular(thenResult), complemented ? Cudd_Not(elseResult) : elseResult); - std::cout << "got " << result << " as a result node, idx " << (Cudd_NodeReadIndex(nonBlockVariablesNode) + offset) << " and children " << Cudd_NodeReadIndex(thenResult) << " [" << Cudd_IsConstant(thenResult) << "] (" << thenResult << ") and " << Cudd_NodeReadIndex(elseResult) << " [" << Cudd_IsConstant(elseResult) << "] (" << elseResult << ")" << std::endl; if (complemented) { result = Cudd_Not(result); } @@ -222,7 +210,6 @@ namespace storm { // Store the result in the cache. signatureCache[nodePair] = result; - std::cout << "returning " << result << " with index " << Cudd_NodeReadIndex(result) << ", const? " << Cudd_IsConstant(result) << std::endl; return result; } } @@ -494,10 +481,7 @@ namespace storm { template Partition SignatureRefiner::refine(Partition const& oldPartition, Signature const& signature) { - oldPartition.asAdd().getDdManager().debugCheck(); - oldPartition.asAdd().exportToDot("lastpart.dot"); Partition result = internalRefiner->refine(oldPartition, signature); - oldPartition.asAdd().getDdManager().debugCheck(); return result; } diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp index e6a13ab89..187968f23 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.cpp @@ -322,7 +322,7 @@ namespace storm { } template - void InternalAdd::exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const { + void InternalAdd::exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible) const { // Build the name input of the DD. std::vector ddNames; std::string ddName("f"); @@ -339,7 +339,11 @@ namespace storm { // Open the file, dump the DD and close it again. FILE* filePointer = fopen(filename.c_str() , "w"); std::vector cuddAddVector = { this->getCuddAdd() }; - ddManager->getCuddManager().DumpDot(cuddAddVector, &ddVariableNames[0], &ddNames[0], filePointer); + if (showVariablesIfPossible) { + ddManager->getCuddManager().DumpDot(cuddAddVector, ddVariableNames.data(), &ddNames[0], filePointer); + } else { + ddManager->getCuddManager().DumpDot(cuddAddVector, nullptr, &ddNames[0], filePointer); + } fclose(filePointer); // Finally, delete the names. diff --git a/src/storm/storage/dd/cudd/InternalCuddAdd.h b/src/storm/storage/dd/cudd/InternalCuddAdd.h index b37499898..cc619cd11 100644 --- a/src/storm/storage/dd/cudd/InternalCuddAdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddAdd.h @@ -494,7 +494,7 @@ namespace storm { * @param filename The name of the file to which the DD is to be exported. * @param ddVariableNamesAsString The names of the DD variables to display in the dot file. */ - void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const; + void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible = true) const; /*! * Retrieves an iterator that points to the first meta variable assignment with a non-zero function value. diff --git a/src/storm/storage/dd/cudd/InternalCuddBdd.cpp b/src/storm/storage/dd/cudd/InternalCuddBdd.cpp index 8d8264dd7..87051bfc6 100644 --- a/src/storm/storage/dd/cudd/InternalCuddBdd.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddBdd.cpp @@ -179,7 +179,7 @@ namespace storm { return static_cast(ddManager->getCuddManager().ReadPerm(this->getIndex())); } - void InternalBdd::exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const { + void InternalBdd::exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible) const { // Build the name input of the DD. std::vector ddNames; std::string ddName("f"); @@ -196,7 +196,11 @@ namespace storm { // Open the file, dump the DD and close it again. std::vector cuddBddVector = { this->getCuddBdd() }; FILE* filePointer = fopen(filename.c_str() , "w"); - ddManager->getCuddManager().DumpDot(cuddBddVector, &ddVariableNames[0], &ddNames[0], filePointer); + if (showVariablesIfPossible) { + ddManager->getCuddManager().DumpDot(cuddBddVector, ddVariableNames.data(), &ddNames[0], filePointer); + } else { + ddManager->getCuddManager().DumpDot(cuddBddVector, nullptr, &ddNames[0], filePointer); + } fclose(filePointer); // Finally, delete the names. diff --git a/src/storm/storage/dd/cudd/InternalCuddBdd.h b/src/storm/storage/dd/cudd/InternalCuddBdd.h index 36a200a56..93c54c0c8 100644 --- a/src/storm/storage/dd/cudd/InternalCuddBdd.h +++ b/src/storm/storage/dd/cudd/InternalCuddBdd.h @@ -327,7 +327,7 @@ namespace storm { * @param filename The name of the file to which the BDD is to be exported. * @param ddVariableNamesAsStrings The names of the variables to display in the dot file. */ - void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const; + void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible = true) const; /*! * Converts a BDD to an equivalent ADD. diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index cf73720dd..47b5ffa8d 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -783,7 +783,7 @@ namespace storm { } template - void InternalAdd::exportToDot(std::string const& filename, std::vector const&) const { + void InternalAdd::exportToDot(std::string const& filename, std::vector const&, bool) const { // Open the file, dump the DD and close it again. FILE* filePointer = fopen(filename.c_str() , "w"); this->sylvanMtbdd.PrintDot(filePointer); diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h index 8869099ca..687d829af 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h @@ -497,7 +497,7 @@ namespace storm { * @param filename The name of the file to which the DD is to be exported. * @param ddVariableNamesAsString The names of the DD variables to display in the dot file. */ - void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const; + void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible = true) const; /*! * Retrieves an iterator that points to the first meta variable assignment with a non-zero function value. diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp index cb3bd74b2..6868b6972 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp @@ -232,7 +232,7 @@ namespace storm { return this->getIndex(); } - void InternalBdd::exportToDot(std::string const& filename, std::vector const&) const { + void InternalBdd::exportToDot(std::string const& filename, std::vector const&, bool) const { FILE* filePointer = fopen(filename.c_str() , "w"); this->sylvanBdd.PrintDot(filePointer); fclose(filePointer); diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h index fc0fc2a83..54371a3c3 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h @@ -316,7 +316,7 @@ namespace storm { * @param filename The name of the file to which the BDD is to be exported. * @param ddVariableNamesAsStrings The names of the variables to display in the dot file. */ - void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings) const; + void exportToDot(std::string const& filename, std::vector const& ddVariableNamesAsStrings, bool showVariablesIfPossible = true) const; /*! * Converts a BDD to an equivalent ADD. diff --git a/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp b/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp index df250bc59..7c174b018 100644 --- a/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp +++ b/src/test/storm/storage/SymbolicBisimulationDecompositionTest.cpp @@ -116,7 +116,10 @@ TEST(SymbolicModelBisimulationDecomposition, AsynchronousLeader_Cudd) { // Preprocess model to substitute all constants. smd = smd.preprocess(); - std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(smd.asPrismProgram()); + storm::parser::FormulaParser formulaParser; + std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); + + std::shared_ptr> model = storm::builder::DdPrismModelBuilder().build(smd.asPrismProgram(), *formula); storm::dd::BisimulationDecomposition decomposition(*model, storm::storage::BisimulationType::Strong); decomposition.compute(); @@ -128,9 +131,6 @@ TEST(SymbolicModelBisimulationDecomposition, AsynchronousLeader_Cudd) { EXPECT_TRUE(quotient->isSymbolicModel()); EXPECT_EQ(500ul, (quotient->as>()->getNumberOfChoices())); - storm::parser::FormulaParser formulaParser; - std::shared_ptr formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); - std::vector> formulas; formulas.push_back(formula); @@ -138,9 +138,9 @@ TEST(SymbolicModelBisimulationDecomposition, AsynchronousLeader_Cudd) { decomposition2.compute(); quotient = decomposition2.getQuotient(); - EXPECT_EQ(19ul, quotient->getNumberOfStates()); - EXPECT_EQ(58ul, quotient->getNumberOfTransitions()); + EXPECT_EQ(252ul, quotient->getNumberOfStates()); + EXPECT_EQ(624ul, quotient->getNumberOfTransitions()); EXPECT_EQ(storm::models::ModelType::Mdp, quotient->getType()); EXPECT_TRUE(quotient->isSymbolicModel()); - EXPECT_EQ(34ul, (quotient->as>()->getNumberOfChoices())); + EXPECT_EQ(500ul, (quotient->as>()->getNumberOfChoices())); } From ee87067c9a27c68ead109989f093b35a05f8aec0 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 24 Aug 2017 09:13:30 +0200 Subject: [PATCH 59/95] fixed type to make gcc happy --- src/storm/storage/dd/DdManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index dbba10a29..6a00b4cbf 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -215,7 +215,7 @@ namespace storm { template std::vector DdManager::addMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, uint64_t numberOfLayers, boost::optional> const& position) { - return this->addMetaVariableHelper(MetaVariableType::Int, name, std::max(static_cast(std::ceil(std::log2(high - low + 1))), 1ull), numberOfLayers, position, std::make_pair(low, high)); + return this->addMetaVariableHelper(MetaVariableType::Int, name, std::max(static_cast(std::ceil(std::log2(high - low + 1))), static_cast(1)), numberOfLayers, position, std::make_pair(low, high)); } template From 6bebb3c9d52d50290dab9cdc28c4b978476edf14 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 24 Aug 2017 11:00:19 +0200 Subject: [PATCH 60/95] fix bug in rational number/function handling with sylvan --- .../sylvan/src/sylvan_storm_rational_function.c | 4 ++-- .../sylvan/src/sylvan_storm_rational_number.c | 4 ++-- src/storm/solver/SymbolicLinearEquationSolver.cpp | 1 - .../storage/dd/bisimulation/QuotientExtractor.cpp | 12 ++++++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c index 4362077aa..5f21b9d11 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_function.c @@ -554,7 +554,7 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_function_op_threshold, MTBDD, a, size_t if (mtbdd_isleaf(a)) { storm_rational_function_ptr ma = mtbdd_getstorm_rational_function_ptr(a); - return storm_rational_function_less_or_equal(ma, value) ? mtbdd_false : mtbdd_true; + return storm_rational_function_less(ma, value) ? mtbdd_false : mtbdd_true; } return mtbdd_invalid; @@ -566,7 +566,7 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_function_op_strict_threshold, MTBDD, a, if (mtbdd_isleaf(a)) { storm_rational_function_ptr ma = mtbdd_getstorm_rational_function_ptr(a); - return storm_rational_function_less(ma, value) ? mtbdd_false : mtbdd_true; + return storm_rational_function_less_or_equal(ma, value) ? mtbdd_false : mtbdd_true; } return mtbdd_invalid; diff --git a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c index eb739693a..22f9ef053 100644 --- a/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c +++ b/resources/3rdparty/sylvan/src/sylvan_storm_rational_number.c @@ -588,7 +588,7 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_number_op_threshold, MTBDD, a, size_t*, if (mtbdd_isleaf(a)) { storm_rational_number_ptr ma = mtbdd_getstorm_rational_number_ptr(a); - return storm_rational_number_less_or_equal(ma, value) ? mtbdd_false : mtbdd_true; + return storm_rational_number_less(ma, value) ? mtbdd_false : mtbdd_true; } return mtbdd_invalid; @@ -600,7 +600,7 @@ TASK_IMPL_2(MTBDD, sylvan_storm_rational_number_op_strict_threshold, MTBDD, a, s if (mtbdd_isleaf(a)) { storm_rational_number_ptr ma = mtbdd_getstorm_rational_number_ptr(a); - return storm_rational_number_less(ma, value) ? mtbdd_false : mtbdd_true; + return storm_rational_number_less_or_equal(ma, value) ? mtbdd_false : mtbdd_true; } return mtbdd_invalid; diff --git a/src/storm/solver/SymbolicLinearEquationSolver.cpp b/src/storm/solver/SymbolicLinearEquationSolver.cpp index 0a80a3afc..c6a75b6ce 100644 --- a/src/storm/solver/SymbolicLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicLinearEquationSolver.cpp @@ -59,7 +59,6 @@ namespace storm { } } - template std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index 83201cfbe..feaeb4313 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -846,7 +846,6 @@ namespace storm { auto states = partition.getStates().swapVariables(model.getRowColumnMetaVariablePairs()); storm::dd::Bdd partitionAsBdd = partition.storedAsAdd() ? partition.asAdd().toBdd() : partition.asBdd(); - partitionAsBdd.exportToDot("part.dot"); partitionAsBdd = partitionAsBdd.renameVariables(model.getColumnVariables(), model.getRowVariables()); auto start = std::chrono::high_resolution_clock::now(); @@ -968,13 +967,18 @@ namespace storm { STORM_LOG_TRACE("Quotient labels extracted in " << std::chrono::duration_cast(end - start).count() << "ms."); start = std::chrono::high_resolution_clock::now(); - storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsBdd.renameVariables(blockVariableSet, blockPrimeVariableSet).renameVariables(model.getRowVariables(), model.getColumnVariables()), model.getColumnVariables()); + std::set blockAndRowVariables; + std::set_union(blockVariableSet.begin(), blockVariableSet.end(), model.getRowVariables().begin(), model.getRowVariables().end(), std::inserter(blockAndRowVariables, blockAndRowVariables.end())); + std::set blockPrimeAndColumnVariables; + std::set_union(blockPrimeVariableSet.begin(), blockPrimeVariableSet.end(), model.getColumnVariables().begin(), model.getColumnVariables().end(), std::inserter(blockPrimeAndColumnVariables, blockPrimeAndColumnVariables.end())); + storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); + storm::dd::Add quotientTransitionMatrix = model.getTransitionMatrix().multiplyMatrix(partitionAsAdd.renameVariables(blockAndRowVariables, blockPrimeAndColumnVariables), model.getColumnVariables()); // Pick a representative from each block. auto representatives = InternalRepresentativeComputer(partitionAsBdd, model.getRowVariables()).getRepresentatives(); partitionAsBdd &= representatives; - storm::dd::Add partitionAsAdd = partitionAsBdd.template toAdd(); - + partitionAsAdd *= partitionAsBdd.template toAdd(); + quotientTransitionMatrix = quotientTransitionMatrix.multiplyMatrix(partitionAsAdd, model.getRowVariables()); end = std::chrono::high_resolution_clock::now(); From 5856d9fe51161f05f12ce156eb762a8180ffcffa Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 24 Aug 2017 12:48:37 +0200 Subject: [PATCH 61/95] removed some debug output --- src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp index bda068db9..a79c67720 100644 --- a/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/MdpPartitionRefiner.cpp @@ -51,8 +51,6 @@ namespace storm { template bool MdpPartitionRefiner::refineWrtStateActionRewards(storm::dd::Add const& stateActionRewards) { STORM_LOG_TRACE("Refining with respect to state-action rewards."); - stateActionRewards.exportToDot("stateactrew.dot", false); - this->choicePartition.asAdd().exportToDot("choicepart.dot"); Partition newChoicePartition = this->signatureRefiner.refine(this->choicePartition, Signature(stateActionRewards)); if (newChoicePartition == this->choicePartition) { return false; From e2e1407f3e720fc7365a8bd3c34ab5a592387a40 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 25 Aug 2017 09:58:14 +0200 Subject: [PATCH 62/95] not calling sylvan_var on leaf nodes of sylvan anymore --- CHANGELOG.md | 1 + .../3rdparty/sylvan/src/storm_wrapper.cpp | 2 ++ .../solver/SymbolicLinearEquationSolver.cpp | 6 ++--- .../dd/bisimulation/QuotientExtractor.cpp | 23 ++++++++++--------- .../dd/bisimulation/SignatureRefiner.cpp | 4 ++-- .../storage/dd/sylvan/InternalSylvanAdd.cpp | 5 ++++ .../storage/dd/sylvan/InternalSylvanAdd.h | 10 ++++++++ .../storage/dd/sylvan/InternalSylvanBdd.cpp | 10 +++++--- .../storage/dd/sylvan/InternalSylvanBdd.h | 10 ++++++++ 9 files changed, 51 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56004ed4f..75d2a807c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Long run average computation via ValueIteration, LP based MDP model checking, pa - c++ api changes: Building model takes BuilderOptions instead of extended list of Booleans, does not depend on settings anymore. - storm-cli-utilities now contains cli related stuff, instead of storm-lib - storm-pars: support for welldefinedness constraints in mdps. +- symbolic (MT/BDD) bisimulation ### Version 1.1.0 (2017/8) diff --git a/resources/3rdparty/sylvan/src/storm_wrapper.cpp b/resources/3rdparty/sylvan/src/storm_wrapper.cpp index fb92720d0..09fb51ccf 100644 --- a/resources/3rdparty/sylvan/src/storm_wrapper.cpp +++ b/resources/3rdparty/sylvan/src/storm_wrapper.cpp @@ -125,6 +125,8 @@ int storm_rational_number_is_zero(storm_rational_number_ptr a) { std::lock_guard lock(rationalNumberMutex); #endif + std::cout << "got ptr for eq check " << a << std::endl; + return storm::utility::isZero(*(storm::RationalNumber const*)a) ? 1 : 0; } diff --git a/src/storm/solver/SymbolicLinearEquationSolver.cpp b/src/storm/solver/SymbolicLinearEquationSolver.cpp index d12f1f420..75fe87254 100644 --- a/src/storm/solver/SymbolicLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicLinearEquationSolver.cpp @@ -63,12 +63,10 @@ namespace storm { std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { auto const& coreSettings = storm::settings::getModule(); - storm::solver::EquationSolverType equationSolver; - if (coreSettings.isEquationSolverSetFromDefaultValue()) { + storm::solver::EquationSolverType equationSolver = coreSettings.getEquationSolver(); + if (coreSettings.isEquationSolverSetFromDefaultValue() && equationSolver != storm::solver::EquationSolverType::Elimination) { STORM_LOG_WARN("Selecting the elimination solver to guarantee exact results. If you want to override this, please explicitly specify a different equation solver."); equationSolver = storm::solver::EquationSolverType::Elimination; - } else { - equationSolver = coreSettings.getEquationSolver(); } if (equationSolver != storm::solver::EquationSolverType::Elimination) { diff --git a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp index feaeb4313..6385c1d93 100644 --- a/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp +++ b/src/storm/storage/dd/bisimulation/QuotientExtractor.cpp @@ -175,7 +175,7 @@ namespace storm { bool skipped = false; BDD elsePartitionNode; BDD thenPartitionNode; - if (sylvan_var(partitionNode) == sylvan_var(stateVariablesCube)) { + if (storm::dd::InternalBdd::matchesVariableIndex(partitionNode, sylvan_var(stateVariablesCube))) { elsePartitionNode = sylvan_low(partitionNode); thenPartitionNode = sylvan_high(partitionNode); } else { @@ -652,7 +652,7 @@ namespace storm { } else { MTBDD vectorT; MTBDD vectorE; - if (sylvan_var(vector) == sylvan_var(variables)) { + if (storm::dd::InternalAdd::matchesVariableIndex(vector, sylvan_var(variables))) { vectorT = sylvan_high(vector); vectorE = sylvan_low(vector); } else { @@ -661,7 +661,7 @@ namespace storm { BDD representativesT; BDD representativesE; - if (sylvan_var(representativesNode) == sylvan_var(variables)) { + if (storm::dd::InternalBdd::matchesVariableIndex(representativesNode, sylvan_var(variables))) { representativesT = sylvan_high(representativesNode); representativesE = sylvan_low(representativesNode); } else { @@ -692,7 +692,7 @@ namespace storm { STORM_LOG_ASSERT(!odd.isTerminalNode(), "Expected non-terminal node."); BDD partitionT; BDD partitionE; - if (sylvan_var(partitionNode) == sylvan_var(variables)) { + if (storm::dd::InternalBdd::matchesVariableIndex(partitionNode, sylvan_var(variables))) { partitionT = sylvan_high(partitionNode); partitionE = sylvan_low(partitionNode); } else { @@ -701,7 +701,7 @@ namespace storm { BDD representativesT; BDD representativesE; - if (sylvan_var(representativesNode) == sylvan_var(variables)) { + if (storm::dd::InternalBdd::matchesVariableIndex(representativesNode, sylvan_var(variables))) { representativesT = sylvan_high(representativesNode); representativesE = sylvan_low(representativesNode); } else { @@ -714,6 +714,7 @@ namespace storm { } void extractTransitionMatrixRec(MTBDD transitionMatrixNode, storm::dd::Odd const& sourceOdd, uint64_t sourceOffset, BDD targetPartitionNode, BDD representativesNode, BDD variables, BDD nondeterminismVariables, storm::dd::Odd const* stateOdd, uint64_t stateOffset) { + // For the empty DD, we do not need to add any entries. Note that the partition nodes cannot be zero // as all states of the model have to be contained. if (mtbdd_iszero(transitionMatrixNode) || representativesNode == sylvan_false) { @@ -736,7 +737,7 @@ namespace storm { MTBDD e; // Determine whether the variable was skipped in the matrix. - if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { + if (storm::dd::InternalAdd::matchesVariableIndex(transitionMatrixNode, sylvan_var(variables))) { t = sylvan_high(transitionMatrixNode); e = sylvan_low(transitionMatrixNode); } else { @@ -753,7 +754,7 @@ namespace storm { MTBDD e; MTBDD et; MTBDD ee; - if (sylvan_var(transitionMatrixNode) == sylvan_var(variables)) { + if (storm::dd::InternalAdd::matchesVariableIndex(transitionMatrixNode, sylvan_var(variables))) { // Source node was not skipped in transition matrix. t = sylvan_high(transitionMatrixNode); e = sylvan_low(transitionMatrixNode); @@ -761,7 +762,7 @@ namespace storm { t = e = transitionMatrixNode; } - if (sylvan_var(t) == sylvan_var(variables) + 1) { + if (storm::dd::InternalAdd::matchesVariableIndex(t, sylvan_var(variables) + 1)) { // Target node was not skipped in transition matrix. tt = sylvan_high(t); te = sylvan_low(t); @@ -770,7 +771,7 @@ namespace storm { tt = te = t; } if (t != e) { - if (sylvan_var(e) == sylvan_var(variables) + 1) { + if (storm::dd::InternalAdd::matchesVariableIndex(e, sylvan_var(variables) + 1)) { // Target node was not skipped in transition matrix. et = sylvan_high(e); ee = sylvan_low(e); @@ -785,7 +786,7 @@ namespace storm { BDD targetT; BDD targetE; - if (sylvan_var(targetPartitionNode) == sylvan_var(variables)) { + if (storm::dd::InternalBdd::matchesVariableIndex(targetPartitionNode, sylvan_var(variables))) { // Node was not skipped in target partition. targetT = sylvan_high(targetPartitionNode); targetE = sylvan_low(targetPartitionNode); @@ -796,7 +797,7 @@ namespace storm { BDD representativesT; BDD representativesE; - if (sylvan_var(representativesNode) == sylvan_var(variables)) { + if (storm::dd::InternalBdd::matchesVariableIndex(representativesNode, sylvan_var(variables))) { // Node was not skipped in representatives. representativesT = sylvan_high(representativesNode); representativesE = sylvan_low(representativesNode); diff --git a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp index 59ea80db0..3dcb5a5b9 100644 --- a/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp +++ b/src/storm/storage/dd/bisimulation/SignatureRefiner.cpp @@ -371,7 +371,7 @@ namespace storm { offset = 0; } - if (sylvan_var(partitionNode) - offset == sylvan_var(nonBlockVariablesNode)) { + if (storm::dd::InternalAdd::matchesVariableIndex(partitionNode, sylvan_var(nonBlockVariablesNode), -offset)) { partitionThen = sylvan_high(partitionNode); partitionElse = sylvan_low(partitionNode); skippedBoth = false; @@ -379,7 +379,7 @@ namespace storm { partitionThen = partitionElse = partitionNode; } - if (sylvan_var(signatureNode) == sylvan_var(nonBlockVariablesNode)) { + if (storm::dd::InternalAdd::matchesVariableIndex(signatureNode, sylvan_var(nonBlockVariablesNode))) { signatureThen = sylvan_high(signatureNode); signatureElse = sylvan_low(signatureNode); skippedBoth = false; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index 47b5ffa8d..46167f116 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -81,6 +81,11 @@ namespace storm { } #endif + template + bool InternalAdd::matchesVariableIndex(MTBDD const& node, uint64_t variableIndex, int64_t offset) { + return !mtbdd_isleaf(node) && static_cast(sylvan_var(node) + offset) == variableIndex; + } + template bool InternalAdd::operator==(InternalAdd const& other) const { return this->sylvanMtbdd == other.sylvanMtbdd; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h index 687d829af..201048b6f 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.h @@ -612,6 +612,16 @@ namespace storm { */ static ValueType getValue(MTBDD const& node); + /*! + * Retrieves whether the topmost variable in the MTBDD is the one with the given index. + * + * @param The top node of the MTBDD. + * @param variableIndex The variable index. + * @param offset An offset that is applied to the index of the top variable in the MTBDD. + * @return True iff the MTBDD's top variable has the given index. + */ + static bool matchesVariableIndex(MTBDD const& node, uint64_t variableIndex, int64_t offset = 0); + private: /*! * Recursively builds the ODD from an ADD. diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp index 6868b6972..00e12dfdb 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.cpp @@ -283,7 +283,7 @@ namespace storm { // If we are at the maximal level, the value to be set is stored as a constant in the DD. if (currentRowLevel == maxLevel) { result.set(currentRowOffset, true); - } else if (ddRowVariableIndices[currentRowLevel] < sylvan_var(dd)) { + } else if (bdd_isterminal(dd) || ddRowVariableIndices[currentRowLevel] < sylvan_var(dd)) { toVectorRec(dd, result, rowOdd.getElseSuccessor(), complement, currentRowLevel + 1, maxLevel, currentRowOffset, ddRowVariableIndices); toVectorRec(dd, result, rowOdd.getThenSuccessor(), complement, currentRowLevel + 1, maxLevel, currentRowOffset + rowOdd.getElseOffset(), ddRowVariableIndices); } else { @@ -390,7 +390,7 @@ namespace storm { if (currentLevel == maxLevel) { result[currentIndex++] = values[currentOffset]; - } else if (ddVariableIndices[currentLevel] < sylvan_var(dd)) { + } else if (bdd_isterminal(dd) || ddVariableIndices[currentLevel] < sylvan_var(dd)) { // If we skipped a level, we need to enumerate the explicit entries for the case in which the bit is set // and for the one in which it is not set. filterExplicitVectorRec(dd, currentLevel + 1, complement, maxLevel, ddVariableIndices, currentOffset, odd.getElseSuccessor(), result, currentIndex, values); @@ -424,7 +424,7 @@ namespace storm { if (currentLevel == maxLevel) { result.set(currentIndex++, values.get(currentOffset)); - } else if (ddVariableIndices[currentLevel] < sylvan_var(dd)) { + } else if (bdd_isterminal(dd) || ddVariableIndices[currentLevel] < sylvan_var(dd)) { // If we skipped a level, we need to enumerate the explicit entries for the case in which the bit is set // and for the one in which it is not set. filterExplicitVectorRec(dd, currentLevel + 1, complement, maxLevel, ddVariableIndices, currentOffset, odd.getElseSuccessor(), result, currentIndex, values); @@ -527,6 +527,10 @@ namespace storm { return newNodeVariable; } + bool InternalBdd::matchesVariableIndex(BDD const& node, uint64_t variableIndex, int64_t offset) { + return !sylvan_isconst(node) && static_cast(sylvan_var(node) + offset) == variableIndex; + } + template InternalAdd InternalBdd::toAdd() const; template InternalAdd InternalBdd::toAdd() const; template InternalAdd InternalBdd::toAdd() const; diff --git a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h index 54371a3c3..6c07449c7 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanBdd.h +++ b/src/storm/storage/dd/sylvan/InternalSylvanBdd.h @@ -374,6 +374,16 @@ namespace storm { */ void filterExplicitVector(Odd const& odd, std::vector const& ddVariableIndices, storm::storage::BitVector const& sourceValues, storm::storage::BitVector& targetValues) const; + /*! + * Retrieves whether the topmost variable in the BDD is the one with the given index. + * + * @param The top node of the BDD. + * @param variableIndex The variable index. + * @param offset An offset that is applied to the index of the top variable in the BDD. + * @return True iff the BDD's top variable has the given index. + */ + static bool matchesVariableIndex(BDD const& node, uint64_t variableIndex, int64_t offset = 0); + friend struct std::hash>; /*! From 12c79ad6ea0664a327448dc0960082adf60ebaf2 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sat, 26 Aug 2017 14:51:04 +0200 Subject: [PATCH 63/95] export choice labels --- src/storm/utility/DirectEncodingExporter.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/storm/utility/DirectEncodingExporter.cpp b/src/storm/utility/DirectEncodingExporter.cpp index 8c93b3b7f..6bdd629a7 100644 --- a/src/storm/utility/DirectEncodingExporter.cpp +++ b/src/storm/utility/DirectEncodingExporter.cpp @@ -88,7 +88,19 @@ namespace storm { // Iterate over all actions for (typename storm::storage::SparseMatrix::index_type row = start; row < end; ++row) { // Print the actual row. - os << "\taction " << row - start; + if (sparseModel->hasChoiceLabeling()) { + os << "\taction "; + bool lfirst = true; + for (auto const& label : sparseModel->getChoiceLabeling().getLabelsOfChoice(row)) { + if (!lfirst) { + os << "_"; + } + os << label; + lfirst = false; + } + } else { + os << "\taction " << row - start; + } bool first = true; // Write transition rewards for (auto const& rewardModelEntry : sparseModel->getRewardModels()) { @@ -110,11 +122,6 @@ namespace storm { os << "]"; } - // Write choice labeling - if(sparseModel->hasChoiceLabeling()) { - // TODO export choice labeling - STORM_LOG_WARN("Choice labeling was not exported."); - } os << std::endl; // Write probabilities From ecade3f8578e415c345702bda2664c145700b132 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 28 Aug 2017 20:02:23 +0200 Subject: [PATCH 64/95] fixes issue #9 raised by Joachim Klein --- src/storm/storage/prism/Program.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storm/storage/prism/Program.cpp b/src/storm/storage/prism/Program.cpp index a87ea5888..387423066 100644 --- a/src/storm/storage/prism/Program.cpp +++ b/src/storm/storage/prism/Program.cpp @@ -492,6 +492,11 @@ namespace storm { } } + // If there are no variables, there is no restriction on the initial states. + if (!result.isInitialized()) { + result = manager->boolean(true); + } + return result; } } From 2d30108b499003e90b9ec48ead2bf59dc5ebe4d4 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 28 Aug 2017 20:23:09 +0200 Subject: [PATCH 65/95] fixes issue #10 raised by Joachim Klein --- src/storm/logic/VariableSubstitutionVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storm/logic/VariableSubstitutionVisitor.cpp b/src/storm/logic/VariableSubstitutionVisitor.cpp index 00eee1e01..2a84a0c10 100644 --- a/src/storm/logic/VariableSubstitutionVisitor.cpp +++ b/src/storm/logic/VariableSubstitutionVisitor.cpp @@ -53,7 +53,7 @@ namespace storm { if (f.hasUpperBound(i)) { upperBounds.push_back(TimeBound(f.isUpperBoundStrict(i), f.getUpperBound(i).substitute(substitution))); } else { - lowerBounds.push_back(boost::none); + upperBounds.push_back(boost::none); } tbReferences.push_back(f.getTimeBoundReference(i)); } From beb80cc5af32290747844c365f9ecb0d9a0b4b3a Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 28 Aug 2017 22:40:46 +0200 Subject: [PATCH 66/95] fixes issue #11 raised by Joachim Klein --- src/storm/modelchecker/CheckTask.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storm/modelchecker/CheckTask.h b/src/storm/modelchecker/CheckTask.h index 4440f1ba3..828f85215 100644 --- a/src/storm/modelchecker/CheckTask.h +++ b/src/storm/modelchecker/CheckTask.h @@ -52,6 +52,7 @@ namespace storm { template CheckTask substituteFormula(NewFormulaType const& newFormula) const { CheckTask result(newFormula, this->optimizationDirection, this->rewardModel, this->onlyInitialStatesRelevant, this->bound, this->qualitative, this->produceSchedulers, this->hint); + result.updateOperatorInformation(); return result; } From 2d2cc9577403deaa49e9b55968bcbe924decdf06 Mon Sep 17 00:00:00 2001 From: TimQu Date: Tue, 29 Aug 2017 10:01:07 +0200 Subject: [PATCH 67/95] fixed issue #12 raised by Joachim Klein --- src/storm/utility/graph.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storm/utility/graph.cpp b/src/storm/utility/graph.cpp index 13065000a..c341cdc22 100644 --- a/src/storm/utility/graph.cpp +++ b/src/storm/utility/graph.cpp @@ -165,7 +165,7 @@ namespace storm { } candidateStates = storm::utility::graph::getReachableStates(transitionMatrix, choiceTargets, candidateStates, storm::storage::BitVector(candidateStates.size(), false)); - // At this point we know that every candidate state can reach a choice at least once without leaving the set of candidate states. + // At this point we know that every candidate state can reach a state with a choice without leaving the set of candidate states. // We now compute the states that can reach a choice at least twice, three times, four times, ... until a fixpoint is reached. while (!candidateStates.empty()) { // Update the states with a choice that stays within the set of candidates @@ -193,11 +193,12 @@ namespace storm { // Update the candidates storm::storage::BitVector newCandidates = storm::utility::graph::performProb1E(transitionMatrix, transitionMatrix.getRowGroupIndices(), backwardTransitions, candidateStates, statesWithChoice); - // Check if conferged + // Check if converged if (newCandidates == candidateStates) { assert(!candidateStates.empty()); return true; } + candidateStates = std::move(newCandidates); } return false; } From 06ec288296862ce8222a54dbda6bbfa3d3eabf35 Mon Sep 17 00:00:00 2001 From: TimQu Date: Tue, 29 Aug 2017 10:01:44 +0200 Subject: [PATCH 68/95] enabled pcaa test that uses rational numbers --- .../SparseMaPcaaMultiObjectiveModelCheckerTest.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/test/storm/modelchecker/SparseMaPcaaMultiObjectiveModelCheckerTest.cpp b/src/test/storm/modelchecker/SparseMaPcaaMultiObjectiveModelCheckerTest.cpp index b78eead1b..ad9699e46 100644 --- a/src/test/storm/modelchecker/SparseMaPcaaMultiObjectiveModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/SparseMaPcaaMultiObjectiveModelCheckerTest.cpp @@ -16,23 +16,19 @@ #include "storm/api/storm.h" -/* Rationals for MAs not supported at this point TEST(SparseMaPcaaMultiObjectiveModelCheckerTest, serverRationalNumbers) { std::string programFile = STORM_TEST_RESOURCES_DIR "/ma/server.ma"; std::string formulasAsString = "multi(Tmax=? [ F \"error\" ], Pmax=? [ F \"processB\" ]) "; // pareto - // formulasAsString += "; \n multi(..)"; // programm, model, formula storm::prism::Program program = storm::api::parseProgram(programFile); program.checkValidity(); - std::vector> formulas = storm::api::extractFormulasFromProperties(parseFormulasForProgram(formulasAsString, program)); + std::vector> formulas = storm::api::extractFormulasFromProperties(storm::api::parsePropertiesForPrismProgram(formulasAsString, program)); storm::generator::NextStateGeneratorOptions options(formulas); std::shared_ptr> ma = storm::builder::ExplicitModelBuilder(program, options).build()->as>(); - storm::modelchecker::SparseMarkovAutomatonCslModelChecker> checker(*ma); - - std::unique_ptr result = checker.check(storm::modelchecker::CheckTask(*formulas[0], true)); + std::unique_ptr result = storm::modelchecker::multiobjective::performMultiObjectiveModelChecking(*ma, formulas[0]->asMultiObjectiveFormula(), storm::modelchecker::multiobjective::MultiObjectiveMethodSelection::Pcaa); ASSERT_TRUE(result->isExplicitParetoCurveCheckResult()); storm::RationalNumber p1 = storm::utility::convertNumber(11.0); p1 /= storm::utility::convertNumber(6.0); @@ -45,7 +41,7 @@ TEST(SparseMaPcaaMultiObjectiveModelCheckerTest, serverRationalNumbers) { EXPECT_TRUE(expectedAchievableValues->contains(result->asExplicitParetoCurveCheckResult().getUnderApproximation())); EXPECT_TRUE(result->asExplicitParetoCurveCheckResult().getOverApproximation()->contains(expectedAchievableValues)); -}*/ +} TEST(SparseMaPcaaMultiObjectiveModelCheckerTest, server) { From 5bb656407822a18ad03bad00a78efa6369e2866b Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 29 Aug 2017 10:57:24 +0200 Subject: [PATCH 69/95] remove debug output --- src/storm/logic/VariableSubstitutionVisitor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/storm/logic/VariableSubstitutionVisitor.cpp b/src/storm/logic/VariableSubstitutionVisitor.cpp index 2a84a0c10..bc5c43ed9 100644 --- a/src/storm/logic/VariableSubstitutionVisitor.cpp +++ b/src/storm/logic/VariableSubstitutionVisitor.cpp @@ -43,7 +43,6 @@ namespace storm { std::vector tbReferences; for (unsigned i = 0; i < f.getDimension(); ++i) { - std::cout << f.hasLowerBound(i) << std::endl; if (f.hasLowerBound(i)) { lowerBounds.push_back(TimeBound(f.isLowerBoundStrict(i), f.getLowerBound(i).substitute(substitution))); } else { From 0c5aa1645d577c32864bbd68657f603b41505c5d Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 29 Aug 2017 13:33:53 +0200 Subject: [PATCH 70/95] fix reward model generation in JIT builder --- src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp index 8f23d14ce..a550ee130 100644 --- a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp +++ b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp @@ -1088,6 +1088,7 @@ namespace storm { std::stringstream tmp; indent(tmp, indentLevel + 1) << "{% for reward in destination_rewards %}choice.addReward({$reward.index}, probability * transientOut.{$reward.variable});" << std::endl; indent(tmp, indentLevel + 1) << "{% endfor %}" << std::endl; + vectorSource << cpptempl::parse(tmp.str(), modelData); indent(vectorSource, indentLevel) << "}" << std::endl << std::endl; indent(vectorSource, indentLevel) << "void performSynchronizedDestinations_" << synchronizationVectorIndex << "(StateType const& in, StateBehaviour& behaviour, StateSet& statesToExplore, "; @@ -2309,8 +2310,8 @@ namespace storm { {% if dontFixDeadlocks %} if (behaviour.empty() && behaviour.isExpanded() ) { - std::cout << currentState << std::endl; - throw storm::exceptions::WrongFormatException("Error while creating sparse matrix from JANI model: found deadlock state and fixing deadlocks was explicitly disabled."); + std::cout << "found deadlock state: " << currentState << std::endl; + throw storm::exceptions::WrongFormatException("Error while creating sparse matrix from JANI model: found deadlock state and fixing deadlocks was explicitly disabled."); } {% endif %} From e278c3ef69751a014089437572cef81822bbbba4 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 12:39:27 +0200 Subject: [PATCH 71/95] moving from internal reference to pointer in StandardMinMax solver equipped MinMax solvers with default constructors --- .../IterativeMinMaxLinearEquationSolver.cpp | 56 +++++++++---------- .../IterativeMinMaxLinearEquationSolver.h | 1 + .../solver/LpMinMaxLinearEquationSolver.cpp | 22 ++++---- .../solver/LpMinMaxLinearEquationSolver.h | 3 +- .../StandardMinMaxLinearEquationSolver.cpp | 15 +++-- .../StandardMinMaxLinearEquationSolver.h | 4 +- 6 files changed, 55 insertions(+), 46 deletions(-) diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index d03e356ac..f4c8a0f2f 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -74,7 +74,7 @@ namespace storm { bool IterativeMinMaxLinearEquationSolverSettings::getRelativeTerminationCriterion() const { return relative; } - + template IterativeMinMaxLinearEquationSolver::IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings) : StandardMinMaxLinearEquationSolver(A, std::move(linearEquationSolverFactory)), settings(settings) { // Intentionally left empty. @@ -103,18 +103,18 @@ namespace storm { template bool IterativeMinMaxLinearEquationSolver::solveEquationsPolicyIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const { // Create the initial scheduler. - std::vector scheduler = this->hasSchedulerHint() ? this->choicesHint.get() : std::vector(this->A.getRowGroupCount()); + std::vector scheduler = this->hasSchedulerHint() ? this->choicesHint.get() : std::vector(this->A->getRowGroupCount()); // Get a vector for storing the right-hand side of the inner equation system. if(!auxiliaryRowGroupVector) { - auxiliaryRowGroupVector = std::make_unique>(this->A.getRowGroupCount()); + auxiliaryRowGroupVector = std::make_unique>(this->A->getRowGroupCount()); } std::vector& subB = *auxiliaryRowGroupVector; // Resolve the nondeterminism according to the current scheduler. - storm::storage::SparseMatrix submatrix = this->A.selectRowsFromRowGroups(scheduler, true); + storm::storage::SparseMatrix submatrix = this->A->selectRowsFromRowGroups(scheduler, true); submatrix.convertToEquationSystem(); - storm::utility::vector::selectVectorValues(subB, scheduler, this->A.getRowGroupIndices(), b); + storm::utility::vector::selectVectorValues(subB, scheduler, this->A->getRowGroupIndices(), b); // Create a solver that we will use throughout the procedure. We will modify the matrix in each iteration. auto solver = this->linearEquationSolverFactory->create(std::move(submatrix)); @@ -137,17 +137,17 @@ namespace storm { // Go through the multiplication result and see whether we can improve any of the choices. bool schedulerImproved = false; - for (uint_fast64_t group = 0; group < this->A.getRowGroupCount(); ++group) { + for (uint_fast64_t group = 0; group < this->A->getRowGroupCount(); ++group) { uint_fast64_t currentChoice = scheduler[group]; - for (uint_fast64_t choice = this->A.getRowGroupIndices()[group]; choice < this->A.getRowGroupIndices()[group + 1]; ++choice) { + for (uint_fast64_t choice = this->A->getRowGroupIndices()[group]; choice < this->A->getRowGroupIndices()[group + 1]; ++choice) { // If the choice is the currently selected one, we can skip it. - if (choice - this->A.getRowGroupIndices()[group] == currentChoice) { + if (choice - this->A->getRowGroupIndices()[group] == currentChoice) { continue; } // Create the value of the choice. ValueType choiceValue = storm::utility::zero(); - for (auto const& entry : this->A.getRow(choice)) { + for (auto const& entry : this->A->getRow(choice)) { choiceValue += entry.getValue() * x[entry.getColumn()]; } choiceValue += b[choice]; @@ -157,7 +157,7 @@ namespace storm { // only changing the scheduler if the values are not equal (modulo precision) would make this unsound. if (valueImproved(dir, x[group], choiceValue)) { schedulerImproved = true; - scheduler[group] = choice - this->A.getRowGroupIndices()[group]; + scheduler[group] = choice - this->A->getRowGroupIndices()[group]; x[group] = std::move(choiceValue); } } @@ -168,9 +168,9 @@ namespace storm { status = Status::Converged; } else { // Update the scheduler and the solver. - submatrix = this->A.selectRowsFromRowGroups(scheduler, true); + submatrix = this->A->selectRowsFromRowGroups(scheduler, true); submatrix.convertToEquationSystem(); - storm::utility::vector::selectVectorValues(subB, scheduler, this->A.getRowGroupIndices(), b); + storm::utility::vector::selectVectorValues(subB, scheduler, this->A->getRowGroupIndices(), b); solver->setMatrix(std::move(submatrix)); } @@ -215,24 +215,24 @@ namespace storm { template bool IterativeMinMaxLinearEquationSolver::solveEquationsValueIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const { if(!this->linEqSolverA) { - this->linEqSolverA = this->linearEquationSolverFactory->create(this->A); + this->linEqSolverA = this->linearEquationSolverFactory->create(*this->A); this->linEqSolverA->setCachingEnabled(true); } if (!this->auxiliaryRowVector) { - this->auxiliaryRowVector = std::make_unique>(this->A.getRowCount()); + this->auxiliaryRowVector = std::make_unique>(this->A->getRowCount()); } std::vector& multiplyResult = *this->auxiliaryRowVector; if (!auxiliaryRowGroupVector) { - auxiliaryRowGroupVector = std::make_unique>(this->A.getRowGroupCount()); + auxiliaryRowGroupVector = std::make_unique>(this->A->getRowGroupCount()); } if (this->hasSchedulerHint()) { // Resolve the nondeterminism according to the scheduler hint - storm::storage::SparseMatrix submatrix = this->A.selectRowsFromRowGroups(this->choicesHint.get(), true); + storm::storage::SparseMatrix submatrix = this->A->selectRowsFromRowGroups(this->choicesHint.get(), true); submatrix.convertToEquationSystem(); - storm::utility::vector::selectVectorValues(*auxiliaryRowGroupVector, this->choicesHint.get(), this->A.getRowGroupIndices(), b); + storm::utility::vector::selectVectorValues(*auxiliaryRowGroupVector, this->choicesHint.get(), this->A->getRowGroupIndices(), b); // Solve the resulting equation system. // Note that the linEqSolver might consider a slightly different interpretation of "equalModuloPrecision". Hence, we iteratively increase its precision. @@ -256,7 +256,7 @@ namespace storm { this->linEqSolverA->multiply(*currentX, &b, multiplyResult); // Reduce the vector x' by applying min/max for all non-deterministic choices. - storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, *newX, this->A.getRowGroupIndices()); + storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, *newX, this->A->getRowGroupIndices()); // Determine whether the method converged. if (storm::utility::vector::equalModuloPrecision(*currentX, *newX, this->getSettings().getPrecision(), this->getSettings().getRelativeTerminationCriterion())) { @@ -284,9 +284,9 @@ namespace storm { if (iterations==0) { this->linEqSolverA->multiply(x, &b, multiplyResult); } - this->schedulerChoices = std::vector(this->A.getRowGroupCount()); + this->schedulerChoices = std::vector(this->A->getRowGroupCount()); // Reduce the multiplyResult and keep track of the choices made - storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, x, this->A.getRowGroupIndices(), &this->schedulerChoices.get()); + storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, x, this->A->getRowGroupIndices(), &this->schedulerChoices.get()); } if (!this->isCachingEnabled()) { @@ -298,7 +298,7 @@ namespace storm { template bool IterativeMinMaxLinearEquationSolver::solveEquationsAcyclic(OptimizationDirection dir, std::vector& x, std::vector const& b) const { - uint64_t numGroups = this->A.getRowGroupCount(); + uint64_t numGroups = this->A->getRowGroupCount(); // Allocate memory for the scheduler (if required) if (this->isTrackSchedulerSet()) { @@ -323,7 +323,7 @@ namespace storm { } } - auto transposedMatrix = this->A.transpose(true); + auto transposedMatrix = this->A->transpose(true); // We store the groups that have already been processed, i.e., the groups for which x[group] was already set to the correct value. storm::storage::BitVector processedGroups(numGroups, false); @@ -338,7 +338,7 @@ namespace storm { // Check if the candidate row group has an unprocessed successor bool hasUnprocessedSuccessor = false; - for (auto const& entry : this->A.getRowGroup(candidate)) { + for (auto const& entry : this->A->getRowGroup(candidate)) { if (!processedGroups.get(entry.getColumn())) { hasUnprocessedSuccessor = true; break; @@ -375,17 +375,17 @@ namespace storm { template void IterativeMinMaxLinearEquationSolver::computeOptimalValueForRowGroup(uint_fast64_t group, OptimizationDirection dir, std::vector& x, std::vector const& b, uint_fast64_t* choice) const { - uint64_t row = this->A.getRowGroupIndices()[group]; - uint64_t groupEnd = this->A.getRowGroupIndices()[group + 1]; + uint64_t row = this->A->getRowGroupIndices()[group]; + uint64_t groupEnd = this->A->getRowGroupIndices()[group + 1]; assert(row != groupEnd); auto bIt = b.begin() + row; ValueType& xi = x[group]; - xi = this->A.multiplyRowWithVector(row, x) + *bIt; + xi = this->A->multiplyRowWithVector(row, x) + *bIt; uint64_t optimalRow = row; for (++row, ++bIt; row < groupEnd; ++row, ++bIt) { - ValueType choiceVal = this->A.multiplyRowWithVector(row, x) + *bIt; + ValueType choiceVal = this->A->multiplyRowWithVector(row, x) + *bIt; if (minimize(dir)) { if (choiceVal < xi) { xi = choiceVal; @@ -399,7 +399,7 @@ namespace storm { } } if (choice != nullptr) { - *choice = optimalRow - this->A.getRowGroupIndices()[group]; + *choice = optimalRow - this->A->getRowGroupIndices()[group]; } } diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index e197f88b0..23d34cd7c 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -36,6 +36,7 @@ namespace storm { template class IterativeMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver { public: + IterativeMinMaxLinearEquationSolver() = default; IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp index 35de0902d..9b52a1fa9 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp @@ -28,8 +28,8 @@ namespace storm { // Create a variable for each row group std::vector variables; - variables.reserve(this->A.getRowGroupCount()); - for (uint64_t rowGroup = 0; rowGroup < this->A.getRowGroupCount(); ++rowGroup) { + variables.reserve(this->A->getRowGroupCount()); + for (uint64_t rowGroup = 0; rowGroup < this->A->getRowGroupCount(); ++rowGroup) { if (this->lowerBound) { if (this->upperBound) { variables.push_back(solver->addBoundedContinuousVariable("x" + std::to_string(rowGroup), this->lowerBound.get(), this->upperBound.get(), storm::utility::one())); @@ -47,10 +47,10 @@ namespace storm { solver->update(); // Add a constraint for each row - for (uint64_t rowGroup = 0; rowGroup < this->A.getRowGroupCount(); ++rowGroup) { - for (uint64_t row = this->A.getRowGroupIndices()[rowGroup]; row < this->A.getRowGroupIndices()[rowGroup + 1]; ++row) { + for (uint64_t rowGroup = 0; rowGroup < this->A->getRowGroupCount(); ++rowGroup) { + for (uint64_t row = this->A->getRowGroupIndices()[rowGroup]; row < this->A->getRowGroupIndices()[rowGroup + 1]; ++row) { storm::expressions::Expression rowConstraint = solver->getConstant(b[row]); - for (auto const& entry : this->A.getRow(row)) { + for (auto const& entry : this->A->getRow(row)) { rowConstraint = rowConstraint + (solver->getConstant(entry.getValue()) * variables[entry.getColumn()].getExpression()); } if (minimize(dir)) { @@ -78,14 +78,14 @@ namespace storm { // If requested, we store the scheduler for retrieval. if (this->isTrackSchedulerSet()) { - this->schedulerChoices = std::vector(this->A.getRowGroupCount()); - for (uint64_t rowGroup = 0; rowGroup < this->A.getRowGroupCount(); ++rowGroup) { - uint64_t row = this->A.getRowGroupIndices()[rowGroup]; + this->schedulerChoices = std::vector(this->A->getRowGroupCount()); + for (uint64_t rowGroup = 0; rowGroup < this->A->getRowGroupCount(); ++rowGroup) { + uint64_t row = this->A->getRowGroupIndices()[rowGroup]; uint64_t optimalChoiceIndex = 0; uint64_t currChoice = 0; - ValueType optimalGroupValue = this->A.multiplyRowWithVector(row, x) + b[row]; - for (++row, ++currChoice; row < this->A.getRowGroupIndices()[rowGroup + 1]; ++row, ++currChoice) { - ValueType rowValue = this->A.multiplyRowWithVector(row, x) + b[row]; + ValueType optimalGroupValue = this->A->multiplyRowWithVector(row, x) + b[row]; + for (++row, ++currChoice; row < this->A->getRowGroupIndices()[rowGroup + 1]; ++row, ++currChoice) { + ValueType rowValue = this->A->multiplyRowWithVector(row, x) + b[row]; if ((minimize(dir) && rowValue < optimalGroupValue) || (maximize(dir) && rowValue > optimalGroupValue)) { optimalGroupValue = rowValue; optimalChoiceIndex = currChoice; diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.h b/src/storm/solver/LpMinMaxLinearEquationSolver.h index 540fe89c1..84d744c39 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.h +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.h @@ -10,6 +10,7 @@ namespace storm { template class LpMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver { public: + LpMinMaxLinearEquationSolver() = default; LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); @@ -21,7 +22,7 @@ namespace storm { std::unique_ptr> lpSolverFactory; }; - template + template class LpMinMaxLinearEquationSolverFactory : public StandardMinMaxLinearEquationSolverFactory { public: LpMinMaxLinearEquationSolverFactory(bool trackScheduler = false); diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp index 6b0f140ce..5fedfced4 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp @@ -15,24 +15,29 @@ namespace storm { namespace solver { template - StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory) : linearEquationSolverFactory(std::move(linearEquationSolverFactory)), localA(nullptr), A(A) { + StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver() : A(nullptr) { // Intentionally left empty. } template - StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory) : linearEquationSolverFactory(std::move(linearEquationSolverFactory)), localA(std::make_unique>(std::move(A))), A(*localA) { + StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory) : linearEquationSolverFactory(std::move(linearEquationSolverFactory)), localA(nullptr), A(&A) { + // Intentionally left empty. + } + + template + StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory) : linearEquationSolverFactory(std::move(linearEquationSolverFactory)), localA(std::make_unique>(std::move(A))), A(localA.get()) { // Intentionally left empty. } template void StandardMinMaxLinearEquationSolver::repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const { if (!linEqSolverA) { - linEqSolverA = linearEquationSolverFactory->create(A); + linEqSolverA = linearEquationSolverFactory->create(*A); linEqSolverA->setCachingEnabled(true); } if (!auxiliaryRowVector) { - auxiliaryRowVector = std::make_unique>(A.getRowCount()); + auxiliaryRowVector = std::make_unique>(A->getRowCount()); } std::vector& multiplyResult = *auxiliaryRowVector; @@ -41,7 +46,7 @@ namespace storm { // Reduce the vector x' by applying min/max for all non-deterministic choices as given by the topmost // element of the min/max operator stack. - storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, x, this->A.getRowGroupIndices()); + storm::utility::vector::reduceVectorMinOrMax(dir, multiplyResult, x, this->A->getRowGroupIndices()); } if (!this->isCachingEnabled()) { diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.h b/src/storm/solver/StandardMinMaxLinearEquationSolver.h index 1305f3e26..b122489c8 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.h +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.h @@ -9,6 +9,8 @@ namespace storm { template class StandardMinMaxLinearEquationSolver : public MinMaxLinearEquationSolver { public: + StandardMinMaxLinearEquationSolver(); + StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory); StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory); @@ -33,7 +35,7 @@ namespace storm { // A reference to the original sparse matrix given to this solver. If the solver takes posession of the matrix // the reference refers to localA. - storm::storage::SparseMatrix const& A; + storm::storage::SparseMatrix const* A; }; From 3c8f9a2ecf1f87569cc262d6d374c11377acc886 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 30 Aug 2017 14:46:02 +0200 Subject: [PATCH 72/95] Added 5th build stage --- .travis.yml | 51 +++++++++++++++++++++++++++++++++++++++ travis/build-helper.sh | 4 +-- travis/build.sh | 4 +-- travis/generate_travis.py | 1 + 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c824cddf6..2b5f50657 100644 --- a/.travis.yml +++ b/.travis.yml @@ -243,6 +243,57 @@ jobs: after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; + ### + # Stage: Build (5th run) + ### + + # osx + - stage: Build (5th run) + os: osx + compiler: clang + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: + - travis/install_osx.sh + script: + - travis/build.sh BuildLast + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; + - stage: Build (5th run) + os: osx + compiler: clang + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: + - travis/install_osx.sh + script: + - travis/build.sh BuildLast + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; + # ubuntu-16.10 + - stage: Build (5th run) + os: linux + compiler: gcc + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: + - travis/install_linux.sh + script: + - travis/build.sh BuildLast + before_cache: + - docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; + - stage: Build (5th run) + os: linux + compiler: gcc + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: + - travis/install_linux.sh + script: + - travis/build.sh BuildLast + before_cache: + - docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; + ### # Stage: Test all ### diff --git a/travis/build-helper.sh b/travis/build-helper.sh index c6f2dff60..8d73c87e7 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -13,7 +13,7 @@ travis_fold() { # Helper for distinguishing between different runs run() { case "$1" in - Build1 | Build2 | Build3 | Build4) + Build*) if [[ "$1" == "Build1" ]] then # CMake @@ -38,7 +38,7 @@ run() { make -j$N_JOBS travis_fold end make # Set skip-file - if [[ "$1" != "Build4" ]] + if [[ "$1" != "BuildLast" ]] then touch skip.txt else diff --git a/travis/build.sh b/travis/build.sh index 0b7900e70..668e4f18e 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -13,7 +13,7 @@ EXITCODE=42 if [ -f build/skip.txt ] then # Remove flag s.t. tests will be executed - if [[ "$1" == "Build4" ]] + if [[ "$1" == "BuildLast" ]] then rm build/skip.txt fi @@ -63,7 +63,7 @@ osx) exit 1 esac -if [[ $EXITCODE == 124 ]] && [[ "$1" == Build* ]] && [[ "$1" != "Build4" ]] +if [[ $EXITCODE == 124 ]] && [[ "$1" == Build* ]] && [[ "$1" != "BuildLast" ]] then exit 0 else diff --git a/travis/generate_travis.py b/travis/generate_travis.py index c47afac0c..14e058a85 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -24,6 +24,7 @@ stages = [ ("Build (2nd run)", "Build2"), ("Build (3rd run)", "Build3"), ("Build (4th run)", "Build4"), + ("Build (5th run)", "BuildLast"), ("Test all", "TestAll"), ] From 72234e96b271fa1097612c4309ceaea0d5527e30 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 18:13:47 +0200 Subject: [PATCH 73/95] started on requirements for MinMax solvers --- .../IterativeMinMaxLinearEquationSolver.cpp | 18 ++-- .../IterativeMinMaxLinearEquationSolver.h | 9 +- .../solver/LpMinMaxLinearEquationSolver.cpp | 19 ++-- .../solver/LpMinMaxLinearEquationSolver.h | 11 +-- .../solver/MinMaxLinearEquationSolver.cpp | 67 +++++++++------ src/storm/solver/MinMaxLinearEquationSolver.h | 86 +++++++++++++------ .../StandardMinMaxLinearEquationSolver.cpp | 49 +++++------ .../StandardMinMaxLinearEquationSolver.h | 14 +-- .../TopologicalMinMaxLinearEquationSolver.cpp | 67 +++++++++------ .../TopologicalMinMaxLinearEquationSolver.h | 14 ++- 10 files changed, 203 insertions(+), 151 deletions(-) diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index f4c8a0f2f..4815fc8a4 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -75,6 +75,11 @@ namespace storm { return relative; } + template + IterativeMinMaxLinearEquationSolver::IterativeMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings) : StandardMinMaxLinearEquationSolver(std::move(linearEquationSolverFactory)), settings(settings) { + // Intentionally left empty + } + template IterativeMinMaxLinearEquationSolver::IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings) : StandardMinMaxLinearEquationSolver(A, std::move(linearEquationSolverFactory)), settings(settings) { // Intentionally left empty. @@ -459,19 +464,10 @@ namespace storm { } template - std::unique_ptr> IterativeMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); - - std::unique_ptr> result = std::make_unique>(std::move(matrix), this->linearEquationSolverFactory->clone(), settings); - result->setTrackScheduler(this->isTrackSchedulerSet()); - return result; - } - - template - std::unique_ptr> IterativeMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { + std::unique_ptr> IterativeMinMaxLinearEquationSolverFactory::internalCreate() const { STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); - std::unique_ptr> result = std::make_unique>(std::move(matrix), this->linearEquationSolverFactory->clone(), settings); + std::unique_ptr> result = std::make_unique>(this->linearEquationSolverFactory->clone(), settings); result->setTrackScheduler(this->isTrackSchedulerSet()); return result; } diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index 23d34cd7c..dc5cc656a 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -36,7 +36,7 @@ namespace storm { template class IterativeMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver { public: - IterativeMinMaxLinearEquationSolver() = default; + IterativeMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); @@ -81,18 +81,17 @@ namespace storm { IterativeMinMaxLinearEquationSolverFactory(std::unique_ptr>&& linearEquationSolverFactory, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); IterativeMinMaxLinearEquationSolverFactory(EquationSolverType const& solverType, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const override; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const override; - IterativeMinMaxLinearEquationSolverSettings& getSettings(); IterativeMinMaxLinearEquationSolverSettings const& getSettings() const; virtual void setMinMaxMethod(MinMaxMethodSelection const& newMethod) override; virtual void setMinMaxMethod(MinMaxMethod const& newMethod) override; + + protected: + virtual std::unique_ptr> internalCreate() const override; private: IterativeMinMaxLinearEquationSolverSettings settings; - }; } } diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp index 9b52a1fa9..45c76e029 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp @@ -9,6 +9,11 @@ namespace storm { namespace solver { + template + LpMinMaxLinearEquationSolver::LpMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory) : StandardMinMaxLinearEquationSolver(std::move(linearEquationSolverFactory)), lpSolverFactory(std::move(lpSolverFactory)) { + // Intentionally left empty. + } + template LpMinMaxLinearEquationSolver::LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory) : StandardMinMaxLinearEquationSolver(A, std::move(linearEquationSolverFactory)), lpSolverFactory(std::move(lpSolverFactory)) { // Intentionally left empty. @@ -119,21 +124,11 @@ namespace storm { } template - std::unique_ptr> LpMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); + std::unique_ptr> LpMinMaxLinearEquationSolverFactory::internalCreate() const { STORM_LOG_ASSERT(this->lpSolverFactory, "Lp solver factory not initialized."); - - std::unique_ptr> result = std::make_unique>(std::move(matrix), this->linearEquationSolverFactory->clone(), this->lpSolverFactory->clone()); - result->setTrackScheduler(this->isTrackSchedulerSet()); - return result; - } - - template - std::unique_ptr> LpMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); - STORM_LOG_ASSERT(this->lpSolverFactory, "Lp solver factory not initialized."); - std::unique_ptr> result = std::make_unique>(std::move(matrix), this->linearEquationSolverFactory->clone(), this->lpSolverFactory->clone()); + std::unique_ptr> result = std::make_unique>(this->linearEquationSolverFactory->clone(), this->lpSolverFactory->clone()); result->setTrackScheduler(this->isTrackSchedulerSet()); return result; } diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.h b/src/storm/solver/LpMinMaxLinearEquationSolver.h index 84d744c39..5491e7ca2 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.h +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.h @@ -10,7 +10,7 @@ namespace storm { template class LpMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver { public: - LpMinMaxLinearEquationSolver() = default; + LpMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); @@ -29,12 +29,13 @@ namespace storm { LpMinMaxLinearEquationSolverFactory(std::unique_ptr>&& lpSolverFactory, bool trackScheduler = false); LpMinMaxLinearEquationSolverFactory(std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory, bool trackScheduler = false); - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const override; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const override; - virtual void setMinMaxMethod(MinMaxMethodSelection const& newMethod) override; virtual void setMinMaxMethod(MinMaxMethod const& newMethod) override; - + + protected: + virtual std::unique_ptr> internalCreate() const override; + std::unique_ptr> createLpEquationSolverFactory() const; + private: std::unique_ptr> lpSolverFactory; }; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 0ce28bd2a..872f7c03b 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -19,7 +19,7 @@ namespace storm { namespace solver { template - MinMaxLinearEquationSolver::MinMaxLinearEquationSolver(OptimizationDirectionSetting direction) : direction(direction), trackScheduler(false), cachingEnabled(false) { + MinMaxLinearEquationSolver::MinMaxLinearEquationSolver(OptimizationDirectionSetting direction) : direction(direction), trackScheduler(false), cachingEnabled(false), requirementsChecked(false) { // Intentionally left empty. } @@ -132,13 +132,23 @@ namespace storm { } template - MinMaxLinearEquationSolverFactory::MinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method, bool trackScheduler) : trackScheduler(trackScheduler) { - setMinMaxMethod(method); + std::vector MinMaxLinearEquationSolver::getRequirements() const { + return std::vector(); } template - std::unique_ptr> MinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { - return this->create(matrix); + void MinMaxLinearEquationSolver::setRequirementsChecked(bool value) { + this->requirementsChecked = value; + } + + template + bool MinMaxLinearEquationSolver::getRequirementsChecked() const { + return this->requirementsChecked; + } + + template + MinMaxLinearEquationSolverFactory::MinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method, bool trackScheduler) : trackScheduler(trackScheduler) { + setMinMaxMethod(method); } template @@ -182,35 +192,45 @@ namespace storm { MinMaxMethod const& MinMaxLinearEquationSolverFactory::getMinMaxMethod() const { return method; } - + template - GeneralMinMaxLinearEquationSolverFactory::GeneralMinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method, bool trackScheduler) : MinMaxLinearEquationSolverFactory(method, trackScheduler) { - // Intentionally left empty. + std::vector MinMaxLinearEquationSolverFactory::getRequirements() const { + // Create dummy solver and ask it for requirements. + std::unique_ptr> solver = this->internalCreate(); + return solver->getRequirements(); } template - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - return selectSolver(matrix); + std::unique_ptr> MinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { + std::unique_ptr> solver = this->internalCreate(); + solver->setMatrix(matrix); + return solver; } template - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { - return selectSolver(std::move(matrix)); + std::unique_ptr> MinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { + std::unique_ptr> solver = this->internalCreate(); + solver->setMatrix(std::move(matrix)); + return solver; } template - template - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::selectSolver(MatrixType&& matrix) const { + GeneralMinMaxLinearEquationSolverFactory::GeneralMinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method, bool trackScheduler) : MinMaxLinearEquationSolverFactory(method, trackScheduler) { + // Intentionally left empty. + } + + template + std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::internalCreate() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; iterativeSolverSettings.setSolutionMethod(method); - result = std::make_unique>(std::forward(matrix), std::make_unique>(), iterativeSolverSettings); + result = std::make_unique>(std::make_unique>(), iterativeSolverSettings); } else if (method == MinMaxMethod::Topological) { - result = std::make_unique>(std::forward(matrix)); + result = std::make_unique>(); } else if (method == MinMaxMethod::LinearProgramming) { - result = std::make_unique>(std::forward(matrix), std::make_unique>(), std::make_unique>()); + result = std::make_unique>(std::make_unique>(), std::make_unique>()); } else { STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } @@ -218,24 +238,23 @@ namespace storm { return result; } -#ifdef STORM_HAVE_CARL template<> - template - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::selectSolver(MatrixType&& matrix) const { + std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::internalCreate() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; iterativeSolverSettings.setSolutionMethod(method); - result = std::make_unique>(std::forward(matrix), std::make_unique>(), iterativeSolverSettings); + result = std::make_unique>(std::make_unique>(), iterativeSolverSettings); } else if (method == MinMaxMethod::LinearProgramming) { - result = std::make_unique>(std::forward(matrix), std::make_unique>(), std::make_unique>()); + result = std::make_unique>(std::make_unique>(), std::make_unique>()); } else { - STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "The selected method is not available for this data type."); + STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } + result->setTrackScheduler(this->isTrackSchedulerSet()); return result; } -#endif + template class MinMaxLinearEquationSolver; template class MinMaxLinearEquationSolver; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 3b7574abe..b00c7f155 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -23,6 +23,14 @@ namespace storm { namespace solver { + enum class MinMaxLinearEquationSolverRequirement { + ValidSchedulerHint, + ValidValueHint, + NoEndComponents, + GlobalUpperBound, + GlobalLowerBound + }; + /*! * A class representing the interface that all min-max linear equation solvers shall implement. */ @@ -30,10 +38,13 @@ namespace storm { class MinMaxLinearEquationSolver : public AbstractEquationSolver { protected: MinMaxLinearEquationSolver(OptimizationDirectionSetting direction = OptimizationDirectionSetting::Unset); - + public: virtual ~MinMaxLinearEquationSolver(); - + + virtual void setMatrix(storm::storage::SparseMatrix const& matrix) = 0; + virtual void setMatrix(storm::storage::SparseMatrix&& matrix) = 0; + /*! * Solves the equation system x = min/max(A*x + b) given by the parameters. Note that the matrix A has * to be given upon construction time of the solver object. @@ -78,33 +89,33 @@ namespace storm { * optimization direction is used. Note: this method can only be called after setting the optimization direction. */ virtual void repeatedMultiply(std::vector& x, std::vector* b , uint_fast64_t n) const; - + /*! * Sets an optimization direction to use for calls to methods that do not explicitly provide one. */ void setOptimizationDirection(OptimizationDirection direction); - + /*! * Unsets the optimization direction to use for calls to methods that do not explicitly provide one. */ void unsetOptimizationDirection(); - + /*! * Sets whether schedulers are generated when solving equation systems. If the argument is false, the currently * stored scheduler (if any) is deleted. */ void setTrackScheduler(bool trackScheduler = true); - + /*! * Retrieves whether this solver is set to generate schedulers. */ bool isTrackSchedulerSet() const; - + /*! * Retrieves whether the solver generated a scheduler. */ bool hasScheduler() const; - + /*! * Retrieves the generated scheduler. Note: it is only legal to call this function if a scheduler was generated. */ @@ -114,7 +125,7 @@ namespace storm { * Retrieves the generated (deterministic) choices of the optimal scheduler. Note: it is only legal to call this function if a scheduler was generated. */ std::vector const& getSchedulerChoices() const; - + /*! * Sets whether some of the generated data during solver calls should be cached. * This possibly decreases the runtime of subsequent calls but also increases memory consumption. @@ -125,12 +136,12 @@ namespace storm { * Retrieves whether some of the generated data during solver calls should be cached. */ bool isCachingEnabled() const; - + /* * Clears the currently cached data that has been stored during previous calls of the solver. */ virtual void clearCache() const; - + /*! * Sets a lower bound for the solution that can potentially used by the solver. */ @@ -154,15 +165,31 @@ namespace storm { /*! * Returns true iff a scheduler hint was defined */ - bool hasSchedulerHint() const; - + bool hasSchedulerHint() const; + + /*! + * Retrieves the requirements of this solver for solving equations with the current settings. + */ + virtual std::vector getRequirements() const; + + /*! + * Notifies the solver that the requirements for solving equations have been checked. If this has not been + * done before solving equations, the solver might issue a warning, perform the checks itself or even fail. + */ + void setRequirementsChecked(bool value = true); + + /*! + * Retrieves whether the solver is aware that the requirements were checked. + */ + bool getRequirementsChecked() const; + protected: /// The optimization direction to use for calls to functions that do not provide it explicitly. Can also be unset. OptimizationDirectionSetting direction; - + /// Whether we generate a scheduler during solving. bool trackScheduler; - + /// The scheduler choices that induce the optimal values (if they could be successfully generated). mutable boost::optional> schedulerChoices; @@ -179,16 +206,18 @@ namespace storm { /// Whether some of the generated data during solver calls should be cached. bool cachingEnabled; + /// A flag storing whether the requirements of the solver were checked. + bool requirementsChecked; }; - + template class MinMaxLinearEquationSolverFactory { public: MinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const = 0; + + virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const; virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const; - + void setTrackScheduler(bool value); bool isTrackSchedulerSet() const; @@ -196,23 +225,24 @@ namespace storm { virtual void setMinMaxMethod(MinMaxMethod const& newMethod); MinMaxMethod const& getMinMaxMethod() const; - + + std::vector getRequirements() const; + + protected: + virtual std::unique_ptr> internalCreate() const = 0; + private: bool trackScheduler; MinMaxMethod method; }; - + template class GeneralMinMaxLinearEquationSolverFactory : public MinMaxLinearEquationSolverFactory { public: GeneralMinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const override; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const override; - - private: - template - std::unique_ptr> selectSolver(MatrixType&& matrix) const; + + protected: + virtual std::unique_ptr> internalCreate() const override; }; } // namespace solver diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp index 5fedfced4..ab879a175 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp @@ -15,7 +15,7 @@ namespace storm { namespace solver { template - StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver() : A(nullptr) { + StandardMinMaxLinearEquationSolver::StandardMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory) : linearEquationSolverFactory(std::move(linearEquationSolverFactory)), A(nullptr) { // Intentionally left empty. } @@ -29,6 +29,18 @@ namespace storm { // Intentionally left empty. } + template + void StandardMinMaxLinearEquationSolver::setMatrix(storm::storage::SparseMatrix const& matrix) { + this->localA = nullptr; + this->A = &matrix; + } + + template + void StandardMinMaxLinearEquationSolver::setMatrix(storm::storage::SparseMatrix&& matrix) { + this->localA = std::make_unique>(std::move(matrix)); + this->A = this->localA.get(); + } + template void StandardMinMaxLinearEquationSolver::repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const { if (!linEqSolverA) { @@ -80,46 +92,25 @@ namespace storm { case EquationSolverType::Elimination: linearEquationSolverFactory = std::make_unique>(); break; } } - -#ifdef STORM_HAVE_CARL + template<> StandardMinMaxLinearEquationSolverFactory::StandardMinMaxLinearEquationSolverFactory(EquationSolverType const& solverType, MinMaxMethodSelection const& method, bool trackScheduler) : MinMaxLinearEquationSolverFactory(method, trackScheduler) { switch (solverType) { - case EquationSolverType::Eigen: linearEquationSolverFactory = std::make_unique>(); break; - case EquationSolverType::Elimination: linearEquationSolverFactory = std::make_unique>(); break; + case EquationSolverType::Eigen: linearEquationSolverFactory = std::make_unique>(); break; + case EquationSolverType::Elimination: linearEquationSolverFactory = std::make_unique>(); break; default: - STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Cannot create the requested solver for this data type."); + STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported equation solver for this data type."); } } -#endif - - template - std::unique_ptr> StandardMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - STORM_LOG_ASSERT(linearEquationSolverFactory, "Linear equation solver factory not initialized."); - - std::unique_ptr> result; - auto method = this->getMinMaxMethod(); - if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { - IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; - iterativeSolverSettings.setSolutionMethod(method); - result = std::make_unique>(matrix, linearEquationSolverFactory->clone(), iterativeSolverSettings); - } else { - STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); - } - result->setTrackScheduler(this->isTrackSchedulerSet()); - return result; - } - + template - std::unique_ptr> StandardMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { - STORM_LOG_ASSERT(linearEquationSolverFactory, "Linear equation solver factory not initialized."); - + std::unique_ptr> StandardMinMaxLinearEquationSolverFactory::internalCreate() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { IterativeMinMaxLinearEquationSolverSettings iterativeSolverSettings; iterativeSolverSettings.setSolutionMethod(method); - result = std::make_unique>(std::move(matrix), linearEquationSolverFactory->clone(), iterativeSolverSettings); + result = std::make_unique>(this->linearEquationSolverFactory->clone(), iterativeSolverSettings); } else { STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.h b/src/storm/solver/StandardMinMaxLinearEquationSolver.h index b122489c8..765e24888 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.h +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.h @@ -9,11 +9,13 @@ namespace storm { template class StandardMinMaxLinearEquationSolver : public MinMaxLinearEquationSolver { public: - StandardMinMaxLinearEquationSolver(); - + StandardMinMaxLinearEquationSolver(std::unique_ptr>&& linearEquationSolverFactory); StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory); StandardMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory); + virtual void setMatrix(storm::storage::SparseMatrix const& matrix) override; + virtual void setMatrix(storm::storage::SparseMatrix&& matrix) override; + virtual ~StandardMinMaxLinearEquationSolver() = default; virtual void repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const override; @@ -46,11 +48,13 @@ namespace storm { StandardMinMaxLinearEquationSolverFactory(std::unique_ptr>&& linearEquationSolverFactory, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); StandardMinMaxLinearEquationSolverFactory(EquationSolverType const& solverType, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const override; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const override; - protected: + virtual std::unique_ptr> internalCreate() const override; + std::unique_ptr> linearEquationSolverFactory; + + private: + void createLinearEquationSolverFactory() const; }; template diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp index f659620e9..f60fce272 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp @@ -23,15 +23,31 @@ namespace storm { namespace solver { template - TopologicalMinMaxLinearEquationSolver::TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, double precision, uint_fast64_t maximalNumberOfIterations, bool relative) : A(A), precision(precision), maximalNumberOfIterations(maximalNumberOfIterations), relative(relative) - { - // Get the settings object to customize solving. - this->enableCuda = storm::settings::getModule().isCudaSet(); + TopologicalMinMaxLinearEquationSolver::TopologicalMinMaxLinearEquationSolver(double precision, uint_fast64_t maximalNumberOfIterations, bool relative) : precision(precision), maximalNumberOfIterations(maximalNumberOfIterations), relative(relative) { + // Get the settings object to customize solving. + this->enableCuda = storm::settings::getModule().isCudaSet(); #ifdef STORM_HAVE_CUDA - STORM_LOG_INFO_COND(this->enableCuda, "Option CUDA was not set, but the topological value iteration solver will use it anyways."); + STORM_LOG_INFO_COND(this->enableCuda, "Option CUDA was not set, but the topological value iteration solver will use it anyways."); #endif } - + + template + TopologicalMinMaxLinearEquationSolver::TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, double precision, uint_fast64_t maximalNumberOfIterations, bool relative) : TopologicalMinMaxLinearEquationSolver(precision, maximalNumberOfIterations, relative) { + this->setMatrix(A); + } + + template + void TopologicalMinMaxLinearEquationSolver::setMatrix(storm::storage::SparseMatrix const& matrix) { + this->localA = nullptr; + this->A = &matrix; + } + + template + void TopologicalMinMaxLinearEquationSolver::setMatrix(storm::storage::SparseMatrix&& matrix) { + this->localA = std::make_unique>(std::move(matrix)); + this->A = this->localA.get(); + } + template bool TopologicalMinMaxLinearEquationSolver::solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { @@ -42,7 +58,7 @@ namespace storm { #endif if (__FORCE_FLOAT_CALCULATION && std::is_same::value) { // FIXME: This actually allocates quite some storage, because of this conversion, is it really necessary? - storm::storage::SparseMatrix newA = this->A.template toValueType(); + storm::storage::SparseMatrix newA = this->A->template toValueType(); TopologicalMinMaxLinearEquationSolver newSolver(newA, this->precision, this->maximalNumberOfIterations, this->relative); @@ -67,12 +83,12 @@ namespace storm { } // Now, we need to determine the SCCs of the MDP and perform a topological sort. - std::vector const& nondeterministicChoiceIndices = this->A.getRowGroupIndices(); + std::vector const& nondeterministicChoiceIndices = this->A->getRowGroupIndices(); // Check if the decomposition is necessary #ifdef STORM_HAVE_CUDA #define __USE_CUDAFORSTORM_OPT true - size_t const gpuSizeOfCompleteSystem = basicValueIteration_mvReduce_uint64_double_calculateMemorySize(static_cast(A.getRowCount()), nondeterministicChoiceIndices.size(), static_cast(A.getEntryCount())); + size_t const gpuSizeOfCompleteSystem = basicValueIteration_mvReduce_uint64_double_calculateMemorySize(static_cast(A->getRowCount()), nondeterministicChoiceIndices.size(), static_cast(A->getEntryCount())); size_t const cudaFreeMemory = static_cast(getFreeCudaMemory() * 0.95); #else #define __USE_CUDAFORSTORM_OPT false @@ -90,9 +106,9 @@ namespace storm { bool result = false; size_t globalIterations = 0; if (dir == OptimizationDirection::Minimize) { - result = __basicValueIteration_mvReduce_minimize(this->maximalNumberOfIterations, this->precision, this->relative, A.rowIndications, A.columnsAndValues, x, b, nondeterministicChoiceIndices, globalIterations); + result = __basicValueIteration_mvReduce_minimize(this->maximalNumberOfIterations, this->precision, this->relative, A->rowIndications, A->columnsAndValues, x, b, nondeterministicChoiceIndices, globalIterations); } else { - result = __basicValueIteration_mvReduce_maximize(this->maximalNumberOfIterations, this->precision, this->relative, A.rowIndications, A.columnsAndValues, x, b, nondeterministicChoiceIndices, globalIterations); + result = __basicValueIteration_mvReduce_maximize(this->maximalNumberOfIterations, this->precision, this->relative, A->rowIndications, A->columnsAndValues, x, b, nondeterministicChoiceIndices, globalIterations); } STORM_LOG_INFO("Executed " << globalIterations << " of max. " << maximalNumberOfIterations << " Iterations on GPU."); @@ -116,16 +132,16 @@ namespace storm { throw storm::exceptions::InvalidStateException() << "The useGpu Flag of a SCC was set, but this version of storm does not support CUDA acceleration. Internal Error!"; #endif } else { - storm::storage::BitVector fullSystem(this->A.getRowGroupCount(), true); - storm::storage::StronglyConnectedComponentDecomposition sccDecomposition(this->A, fullSystem, false, false); + storm::storage::BitVector fullSystem(this->A->getRowGroupCount(), true); + storm::storage::StronglyConnectedComponentDecomposition sccDecomposition(*this->A, fullSystem, false, false); STORM_LOG_THROW(sccDecomposition.size() > 0, storm::exceptions::IllegalArgumentException, "Can not solve given equation system as the SCC decomposition returned no SCCs."); - storm::storage::SparseMatrix stronglyConnectedComponentsDependencyGraph = sccDecomposition.extractPartitionDependencyGraph(this->A); + storm::storage::SparseMatrix stronglyConnectedComponentsDependencyGraph = sccDecomposition.extractPartitionDependencyGraph(*this->A); std::vector topologicalSort = storm::utility::graph::getTopologicalSort(stronglyConnectedComponentsDependencyGraph); // Calculate the optimal distribution of sccs - std::vector> optimalSccs = this->getOptimalGroupingFromTopologicalSccDecomposition(sccDecomposition, topologicalSort, this->A); + std::vector> optimalSccs = this->getOptimalGroupingFromTopologicalSccDecomposition(sccDecomposition, topologicalSort, *this->A); STORM_LOG_INFO("Optimized SCC Decomposition, originally " << topologicalSort.size() << " SCCs, optimized to " << optimalSccs.size() << " SCCs."); std::vector* currentX = nullptr; @@ -142,8 +158,8 @@ namespace storm { storm::storage::StateBlock const& scc = sccIndexIt->second; // Generate a sub matrix - storm::storage::BitVector subMatrixIndices(this->A.getColumnCount(), scc.cbegin(), scc.cend()); - storm::storage::SparseMatrix sccSubmatrix = this->A.getSubmatrix(true, subMatrixIndices, subMatrixIndices); + storm::storage::BitVector subMatrixIndices(this->A->getColumnCount(), scc.cbegin(), scc.cend()); + storm::storage::SparseMatrix sccSubmatrix = this->A->getSubmatrix(true, subMatrixIndices, subMatrixIndices); std::vector sccSubB(sccSubmatrix.getRowCount()); storm::utility::vector::selectVectorValues(sccSubB, subMatrixIndices, nondeterministicChoiceIndices, b); std::vector sccSubX(sccSubmatrix.getColumnCount()); @@ -167,7 +183,7 @@ namespace storm { sccSubNondeterministicChoiceIndices.at(outerIndex + 1) = sccSubNondeterministicChoiceIndices.at(outerIndex) + (nondeterministicChoiceIndices[state + 1] - nondeterministicChoiceIndices[state]); for (auto rowGroupIt = nondeterministicChoiceIndices[state]; rowGroupIt != nondeterministicChoiceIndices[state + 1]; ++rowGroupIt) { - typename storm::storage::SparseMatrix::const_rows row = this->A.getRow(rowGroupIt); + typename storm::storage::SparseMatrix::const_rows row = this->A->getRow(rowGroupIt); for (auto rowIt = row.begin(); rowIt != row.end(); ++rowIt) { if (!subMatrixIndices.get(rowIt->getColumn())) { // This is an outgoing transition of a state in the SCC to a state not included in the SCC @@ -439,11 +455,11 @@ namespace storm { template void TopologicalMinMaxLinearEquationSolver::repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const { - std::unique_ptr> multiplyResult = std::make_unique>(this->A.getRowCount()); + std::unique_ptr> multiplyResult = std::make_unique>(this->A->getRowCount()); // Now perform matrix-vector multiplication as long as we meet the bound of the formula. for (uint_fast64_t i = 0; i < n; ++i) { - this->A.multiplyWithVector(x, *multiplyResult); + this->A->multiplyWithVector(x, *multiplyResult); // Add b if it is non-null. if (b != nullptr) { @@ -452,7 +468,7 @@ namespace storm { // Reduce the vector x' by applying min/max for all non-deterministic choices as given by the topmost // element of the min/max operator stack. - storm::utility::vector::reduceVectorMinOrMax(dir, *multiplyResult, x, this->A.getRowGroupIndices()); + storm::utility::vector::reduceVectorMinOrMax(dir, *multiplyResult, x, this->A->getRowGroupIndices()); } } @@ -462,15 +478,10 @@ namespace storm { } template - std::unique_ptr> TopologicalMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - return std::make_unique>(matrix); + std::unique_ptr> TopologicalMinMaxLinearEquationSolverFactory::internalCreate() const { + return std::make_unique>(); } - template - std::unique_ptr> TopologicalMinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { - return std::make_unique>(std::move(matrix)); - } - // Explicitly instantiate the solver. template class TopologicalMinMaxLinearEquationSolver; diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h index fcbdcf988..2488ead3f 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h @@ -24,6 +24,8 @@ namespace storm { template class TopologicalMinMaxLinearEquationSolver : public MinMaxLinearEquationSolver { public: + TopologicalMinMaxLinearEquationSolver(double precision = 1e-6, uint_fast64_t maximalNumberOfIterations = 20000, bool relative = true); + /*! * Constructs a min-max linear equation solver with parameters being set according to the settings * object. @@ -31,7 +33,10 @@ namespace storm { * @param A The matrix defining the coefficients of the linear equation system. */ TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, double precision = 1e-6, uint_fast64_t maximalNumberOfIterations = 20000, bool relative = true); - + + virtual void setMatrix(storm::storage::SparseMatrix const& matrix) override; + virtual void setMatrix(storm::storage::SparseMatrix&& matrix) override; + virtual bool solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; virtual void repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const override; @@ -40,7 +45,8 @@ namespace storm { bool getRelative() const; private: - storm::storage::SparseMatrix const& A; + storm::storage::SparseMatrix const* A; + std::unique_ptr> localA; double precision; uint_fast64_t maximalNumberOfIterations; bool relative; @@ -144,8 +150,8 @@ namespace storm { public: TopologicalMinMaxLinearEquationSolverFactory(bool trackScheduler = false); - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const override; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const override; + protected: + virtual std::unique_ptr> internalCreate() const override; }; } // namespace solver From 3829b58e0de262ef0199511a35f706d3f419f830 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 19:26:54 +0200 Subject: [PATCH 74/95] introduced top-level solve equations function to centrally check for requirements --- .../IterativeMinMaxLinearEquationSolver.cpp | 4 ++-- .../solver/IterativeMinMaxLinearEquationSolver.h | 8 +++++--- .../solver/LpMinMaxLinearEquationSolver.cpp | 4 ++-- src/storm/solver/LpMinMaxLinearEquationSolver.h | 9 +++++---- src/storm/solver/MinMaxLinearEquationSolver.cpp | 15 ++++++++++----- src/storm/solver/MinMaxLinearEquationSolver.h | 16 +++++++++------- .../StandardMinMaxLinearEquationSolver.cpp | 2 +- .../solver/StandardMinMaxLinearEquationSolver.h | 7 +++++-- .../TopologicalMinMaxLinearEquationSolver.cpp | 4 ++-- .../TopologicalMinMaxLinearEquationSolver.h | 4 ++-- 10 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 4815fc8a4..de02a1c79 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -91,7 +91,7 @@ namespace storm { } template - bool IterativeMinMaxLinearEquationSolver::solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { + bool IterativeMinMaxLinearEquationSolver::internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { switch (this->getSettings().getSolutionMethod()) { case IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::ValueIteration: return solveEquationsValueIteration(dir, x, b); @@ -464,7 +464,7 @@ namespace storm { } template - std::unique_ptr> IterativeMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> IterativeMinMaxLinearEquationSolverFactory::create() const { STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); std::unique_ptr> result = std::make_unique>(this->linearEquationSolverFactory->clone(), settings); diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index dc5cc656a..bd3ad9c0e 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -40,7 +40,7 @@ namespace storm { IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); IterativeMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, IterativeMinMaxLinearEquationSolverSettings const& settings = IterativeMinMaxLinearEquationSolverSettings()); - virtual bool solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; + virtual bool internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; IterativeMinMaxLinearEquationSolverSettings const& getSettings() const; void setSettings(IterativeMinMaxLinearEquationSolverSettings const& newSettings); @@ -87,8 +87,10 @@ namespace storm { virtual void setMinMaxMethod(MinMaxMethodSelection const& newMethod) override; virtual void setMinMaxMethod(MinMaxMethod const& newMethod) override; - protected: - virtual std::unique_ptr> internalCreate() const override; + // Make the other create methods visible. + using MinMaxLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create() const override; private: IterativeMinMaxLinearEquationSolverSettings settings; diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp index 45c76e029..5df72fe28 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp @@ -25,7 +25,7 @@ namespace storm { } template - bool LpMinMaxLinearEquationSolver::solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { + bool LpMinMaxLinearEquationSolver::internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { // Set up the LP solver std::unique_ptr> solver = lpSolverFactory->create(""); @@ -124,7 +124,7 @@ namespace storm { } template - std::unique_ptr> LpMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> LpMinMaxLinearEquationSolverFactory::create() const { STORM_LOG_ASSERT(this->lpSolverFactory, "Lp solver factory not initialized."); STORM_LOG_ASSERT(this->linearEquationSolverFactory, "Linear equation solver factory not initialized."); diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.h b/src/storm/solver/LpMinMaxLinearEquationSolver.h index 5491e7ca2..a31ac710b 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.h +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.h @@ -14,7 +14,7 @@ namespace storm { LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix const& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); LpMinMaxLinearEquationSolver(storm::storage::SparseMatrix&& A, std::unique_ptr>&& linearEquationSolverFactory, std::unique_ptr>&& lpSolverFactory); - virtual bool solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; + virtual bool internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; virtual void clearCache() const override; @@ -32,9 +32,10 @@ namespace storm { virtual void setMinMaxMethod(MinMaxMethodSelection const& newMethod) override; virtual void setMinMaxMethod(MinMaxMethod const& newMethod) override; - protected: - virtual std::unique_ptr> internalCreate() const override; - std::unique_ptr> createLpEquationSolverFactory() const; + // Make the other create methods visible. + using MinMaxLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create() const override; private: std::unique_ptr> lpSolverFactory; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 872f7c03b..f1a7b1e3c 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -28,6 +28,11 @@ namespace storm { // Intentionally left empty. } + template + bool MinMaxLinearEquationSolver::solveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const { + return internalSolveEquations(d, x, b); + } + template void MinMaxLinearEquationSolver::solveEquations(std::vector& x, std::vector const& b) const { STORM_LOG_THROW(isSet(this->direction), storm::exceptions::IllegalFunctionCallException, "Optimization direction not set."); @@ -196,20 +201,20 @@ namespace storm { template std::vector MinMaxLinearEquationSolverFactory::getRequirements() const { // Create dummy solver and ask it for requirements. - std::unique_ptr> solver = this->internalCreate(); + std::unique_ptr> solver = this->create(); return solver->getRequirements(); } template std::unique_ptr> MinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix const& matrix) const { - std::unique_ptr> solver = this->internalCreate(); + std::unique_ptr> solver = this->create(); solver->setMatrix(matrix); return solver; } template std::unique_ptr> MinMaxLinearEquationSolverFactory::create(storm::storage::SparseMatrix&& matrix) const { - std::unique_ptr> solver = this->internalCreate(); + std::unique_ptr> solver = this->create(); solver->setMatrix(std::move(matrix)); return solver; } @@ -220,7 +225,7 @@ namespace storm { } template - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::create() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { @@ -239,7 +244,7 @@ namespace storm { } template<> - std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> GeneralMinMaxLinearEquationSolverFactory::create() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index b00c7f155..0fe7d8fbe 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -55,7 +55,7 @@ namespace storm { * solver, but may be ignored. * @param b The vector to add after matrix-vector multiplication. */ - virtual bool solveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const = 0; + bool solveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const; /*! * Behaves the same as the other variant of solveEquations, with the distinction that @@ -184,6 +184,8 @@ namespace storm { bool getRequirementsChecked() const; protected: + virtual bool internalSolveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const = 0; + /// The optimization direction to use for calls to functions that do not provide it explicitly. Can also be unset. OptimizationDirectionSetting direction; @@ -217,7 +219,8 @@ namespace storm { virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const; virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const; - + virtual std::unique_ptr> create() const = 0; + void setTrackScheduler(bool value); bool isTrackSchedulerSet() const; @@ -228,9 +231,6 @@ namespace storm { std::vector getRequirements() const; - protected: - virtual std::unique_ptr> internalCreate() const = 0; - private: bool trackScheduler; MinMaxMethod method; @@ -241,8 +241,10 @@ namespace storm { public: GeneralMinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - protected: - virtual std::unique_ptr> internalCreate() const override; + // Make the other create methods visible. + using MinMaxLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create() const override; }; } // namespace solver diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp index ab879a175..0b3f41a03 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp @@ -104,7 +104,7 @@ namespace storm { } template - std::unique_ptr> StandardMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> StandardMinMaxLinearEquationSolverFactory::create() const { std::unique_ptr> result; auto method = this->getMinMaxMethod(); if (method == MinMaxMethod::ValueIteration || method == MinMaxMethod::PolicyIteration || method == MinMaxMethod::Acyclic) { diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.h b/src/storm/solver/StandardMinMaxLinearEquationSolver.h index 765e24888..4529b2dc1 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.h +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.h @@ -48,9 +48,12 @@ namespace storm { StandardMinMaxLinearEquationSolverFactory(std::unique_ptr>&& linearEquationSolverFactory, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); StandardMinMaxLinearEquationSolverFactory(EquationSolverType const& solverType, MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - protected: - virtual std::unique_ptr> internalCreate() const override; + // Make the other create methods visible. + using MinMaxLinearEquationSolverFactory::create; + virtual std::unique_ptr> create() const override; + + protected: std::unique_ptr> linearEquationSolverFactory; private: diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp index f60fce272..6d70c7ea9 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp @@ -49,7 +49,7 @@ namespace storm { } template - bool TopologicalMinMaxLinearEquationSolver::solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { + bool TopologicalMinMaxLinearEquationSolver::internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const { #ifdef GPU_USE_FLOAT #define __FORCE_FLOAT_CALCULATION true @@ -478,7 +478,7 @@ namespace storm { } template - std::unique_ptr> TopologicalMinMaxLinearEquationSolverFactory::internalCreate() const { + std::unique_ptr> TopologicalMinMaxLinearEquationSolverFactory::create() const { return std::make_unique>(); } diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h index 2488ead3f..27e261961 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h @@ -37,7 +37,7 @@ namespace storm { virtual void setMatrix(storm::storage::SparseMatrix const& matrix) override; virtual void setMatrix(storm::storage::SparseMatrix&& matrix) override; - virtual bool solveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; + virtual bool internalSolveEquations(OptimizationDirection dir, std::vector& x, std::vector const& b) const override; virtual void repeatedMultiply(OptimizationDirection dir, std::vector& x, std::vector const* b, uint_fast64_t n) const override; @@ -151,7 +151,7 @@ namespace storm { TopologicalMinMaxLinearEquationSolverFactory(bool trackScheduler = false); protected: - virtual std::unique_ptr> internalCreate() const override; + virtual std::unique_ptr> create() const override; }; } // namespace solver From 4adee85fa5e47775b04e2382edd0c299d7a19a57 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 20:59:20 +0200 Subject: [PATCH 75/95] added checking requirements of MinMax solvers to model checker helpers --- .../3rdparty/sylvan/src/storm_wrapper.cpp | 2 -- .../UncheckedRequirementException.h | 12 +++++++++++ .../helper/SparseMarkovAutomatonCslHelper.cpp | 21 +++++++++++++++++-- .../prctl/helper/HybridMdpPrctlHelper.cpp | 15 +++++++++++++ .../prctl/helper/SparseMdpPrctlHelper.cpp | 12 +++++++++++ .../IterativeMinMaxLinearEquationSolver.cpp | 1 + .../solver/LpMinMaxLinearEquationSolver.cpp | 1 + .../solver/MinMaxLinearEquationSolver.cpp | 17 +++++++++++++-- src/storm/solver/MinMaxLinearEquationSolver.h | 11 ++++++---- .../StandardMinMaxLinearEquationSolver.cpp | 1 + src/storm/utility/macros.h | 8 ++++++- .../parser/SparseItemLabelingParserTest.cpp | 6 +++--- 12 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 src/storm/exceptions/UncheckedRequirementException.h diff --git a/resources/3rdparty/sylvan/src/storm_wrapper.cpp b/resources/3rdparty/sylvan/src/storm_wrapper.cpp index 09fb51ccf..fb92720d0 100644 --- a/resources/3rdparty/sylvan/src/storm_wrapper.cpp +++ b/resources/3rdparty/sylvan/src/storm_wrapper.cpp @@ -125,8 +125,6 @@ int storm_rational_number_is_zero(storm_rational_number_ptr a) { std::lock_guard lock(rationalNumberMutex); #endif - std::cout << "got ptr for eq check " << a << std::endl; - return storm::utility::isZero(*(storm::RationalNumber const*)a) ? 1 : 0; } diff --git a/src/storm/exceptions/UncheckedRequirementException.h b/src/storm/exceptions/UncheckedRequirementException.h new file mode 100644 index 000000000..f902c6ee5 --- /dev/null +++ b/src/storm/exceptions/UncheckedRequirementException.h @@ -0,0 +1,12 @@ +#pragma once + +#include "storm/exceptions/BaseException.h" +#include "storm/exceptions/ExceptionMacros.h" + +namespace storm { + namespace exceptions { + + STORM_NEW_EXCEPTION(UncheckedRequirementException) + + } // namespace exceptions +} // namespace storm diff --git a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp index 3aaeec73d..a7d28ecac 100644 --- a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp +++ b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp @@ -27,6 +27,7 @@ #include "storm/exceptions/InvalidStateException.h" #include "storm/exceptions/InvalidPropertyException.h" #include "storm/exceptions/InvalidOperationException.h" +#include "storm/exceptions/UncheckedRequirementException.h" namespace storm { namespace modelchecker { @@ -86,8 +87,13 @@ namespace storm { } } } - + + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(aProbabilistic); + solver->setRequirementsChecked(); solver->setCachingEnabled(true); // Perform the actual value iteration @@ -368,7 +374,13 @@ namespace storm { storm::storage::SparseMatrix sspMatrix = sspMatrixBuilder.build(currentChoice, numberOfSspStates, numberOfSspStates); std::vector x(numberOfSspStates); + + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(sspMatrix); + solver->setRequirementsChecked(); solver->solveEquations(dir, x, b); // Prepare result vector. @@ -570,11 +582,16 @@ namespace storm { std::vector w = v; std::vector x(aProbabilistic.getRowGroupCount(), storm::utility::zero()); std::vector b = probabilisticChoiceRewards; + + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + auto solver = minMaxLinearEquationSolverFactory.create(std::move(aProbabilistic)); + solver->setRequirementsChecked(true); solver->setCachingEnabled(true); while (true) { - // Compute the expected total rewards for the probabilistic states solver->solveEquations(dir, x, b); diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index b0363cd4e..6a6a15dd7 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -19,6 +19,7 @@ #include "storm/solver/MinMaxLinearEquationSolver.h" #include "storm/exceptions/InvalidPropertyException.h" +#include "storm/exceptions/UncheckedRequirementException.h" namespace storm { namespace modelchecker { @@ -77,7 +78,12 @@ namespace storm { // Translate the symbolic matrix/vector to their explicit representations and solve the equation system. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); + // Check for requirements of the solver. + std::vector requirements = linearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); + solver->setRequirementsChecked(); solver->solveEquations(dir, x, explicitRepresentation.second); // Return a hybrid check result that stores the numerical values explicitly. @@ -141,6 +147,10 @@ namespace storm { // Translate the symbolic matrix/vector to their explicit representations. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); + // Check for requirements of the solver. + std::vector requirements = linearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); solver->repeatedMultiply(dir, x, &explicitRepresentation.second, stepBound); @@ -267,8 +277,13 @@ namespace storm { // Translate the symbolic matrix/vector to their explicit representations. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); + // Check for requirements of the solver. + std::vector requirements = linearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + // Now solve the resulting equation system. std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); + solver->setRequirementsChecked(); solver->solveEquations(dir, x, explicitRepresentation.second); // Return a hybrid check result that stores the numerical values explicitly. diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 93c1674b0..1e6cfb882 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -29,6 +29,7 @@ #include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/IllegalFunctionCallException.h" #include "storm/exceptions/IllegalArgumentException.h" +#include "storm/exceptions/UncheckedRequirementException.h" namespace storm { namespace modelchecker { @@ -253,8 +254,13 @@ namespace storm { template std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound) { + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + // Set up the solver std::unique_ptr> solver = storm::solver::configureMinMaxLinearEquationSolver(goal, minMaxLinearEquationSolverFactory, submatrix); + solver->setRequirementsChecked(); if (lowerResultBound) { solver->setLowerBound(lowerResultBound.get()); } @@ -651,8 +657,13 @@ namespace storm { // Finalize the matrix and solve the corresponding system of equations. storm::storage::SparseMatrix sspMatrix = sspMatrixBuilder.build(currentChoice, numberOfSspStates, numberOfSspStates); + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::vector sspResult(numberOfSspStates); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(std::move(sspMatrix)); + solver->setRequirementsChecked(); solver->solveEquations(dir, sspResult, b); // Prepare result vector. @@ -764,6 +775,7 @@ namespace storm { ValueType precision = storm::utility::convertNumber(storm::settings::getModule().getPrecision()); std::vector x(mecTransitions.getRowGroupCount(), storm::utility::zero()); std::vector xPrime = x; + auto solver = minMaxLinearEquationSolverFactory.create(std::move(mecTransitions)); solver->setCachingEnabled(true); ValueType maxDiff, minDiff; diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index de02a1c79..671e35345 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -469,6 +469,7 @@ namespace storm { std::unique_ptr> result = std::make_unique>(this->linearEquationSolverFactory->clone(), settings); result->setTrackScheduler(this->isTrackSchedulerSet()); + result->setRequirementsChecked(this->isRequirementsCheckedSet()); return result; } diff --git a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp index 5df72fe28..2f360f513 100644 --- a/src/storm/solver/LpMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/LpMinMaxLinearEquationSolver.cpp @@ -130,6 +130,7 @@ namespace storm { std::unique_ptr> result = std::make_unique>(this->linearEquationSolverFactory->clone(), this->lpSolverFactory->clone()); result->setTrackScheduler(this->isTrackSchedulerSet()); + result->setRequirementsChecked(this->isRequirementsCheckedSet()); return result; } diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index f1a7b1e3c..011249ec6 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -30,6 +30,7 @@ namespace storm { template bool MinMaxLinearEquationSolver::solveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const { + STORM_LOG_WARN_COND_DEBUG(this->isRequirementsCheckedSet(), "The requirements of the solver have not been marked as checked. Please provide the appropriate check or mark the requirements as checked (if applicable)."); return internalSolveEquations(d, x, b); } @@ -147,8 +148,8 @@ namespace storm { } template - bool MinMaxLinearEquationSolver::getRequirementsChecked() const { - return this->requirementsChecked; + bool MinMaxLinearEquationSolver::isRequirementsCheckedSet() const { + return requirementsChecked; } template @@ -166,6 +167,16 @@ namespace storm { return trackScheduler; } + template + void MinMaxLinearEquationSolverFactory::setRequirementsChecked(bool value) { + this->requirementsChecked = value; + } + + template + bool MinMaxLinearEquationSolverFactory::isRequirementsCheckedSet() const { + return this->requirementsChecked; + } + template void MinMaxLinearEquationSolverFactory::setMinMaxMethod(MinMaxMethodSelection const& newMethod) { if (newMethod == MinMaxMethodSelection::FROMSETTINGS) { @@ -240,6 +251,7 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } result->setTrackScheduler(this->isTrackSchedulerSet()); + result->setRequirementsChecked(this->isRequirementsCheckedSet()); return result; } @@ -257,6 +269,7 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } result->setTrackScheduler(this->isTrackSchedulerSet()); + result->setRequirementsChecked(this->isRequirementsCheckedSet()); return result; } diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 0fe7d8fbe..992bd2cc5 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -181,7 +181,7 @@ namespace storm { /*! * Retrieves whether the solver is aware that the requirements were checked. */ - bool getRequirementsChecked() const; + bool isRequirementsCheckedSet() const; protected: virtual bool internalSolveEquations(OptimizationDirection d, std::vector& x, std::vector const& b) const = 0; @@ -217,8 +217,8 @@ namespace storm { public: MinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); - virtual std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const; - virtual std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const; + std::unique_ptr> create(storm::storage::SparseMatrix const& matrix) const; + std::unique_ptr> create(storm::storage::SparseMatrix&& matrix) const; virtual std::unique_ptr> create() const = 0; void setTrackScheduler(bool value); @@ -230,10 +230,13 @@ namespace storm { MinMaxMethod const& getMinMaxMethod() const; std::vector getRequirements() const; - + void setRequirementsChecked(bool value = true); + bool isRequirementsCheckedSet() const; + private: bool trackScheduler; MinMaxMethod method; + bool requirementsChecked; }; template diff --git a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp index 0b3f41a03..4e2eabf03 100644 --- a/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/StandardMinMaxLinearEquationSolver.cpp @@ -115,6 +115,7 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "Unsupported technique."); } result->setTrackScheduler(this->isTrackSchedulerSet()); + result->setRequirementsChecked(this->isRequirementsCheckedSet()); return result; } diff --git a/src/storm/utility/macros.h b/src/storm/utility/macros.h index 348f6677e..b4f3cb06a 100644 --- a/src/storm/utility/macros.h +++ b/src/storm/utility/macros.h @@ -15,9 +15,15 @@ do { \ assert(cond); \ } \ } while (false) - +#define STORM_LOG_WARN_COND_DEBUG(cond, message) \ +do { \ + if (!(cond)) { \ + STORM_LOG_WARN(message); \ + } \ +} while (false) #else #define STORM_LOG_ASSERT(cond, message) +#define STORM_LOG_WARN_COND_DEBUG(cond, message) #endif // Define STORM_LOG_THROW to always throw the exception with the given message if the condition fails to hold. diff --git a/src/test/storm/parser/SparseItemLabelingParserTest.cpp b/src/test/storm/parser/SparseItemLabelingParserTest.cpp index bca1c2201..695b6837b 100644 --- a/src/test/storm/parser/SparseItemLabelingParserTest.cpp +++ b/src/test/storm/parser/SparseItemLabelingParserTest.cpp @@ -81,18 +81,18 @@ TEST(SparseItemLabelingParserTest, BasicNondeterministicParsing) { // Checking whether the parsed labeling is correct ASSERT_TRUE(labeling.containsLabel("alpha")); - EXPECT_EQ(2, labeling.getChoices("alpha").getNumberOfSetBits()); + EXPECT_EQ(2ull, labeling.getChoices("alpha").getNumberOfSetBits()); EXPECT_TRUE(labeling.getChoiceHasLabel("alpha", 0)); EXPECT_TRUE(labeling.getChoiceHasLabel("alpha", 1)); ASSERT_TRUE(labeling.containsLabel("beta")); - EXPECT_EQ(3, labeling.getChoices("beta").getNumberOfSetBits()); + EXPECT_EQ(3ull, labeling.getChoices("beta").getNumberOfSetBits()); EXPECT_TRUE(labeling.getChoiceHasLabel("beta", 1)); EXPECT_TRUE(labeling.getChoiceHasLabel("beta", 3)); EXPECT_TRUE(labeling.getChoiceHasLabel("beta", 8)); ASSERT_TRUE(labeling.containsLabel("gamma")); - EXPECT_EQ(1, labeling.getChoices("gamma").getNumberOfSetBits()); + EXPECT_EQ(1ull, labeling.getChoices("gamma").getNumberOfSetBits()); EXPECT_TRUE(labeling.getChoiceHasLabel("gamma", 2)); ASSERT_TRUE(labeling.containsLabel("delta")); From f7c803827b5d6d8870b5fd28b0a7afedd4972897 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 21:00:15 +0200 Subject: [PATCH 76/95] remove debug output --- resources/3rdparty/sylvan/src/storm_wrapper.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/3rdparty/sylvan/src/storm_wrapper.cpp b/resources/3rdparty/sylvan/src/storm_wrapper.cpp index 09fb51ccf..fb92720d0 100644 --- a/resources/3rdparty/sylvan/src/storm_wrapper.cpp +++ b/resources/3rdparty/sylvan/src/storm_wrapper.cpp @@ -125,8 +125,6 @@ int storm_rational_number_is_zero(storm_rational_number_ptr a) { std::lock_guard lock(rationalNumberMutex); #endif - std::cout << "got ptr for eq check " << a << std::endl; - return storm::utility::isZero(*(storm::RationalNumber const*)a) ? 1 : 0; } From 569b0122b84b2d1d8b011048227368964dd15c68 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 30 Aug 2017 21:30:02 +0200 Subject: [PATCH 77/95] introduced different minmax equation system types for requirement retrieval --- .../csl/helper/SparseMarkovAutomatonCslHelper.cpp | 6 +++--- .../modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp | 8 ++------ .../modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp | 10 +++++----- .../modelchecker/prctl/helper/SparseMdpPrctlHelper.h | 2 +- src/storm/solver/MinMaxLinearEquationSolver.cpp | 6 +++--- src/storm/solver/MinMaxLinearEquationSolver.h | 10 ++++++++-- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp index a7d28ecac..ecf2b6759 100644 --- a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp +++ b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp @@ -89,7 +89,7 @@ namespace storm { } // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(aProbabilistic); @@ -376,7 +376,7 @@ namespace storm { std::vector x(numberOfSspStates); // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(sspMatrix); @@ -584,7 +584,7 @@ namespace storm { std::vector b = probabilisticChoiceRewards; // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); auto solver = minMaxLinearEquationSolverFactory.create(std::move(aProbabilistic)); diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index 6a6a15dd7..b94b8ad9c 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -79,7 +79,7 @@ namespace storm { std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); // Check for requirements of the solver. - std::vector requirements = linearEquationSolverFactory.getRequirements(); + std::vector requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); @@ -147,10 +147,6 @@ namespace storm { // Translate the symbolic matrix/vector to their explicit representations. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); - // Check for requirements of the solver. - std::vector requirements = linearEquationSolverFactory.getRequirements(); - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); - std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); solver->repeatedMultiply(dir, x, &explicitRepresentation.second, stepBound); @@ -278,7 +274,7 @@ namespace storm { std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); // Check for requirements of the solver. - std::vector requirements = linearEquationSolverFactory.getRequirements(); + std::vector requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); // Now solve the resulting equation system. diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 1e6cfb882..c901d29d3 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -159,7 +159,7 @@ namespace storm { std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, boost::none, hint, skipEcWithinMaybeStatesCheck); // Now compute the results for the maybeStates - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), storm::utility::one()); + std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), storm::utility::one(), storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); // Set values of resulting vector according to result. storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); @@ -252,10 +252,10 @@ namespace storm { } template - std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound) { + std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound, storm::solver::MinMaxLinearEquationSolverSystemType const& equationSystemType) { // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(equationSystemType); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); // Set up the solver @@ -460,7 +460,7 @@ namespace storm { std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, selectedChoices, hint, skipEcWithinMaybeStatesCheck); // Now compute the results for the maybeStates - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero()); + std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), boost::none, storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); // Set values of resulting vector according to result. storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); @@ -658,7 +658,7 @@ namespace storm { storm::storage::SparseMatrix sspMatrix = sspMatrixBuilder.build(currentChoice, numberOfSspStates, numberOfSspStates); // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(); + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::vector sspResult(numberOfSspStates); diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h index e82c89cc2..3727601d1 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h @@ -41,7 +41,7 @@ namespace storm { static std::pair>, boost::optional>> extractHintInformationForMaybeStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, boost::optional const& selectedChoices, ModelCheckerHint const& hint, bool skipECWithinMaybeStatesCheck); - static std::pair, boost::optional>> computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues = boost::none, boost::optional>&& hintChoices = boost::none, boost::optional const& lowerResultBound = boost::none, boost::optional const& upperResultBound = boost::none); + static std::pair, boost::optional>> computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues = boost::none, boost::optional>&& hintChoices = boost::none, boost::optional const& lowerResultBound = boost::none, boost::optional const& upperResultBound = boost::none, storm::solver::MinMaxLinearEquationSolverSystemType const& equationSystemType = storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); static MDPSparseModelCheckingHelperReturnType computeUntilProbabilities(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint = ModelCheckerHint()); diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 011249ec6..4c2321de0 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -138,7 +138,7 @@ namespace storm { } template - std::vector MinMaxLinearEquationSolver::getRequirements() const { + std::vector MinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const { return std::vector(); } @@ -210,10 +210,10 @@ namespace storm { } template - std::vector MinMaxLinearEquationSolverFactory::getRequirements() const { + std::vector MinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const { // Create dummy solver and ask it for requirements. std::unique_ptr> solver = this->create(); - return solver->getRequirements(); + return solver->getRequirements(equationSystemType); } template diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 992bd2cc5..626be302d 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -23,6 +23,12 @@ namespace storm { namespace solver { + enum class MinMaxLinearEquationSolverSystemType { + UntilProbabilities, + ReachabilityRewards, + StochasticShortestPath + }; + enum class MinMaxLinearEquationSolverRequirement { ValidSchedulerHint, ValidValueHint, @@ -170,7 +176,7 @@ namespace storm { /*! * Retrieves the requirements of this solver for solving equations with the current settings. */ - virtual std::vector getRequirements() const; + virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const; /*! * Notifies the solver that the requirements for solving equations have been checked. If this has not been @@ -229,7 +235,7 @@ namespace storm { MinMaxMethod const& getMinMaxMethod() const; - std::vector getRequirements() const; + std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const; void setRequirementsChecked(bool value = true); bool isRequirementsCheckedSet() const; From 74eeaa7f815044171ec8e3ba8cf31e61086af155 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 3 Sep 2017 21:29:47 +0200 Subject: [PATCH 78/95] computing unbounded until on MDPs with the sparse helper now respects solver requirements --- .../modelchecker/hints/ModelCheckerHint.h | 2 - .../prctl/helper/SparseMdpPrctlHelper.cpp | 42 ++++++++++++++----- .../prctl/helper/SparseMdpPrctlHelper.h | 2 +- .../IterativeMinMaxLinearEquationSolver.cpp | 13 ++++++ .../IterativeMinMaxLinearEquationSolver.h | 2 + .../solver/MinMaxLinearEquationSolver.cpp | 6 +-- src/storm/solver/MinMaxLinearEquationSolver.h | 20 +++++++-- 7 files changed, 66 insertions(+), 21 deletions(-) diff --git a/src/storm/modelchecker/hints/ModelCheckerHint.h b/src/storm/modelchecker/hints/ModelCheckerHint.h index 37fc7ec44..afa24484a 100644 --- a/src/storm/modelchecker/hints/ModelCheckerHint.h +++ b/src/storm/modelchecker/hints/ModelCheckerHint.h @@ -7,14 +7,12 @@ namespace storm { template class ExplicitModelCheckerHint; - /*! * This class contains information that might accelerate the model checking process. * @note The model checker has to make sure whether a given hint is actually applicable and thus a hint might be ignored. */ class ModelCheckerHint { public: - ModelCheckerHint() = default; // Returns true iff this hint does not contain any information diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index c901d29d3..884396c10 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -157,9 +157,33 @@ namespace storm { // obtain hint information if possible bool skipEcWithinMaybeStatesCheck = goal.minimize() || (hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()); std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, boost::none, hint, skipEcWithinMaybeStatesCheck); - - // Now compute the results for the maybeStates - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), storm::utility::one(), storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); + + // Check for requirements of the solver. + std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); + if (!requirements.empty()) { + std::unique_ptr> validScheduler; + for (auto const& requirement : requirements) { + if (requirement == storm::solver::MinMaxLinearEquationSolverRequirement::ValidSchedulerHint) { + // If the solver requires a valid scheduler (a scheduler that produces non-zero + // probabilities for all maybe states), we need to compute such a scheduler now. + validScheduler = std::make_unique>(maybeStates.size()); + storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, phiStates, statesWithProbability1, *validScheduler, boost::none); + + STORM_LOG_WARN_COND(hintInformation.second, "A scheduler hint was provided, but the solver requires a valid scheduler hint. The hint will be ignored."); + + hintInformation.second = std::vector(maybeStates.getNumberOfSetBits()); + auto maybeIt = maybeStates.begin(); + for (auto& choice : hintInformation.second.get()) { + choice = validScheduler->getChoice(*maybeIt).getDeterministicChoice(); + } + } else { + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + } + } + } + + // Now compute the results for the maybe states. + std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), storm::utility::one()); // Set values of resulting vector according to result. storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); @@ -252,13 +276,9 @@ namespace storm { } template - std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound, storm::solver::MinMaxLinearEquationSolverSystemType const& equationSystemType) { - - // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(equationSystemType); - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound) { - // Set up the solver + // Set up the solver. std::unique_ptr> solver = storm::solver::configureMinMaxLinearEquationSolver(goal, minMaxLinearEquationSolverFactory, submatrix); solver->setRequirementsChecked(); if (lowerResultBound) { @@ -278,7 +298,7 @@ namespace storm { // Solve the corresponding system of equations. solver->solveEquations(x, b); - // If requested, a scheduler was produced + // If requested, return the requested scheduler. if (produceScheduler) { return std::pair, boost::optional>>(std::move(x), std::move(solver->getSchedulerChoices())); } else { @@ -460,7 +480,7 @@ namespace storm { std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, selectedChoices, hint, skipEcWithinMaybeStatesCheck); // Now compute the results for the maybeStates - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), boost::none, storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); + std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), boost::none); // Set values of resulting vector according to result. storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h index 3727601d1..e82c89cc2 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h @@ -41,7 +41,7 @@ namespace storm { static std::pair>, boost::optional>> extractHintInformationForMaybeStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, boost::optional const& selectedChoices, ModelCheckerHint const& hint, bool skipECWithinMaybeStatesCheck); - static std::pair, boost::optional>> computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues = boost::none, boost::optional>&& hintChoices = boost::none, boost::optional const& lowerResultBound = boost::none, boost::optional const& upperResultBound = boost::none, storm::solver::MinMaxLinearEquationSolverSystemType const& equationSystemType = storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); + static std::pair, boost::optional>> computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues = boost::none, boost::optional>&& hintChoices = boost::none, boost::optional const& lowerResultBound = boost::none, boost::optional const& upperResultBound = boost::none); static MDPSparseModelCheckingHelperReturnType computeUntilProbabilities(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint = ModelCheckerHint()); diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 671e35345..4980c32c3 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -216,6 +216,19 @@ namespace storm { bool IterativeMinMaxLinearEquationSolver::getRelative() const { return this->getSettings().getRelativeTerminationCriterion(); } + + template + std::vector IterativeMinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + std::vector requirements; + if (equationSystemType == MinMaxLinearEquationSolverSystemType::UntilProbabilities) { + if (this->getSettings().getSolutionMethod() == IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration) { + if (!direction || direction.get() == OptimizationDirection::Maximize) { + requirements.push_back(MinMaxLinearEquationSolverRequirement::ValidSchedulerHint); + } + } + } + return requirements; + } template bool IterativeMinMaxLinearEquationSolver::solveEquationsValueIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const { diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index bd3ad9c0e..ac51de473 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -50,6 +50,8 @@ namespace storm { ValueType getPrecision() const; bool getRelative() const; + virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const override; + private: bool solveEquationsPolicyIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const; bool solveEquationsValueIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 4c2321de0..ba0847ded 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -138,7 +138,7 @@ namespace storm { } template - std::vector MinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const { + std::vector MinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { return std::vector(); } @@ -210,10 +210,10 @@ namespace storm { } template - std::vector MinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const { + std::vector MinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { // Create dummy solver and ask it for requirements. std::unique_ptr> solver = this->create(); - return solver->getRequirements(equationSystemType); + return solver->getRequirements(equationSystemType, direction); } template diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 626be302d..240820579 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -29,10 +29,17 @@ namespace storm { StochasticShortestPath }; + // Possible requirements of solvers. Note that the order must not be changed as it shall be guaranteed that the + // solver announces requirements in the order in which they appear in this list. enum class MinMaxLinearEquationSolverRequirement { + // Graph requirements. + NoEndComponents, + + // Hint requirements. ValidSchedulerHint, ValidValueHint, - NoEndComponents, + + // Global bounds requirements. GlobalUpperBound, GlobalLowerBound }; @@ -174,9 +181,10 @@ namespace storm { bool hasSchedulerHint() const; /*! - * Retrieves the requirements of this solver for solving equations with the current settings. + * Retrieves the requirements of this solver for solving equations with the current settings. The requirements + * are guaranteed to be ordered according to their appearance in the SolverRequirement type. */ - virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const; + virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; /*! * Notifies the solver that the requirements for solving equations have been checked. If this has not been @@ -235,7 +243,11 @@ namespace storm { MinMaxMethod const& getMinMaxMethod() const; - std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType) const; + /*! + * Retrieves the requirements of the solver that would be created when calling create() right now. The + * requirements are guaranteed to be ordered according to their appearance in the SolverRequirement type. + */ + std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; void setRequirementsChecked(bool value = true); bool isRequirementsCheckedSet() const; From f327ff75e9e81c78404ae92cc0b83397cdd836ef Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 4 Sep 2017 09:28:15 +0200 Subject: [PATCH 79/95] showing progress for bisimulation --- .../storage/dd/BisimulationDecomposition.cpp | 24 +++++++++++++++++++ .../storage/dd/BisimulationDecomposition.h | 6 +++++ 2 files changed, 30 insertions(+) diff --git a/src/storm/storage/dd/BisimulationDecomposition.cpp b/src/storm/storage/dd/BisimulationDecomposition.cpp index 57190ff23..be19015ec 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.cpp +++ b/src/storm/storage/dd/BisimulationDecomposition.cpp @@ -9,6 +9,9 @@ #include "storm/models/symbolic/Mdp.h" #include "storm/models/symbolic/StandardRewardModel.h" +#include "storm/settings/SettingsManager.h" +#include "storm/settings/modules/IOSettings.h" + #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" #include "storm/exceptions/NotSupportedException.h" @@ -29,16 +32,25 @@ namespace storm { template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { + auto const& ioSettings = storm::settings::getModule(); + showProgress = ioSettings.isExplorationShowProgressSet(); + showProgressDelay = ioSettings.getExplorationShowProgressDelay(); this->refineWrtRewardModels(); } template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, std::vector> const& formulas, storm::storage::BisimulationType const& bisimulationType) : model(model), preservationInformation(model, formulas, bisimulationType), refiner(createRefiner(model, Partition::create(model, bisimulationType, preservationInformation))) { + auto const& ioSettings = storm::settings::getModule(); + showProgress = ioSettings.isExplorationShowProgressSet(); + showProgressDelay = ioSettings.getExplorationShowProgressDelay(); this->refineWrtRewardModels(); } template BisimulationDecomposition::BisimulationDecomposition(storm::models::symbolic::Model const& model, Partition const& initialPartition, bisimulation::PreservationInformation const& preservationInformation) : model(model), preservationInformation(preservationInformation), refiner(createRefiner(model, initialPartition)) { + auto const& ioSettings = storm::settings::getModule(); + showProgress = ioSettings.isExplorationShowProgressSet(); + showProgressDelay = ioSettings.getExplorationShowProgressDelay(); this->refineWrtRewardModels(); } @@ -55,12 +67,24 @@ namespace storm { #endif auto start = std::chrono::high_resolution_clock::now(); + auto timeOfLastMessage = start; uint64_t iterations = 0; bool refined = true; while (refined) { refined = refiner->refine(mode); + ++iterations; STORM_LOG_TRACE("After iteration " << iterations << " partition has " << refiner->getStatePartition().getNumberOfBlocks() << " blocks."); + + if (showProgress) { + auto now = std::chrono::high_resolution_clock::now(); + auto durationSinceLastMessage = std::chrono::duration_cast(now - timeOfLastMessage).count(); + if (static_cast(durationSinceLastMessage) >= showProgressDelay) { + auto durationSinceStart = std::chrono::duration_cast(now - start).count(); + std::cout << "State partition after " << iterations << " iterations (" << durationSinceStart << "ms) has " << refiner->getStatePartition().getNumberOfBlocks() << " blocks." << std::endl; + timeOfLastMessage = std::chrono::high_resolution_clock::now(); + } + } } auto end = std::chrono::high_resolution_clock::now(); diff --git a/src/storm/storage/dd/BisimulationDecomposition.h b/src/storm/storage/dd/BisimulationDecomposition.h index 66e562bea..2a62c9fa4 100644 --- a/src/storm/storage/dd/BisimulationDecomposition.h +++ b/src/storm/storage/dd/BisimulationDecomposition.h @@ -60,6 +60,12 @@ namespace storm { // The refiner to use. std::unique_ptr> refiner; + + // A flag indicating whether progress is reported. + bool showProgress; + + // The delay between progress reports. + uint64_t showProgressDelay; }; } From 4c5cdfeafc65b15f16ddcb499273dae7dec37336 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 4 Sep 2017 15:51:34 +0200 Subject: [PATCH 80/95] Sparse MDP helper now also respects solver requirements for reachability rewards --- .../helper/SparseMarkovAutomatonCslHelper.cpp | 6 +- .../prctl/helper/HybridMdpPrctlHelper.cpp | 10 +- .../prctl/helper/SparseMdpPrctlHelper.cpp | 333 +++++++++++------- .../prctl/helper/SparseMdpPrctlHelper.h | 4 - .../modules/EigenEquationSolverSettings.cpp | 2 +- .../IterativeMinMaxLinearEquationSolver.cpp | 27 +- .../IterativeMinMaxLinearEquationSolver.h | 2 +- .../solver/MinMaxLinearEquationSolver.cpp | 19 +- src/storm/solver/MinMaxLinearEquationSolver.h | 100 ++++-- 9 files changed, 328 insertions(+), 175 deletions(-) diff --git a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp index ecf2b6759..d9a58c585 100644 --- a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp +++ b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp @@ -89,7 +89,7 @@ namespace storm { } // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(aProbabilistic); @@ -376,7 +376,7 @@ namespace storm { std::vector x(numberOfSspStates); // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(sspMatrix); @@ -584,7 +584,7 @@ namespace storm { std::vector b = probabilisticChoiceRewards; // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); auto solver = minMaxLinearEquationSolverFactory.create(std::move(aProbabilistic)); diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index b94b8ad9c..24fe1326f 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -72,15 +72,15 @@ namespace storm { // Finally cut away all columns targeting non-maybe states. submatrix *= maybeStatesAdd.swapVariables(model.getRowColumnMetaVariablePairs()); - // Create the solution vector. - std::vector x(maybeStates.getNonZeroCount(), storm::utility::zero()); - // Translate the symbolic matrix/vector to their explicit representations and solve the equation system. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); // Check for requirements of the solver. - std::vector requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + + // Create the solution vector. + std::vector x(maybeStates.getNonZeroCount(), storm::utility::zero()); std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); solver->setRequirementsChecked(); @@ -274,7 +274,7 @@ namespace storm { std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); // Check for requirements of the solver. - std::vector requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); // Now solve the resulting equation system. diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 884396c10..a90c6bbfc 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -85,6 +85,203 @@ namespace storm { return result; } + template + std::vector computeValidSchedulerHint(storm::solver::MinMaxLinearEquationSolverSystemType const& type, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, storm::storage::BitVector const& filterStates, storm::storage::BitVector const& targetStates) { + std::unique_ptr> validScheduler = std::make_unique>(maybeStates.size()); + + if (type == storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities) { + storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, filterStates, targetStates, *validScheduler, boost::none); + } else if (type == storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { + storm::utility::graph::computeSchedulerProb1E(maybeStates | targetStates, transitionMatrix, backwardTransitions, filterStates, targetStates, *validScheduler); + } else { + STORM_LOG_ASSERT(false, "Unexpected equation system type."); + } + + // Extract the relevant parts of the scheduler for the solver. + std::vector schedulerHint(maybeStates.getNumberOfSetBits()); + auto maybeIt = maybeStates.begin(); + for (auto& choice : schedulerHint) { + choice = validScheduler->getChoice(*maybeIt).getDeterministicChoice(); + ++maybeIt; + } + return schedulerHint; + } + + template + struct SparseMdpHintType { + bool hasSchedulerHint() const { + return static_cast(schedulerHint); + } + + bool hasValueHint() const { + return static_cast(valueHint); + } + + bool hasLowerResultBound() const { + return static_cast(lowerResultBound); + } + + ValueType const& getLowerResultBound() const { + return lowerResultBound.get(); + } + + bool hasUpperResultBound() const { + return static_cast(upperResultBound); + } + + ValueType const& getUpperResultBound() const { + return upperResultBound.get(); + } + + std::vector& getSchedulerHint() { + return schedulerHint.get(); + } + + std::vector& getValueHint() { + return valueHint.get(); + } + + boost::optional> schedulerHint; + boost::optional> valueHint; + boost::optional lowerResultBound; + boost::optional upperResultBound; + }; + + template + void extractHintInformationForMaybeStates(SparseMdpHintType& hintStorage, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, boost::optional const& selectedChoices, ModelCheckerHint const& hint, bool skipECWithinMaybeStatesCheck) { + + // Deal with scheduler hint. + if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().hasSchedulerHint()) { + if (hintStorage.hasSchedulerHint()) { + STORM_LOG_WARN("A scheduler hint was provided, but the solver requires a specific one. The provided scheduler hint will be ignored."); + } else { + auto const& schedulerHint = hint.template asExplicitModelCheckerHint().getSchedulerHint(); + std::vector hintChoices; + + // The scheduler hint is only applicable if it induces no BSCC consisting of maybe states. + bool hintApplicable; + if (!skipECWithinMaybeStatesCheck) { + hintChoices.reserve(maybeStates.size()); + for (uint_fast64_t state = 0; state < maybeStates.size(); ++state) { + hintChoices.push_back(schedulerHint.getChoice(state).getDeterministicChoice()); + } + hintApplicable = storm::utility::graph::performProb1(transitionMatrix.transposeSelectedRowsFromRowGroups(hintChoices), maybeStates, ~maybeStates).full(); + } else { + hintApplicable = true; + } + + if (hintApplicable) { + // Compute the hint w.r.t. the given subsystem. + hintChoices.clear(); + hintChoices.reserve(maybeStates.getNumberOfSetBits()); + for (auto const& state : maybeStates) { + uint_fast64_t hintChoice = schedulerHint.getChoice(state).getDeterministicChoice(); + if (selectedChoices) { + uint_fast64_t firstChoice = transitionMatrix.getRowGroupIndices()[state]; + uint_fast64_t lastChoice = firstChoice + hintChoice; + hintChoice = 0; + for (uint_fast64_t choice = selectedChoices->getNextSetIndex(firstChoice); choice < lastChoice; choice = selectedChoices->getNextSetIndex(choice + 1)) { + ++hintChoice; + } + } + hintChoices.push_back(hintChoice); + } + hintStorage.schedulerHint = std::move(hintChoices); + } + } + } + + // Deal with solution value hint. Only applicable if there are no End Components consisting of maybe states. + if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().hasResultHint() && (skipECWithinMaybeStatesCheck || hintStorage.hasSchedulerHint() || storm::utility::graph::performProb1A(transitionMatrix, transitionMatrix.getRowGroupIndices(), backwardTransitions, maybeStates, ~maybeStates).full())) { + hintStorage.valueHint = storm::utility::vector::filterVector(hint.template asExplicitModelCheckerHint().getResultHint(), maybeStates); + } + } + + template + SparseMdpHintType computeHints(storm::solver::MinMaxLinearEquationSolverSystemType const& type, ModelCheckerHint const& hint, storm::OptimizationDirection const& dir, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& targetStates, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional const& selectedChoices = boost::none) { + SparseMdpHintType result; + + // Check for requirements of the solver. + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(type); + if (!(hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()) && !requirements.empty()) { + if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { + STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); + result.schedulerHint = computeValidSchedulerHint(type, transitionMatrix, backwardTransitions, maybeStates, phiStates, targetStates); + requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); + } + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "There are unchecked requirements of the solver."); + } + + bool skipEcWithinMaybeStatesCheck = dir == storm::OptimizationDirection::Minimize || (hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()); + extractHintInformationForMaybeStates(result, transitionMatrix, backwardTransitions, maybeStates, selectedChoices, hint, skipEcWithinMaybeStatesCheck); + + result.lowerResultBound = storm::utility::zero(); + if (type == storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities) { + result.upperResultBound = storm::utility::one(); + } else if (type == storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { + // Intentionally left empty. + } else { + STORM_LOG_ASSERT(false, "Unexpected equation system type."); + } + + return result; + } + + template + struct MaybeStateResult { + MaybeStateResult(std::vector&& values) : values(std::move(values)) { + // Intentionally left empty. + } + + bool hasScheduler() const { + return static_cast(scheduler); + } + + std::vector const& getScheduler() const { + return scheduler.get(); + } + + std::vector const& getValues() const { + return values; + } + + std::vector values; + boost::optional> scheduler; + }; + + template + MaybeStateResult computeValuesForMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, SparseMdpHintType& hint) { + + // Set up the solver. + std::unique_ptr> solver = storm::solver::configureMinMaxLinearEquationSolver(goal, minMaxLinearEquationSolverFactory, submatrix); + solver->setRequirementsChecked(); + if (hint.hasLowerResultBound()) { + solver->setLowerBound(hint.getLowerResultBound()); + } + if (hint.hasUpperResultBound()) { + solver->setUpperBound(hint.getUpperResultBound()); + } + if (hint.hasSchedulerHint()) { + solver->setInitialScheduler(std::move(hint.getSchedulerHint())); + } + solver->setTrackScheduler(produceScheduler); + + // Initialize the solution vector. + std::vector x = hint.hasValueHint() ? std::move(hint.getValueHint()) : std::vector(submatrix.getRowGroupCount(), hint.hasLowerResultBound() ? hint.getLowerResultBound() : storm::utility::zero()); + + // Solve the corresponding system of equations. + solver->solveEquations(x, b); + + // Create result. + MaybeStateResult result(std::move(x)); + + // If requested, return the requested scheduler. + if (produceScheduler) { + result.scheduler = std::move(solver->getSchedulerChoices()); + } + return result; + } + template MDPSparseModelCheckingHelperReturnType SparseMdpPrctlHelper::computeUntilProbabilities(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint) { STORM_LOG_THROW(!(qualitative && produceScheduler), storm::exceptions::InvalidSettingsException, "Cannot produce scheduler when performing qualitative model checking only."); @@ -154,42 +351,17 @@ namespace storm { // the accumulated probability of going from state i to some 'yes' state. std::vector b = transitionMatrix.getConstrainedRowGroupSumVector(maybeStates, statesWithProbability1); - // obtain hint information if possible - bool skipEcWithinMaybeStatesCheck = goal.minimize() || (hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()); - std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, boost::none, hint, skipEcWithinMaybeStatesCheck); - - // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); - if (!requirements.empty()) { - std::unique_ptr> validScheduler; - for (auto const& requirement : requirements) { - if (requirement == storm::solver::MinMaxLinearEquationSolverRequirement::ValidSchedulerHint) { - // If the solver requires a valid scheduler (a scheduler that produces non-zero - // probabilities for all maybe states), we need to compute such a scheduler now. - validScheduler = std::make_unique>(maybeStates.size()); - storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, phiStates, statesWithProbability1, *validScheduler, boost::none); - - STORM_LOG_WARN_COND(hintInformation.second, "A scheduler hint was provided, but the solver requires a valid scheduler hint. The hint will be ignored."); - - hintInformation.second = std::vector(maybeStates.getNumberOfSetBits()); - auto maybeIt = maybeStates.begin(); - for (auto& choice : hintInformation.second.get()) { - choice = validScheduler->getChoice(*maybeIt).getDeterministicChoice(); - } - } else { - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); - } - } - } - + // Obtain proper hint information either from the provided hint or from requirements of the solver. + SparseMdpHintType hintInformation = computeHints(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities, hint, goal.direction(), transitionMatrix, backwardTransitions, maybeStates, phiStates, statesWithProbability1, minMaxLinearEquationSolverFactory); + // Now compute the results for the maybe states. - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), storm::utility::one()); + MaybeStateResult resultForMaybeStates = computeValuesForMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, hintInformation); // Set values of resulting vector according to result. - storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); + storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.getValues()); if (produceScheduler) { - std::vector const& subChoices = resultForMaybeStates.second.get(); + std::vector const& subChoices = resultForMaybeStates.getScheduler(); auto subChoiceIt = subChoices.begin(); for (auto maybeState : maybeStates) { scheduler->setChoice(*subChoiceIt, maybeState); @@ -222,89 +394,6 @@ namespace storm { return MDPSparseModelCheckingHelperReturnType(std::move(result), std::move(scheduler)); } - - template - std::pair>, boost::optional>> SparseMdpPrctlHelper::extractHintInformationForMaybeStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, boost::optional const& selectedChoices, ModelCheckerHint const& hint, bool skipECWithinMaybeStatesCheck) { - - // Scheduler hint - boost::optional> subSchedulerChoices; - if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().hasSchedulerHint()) { - auto const& schedulerHint = hint.template asExplicitModelCheckerHint().getSchedulerHint(); - std::vector hintChoices; - - // the scheduler hint is only applicable if it induces no BSCC consisting of maybestates - bool hintApplicable; - if (!skipECWithinMaybeStatesCheck) { - hintChoices.reserve(maybeStates.size()); - for (uint_fast64_t state = 0; state < maybeStates.size(); ++state) { - hintChoices.push_back(schedulerHint.getChoice(state).getDeterministicChoice()); - } - hintApplicable = storm::utility::graph::performProb1(transitionMatrix.transposeSelectedRowsFromRowGroups(hintChoices), maybeStates, ~maybeStates).full(); - } else { - hintApplicable = true; - } - - if (hintApplicable) { - // Compute the hint w.r.t. the given subsystem - hintChoices.clear(); - hintChoices.reserve(maybeStates.getNumberOfSetBits()); - for (auto const& state : maybeStates) { - uint_fast64_t hintChoice = schedulerHint.getChoice(state).getDeterministicChoice(); - if (selectedChoices) { - uint_fast64_t firstChoice = transitionMatrix.getRowGroupIndices()[state]; - uint_fast64_t lastChoice = firstChoice + hintChoice; - hintChoice = 0; - for (uint_fast64_t choice = selectedChoices->getNextSetIndex(firstChoice); choice < lastChoice; choice = selectedChoices->getNextSetIndex(choice + 1)) { - ++hintChoice; - } - } - hintChoices.push_back(hintChoice); - } - subSchedulerChoices = std::move(hintChoices); - } - } - - // Solution value hint - boost::optional> subValues; - // The result hint is only applicable if there are no End Components consisting of maybestates - if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().hasResultHint() && - (skipECWithinMaybeStatesCheck || subSchedulerChoices || - storm::utility::graph::performProb1A(transitionMatrix, transitionMatrix.getRowGroupIndices(), backwardTransitions, maybeStates, ~maybeStates).full())) { - subValues = storm::utility::vector::filterVector(hint.template asExplicitModelCheckerHint().getResultHint(), maybeStates); - } - return std::make_pair(std::move(subValues), std::move(subSchedulerChoices)); - } - - template - std::pair, boost::optional>> SparseMdpPrctlHelper::computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues, boost::optional>&& hintChoices, boost::optional const& lowerResultBound, boost::optional const& upperResultBound) { - - // Set up the solver. - std::unique_ptr> solver = storm::solver::configureMinMaxLinearEquationSolver(goal, minMaxLinearEquationSolverFactory, submatrix); - solver->setRequirementsChecked(); - if (lowerResultBound) { - solver->setLowerBound(lowerResultBound.get()); - } - if (upperResultBound) { - solver->setUpperBound(upperResultBound.get()); - } - if (hintChoices) { - solver->setSchedulerHint(std::move(hintChoices.get())); - } - solver->setTrackScheduler(produceScheduler); - - // Initialize the solution vector. - std::vector x = hintValues ? std::move(hintValues.get()) : std::vector(submatrix.getRowGroupCount(), lowerResultBound ? lowerResultBound.get() : storm::utility::zero()); - - // Solve the corresponding system of equations. - solver->solveEquations(x, b); - - // If requested, return the requested scheduler. - if (produceScheduler) { - return std::pair, boost::optional>>(std::move(x), std::move(solver->getSchedulerChoices())); - } else { - return std::pair, boost::optional>>(std::move(x), boost::none); - } - } template MDPSparseModelCheckingHelperReturnType SparseMdpPrctlHelper::computeUntilProbabilities(OptimizationDirection dir, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint) { @@ -462,6 +551,7 @@ namespace storm { // Prepare matrix and vector for the equation system. storm::storage::SparseMatrix submatrix; std::vector b; + // Remove rows and columns from the original transition probability matrix for states whose reward values are already known. // If there are infinity states, we additionaly have to remove choices of maybeState that lead to infinity boost::optional selectedChoices; // if not given, all maybeState choices are selected @@ -475,18 +565,17 @@ namespace storm { storm::utility::vector::filterVectorInPlace(b, *selectedChoices); } - // obtain hint information if possible - bool skipEcWithinMaybeStatesCheck = !goal.minimize() || (hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()); - std::pair>, boost::optional>> hintInformation = extractHintInformationForMaybeStates(transitionMatrix, backwardTransitions, maybeStates, selectedChoices, hint, skipEcWithinMaybeStatesCheck); + // Obtain proper hint information either from the provided hint or from requirements of the solver. + SparseMdpHintType hintInformation = computeHints(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, hint, goal.direction(), transitionMatrix, backwardTransitions, maybeStates, storm::storage::BitVector(transitionMatrix.getRowGroupCount(), true), targetStates, minMaxLinearEquationSolverFactory, selectedChoices); - // Now compute the results for the maybeStates - std::pair, boost::optional>> resultForMaybeStates = computeValuesOnlyMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, std::move(hintInformation.first), std::move(hintInformation.second), storm::utility::zero(), boost::none); + // Now compute the results for the maybe states. + MaybeStateResult resultForMaybeStates = computeValuesForMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, hintInformation); // Set values of resulting vector according to result. - storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.first); + storm::utility::vector::setVectorValues(result, maybeStates, resultForMaybeStates.getValues()); if (produceScheduler) { - std::vector const& subChoices = resultForMaybeStates.second.get(); + std::vector const& subChoices = resultForMaybeStates.getScheduler(); auto subChoiceIt = subChoices.begin(); if (selectedChoices) { for (auto maybeState : maybeStates) { @@ -678,7 +767,7 @@ namespace storm { storm::storage::SparseMatrix sspMatrix = sspMatrixBuilder.build(currentChoice, numberOfSspStates, numberOfSspStates); // Check for requirements of the solver. - std::vector requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::StochasticShortestPath); STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); std::vector sspResult(numberOfSspStates); diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h index e82c89cc2..5cf2bcfaf 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.h @@ -39,10 +39,6 @@ namespace storm { static MDPSparseModelCheckingHelperReturnType computeUntilProbabilities(OptimizationDirection dir, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint = ModelCheckerHint()); - static std::pair>, boost::optional>> extractHintInformationForMaybeStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, boost::optional const& selectedChoices, ModelCheckerHint const& hint, bool skipECWithinMaybeStatesCheck); - - static std::pair, boost::optional>> computeValuesOnlyMaybeStates(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& submatrix, std::vector const& b, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, boost::optional>&& hintValues = boost::none, boost::optional>&& hintChoices = boost::none, boost::optional const& lowerResultBound = boost::none, boost::optional const& upperResultBound = boost::none); - static MDPSparseModelCheckingHelperReturnType computeUntilProbabilities(storm::solver::SolveGoal const& goal, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool qualitative, bool produceScheduler, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, ModelCheckerHint const& hint = ModelCheckerHint()); static std::vector computeGloballyProbabilities(OptimizationDirection dir, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& psiStates, bool qualitative, storm::solver::MinMaxLinearEquationSolverFactory const& minMaxLinearEquationSolverFactory, bool useMecBasedTechnique = false); diff --git a/src/storm/settings/modules/EigenEquationSolverSettings.cpp b/src/storm/settings/modules/EigenEquationSolverSettings.cpp index cc3589937..ea25da11d 100644 --- a/src/storm/settings/modules/EigenEquationSolverSettings.cpp +++ b/src/storm/settings/modules/EigenEquationSolverSettings.cpp @@ -101,7 +101,7 @@ namespace storm { // This list does not include the precision, because this option is shared with other modules. bool optionsSet = isLinearEquationSystemMethodSet() || isPreconditioningMethodSet() || isMaximalIterationCountSet(); - STORM_LOG_WARN_COND(storm::settings::getModule().getEquationSolver() == storm::solver::EquationSolverType::Gmmxx || !optionsSet, "eigen is not selected as the preferred equation solver, so setting options for eigen might have no effect."); + STORM_LOG_WARN_COND(storm::settings::getModule().getEquationSolver() == storm::solver::EquationSolverType::Eigen || !optionsSet, "Eigen is not selected as the preferred equation solver, so setting options for eigen might have no effect."); return true; } diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 4980c32c3..0718db5b8 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -108,7 +108,7 @@ namespace storm { template bool IterativeMinMaxLinearEquationSolver::solveEquationsPolicyIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const { // Create the initial scheduler. - std::vector scheduler = this->hasSchedulerHint() ? this->choicesHint.get() : std::vector(this->A->getRowGroupCount()); + std::vector scheduler = this->hasInitialScheduler() ? this->getInitialScheduler() : std::vector(this->A->getRowGroupCount()); // Get a vector for storing the right-hand side of the inner equation system. if(!auxiliaryRowGroupVector) { @@ -135,9 +135,6 @@ namespace storm { uint64_t iterations = 0; do { // Solve the equation system for the 'DTMC'. - // FIXME: we need to remove the 0- and 1- states to make the solution unique. - // HOWEVER: if we start with a valid scheduler, then we will never get an illegal one, because staying - // within illegal MECs will never strictly improve the value. Is this true? solver->solveEquations(x, subB); // Go through the multiplication result and see whether we can improve any of the choices. @@ -218,15 +215,23 @@ namespace storm { } template - std::vector IterativeMinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { - std::vector requirements; + MinMaxLinearEquationSolverRequirements IterativeMinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + MinMaxLinearEquationSolverRequirements requirements; + if (equationSystemType == MinMaxLinearEquationSolverSystemType::UntilProbabilities) { if (this->getSettings().getSolutionMethod() == IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration) { if (!direction || direction.get() == OptimizationDirection::Maximize) { - requirements.push_back(MinMaxLinearEquationSolverRequirement::ValidSchedulerHint); + requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); + } + } + } else if (equationSystemType == MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { + if (this->getSettings().getSolutionMethod() == IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration) { + if (!direction || direction.get() == OptimizationDirection::Minimize) { + requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); } } } + return requirements; } @@ -246,11 +251,11 @@ namespace storm { auxiliaryRowGroupVector = std::make_unique>(this->A->getRowGroupCount()); } - if (this->hasSchedulerHint()) { - // Resolve the nondeterminism according to the scheduler hint - storm::storage::SparseMatrix submatrix = this->A->selectRowsFromRowGroups(this->choicesHint.get(), true); + if (this->hasInitialScheduler()) { + // Resolve the nondeterminism according to the initial scheduler. + storm::storage::SparseMatrix submatrix = this->A->selectRowsFromRowGroups(this->getInitialScheduler(), true); submatrix.convertToEquationSystem(); - storm::utility::vector::selectVectorValues(*auxiliaryRowGroupVector, this->choicesHint.get(), this->A->getRowGroupIndices(), b); + storm::utility::vector::selectVectorValues(*auxiliaryRowGroupVector, this->getInitialScheduler(), this->A->getRowGroupIndices(), b); // Solve the resulting equation system. // Note that the linEqSolver might consider a slightly different interpretation of "equalModuloPrecision". Hence, we iteratively increase its precision. diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index ac51de473..85aeb3843 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -50,7 +50,7 @@ namespace storm { ValueType getPrecision() const; bool getRelative() const; - virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const override; + virtual MinMaxLinearEquationSolverRequirements getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const override; private: bool solveEquationsPolicyIteration(OptimizationDirection dir, std::vector& x, std::vector const& b) const; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index ba0847ded..ace2aa3db 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -128,18 +128,23 @@ namespace storm { } template - void MinMaxLinearEquationSolver::setSchedulerHint(std::vector&& choices) { - choicesHint = std::move(choices); + void MinMaxLinearEquationSolver::setInitialScheduler(std::vector&& choices) { + initialScheduler = std::move(choices); } template - bool MinMaxLinearEquationSolver::hasSchedulerHint() const { - return choicesHint.is_initialized(); + bool MinMaxLinearEquationSolver::hasInitialScheduler() const { + return static_cast(initialScheduler); } template - std::vector MinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { - return std::vector(); + std::vector const& MinMaxLinearEquationSolver::getInitialScheduler() const { + return initialScheduler.get(); + } + + template + MinMaxLinearEquationSolverRequirements MinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + return MinMaxLinearEquationSolverRequirements(); } template @@ -210,7 +215,7 @@ namespace storm { } template - std::vector MinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + MinMaxLinearEquationSolverRequirements MinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { // Create dummy solver and ask it for requirements. std::unique_ptr> solver = this->create(); return solver->getRequirements(equationSystemType, direction); diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 240820579..2f2188eaf 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -29,19 +29,72 @@ namespace storm { StochasticShortestPath }; - // Possible requirements of solvers. Note that the order must not be changed as it shall be guaranteed that the - // solver announces requirements in the order in which they appear in this list. - enum class MinMaxLinearEquationSolverRequirement { - // Graph requirements. - NoEndComponents, - - // Hint requirements. - ValidSchedulerHint, - ValidValueHint, - - // Global bounds requirements. - GlobalUpperBound, - GlobalLowerBound + class MinMaxLinearEquationSolverRequirements { + public: + enum class Element { + NoEndComponents, NoZeroRewardEndComponents, ValidInitialScheduler, GlobalLowerBound, GlobalUpperBound + }; + + MinMaxLinearEquationSolverRequirements() : noEndComponents(false), noZeroRewardEndComponents(false), validInitialScheduler(false), globalLowerBound(false), globalUpperBound(false) { + // Intentionally left empty. + } + + MinMaxLinearEquationSolverRequirements& setNoEndComponents(bool value = true) { + noEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setNoZeroRewardEndComponents(bool value = true) { + noZeroRewardEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setValidInitialScheduler(bool value = true) { + validInitialScheduler = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setGlobalLowerBound(bool value = true) { + globalLowerBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setGlobalUpperBound(bool value = true) { + globalUpperBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& set(Element const& element, bool value = true) { + switch (element) { + case Element::NoEndComponents: noEndComponents = value; break; + case Element::NoZeroRewardEndComponents: noZeroRewardEndComponents = value; break; + case Element::ValidInitialScheduler: validInitialScheduler = value; break; + case Element::GlobalLowerBound: globalLowerBound = value; break; + case Element::GlobalUpperBound: globalUpperBound = value; break; + } + return *this; + } + + bool requires(Element const& element) { + switch (element) { + case Element::NoEndComponents: return noEndComponents; break; + case Element::NoZeroRewardEndComponents: return noZeroRewardEndComponents; break; + case Element::ValidInitialScheduler: return validInitialScheduler; break; + case Element::GlobalLowerBound: return globalLowerBound; break; + case Element::GlobalUpperBound: return globalUpperBound; break; + } + } + + bool empty() const { + return !noEndComponents && !noZeroRewardEndComponents && !validInitialScheduler && !globalLowerBound && !globalUpperBound; + } + + private: + bool noEndComponents; + bool noZeroRewardEndComponents; + bool validInitialScheduler; + bool globalLowerBound; + bool globalUpperBound; }; /*! @@ -171,20 +224,25 @@ namespace storm { void setBounds(ValueType const& lower, ValueType const& upper); /*! - * Sets a scheduler that might be considered by the solver as an initial guess + * Sets a valid initial scheduler that is required by some solvers (see requirements of solvers). + */ + void setInitialScheduler(std::vector&& choices); + + /*! + * Returns true iff an initial scheduler is set. */ - void setSchedulerHint(std::vector&& choices); + bool hasInitialScheduler() const; /*! - * Returns true iff a scheduler hint was defined + * Retrieves the initial scheduler if one was set. */ - bool hasSchedulerHint() const; + std::vector const& getInitialScheduler() const; /*! * Retrieves the requirements of this solver for solving equations with the current settings. The requirements * are guaranteed to be ordered according to their appearance in the SolverRequirement type. */ - virtual std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; + virtual MinMaxLinearEquationSolverRequirements getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; /*! * Notifies the solver that the requirements for solving equations have been checked. If this has not been @@ -215,8 +273,8 @@ namespace storm { // An upper bound if one was set. boost::optional upperBound; - // Scheduler choices that might be considered by the solver as an initial guess - boost::optional> choicesHint; + // A scheduler that can be used by solvers that require a valid initial scheduler. + boost::optional> initialScheduler; private: /// Whether some of the generated data during solver calls should be cached. @@ -247,7 +305,7 @@ namespace storm { * Retrieves the requirements of the solver that would be created when calling create() right now. The * requirements are guaranteed to be ordered according to their appearance in the SolverRequirement type. */ - std::vector getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; + MinMaxLinearEquationSolverRequirements getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; void setRequirementsChecked(bool value = true); bool isRequirementsCheckedSet() const; From 3c4de8ace39459c3468e6f462b08c74dae62dc66 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 4 Sep 2017 16:16:32 +0200 Subject: [PATCH 81/95] moved requirements to new file --- ...SparseDtmcParameterLiftingModelChecker.cpp | 6 +- src/storm/solver/MinMaxLinearEquationSolver.h | 69 +---------------- .../MinMaxLinearEquationSolverRequirements.h | 75 +++++++++++++++++++ 3 files changed, 79 insertions(+), 71 deletions(-) create mode 100644 src/storm/solver/MinMaxLinearEquationSolverRequirements.h diff --git a/src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp b/src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp index 3d8d18f8b..41a92d433 100644 --- a/src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp +++ b/src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp @@ -230,9 +230,9 @@ namespace storm { if (lowerResultBound) solver->setLowerBound(lowerResultBound.get()); if (upperResultBound) solver->setUpperBound(upperResultBound.get()); if (!stepBound) solver->setTrackScheduler(true); - if (storm::solver::minimize(dirForParameters) && minSchedChoices && !stepBound) solver->setSchedulerHint(std::move(minSchedChoices.get())); - if (storm::solver::maximize(dirForParameters) && maxSchedChoices && !stepBound) solver->setSchedulerHint(std::move(maxSchedChoices.get())); - if (this->currentCheckTask->isBoundSet() && solver->hasSchedulerHint()) { + if (storm::solver::minimize(dirForParameters) && minSchedChoices && !stepBound) solver->setInitialScheduler(std::move(minSchedChoices.get())); + if (storm::solver::maximize(dirForParameters) && maxSchedChoices && !stepBound) solver->setInitialScheduler(std::move(maxSchedChoices.get())); + if (this->currentCheckTask->isBoundSet() && solver->hasInitialScheduler()) { // If we reach this point, we know that after applying the hint, the x-values can only become larger (if we maximize) or smaller (if we minimize). std::unique_ptr> termCond; storm::storage::BitVector relevantStatesInSubsystem = this->currentCheckTask->isOnlyInitialStatesRelevantSet() ? this->parametricModel->getInitialStates() % maybeStates : storm::storage::BitVector(maybeStates.getNumberOfSetBits(), true); diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 2f2188eaf..579790412 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -12,6 +12,7 @@ #include "storm/storage/sparse/StateType.h" #include "storm/storage/Scheduler.h" #include "storm/solver/OptimizationDirection.h" +#include "storm/solver/MinMaxLinearEquationSolverRequirements.h" #include "storm/exceptions/InvalidSettingsException.h" #include "storm/utility/macros.h" @@ -29,74 +30,6 @@ namespace storm { StochasticShortestPath }; - class MinMaxLinearEquationSolverRequirements { - public: - enum class Element { - NoEndComponents, NoZeroRewardEndComponents, ValidInitialScheduler, GlobalLowerBound, GlobalUpperBound - }; - - MinMaxLinearEquationSolverRequirements() : noEndComponents(false), noZeroRewardEndComponents(false), validInitialScheduler(false), globalLowerBound(false), globalUpperBound(false) { - // Intentionally left empty. - } - - MinMaxLinearEquationSolverRequirements& setNoEndComponents(bool value = true) { - noEndComponents = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setNoZeroRewardEndComponents(bool value = true) { - noZeroRewardEndComponents = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setValidInitialScheduler(bool value = true) { - validInitialScheduler = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setGlobalLowerBound(bool value = true) { - globalLowerBound = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setGlobalUpperBound(bool value = true) { - globalUpperBound = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& set(Element const& element, bool value = true) { - switch (element) { - case Element::NoEndComponents: noEndComponents = value; break; - case Element::NoZeroRewardEndComponents: noZeroRewardEndComponents = value; break; - case Element::ValidInitialScheduler: validInitialScheduler = value; break; - case Element::GlobalLowerBound: globalLowerBound = value; break; - case Element::GlobalUpperBound: globalUpperBound = value; break; - } - return *this; - } - - bool requires(Element const& element) { - switch (element) { - case Element::NoEndComponents: return noEndComponents; break; - case Element::NoZeroRewardEndComponents: return noZeroRewardEndComponents; break; - case Element::ValidInitialScheduler: return validInitialScheduler; break; - case Element::GlobalLowerBound: return globalLowerBound; break; - case Element::GlobalUpperBound: return globalUpperBound; break; - } - } - - bool empty() const { - return !noEndComponents && !noZeroRewardEndComponents && !validInitialScheduler && !globalLowerBound && !globalUpperBound; - } - - private: - bool noEndComponents; - bool noZeroRewardEndComponents; - bool validInitialScheduler; - bool globalLowerBound; - bool globalUpperBound; - }; - /*! * A class representing the interface that all min-max linear equation solvers shall implement. */ diff --git a/src/storm/solver/MinMaxLinearEquationSolverRequirements.h b/src/storm/solver/MinMaxLinearEquationSolverRequirements.h new file mode 100644 index 000000000..906c0a193 --- /dev/null +++ b/src/storm/solver/MinMaxLinearEquationSolverRequirements.h @@ -0,0 +1,75 @@ +#pragma once + +namespace storm { + namespace solver { + + class MinMaxLinearEquationSolverRequirements { + public: + enum class Element { + NoEndComponents, NoZeroRewardEndComponents, ValidInitialScheduler, GlobalLowerBound, GlobalUpperBound + }; + + MinMaxLinearEquationSolverRequirements() : noEndComponents(false), noZeroRewardEndComponents(false), validInitialScheduler(false), globalLowerBound(false), globalUpperBound(false) { + // Intentionally left empty. + } + + MinMaxLinearEquationSolverRequirements& setNoEndComponents(bool value = true) { + noEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setNoZeroRewardEndComponents(bool value = true) { + noZeroRewardEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setValidInitialScheduler(bool value = true) { + validInitialScheduler = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setGlobalLowerBound(bool value = true) { + globalLowerBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& setGlobalUpperBound(bool value = true) { + globalUpperBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& set(Element const& element, bool value = true) { + switch (element) { + case Element::NoEndComponents: noEndComponents = value; break; + case Element::NoZeroRewardEndComponents: noZeroRewardEndComponents = value; break; + case Element::ValidInitialScheduler: validInitialScheduler = value; break; + case Element::GlobalLowerBound: globalLowerBound = value; break; + case Element::GlobalUpperBound: globalUpperBound = value; break; + } + return *this; + } + + bool requires(Element const& element) { + switch (element) { + case Element::NoEndComponents: return noEndComponents; break; + case Element::NoZeroRewardEndComponents: return noZeroRewardEndComponents; break; + case Element::ValidInitialScheduler: return validInitialScheduler; break; + case Element::GlobalLowerBound: return globalLowerBound; break; + case Element::GlobalUpperBound: return globalUpperBound; break; + } + } + + bool empty() const { + return !noEndComponents && !noZeroRewardEndComponents && !validInitialScheduler && !globalLowerBound && !globalUpperBound; + } + + private: + bool noEndComponents; + bool noZeroRewardEndComponents; + bool validInitialScheduler; + bool globalLowerBound; + bool globalUpperBound; + }; + + } +} From 12b10af6728029fc5bf7fbdff0ea6fe35a767ec7 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 4 Sep 2017 21:32:06 +0200 Subject: [PATCH 82/95] started on hybrid MDP helper respecting solver requirements --- .../prctl/helper/HybridMdpPrctlHelper.cpp | 52 +++++++++++++++++-- .../prctl/helper/SparseMdpPrctlHelper.cpp | 8 +-- .../IterativeMinMaxLinearEquationSolver.cpp | 6 +-- src/storm/storage/SparseMatrix.h | 3 +- 4 files changed, 54 insertions(+), 15 deletions(-) diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index 24fe1326f..02c7d783c 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -25,6 +25,36 @@ namespace storm { namespace modelchecker { namespace helper { + template + std::vector computeValidInitialScheduler(uint64_t numberOfMaybeStates, storm::storage::SparseMatrix const& transitionMatrix, std::vector const& b) { + std::vector result(numberOfMaybeStates); + storm::storage::BitVector targetStates(numberOfMaybeStates); + + for (uint64_t state = 0; state < numberOfMaybeStates; ++state) { + // Record all states with non-zero probability of moving directly to the target states. + for (uint64_t row = transitionMatrix.getRowGroupIndices()[state]; row < transitionMatrix.getRowGroupIndices()[state + 1]; ++row) { + if (!storm::utility::isZero(b[row])) { + targetStates.set(state); + result[state] = row - transitionMatrix.getRowGroupIndices()[state]; + } + } + } + + if (!targetStates.full()) { + storm::storage::Scheduler validScheduler(numberOfMaybeStates); + storm::storage::SparseMatrix backwardTransitions = transitionMatrix.transpose(true); + storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, storm::storage::BitVector(numberOfMaybeStates, true), targetStates, validScheduler, boost::none); + + for (uint64_t state = 0; state < numberOfMaybeStates; ++state) { + if (!targetStates.get(state)) { + result[state] = validScheduler.getChoice(state).getDeterministicChoice(); + } + } + } + + return result; + } + template std::unique_ptr HybridMdpPrctlHelper::computeUntilProbabilities(OptimizationDirection dir, storm::models::symbolic::NondeterministicModel const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, bool qualitative, storm::solver::MinMaxLinearEquationSolverFactory const& linearEquationSolverFactory) { // We need to identify the states which have to be taken out of the matrix, i.e. all states that have @@ -75,14 +105,26 @@ namespace storm { // Translate the symbolic matrix/vector to their explicit representations and solve the equation system. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); - // Check for requirements of the solver. - storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities); - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); - // Create the solution vector. std::vector x(maybeStates.getNonZeroCount(), storm::utility::zero()); + + // Check for requirements of the solver. + storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities, dir); + boost::optional> initialScheduler; + if (!requirements.empty()) { + if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { + STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); + initialScheduler = computeValidInitialScheduler(x.size(), explicitRepresentation.first, explicitRepresentation.second); + + requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); + } + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + } std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); + if (initialScheduler) { + solver->setInitialScheduler(std::move(initialScheduler.get())); + } solver->setRequirementsChecked(); solver->solveEquations(dir, x, explicitRepresentation.second); @@ -247,7 +289,7 @@ namespace storm { // non-maybe states in the matrix. storm::dd::Add submatrix = transitionMatrix * maybeStatesAdd; - // Then compute the state reward vector to use in the computation. + // Then compute the reward vector to use in the computation. storm::dd::Add subvector = rewardModel.getTotalRewardVector(maybeStatesAdd, submatrix, model.getColumnVariables()); if (!rewardModel.hasStateActionRewards() && !rewardModel.hasTransitionRewards()) { // If the reward model neither has state-action nor transition rewards, we need to multiply diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index a90c6bbfc..d842705ac 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -87,12 +87,12 @@ namespace storm { template std::vector computeValidSchedulerHint(storm::solver::MinMaxLinearEquationSolverSystemType const& type, storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& maybeStates, storm::storage::BitVector const& filterStates, storm::storage::BitVector const& targetStates) { - std::unique_ptr> validScheduler = std::make_unique>(maybeStates.size()); + storm::storage::Scheduler validScheduler(maybeStates.size()); if (type == storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities) { - storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, filterStates, targetStates, *validScheduler, boost::none); + storm::utility::graph::computeSchedulerProbGreater0E(transitionMatrix, backwardTransitions, filterStates, targetStates, validScheduler, boost::none); } else if (type == storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { - storm::utility::graph::computeSchedulerProb1E(maybeStates | targetStates, transitionMatrix, backwardTransitions, filterStates, targetStates, *validScheduler); + storm::utility::graph::computeSchedulerProb1E(maybeStates | targetStates, transitionMatrix, backwardTransitions, filterStates, targetStates, validScheduler); } else { STORM_LOG_ASSERT(false, "Unexpected equation system type."); } @@ -101,7 +101,7 @@ namespace storm { std::vector schedulerHint(maybeStates.getNumberOfSetBits()); auto maybeIt = maybeStates.begin(); for (auto& choice : schedulerHint) { - choice = validScheduler->getChoice(*maybeIt).getDeterministicChoice(); + choice = validScheduler.getChoice(*maybeIt).getDeterministicChoice(); ++maybeIt; } return schedulerHint; diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 0718db5b8..314c97c2b 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -225,10 +225,8 @@ namespace storm { } } } else if (equationSystemType == MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { - if (this->getSettings().getSolutionMethod() == IterativeMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration) { - if (!direction || direction.get() == OptimizationDirection::Minimize) { - requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); - } + if (!direction || direction.get() == OptimizationDirection::Minimize) { + requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); } } diff --git a/src/storm/storage/SparseMatrix.h b/src/storm/storage/SparseMatrix.h index bd8c1bad1..6f4dba96f 100644 --- a/src/storm/storage/SparseMatrix.h +++ b/src/storm/storage/SparseMatrix.h @@ -688,7 +688,7 @@ namespace storm { /*! * Selects exactly one row from each row group of this matrix and returns the resulting matrix. * -s * @param insertDiagonalEntries If set to true, the resulting matrix will have zero entries in column i for + * @param insertDiagonalEntries If set to true, the resulting matrix will have zero entries in column i for * each row in row group i. This can then be used for inserting other values later. * @return A submatrix of the current matrix by selecting one row out of each row group. */ @@ -715,7 +715,6 @@ s * @param insertDiagonalEntries If set to true, the resulting matri */ storm::storage::SparseMatrix transpose(bool joinGroups = false, bool keepZeros = false) const; - /*! * Transposes the matrix w.r.t. the selected rows. * This is equivalent to selectRowsFromRowGroups(rowGroupChoices, false).transpose(false, keepZeros) but avoids creating one intermediate matrix. From a3cbaedcc165b9f2807eac4da7a828c83ef154ed Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 5 Sep 2017 11:20:54 +0200 Subject: [PATCH 83/95] intermediate commit to switch workplace --- .../prctl/helper/HybridMdpPrctlHelper.cpp | 145 +++++++++++++++--- .../prctl/helper/SparseMdpPrctlHelper.cpp | 3 +- src/storm/utility/vector.h | 86 +++++++---- 3 files changed, 178 insertions(+), 56 deletions(-) diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index 02c7d783c..67b2dbf1f 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -26,7 +26,8 @@ namespace storm { namespace helper { template - std::vector computeValidInitialScheduler(uint64_t numberOfMaybeStates, storm::storage::SparseMatrix const& transitionMatrix, std::vector const& b) { + std::vector computeValidInitialSchedulerForUntilProbabilities(storm::storage::SparseMatrix const& transitionMatrix, std::vector const& b) { + uint64_t numberOfMaybeStates = transitionMatrix.getRowGroupCount(); std::vector result(numberOfMaybeStates); storm::storage::BitVector targetStates(numberOfMaybeStates); @@ -106,7 +107,7 @@ namespace storm { std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); // Create the solution vector. - std::vector x(maybeStates.getNonZeroCount(), storm::utility::zero()); + std::vector x(explicitRepresentation.first.getRowGroupCount(), storm::utility::zero()); // Check for requirements of the solver. storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities, dir); @@ -114,7 +115,7 @@ namespace storm { if (!requirements.empty()) { if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); - initialScheduler = computeValidInitialScheduler(x.size(), explicitRepresentation.first, explicitRepresentation.second); + initialScheduler = computeValidInitialSchedulerForUntilProbabilities(explicitRepresentation.first, explicitRepresentation.second); requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); } @@ -250,6 +251,69 @@ namespace storm { return std::unique_ptr(new HybridQuantitativeCheckResult(model.getReachableStates(), model.getManager().getBddZero(), model.getManager().template getAddZero(), model.getReachableStates(), odd, x)); } + template + storm::storage::BitVector computeTargetStatesForReachabilityRewardsFromExplicitRepresentation(storm::storage::SparseMatrix const& transitionMatrix) { + storm::storage::BitVector targetStates(transitionMatrix.getRowGroupCount()); + + // A state is a target state if its row group is empty. + for (uint64_t rowGroup = 0; rowGroup < transitionMatrix.getRowGroupCount(); ++rowGroup) { + if (transitionMatrix.getRowGroupIndices()[rowGroup] == transitionMatrix.getRowGroupIndices()[rowGroup + 1]) { + targetStates.set(rowGroup); + } + } + + return targetStates; + } + + template + std::vector computeValidInitialSchedulerForReachabilityRewards(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& properMaybeStates, storm::storage::BitVector const& targetStates) { + uint64_t numberOfMaybeStates = transitionMatrix.getRowGroupCount(); + std::vector result(numberOfMaybeStates); + + storm::storage::Scheduler validScheduler(numberOfMaybeStates); + storm::storage::SparseMatrix backwardTransitions = transitionMatrix.transpose(true); + storm::utility::graph::computeSchedulerProb1E(storm::storage::BitVector(numberOfMaybeStates, true), transitionMatrix, backwardTransitions, properMaybeStates, targetStates, validScheduler); + + for (uint64_t state = 0; state < numberOfMaybeStates; ++state) { + if (!targetStates.get(state)) { + result[state] = validScheduler.getChoice(state).getDeterministicChoice(); + } + } + + return result; + } + + template + void eliminateTargetStatesFromExplicitRepresentation(std::pair, std::vector>& explicitRepresentation, std::vector& scheduler, storm::storage::BitVector const& properMaybeStates) { + // Treat the matrix first. + explicitRepresentation.first = explicitRepresentation.first.getSubmatrix(true, properMaybeStates, properMaybeStates); + + // Now eliminate the superfluous entries from the rhs vector and the scheduler. + uint64_t position = 0; + for (auto state : properMaybeStates) { + explicitRepresentation.second[position] = explicitRepresentation.second[state]; + scheduler[position] = scheduler[state]; + position++; + } + + uint64_t numberOfProperMaybeStates = properMaybeStates.getNumberOfSetBits(); + explicitRepresentation.second.resize(numberOfProperMaybeStates); + explicitRepresentation.second.shrink_to_fit(); + scheduler.resize(numberOfProperMaybeStates); + scheduler.shrink_to_fit(); + } + + template + std::vector insertTargetStateValuesIntoExplicitRepresentation(std::vector const& x, storm::storage::BitVector const& properMaybeStates) { + std::vector expandedResult(properMaybeStates.size(), storm::utility::zero()); + + uint64_t position = 0; + for (auto state : properMaybeStates) { + expandedResult[state] = x[position]; + position++; + } + } + template std::unique_ptr HybridMdpPrctlHelper::computeReachabilityRewards(OptimizationDirection dir, storm::models::symbolic::NondeterministicModel const& model, storm::dd::Add const& transitionMatrix, RewardModelType const& rewardModel, storm::dd::Bdd const& targetStates, bool qualitative, storm::solver::MinMaxLinearEquationSolverFactory const& linearEquationSolverFactory) { @@ -266,7 +330,8 @@ namespace storm { infinityStates = storm::utility::graph::performProb1A(model, transitionMatrixBdd, targetStates, storm::utility::graph::performProbGreater0A(model, transitionMatrixBdd, model.getReachableStates(), targetStates)); } infinityStates = !infinityStates && model.getReachableStates(); - storm::dd::Bdd maybeStates = (!targetStates && !infinityStates) && model.getReachableStates(); + storm::dd::Bdd maybeStatesWithTargetStates = !infinityStates && model.getReachableStates(); + storm::dd::Bdd maybeStates = !targetStates && maybeStatesWithTargetStates; STORM_LOG_INFO("Found " << infinityStates.getNonZeroCount() << " 'infinity' states."); STORM_LOG_INFO("Found " << targetStates.getNonZeroCount() << " 'target' states."); STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); @@ -279,51 +344,85 @@ namespace storm { } else { // If there are maybe states, we need to solve an equation system. if (!maybeStates.isZero()) { + // Check for requirements of the solver this early so we can adapt the maybe states accordingly. + storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); + bool requireInitialScheduler = false; + if (!requirements.empty()) { + if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { + STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); + requireInitialScheduler = true; + requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); + } + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); + } + + // Compute the set of maybe states that we are required to keep in the translation to explicit. + storm::dd::Bdd requiredMaybeStates = requireInitialScheduler ? maybeStatesWithTargetStates : maybeStates; + // Create the ODD for the translation between symbolic and explicit storage. - storm::dd::Odd odd = maybeStates.createOdd(); + storm::dd::Odd odd = requiredMaybeStates.createOdd(); // Create the matrix and the vector for the equation system. storm::dd::Add maybeStatesAdd = maybeStates.template toAdd(); - // Start by cutting away all rows that do not belong to maybe states. Note that this leaves columns targeting - // non-maybe states in the matrix. - storm::dd::Add submatrix = transitionMatrix * maybeStatesAdd; + // Start by getting rid of + // (a) transitions from non-maybe states, and + // (b) the choices in the transition matrix that lead to a state that is neither a maybe state + // nor a target state ('infinity choices'). + storm::dd::Add choiceFilterAdd = (transitionMatrixBdd && maybeStatesWithTargetStates.renameVariables(model.getRowVariables(), model.getColumnVariables())).existsAbstract(model.getColumnVariables()).template toAdd(); + storm::dd::Add submatrix = transitionMatrix * maybeStatesAdd * choiceFilterAdd; // Then compute the reward vector to use in the computation. storm::dd::Add subvector = rewardModel.getTotalRewardVector(maybeStatesAdd, submatrix, model.getColumnVariables()); if (!rewardModel.hasStateActionRewards() && !rewardModel.hasTransitionRewards()) { // If the reward model neither has state-action nor transition rewards, we need to multiply // it with the legal nondetermism encodings in each state. - subvector *= transitionMatrixBdd.existsAbstract(model.getColumnVariables()).template toAdd(); + subvector *= choiceFilterAdd; } - // Since we are cutting away target and infinity states, we need to account for this by giving - // choices the value infinity that have some successor contained in the infinity states. - storm::dd::Bdd choicesWithInfinitySuccessor = (maybeStates && transitionMatrixBdd && infinityStates.swapVariables(model.getRowColumnMetaVariablePairs())).existsAbstract(model.getColumnVariables()); - subvector = choicesWithInfinitySuccessor.ite(model.getManager().template getInfinity(), subvector); - // Before cutting the non-maybe columns, we need to compute the sizes of the row groups. storm::dd::Add stateActionAdd = submatrix.notZero().existsAbstract(model.getColumnVariables()).template toAdd(); std::vector rowGroupSizes = stateActionAdd.sumAbstract(model.getNondeterminismVariables()).toVector(odd); - // Finally cut away all columns targeting non-maybe states. - submatrix *= maybeStatesAdd.swapVariables(model.getRowColumnMetaVariablePairs()); - - // Create the solution vector. - std::vector x(maybeStates.getNonZeroCount(), storm::utility::zero()); + // Finally cut away all columns targeting non-maybe states (or non-(maybe or target) states, respectively). + submatrix *= requireInitialScheduler ? maybeStatesWithTargetStates.swapVariables(model.getRowColumnMetaVariablePairs()).template toAdd() : maybeStatesAdd.swapVariables(model.getRowColumnMetaVariablePairs()); // Translate the symbolic matrix/vector to their explicit representations. std::pair, std::vector> explicitRepresentation = submatrix.toMatrixVector(subvector, std::move(rowGroupSizes), model.getNondeterminismVariables(), odd, odd); - // Check for requirements of the solver. - storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Cannot establish requirements for solver."); - + // Compute a valid initial scheduler if necessary. + boost::optional> initialScheduler; + boost::optional properMaybeStates; + if (requireInitialScheduler) { + // Compute a valid initial scheduler. + storm::storage::BitVector targetStates = computeTargetStatesForReachabilityRewardsFromExplicitRepresentation(explicitRepresentation.first); + properMaybeStates = ~targetStates; + initialScheduler = computeValidInitialSchedulerForReachabilityRewards(explicitRepresentation.first, properMaybeStates.get(), targetStates); + + // Since we needed the transitions to target states to be translated as well for the computation + // of the scheduler, we have to get rid of them now. + eliminateTargetStatesFromExplicitRepresentation(explicitRepresentation, initialScheduler.get(), properMaybeStates.get()); + } + // Now solve the resulting equation system. std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); + + // Move the scheduler to the solver. + if (initialScheduler) { + solver->setInitialScheduler(std::move(initialScheduler.get())); + } + + // Create the solution vector. + std::vector x(explicitRepresentation.first.getRowGroupCount(), storm::utility::zero()); + solver->setRequirementsChecked(); solver->solveEquations(dir, x, explicitRepresentation.second); + // If we included the target states in the ODD, we need to expand the result from the solver. + if (requireInitialScheduler) { + x = insertTargetStateValuesIntoExplicitRepresentation(x, properMaybeStates.get()); + } + // Return a hybrid check result that stores the numerical values explicitly. return std::unique_ptr(new storm::modelchecker::HybridQuantitativeCheckResult(model.getReachableStates(), model.getReachableStates() && !maybeStates, infinityStates.ite(model.getManager().getConstant(storm::utility::infinity()), model.getManager().template getAddZero()), maybeStates, odd, x)); } else { diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index d842705ac..605f108bf 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -519,7 +519,6 @@ namespace storm { } else { storm::storage::BitVector trueStates(transitionMatrix.getRowGroupCount(), true); if (goal.minimize()) { - STORM_LOG_WARN("Results of reward computation may be too low, because of zero-reward loops."); infinityStates = storm::utility::graph::performProb1E(transitionMatrix, nondeterministicChoiceIndices, backwardTransitions, trueStates, targetStates); } else { infinityStates = storm::utility::graph::performProb1A(transitionMatrix, nondeterministicChoiceIndices, backwardTransitions, trueStates, targetStates); @@ -566,7 +565,7 @@ namespace storm { } // Obtain proper hint information either from the provided hint or from requirements of the solver. - SparseMdpHintType hintInformation = computeHints(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, hint, goal.direction(), transitionMatrix, backwardTransitions, maybeStates, storm::storage::BitVector(transitionMatrix.getRowGroupCount(), true), targetStates, minMaxLinearEquationSolverFactory, selectedChoices); + SparseMdpHintType hintInformation = computeHints(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, hint, goal.direction(), transitionMatrix, backwardTransitions, maybeStates, ~targetStates, targetStates, minMaxLinearEquationSolverFactory, selectedChoices); // Now compute the results for the maybe states. MaybeStateResult resultForMaybeStates = computeValuesForMaybeStates(goal, submatrix, b, produceScheduler, minMaxLinearEquationSolverFactory, hintInformation); diff --git a/src/storm/utility/vector.h b/src/storm/utility/vector.h index ddac7bd2c..a9ef8d0b0 100644 --- a/src/storm/utility/vector.h +++ b/src/storm/utility/vector.h @@ -623,24 +623,36 @@ namespace storm { } for (; targetIt != targetIte; ++targetIt, ++rowGroupingIt) { - *targetIt = *sourceIt; - ++sourceIt; - localChoice = 1; - if (choices != nullptr) { - *choiceIt = 0; - } - - for (sourceIte = source.begin() + *(rowGroupingIt + 1); sourceIt != sourceIte; ++sourceIt, ++localChoice) { - if (filter(*sourceIt, *targetIt)) { - *targetIt = *sourceIt; - if (choices != nullptr) { - *choiceIt = localChoice; + // Only do work if the row group is not empty. + if (*rowGroupingIt != *(rowGroupingIt + 1)) { + *targetIt = *sourceIt; + ++sourceIt; + localChoice = 1; + if (choices != nullptr) { + *choiceIt = 0; + } + + for (sourceIte = source.begin() + *(rowGroupingIt + 1); sourceIt != sourceIte; ++sourceIt, ++localChoice) { + if (filter(*sourceIt, *targetIt)) { + *targetIt = *sourceIt; + if (choices != nullptr) { + *choiceIt = localChoice; + } } } - } - - if (choices != nullptr) { - ++choiceIt; + + if (choices != nullptr) { + ++choiceIt; + } + } else { + // Compensate for the 'wrong' move forward in the loop header. + --targetIt; + + // Record dummy choice. + if (choices != nullptr) { + *choiceIt = 0; + ++choiceIt; + } } } }); @@ -657,27 +669,39 @@ namespace storm { } for (; targetIt != targetIte; ++targetIt, ++rowGroupingIt) { - *targetIt = *sourceIt; - ++sourceIt; - localChoice = 1; - if (choices != nullptr) { - *choiceIt = 0; - } - for (sourceIte = source.begin() + *(rowGroupingIt + 1); sourceIt != sourceIte; ++sourceIt, ++localChoice) { - if (filter(*sourceIt, *targetIt)) { - *targetIt = *sourceIt; - if (choices != nullptr) { - *choiceIt = localChoice; + // Only do work if the row group is not empty. + if (*rowGroupingIt != *(rowGroupingIt + 1)) { + *targetIt = *sourceIt; + ++sourceIt; + localChoice = 1; + if (choices != nullptr) { + *choiceIt = 0; + } + for (sourceIte = source.begin() + *(rowGroupingIt + 1); sourceIt != sourceIte; ++sourceIt, ++localChoice) { + if (filter(*sourceIt, *targetIt)) { + *targetIt = *sourceIt; + if (choices != nullptr) { + *choiceIt = localChoice; + } } } - } - if (choices != nullptr) { - ++choiceIt; + if (choices != nullptr) { + ++choiceIt; + } + } else { + // Compensate for the 'wrong' move forward in the loop header. + --targetIt; + + // Record dummy choice. + if (choices != nullptr) { + *choiceIt = 0; + ++choiceIt; + } } } #endif } - + /*! * Reduces the given source vector by selecting the smallest element out of each row group. * From e81d979d569b606622291c4d6a85bd93c832e719 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 5 Sep 2017 18:18:05 +0200 Subject: [PATCH 84/95] hybrid MDP helper respecting solver requirements --- .../prctl/helper/HybridMdpPrctlHelper.cpp | 36 +++++++++++-------- .../prctl/helper/SparseMdpPrctlHelper.cpp | 2 +- .../GmmxxHybridMdpPrctlModelCheckerTest.cpp | 24 ++++++------- .../GmmxxMdpPrctlModelCheckerTest.cpp | 8 ++--- .../NativeHybridMdpPrctlModelCheckerTest.cpp | 8 ++--- .../NativeMdpPrctlModelCheckerTest.cpp | 8 ++--- 6 files changed, 46 insertions(+), 40 deletions(-) diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index 67b2dbf1f..5447d7fbd 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -285,22 +285,27 @@ namespace storm { template void eliminateTargetStatesFromExplicitRepresentation(std::pair, std::vector>& explicitRepresentation, std::vector& scheduler, storm::storage::BitVector const& properMaybeStates) { - // Treat the matrix first. - explicitRepresentation.first = explicitRepresentation.first.getSubmatrix(true, properMaybeStates, properMaybeStates); - - // Now eliminate the superfluous entries from the rhs vector and the scheduler. + // Eliminate the superfluous entries from the rhs vector and the scheduler. uint64_t position = 0; for (auto state : properMaybeStates) { - explicitRepresentation.second[position] = explicitRepresentation.second[state]; + for (uint64_t row = explicitRepresentation.first.getRowGroupIndices()[state]; row < explicitRepresentation.first.getRowGroupIndices()[state + 1]; ++row) { + explicitRepresentation.second[position] = explicitRepresentation.second[row]; + position++; + } + } + explicitRepresentation.second.resize(position); + explicitRepresentation.second.shrink_to_fit(); + + position = 0; + for (auto state : properMaybeStates) { scheduler[position] = scheduler[state]; position++; } - - uint64_t numberOfProperMaybeStates = properMaybeStates.getNumberOfSetBits(); - explicitRepresentation.second.resize(numberOfProperMaybeStates); - explicitRepresentation.second.shrink_to_fit(); - scheduler.resize(numberOfProperMaybeStates); + scheduler.resize(properMaybeStates.getNumberOfSetBits()); scheduler.shrink_to_fit(); + + // Treat the matrix. + explicitRepresentation.first = explicitRepresentation.first.getSubmatrix(true, properMaybeStates, properMaybeStates); } template @@ -312,6 +317,8 @@ namespace storm { expandedResult[state] = x[position]; position++; } + + return expandedResult; } template @@ -324,7 +331,6 @@ namespace storm { storm::dd::Bdd infinityStates; storm::dd::Bdd transitionMatrixBdd = transitionMatrix.notZero(); if (dir == OptimizationDirection::Minimize) { - STORM_LOG_WARN("Results of reward computation may be too low, because of zero-reward loops."); infinityStates = storm::utility::graph::performProb1E(model, transitionMatrixBdd, model.getReachableStates(), targetStates, storm::utility::graph::performProbGreater0E(model, transitionMatrixBdd, model.getReachableStates(), targetStates)); } else { infinityStates = storm::utility::graph::performProb1A(model, transitionMatrixBdd, targetStates, storm::utility::graph::performProbGreater0A(model, transitionMatrixBdd, model.getReachableStates(), targetStates)); @@ -345,7 +351,7 @@ namespace storm { // If there are maybe states, we need to solve an equation system. if (!maybeStates.isZero()) { // Check for requirements of the solver this early so we can adapt the maybe states accordingly. - storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = linearEquationSolverFactory.getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, dir); bool requireInitialScheduler = false; if (!requirements.empty()) { if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { @@ -403,6 +409,9 @@ namespace storm { // of the scheduler, we have to get rid of them now. eliminateTargetStatesFromExplicitRepresentation(explicitRepresentation, initialScheduler.get(), properMaybeStates.get()); } + + // Create the solution vector. + std::vector x(explicitRepresentation.first.getRowGroupCount(), storm::utility::zero()); // Now solve the resulting equation system. std::unique_ptr> solver = linearEquationSolverFactory.create(std::move(explicitRepresentation.first)); @@ -412,9 +421,6 @@ namespace storm { solver->setInitialScheduler(std::move(initialScheduler.get())); } - // Create the solution vector. - std::vector x(explicitRepresentation.first.getRowGroupCount(), storm::utility::zero()); - solver->setRequirementsChecked(); solver->solveEquations(dir, x, explicitRepresentation.second); diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 605f108bf..fb70009a3 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -202,7 +202,7 @@ namespace storm { SparseMdpHintType result; // Check for requirements of the solver. - storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(type); + storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(type, dir); if (!(hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()) && !requirements.empty()) { if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); diff --git a/src/test/storm/modelchecker/GmmxxHybridMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/GmmxxHybridMdpPrctlModelCheckerTest.cpp index adf69343c..203730667 100644 --- a/src/test/storm/modelchecker/GmmxxHybridMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/GmmxxHybridMdpPrctlModelCheckerTest.cpp @@ -107,8 +107,8 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, Dice_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult7 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -205,8 +205,8 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, Dice_Sylvan) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult7 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -285,8 +285,8 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, AsynchronousLeader_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult5 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(4.2856896106114934, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(4.2856896106114934, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2857145335329694, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2857145335329694, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); @@ -294,8 +294,8 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, AsynchronousLeader_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult6 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(4.2856896106114934, quantitativeResult6.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(4.2856896106114934, quantitativeResult6.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904354441401, quantitativeResult6.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904354441401, quantitativeResult6.getMax(), storm::settings::getModule().getPrecision()); } TEST(GmmxxHybridMdpPrctlModelCheckerTest, AsynchronousLeader_Sylvan) { @@ -365,8 +365,8 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, AsynchronousLeader_Sylvan) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult5 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(4.2856896106114934, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(4.2856896106114934, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2857145335329694, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2857145335329694, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); @@ -374,7 +374,7 @@ TEST(GmmxxHybridMdpPrctlModelCheckerTest, AsynchronousLeader_Sylvan) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult6 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(4.2856896106114934, quantitativeResult6.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(4.2856896106114934, quantitativeResult6.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904354441401, quantitativeResult6.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904354441401, quantitativeResult6.getMax(), storm::settings::getModule().getPrecision()); } diff --git a/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp index 3d590ef74..e771b3e0a 100644 --- a/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp @@ -79,7 +79,7 @@ TEST(GmmxxMdpPrctlModelCheckerTest, Dice) { result = checker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult7 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(7.333329499, quantitativeResult7[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult7[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -101,7 +101,7 @@ TEST(GmmxxMdpPrctlModelCheckerTest, Dice) { result = stateRewardModelChecker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult9 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(7.333329499, quantitativeResult9[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333333333333375, quantitativeResult9[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -123,7 +123,7 @@ TEST(GmmxxMdpPrctlModelCheckerTest, Dice) { result = stateAndTransitionRewardModelChecker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult11 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(14.666658998, quantitativeResult11[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(14.666666666666675, quantitativeResult11[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -181,7 +181,7 @@ TEST(GmmxxMdpPrctlModelCheckerTest, AsynchronousLeader) { result = checker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult5 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(4.285689611, quantitativeResult5[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2857129064503061, quantitativeResult5[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); diff --git a/src/test/storm/modelchecker/NativeHybridMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/NativeHybridMdpPrctlModelCheckerTest.cpp index 09e480133..1bba57ace 100644 --- a/src/test/storm/modelchecker/NativeHybridMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/NativeHybridMdpPrctlModelCheckerTest.cpp @@ -103,8 +103,8 @@ TEST(NativeHybridMdpPrctlModelCheckerTest, Dice_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult7 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -200,8 +200,8 @@ TEST(NativeHybridMdpPrctlModelCheckerTest, Dice_Sylvan) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::HybridQuantitativeCheckResult& quantitativeResult7 = result->asHybridQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); diff --git a/src/test/storm/modelchecker/NativeMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/NativeMdpPrctlModelCheckerTest.cpp index 7cec42eae..a64e66f04 100644 --- a/src/test/storm/modelchecker/NativeMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/NativeMdpPrctlModelCheckerTest.cpp @@ -76,7 +76,7 @@ TEST(SparseMdpPrctlModelCheckerTest, Dice) { result = checker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult7 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(7.333329499, quantitativeResult7[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -98,7 +98,7 @@ TEST(SparseMdpPrctlModelCheckerTest, Dice) { result = stateRewardModelChecker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult9 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(7.333329499, quantitativeResult9[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult9[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -120,7 +120,7 @@ TEST(SparseMdpPrctlModelCheckerTest, Dice) { result = stateAndTransitionRewardModelChecker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult11 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(14.666658998, quantitativeResult11[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(14.666663408279419, quantitativeResult11[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -178,7 +178,7 @@ TEST(SparseMdpPrctlModelCheckerTest, AsynchronousLeader) { result = checker.check(*formula); storm::modelchecker::ExplicitQuantitativeCheckResult& quantitativeResult5 = result->asExplicitQuantitativeCheckResult(); - EXPECT_NEAR(4.285689611, quantitativeResult5[0], storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856907116062786, quantitativeResult5[0], storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); From 7c246074275acca9cd8e0a16ba9a868006c4bf2f Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 5 Sep 2017 22:16:54 +0200 Subject: [PATCH 85/95] started on symbolic solver requirements --- .../prctl/helper/HybridMdpPrctlHelper.cpp | 2 +- .../prctl/helper/SparseMdpPrctlHelper.cpp | 2 +- .../prctl/helper/SymbolicMdpPrctlHelper.cpp | 47 ++++++++-- src/storm/solver/MinMaxLinearEquationSolver.h | 7 +- ...MinMaxLinearEquationSolverRequirements.cpp | 61 +++++++++++++ .../MinMaxLinearEquationSolverRequirements.h | 59 ++----------- .../MinMaxLinearEquationSolverSystemType.h | 13 +++ .../SymbolicMinMaxLinearEquationSolver.cpp | 87 ++++++++++++++++--- .../SymbolicMinMaxLinearEquationSolver.h | 73 +++++++++++++--- src/storm/utility/graph.cpp | 28 ++++++ src/storm/utility/graph.h | 6 ++ 11 files changed, 298 insertions(+), 87 deletions(-) create mode 100644 src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp create mode 100644 src/storm/solver/MinMaxLinearEquationSolverSystemType.h diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index 5447d7fbd..e89759f81 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -355,7 +355,7 @@ namespace storm { bool requireInitialScheduler = false; if (!requirements.empty()) { if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { - STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); + STORM_LOG_DEBUG("Computing valid scheduler, because the solver requires it."); requireInitialScheduler = true; requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); } diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index fb70009a3..3c213b1cf 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -205,7 +205,7 @@ namespace storm { storm::solver::MinMaxLinearEquationSolverRequirements requirements = minMaxLinearEquationSolverFactory.getRequirements(type, dir); if (!(hint.isExplicitModelCheckerHint() && hint.asExplicitModelCheckerHint().getNoEndComponentsInMaybeStates()) && !requirements.empty()) { if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { - STORM_LOG_DEBUG("Computing valid scheduler hint, because the solver requires it."); + STORM_LOG_DEBUG("Computing valid scheduler, because the solver requires it."); result.schedulerHint = computeValidSchedulerHint(type, transitionMatrix, backwardTransitions, maybeStates, phiStates, targetStates); requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); } diff --git a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp index 74a52cf90..c53724306 100644 --- a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp @@ -9,7 +9,6 @@ #include "storm/utility/graph.h" #include "storm/utility/constants.h" - #include "storm/models/symbolic/StandardRewardModel.h" #include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h" @@ -17,11 +16,24 @@ #include "storm/exceptions/InvalidPropertyException.h" #include "storm/exceptions/InvalidArgumentException.h" +#include "storm/exceptions/UncheckedRequirementException.h" namespace storm { namespace modelchecker { namespace helper { + template + storm::dd::Bdd computeValidSchedulerHint(storm::solver::MinMaxLinearEquationSolverSystemType const& type, storm::models::symbolic::NondeterministicModel const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& maybeStates, storm::dd::Bdd const& targetStates) { + + storm::dd::Bdd result; + + if (type == storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities) { + result = storm::utility::graph::computeSchedulerProbGreater0E(model, transitionMatrix.notZero(), maybeStates, targetStates); + } + + return result; + } + template std::unique_ptr SymbolicMdpPrctlHelper::computeUntilProbabilities(OptimizationDirection dir, storm::models::symbolic::NondeterministicModel const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, bool qualitative, storm::solver::SymbolicGeneralMinMaxLinearEquationSolverFactory const& linearEquationSolverFactory) { // We need to identify the states which have to be taken out of the matrix, i.e. all states that have @@ -66,7 +78,24 @@ namespace storm { // Now solve the resulting equation system. std::unique_ptr> solver = linearEquationSolverFactory.create(submatrix, maybeStates, model.getIllegalMask() && maybeStates, model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), model.getRowColumnMetaVariablePairs()); - storm::dd::Add result = solver->solveEquations(dir == OptimizationDirection::Minimize, model.getManager().template getAddZero(), subvector); + + // Check requirements of solver. + storm::solver::MinMaxLinearEquationSolverRequirements requirements = solver->getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities, dir); + boost::optional> initialScheduler; + if (!requirements.empty()) { + if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { + STORM_LOG_DEBUG("Computing valid scheduler, because the solver requires it."); + initialScheduler = computeValidSchedulerHint(storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities, model, transitionMatrix, maybeStates, statesWithProbability01.second); + requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); + } + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Could not establish requirements of solver."); + } + if (initialScheduler) { + solver->setInitialScheduler(initialScheduler.get()); + } + solver->setRequirementsChecked(); + + storm::dd::Add result = solver->solveEquations(dir, model.getManager().template getAddZero(), subvector); return std::unique_ptr(new storm::modelchecker::SymbolicQuantitativeCheckResult(model.getReachableStates(), statesWithProbability01.second.template toAdd() + result)); } else { @@ -123,7 +152,7 @@ namespace storm { submatrix *= maybeStatesAdd.swapVariables(model.getRowColumnMetaVariablePairs()); std::unique_ptr> solver = linearEquationSolverFactory.create(submatrix, maybeStates, model.getIllegalMask() && maybeStates, model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), model.getRowColumnMetaVariablePairs()); - storm::dd::Add result = solver->multiply(dir == OptimizationDirection::Minimize, model.getManager().template getAddZero(), &subvector, stepBound); + storm::dd::Add result = solver->multiply(dir, model.getManager().template getAddZero(), &subvector, stepBound); return std::unique_ptr(new storm::modelchecker::SymbolicQuantitativeCheckResult(model.getReachableStates(), psiStates.template toAdd() + result)); } else { @@ -138,7 +167,7 @@ namespace storm { // Perform the matrix-vector multiplication. std::unique_ptr> solver = linearEquationSolverFactory.create(transitionMatrix, model.getReachableStates(), model.getIllegalMask(), model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), model.getRowColumnMetaVariablePairs()); - storm::dd::Add result = solver->multiply(dir == OptimizationDirection::Minimize, rewardModel.getStateRewardVector(), nullptr, stepBound); + storm::dd::Add result = solver->multiply(dir, rewardModel.getStateRewardVector(), nullptr, stepBound); return std::unique_ptr(new SymbolicQuantitativeCheckResult(model.getReachableStates(), result)); } @@ -153,7 +182,7 @@ namespace storm { // Perform the matrix-vector multiplication. std::unique_ptr> solver = linearEquationSolverFactory.create(model.getTransitionMatrix(), model.getReachableStates(), model.getIllegalMask(), model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), model.getRowColumnMetaVariablePairs()); - storm::dd::Add result = solver->multiply(dir == OptimizationDirection::Minimize, model.getManager().template getAddZero(), &totalRewardVector, stepBound); + storm::dd::Add result = solver->multiply(dir, model.getManager().template getAddZero(), &totalRewardVector, stepBound); return std::unique_ptr(new SymbolicQuantitativeCheckResult(model.getReachableStates(), result)); } @@ -208,7 +237,13 @@ namespace storm { // Now solve the resulting equation system. std::unique_ptr> solver = linearEquationSolverFactory.create(submatrix, maybeStates, model.getIllegalMask() && maybeStates, model.getRowVariables(), model.getColumnVariables(), model.getNondeterminismVariables(), model.getRowColumnMetaVariablePairs()); - storm::dd::Add result = solver->solveEquations(dir == OptimizationDirection::Minimize, model.getManager().template getAddZero(), subvector); + + // Check requirements of solver. + storm::solver::MinMaxLinearEquationSolverRequirements requirements = solver->getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, dir); + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Could not establish requirements of solver."); + solver->setRequirementsChecked(); + + storm::dd::Add result = solver->solveEquations(dir, model.getManager().template getAddZero(), subvector); return std::unique_ptr(new storm::modelchecker::SymbolicQuantitativeCheckResult(model.getReachableStates(), infinityStates.ite(model.getManager().getConstant(storm::utility::infinity()), result))); } else { diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 579790412..c77417ccd 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -12,6 +12,7 @@ #include "storm/storage/sparse/StateType.h" #include "storm/storage/Scheduler.h" #include "storm/solver/OptimizationDirection.h" +#include "storm/solver/MinMaxLinearEquationSolverSystemType.h" #include "storm/solver/MinMaxLinearEquationSolverRequirements.h" #include "storm/exceptions/InvalidSettingsException.h" @@ -24,12 +25,6 @@ namespace storm { namespace solver { - enum class MinMaxLinearEquationSolverSystemType { - UntilProbabilities, - ReachabilityRewards, - StochasticShortestPath - }; - /*! * A class representing the interface that all min-max linear equation solvers shall implement. */ diff --git a/src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp b/src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp new file mode 100644 index 000000000..07560601d --- /dev/null +++ b/src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp @@ -0,0 +1,61 @@ +#include "storm/solver/MinMaxLinearEquationSolverRequirements.h" + +namespace storm { + namespace solver { + + MinMaxLinearEquationSolverRequirements::MinMaxLinearEquationSolverRequirements() : noEndComponents(false), noZeroRewardEndComponents(false), validInitialScheduler(false), globalLowerBound(false), globalUpperBound(false) { + // Intentionally left empty. + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::setNoEndComponents(bool value) { + noEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::setNoZeroRewardEndComponents(bool value) { + noZeroRewardEndComponents = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::setValidInitialScheduler(bool value) { + validInitialScheduler = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::setGlobalLowerBound(bool value) { + globalLowerBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::setGlobalUpperBound(bool value) { + globalUpperBound = value; + return *this; + } + + MinMaxLinearEquationSolverRequirements& MinMaxLinearEquationSolverRequirements::set(Element const& element, bool value) { + switch (element) { + case Element::NoEndComponents: noEndComponents = value; break; + case Element::NoZeroRewardEndComponents: noZeroRewardEndComponents = value; break; + case Element::ValidInitialScheduler: validInitialScheduler = value; break; + case Element::GlobalLowerBound: globalLowerBound = value; break; + case Element::GlobalUpperBound: globalUpperBound = value; break; + } + return *this; + } + + bool MinMaxLinearEquationSolverRequirements::requires(Element const& element) { + switch (element) { + case Element::NoEndComponents: return noEndComponents; break; + case Element::NoZeroRewardEndComponents: return noZeroRewardEndComponents; break; + case Element::ValidInitialScheduler: return validInitialScheduler; break; + case Element::GlobalLowerBound: return globalLowerBound; break; + case Element::GlobalUpperBound: return globalUpperBound; break; + } + } + + bool MinMaxLinearEquationSolverRequirements::empty() const { + return !noEndComponents && !noZeroRewardEndComponents && !validInitialScheduler && !globalLowerBound && !globalUpperBound; + } + + } +} diff --git a/src/storm/solver/MinMaxLinearEquationSolverRequirements.h b/src/storm/solver/MinMaxLinearEquationSolverRequirements.h index 906c0a193..6cb4e025c 100644 --- a/src/storm/solver/MinMaxLinearEquationSolverRequirements.h +++ b/src/storm/solver/MinMaxLinearEquationSolverRequirements.h @@ -9,59 +9,18 @@ namespace storm { NoEndComponents, NoZeroRewardEndComponents, ValidInitialScheduler, GlobalLowerBound, GlobalUpperBound }; - MinMaxLinearEquationSolverRequirements() : noEndComponents(false), noZeroRewardEndComponents(false), validInitialScheduler(false), globalLowerBound(false), globalUpperBound(false) { - // Intentionally left empty. - } + MinMaxLinearEquationSolverRequirements(); - MinMaxLinearEquationSolverRequirements& setNoEndComponents(bool value = true) { - noEndComponents = value; - return *this; - } + MinMaxLinearEquationSolverRequirements& setNoEndComponents(bool value = true); + MinMaxLinearEquationSolverRequirements& setNoZeroRewardEndComponents(bool value = true); + MinMaxLinearEquationSolverRequirements& setValidInitialScheduler(bool value = true); + MinMaxLinearEquationSolverRequirements& setGlobalLowerBound(bool value = true); + MinMaxLinearEquationSolverRequirements& setGlobalUpperBound(bool value = true); + MinMaxLinearEquationSolverRequirements& set(Element const& element, bool value = true); - MinMaxLinearEquationSolverRequirements& setNoZeroRewardEndComponents(bool value = true) { - noZeroRewardEndComponents = value; - return *this; - } + bool requires(Element const& element); - MinMaxLinearEquationSolverRequirements& setValidInitialScheduler(bool value = true) { - validInitialScheduler = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setGlobalLowerBound(bool value = true) { - globalLowerBound = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& setGlobalUpperBound(bool value = true) { - globalUpperBound = value; - return *this; - } - - MinMaxLinearEquationSolverRequirements& set(Element const& element, bool value = true) { - switch (element) { - case Element::NoEndComponents: noEndComponents = value; break; - case Element::NoZeroRewardEndComponents: noZeroRewardEndComponents = value; break; - case Element::ValidInitialScheduler: validInitialScheduler = value; break; - case Element::GlobalLowerBound: globalLowerBound = value; break; - case Element::GlobalUpperBound: globalUpperBound = value; break; - } - return *this; - } - - bool requires(Element const& element) { - switch (element) { - case Element::NoEndComponents: return noEndComponents; break; - case Element::NoZeroRewardEndComponents: return noZeroRewardEndComponents; break; - case Element::ValidInitialScheduler: return validInitialScheduler; break; - case Element::GlobalLowerBound: return globalLowerBound; break; - case Element::GlobalUpperBound: return globalUpperBound; break; - } - } - - bool empty() const { - return !noEndComponents && !noZeroRewardEndComponents && !validInitialScheduler && !globalLowerBound && !globalUpperBound; - } + bool empty() const; private: bool noEndComponents; diff --git a/src/storm/solver/MinMaxLinearEquationSolverSystemType.h b/src/storm/solver/MinMaxLinearEquationSolverSystemType.h new file mode 100644 index 000000000..e517b7b8f --- /dev/null +++ b/src/storm/solver/MinMaxLinearEquationSolverSystemType.h @@ -0,0 +1,13 @@ +#pragma once + +namespace storm { + namespace solver { + + enum class MinMaxLinearEquationSolverSystemType { + UntilProbabilities, + ReachabilityRewards, + StochasticShortestPath + }; + + } +} diff --git a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp index 7499f166c..9dc9e7c93 100644 --- a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp @@ -78,24 +78,30 @@ namespace storm { } template - SymbolicMinMaxLinearEquationSolver::SymbolicMinMaxLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs, std::unique_ptr>&& linearEquationSolverFactory, SymbolicMinMaxLinearEquationSolverSettings const& settings) : A(A), allRows(allRows), illegalMaskAdd(illegalMask.ite(A.getDdManager().getConstant(storm::utility::infinity()), A.getDdManager().template getAddZero())), rowMetaVariables(rowMetaVariables), columnMetaVariables(columnMetaVariables), choiceVariables(choiceVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), linearEquationSolverFactory(std::move(linearEquationSolverFactory)), settings(settings) { + SymbolicMinMaxLinearEquationSolver::SymbolicMinMaxLinearEquationSolver(SymbolicMinMaxLinearEquationSolverSettings const& settings) : settings(settings), requirementsChecked(false) { // Intentionally left empty. } template - storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquations(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const { + SymbolicMinMaxLinearEquationSolver::SymbolicMinMaxLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs, std::unique_ptr>&& linearEquationSolverFactory, SymbolicMinMaxLinearEquationSolverSettings const& settings) : A(A), allRows(allRows), illegalMaskAdd(illegalMask.ite(A.getDdManager().getConstant(storm::utility::infinity()), A.getDdManager().template getAddZero())), rowMetaVariables(rowMetaVariables), columnMetaVariables(columnMetaVariables), choiceVariables(choiceVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs), linearEquationSolverFactory(std::move(linearEquationSolverFactory)), settings(settings), requirementsChecked(false) { + // Intentionally left empty. + } + + template + storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquations(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const { + STORM_LOG_WARN_COND_DEBUG(this->isRequirementsCheckedSet(), "The requirements of the solver have not been marked as checked. Please provide the appropriate check or mark the requirements as checked (if applicable)."); switch (this->getSettings().getSolutionMethod()) { case SymbolicMinMaxLinearEquationSolverSettings::SolutionMethod::ValueIteration: - return solveEquationsValueIteration(minimize, x, b); + return solveEquationsValueIteration(dir, x, b); break; case SymbolicMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration: - return solveEquationsPolicyIteration(minimize, x, b); + return solveEquationsPolicyIteration(dir, x, b); break; } } template - storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsValueIteration(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const { + storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsValueIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const { // Set up the environment. storm::dd::Add xCopy = x; uint_fast64_t iterations = 0; @@ -107,7 +113,7 @@ namespace storm { storm::dd::Add tmp = this->A.multiplyMatrix(xCopyAsColumn, this->columnMetaVariables); tmp += b; - if (minimize) { + if (dir == storm::solver::OptimizationDirection::Minimize) { tmp += illegalMaskAdd; tmp = tmp.minAbstract(this->choiceVariables); } else { @@ -132,15 +138,15 @@ namespace storm { } template - storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsPolicyIteration(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const { + storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsPolicyIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const { // Set up the environment. storm::dd::Add currentSolution = x; storm::dd::Add diagonal = (storm::utility::dd::getRowColumnDiagonal(x.getDdManager(), this->rowColumnMetaVariablePairs) && this->allRows).template toAdd(); uint_fast64_t iterations = 0; bool converged = false; - // Pick arbitrary initial scheduler. - storm::dd::Bdd scheduler = this->A.sumAbstract(this->columnMetaVariables).maxAbstractRepresentative(this->choiceVariables); + // Choose initial scheduler. + storm::dd::Bdd scheduler = this->hasInitialScheduler() ? this->getInitialScheduler() : this->A.sumAbstract(this->columnMetaVariables).maxAbstractRepresentative(this->choiceVariables); // And apply it to the matrix and vector. storm::dd::Add schedulerA = diagonal - scheduler.ite(this->A, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); @@ -158,7 +164,7 @@ namespace storm { storm::dd::Add choiceValues = this->A.multiplyMatrix(schedulerX.swapVariables(this->rowColumnMetaVariablePairs), this->columnMetaVariables) + b; storm::dd::Bdd nextScheduler; - if (minimize) { + if (dir == storm::solver::OptimizationDirection::Minimize) { choiceValues += illegalMaskAdd; nextScheduler = choiceValues.minAbstractRepresentative(this->choiceVariables); } else { @@ -190,7 +196,7 @@ namespace storm { } template - storm::dd::Add SymbolicMinMaxLinearEquationSolver::multiply(bool minimize, storm::dd::Add const& x, storm::dd::Add const* b, uint_fast64_t n) const { + storm::dd::Add SymbolicMinMaxLinearEquationSolver::multiply(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const* b, uint_fast64_t n) const { storm::dd::Add xCopy = x; // Perform matrix-vector multiplication while the bound is met. @@ -201,7 +207,7 @@ namespace storm { xCopy += *b; } - if (minimize) { + if (dir == storm::solver::OptimizationDirection::Minimize) { // This is a hack and only here because of the lack of a suitable minAbstract/maxAbstract function // that can properly deal with a restriction of the choices. xCopy += illegalMaskAdd; @@ -214,16 +220,66 @@ namespace storm { return xCopy; } + template + void SymbolicMinMaxLinearEquationSolver::setInitialScheduler(storm::dd::Bdd const& scheduler) { + this->initialScheduler = scheduler; + } + + template + storm::dd::Bdd const& SymbolicMinMaxLinearEquationSolver::getInitialScheduler() const { + return initialScheduler.get(); + } + + template + bool SymbolicMinMaxLinearEquationSolver::hasInitialScheduler() const { + return static_cast(initialScheduler); + } + + template + MinMaxLinearEquationSolverRequirements SymbolicMinMaxLinearEquationSolver::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + MinMaxLinearEquationSolverRequirements requirements; + + if (equationSystemType == MinMaxLinearEquationSolverSystemType::UntilProbabilities) { + if (this->getSettings().getSolutionMethod() == SymbolicMinMaxLinearEquationSolverSettings::SolutionMethod::PolicyIteration) { + if (!direction || direction.get() == OptimizationDirection::Maximize) { + requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); + } + } + } else if (equationSystemType == MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { + if (!direction || direction.get() == OptimizationDirection::Minimize) { + requirements.set(MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler); + } + } + + return requirements; + } + + template + void SymbolicMinMaxLinearEquationSolver::setRequirementsChecked(bool value) { + this->requirementsChecked = value; + } + + template + bool SymbolicMinMaxLinearEquationSolver::isRequirementsCheckedSet() const { + return this->requirementsChecked; + } + template SymbolicMinMaxLinearEquationSolverSettings const& SymbolicMinMaxLinearEquationSolver::getSettings() const { return settings; } + template + MinMaxLinearEquationSolverRequirements SymbolicMinMaxLinearEquationSolverFactory::getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction) const { + std::unique_ptr> solver = this->create(); + return solver->getRequirements(equationSystemType, direction); + } + template std::unique_ptr> SymbolicGeneralMinMaxLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs) const { return std::make_unique>(A, allRows, illegalMask, rowMetaVariables, columnMetaVariables, choiceVariables, rowColumnMetaVariablePairs, std::make_unique>(), settings); } - + template SymbolicMinMaxLinearEquationSolverSettings& SymbolicGeneralMinMaxLinearEquationSolverFactory::getSettings() { return settings; @@ -234,6 +290,11 @@ namespace storm { return settings; } + template + std::unique_ptr> SymbolicGeneralMinMaxLinearEquationSolverFactory::create() const { + return std::make_unique>(settings); + } + template class SymbolicMinMaxLinearEquationSolverSettings; template class SymbolicMinMaxLinearEquationSolverSettings; diff --git a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h index 650934211..e9e76ee6e 100644 --- a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h +++ b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h @@ -4,10 +4,15 @@ #include #include #include -#include +#include + +#include "storm/solver/OptimizationDirection.h" #include "storm/solver/SymbolicLinearEquationSolver.h" +#include "storm/solver/MinMaxLinearEquationSolverSystemType.h" +#include "storm/solver/MinMaxLinearEquationSolverRequirements.h" + #include "storm/storage/expressions/Variable.h" #include "storm/storage/dd/DdType.h" @@ -54,6 +59,8 @@ namespace storm { template class SymbolicMinMaxLinearEquationSolver { public: + SymbolicMinMaxLinearEquationSolver(SymbolicMinMaxLinearEquationSolverSettings const& settings = SymbolicMinMaxLinearEquationSolverSettings()); + /*! * Constructs a symbolic min/max linear equation solver with the given meta variable sets and pairs. * @@ -75,36 +82,65 @@ namespace storm { * The solution of the set of linear equations will be written to the vector x. Note that the matrix A has * to be given upon construction time of the solver object. * - * @param minimize If set, all the value of a group of rows is the taken as the minimum over all rows and as - * the maximum otherwise. + * @param dir Determines the direction of the optimization. * @param x The initual guess for the solution vector. Its length must be equal to the number of row * groups of A. * @param b The right-hand side of the equation system. Its length must be equal to the number of row groups * of A. * @return The solution of the equation system. */ - virtual storm::dd::Add solveEquations(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const; + virtual storm::dd::Add solveEquations(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const; /*! * Performs repeated matrix-vector multiplication, using x[0] = x and x[i + 1] = A*x[i] + b. After * performing the necessary multiplications, the result is written to the input vector x. Note that the * matrix A has to be given upon construction time of the solver object. * - * @param minimize If set, all the value of a group of rows is the taken as the minimum over all rows and as - * the maximum otherwise. + * @param dir Determines the direction of the optimization. * @param x The initial vector with which to perform matrix-vector multiplication. Its length must be equal * to the number of row groups of A. * @param b If non-null, this vector is added after each multiplication. If given, its length must be equal * to the number of row groups of A. * @return The solution of the equation system. */ - virtual storm::dd::Add multiply(bool minimize, storm::dd::Add const& x, storm::dd::Add const* b = nullptr, uint_fast64_t n = 1) const; + virtual storm::dd::Add multiply(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const* b = nullptr, uint_fast64_t n = 1) const; SymbolicMinMaxLinearEquationSolverSettings const& getSettings() const; + /*! + * Sets an initial scheduler that is required by some solvers (see requirements). + */ + void setInitialScheduler(storm::dd::Bdd const& scheduler); + + /*! + * Retrieves the initial scheduler (if there is any). + */ + storm::dd::Bdd const& getInitialScheduler() const; + + /*! + * Retrieves whether an initial scheduler was set. + */ + bool hasInitialScheduler() const; + + /*! + * Retrieves the requirements of the solver. + */ + virtual MinMaxLinearEquationSolverRequirements getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; + + /*! + * Notifies the solver that the requirements for solving equations have been checked. If this has not been + * done before solving equations, the solver might issue a warning, perform the checks itself or even fail. + */ + void setRequirementsChecked(bool value = true); + + /*! + * Retrieves whether the solver is aware that the requirements were checked. + */ + bool isRequirementsCheckedSet() const; + private: - storm::dd::Add solveEquationsValueIteration(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const; - storm::dd::Add solveEquationsPolicyIteration(bool minimize, storm::dd::Add const& x, storm::dd::Add const& b) const; + storm::dd::Add solveEquationsValueIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const; + storm::dd::Add solveEquationsPolicyIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const; protected: // The matrix defining the coefficients of the linear equation system. @@ -133,23 +169,40 @@ namespace storm { // The settings to use. SymbolicMinMaxLinearEquationSolverSettings settings; + + // A flag indicating whether the requirements were checked. + bool requirementsChecked; + + // A scheduler that specifies with which schedulers to start. + boost::optional> initialScheduler; }; template class SymbolicMinMaxLinearEquationSolverFactory { public: virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs) const = 0; + + /*! + * Retrieves the requirements of the solver that would be created when calling create() right now. The + * requirements are guaranteed to be ordered according to their appearance in the SolverRequirement type. + */ + MinMaxLinearEquationSolverRequirements getRequirements(MinMaxLinearEquationSolverSystemType const& equationSystemType, boost::optional const& direction = boost::none) const; + + private: + virtual std::unique_ptr> create() const = 0; }; template class SymbolicGeneralMinMaxLinearEquationSolverFactory : public SymbolicMinMaxLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs) const; + virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, storm::dd::Bdd const& illegalMask, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::set const& choiceVariables, std::vector> const& rowColumnMetaVariablePairs) const override; SymbolicMinMaxLinearEquationSolverSettings& getSettings(); SymbolicMinMaxLinearEquationSolverSettings const& getSettings() const; private: + virtual std::unique_ptr> create() const override; + SymbolicMinMaxLinearEquationSolverSettings settings; }; diff --git a/src/storm/utility/graph.cpp b/src/storm/utility/graph.cpp index c341cdc22..4464ed2be 100644 --- a/src/storm/utility/graph.cpp +++ b/src/storm/utility/graph.cpp @@ -885,6 +885,26 @@ namespace storm { std::pair performProb01Min(storm::models::sparse::NondeterministicModel const& model, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates) { return performProb01Min(model.getTransitionMatrix(), model.getTransitionMatrix().getRowGroupIndices(), model.getBackwardTransitions(), phiStates, psiStates); } + + template + storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates) { + // Initialize environment for backward search. + storm::dd::DdManager const& manager = model.getManager(); + storm::dd::Bdd statesWithProbabilityGreater0E = manager.getBddZero(); + storm::dd::Bdd frontier = psiStates; + storm::dd::Bdd scheduler = manager.getBddZero(); + + uint_fast64_t iterations = 0; + while (!frontier.isZero()) { + storm::dd::Bdd statesAndChoicesWithProbabilityGreater0E = statesWithProbabilityGreater0E.inverseRelationalProduct(transitionMatrix, model.getRowVariables(), model.getColumnVariables()); + frontier = phiStates && statesAndChoicesWithProbabilityGreater0E.existsAbstract(model.getNondeterminismVariables()) && !statesWithProbabilityGreater0E; + scheduler = scheduler || (frontier && statesAndChoicesWithProbabilityGreater0E).existsAbstractRepresentative(model.getNondeterminismVariables()); + statesWithProbabilityGreater0E |= frontier; + ++iterations; + } + + return scheduler; + } template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates) { @@ -1478,6 +1498,8 @@ namespace storm { template std::pair, storm::dd::Bdd> performProb01(storm::models::symbolic::Model const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template storm::dd::Bdd performProb0A(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1510,6 +1532,8 @@ namespace storm { template std::pair, storm::dd::Bdd> performProb01(storm::models::symbolic::Model const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template storm::dd::Bdd performProb0A(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1542,6 +1566,8 @@ namespace storm { template std::pair, storm::dd::Bdd> performProb01(storm::models::symbolic::Model const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template storm::dd::Bdd performProb0A(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1570,6 +1596,8 @@ namespace storm { template std::pair, storm::dd::Bdd> performProb01(storm::models::symbolic::Model const& model, storm::dd::Add const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template storm::dd::Bdd performProb0A(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); diff --git a/src/storm/utility/graph.h b/src/storm/utility/graph.h index ff8b30287..69a07770c 100644 --- a/src/storm/utility/graph.h +++ b/src/storm/utility/graph.h @@ -447,6 +447,12 @@ namespace storm { template storm::dd::Bdd performProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + /*! + * Computes a scheduler realizing a probability greater zero of satisfying phi until psi for all such states. + */ + template + storm::dd::Bdd computeSchedulerProbGreater0E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); + /*! * Computes the set of states for which there does not exist a scheduler that achieves a probability greater * than zero of satisfying phi until psi. From 9bda63179536b0c6482be36f361210c11dbed62d Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 6 Sep 2017 10:53:31 +0200 Subject: [PATCH 86/95] symbolic MDP helper respecting solver requirements --- .../prctl/helper/SymbolicMdpPrctlHelper.cpp | 15 ++++++- ...ymbolicEliminationLinearEquationSolver.cpp | 13 ++++-- .../SymbolicEliminationLinearEquationSolver.h | 8 +++- .../solver/SymbolicLinearEquationSolver.cpp | 43 ++++++++++++------ .../solver/SymbolicLinearEquationSolver.h | 34 +++++++++++--- .../SymbolicMinMaxLinearEquationSolver.cpp | 41 ++++++++++++----- .../SymbolicMinMaxLinearEquationSolver.h | 3 ++ .../SymbolicNativeLinearEquationSolver.cpp | 13 ++++-- .../SymbolicNativeLinearEquationSolver.h | 21 +++++++-- src/storm/utility/graph.cpp | 45 ++++++++++++++++++- src/storm/utility/graph.h | 6 +++ 11 files changed, 199 insertions(+), 43 deletions(-) diff --git a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp index c53724306..a4c418b3c 100644 --- a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp @@ -29,6 +29,8 @@ namespace storm { if (type == storm::solver::MinMaxLinearEquationSolverSystemType::UntilProbabilities) { result = storm::utility::graph::computeSchedulerProbGreater0E(model, transitionMatrix.notZero(), maybeStates, targetStates); + } else if (type == storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards) { + result = storm::utility::graph::computeSchedulerProb1E(model, transitionMatrix.notZero(), maybeStates, targetStates, maybeStates || targetStates); } return result; @@ -240,7 +242,18 @@ namespace storm { // Check requirements of solver. storm::solver::MinMaxLinearEquationSolverRequirements requirements = solver->getRequirements(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, dir); - STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Could not establish requirements of solver."); + boost::optional> initialScheduler; + if (!requirements.empty()) { + if (requirements.requires(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler)) { + STORM_LOG_DEBUG("Computing valid scheduler, because the solver requires it."); + initialScheduler = computeValidSchedulerHint(storm::solver::MinMaxLinearEquationSolverSystemType::ReachabilityRewards, model, transitionMatrix, maybeStates, targetStates); + requirements.set(storm::solver::MinMaxLinearEquationSolverRequirements::Element::ValidInitialScheduler, false); + } + STORM_LOG_THROW(requirements.empty(), storm::exceptions::UncheckedRequirementException, "Could not establish requirements of solver."); + } + if (initialScheduler) { + solver->setInitialScheduler(initialScheduler.get()); + } solver->setRequirementsChecked(); storm::dd::Add result = solver->solveEquations(dir, model.getManager().template getAddZero(), subvector); diff --git a/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp b/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp index bcbc41085..44689d990 100644 --- a/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicEliminationLinearEquationSolver.cpp @@ -11,8 +11,13 @@ namespace storm { namespace solver { template - SymbolicEliminationLinearEquationSolver::SymbolicEliminationLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : SymbolicLinearEquationSolver(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs) { - storm::dd::DdManager& ddManager = A.getDdManager(); + SymbolicEliminationLinearEquationSolver::SymbolicEliminationLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : SymbolicEliminationLinearEquationSolver(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs) { + this->setMatrix(A); + } + + template + SymbolicEliminationLinearEquationSolver::SymbolicEliminationLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : SymbolicLinearEquationSolver(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs) { + storm::dd::DdManager& ddManager = allRows.getDdManager(); // Create triple-layered meta variables for all original meta variables. We will use them later in the elimination process. for (auto const& metaVariablePair : this->rowColumnMetaVariablePairs) { @@ -104,8 +109,8 @@ namespace storm { } template - std::unique_ptr> SymbolicEliminationLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + std::unique_ptr> SymbolicEliminationLinearEquationSolverFactory::create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); } template diff --git a/src/storm/solver/SymbolicEliminationLinearEquationSolver.h b/src/storm/solver/SymbolicEliminationLinearEquationSolver.h index a77ac2a8c..45b0f0b12 100644 --- a/src/storm/solver/SymbolicEliminationLinearEquationSolver.h +++ b/src/storm/solver/SymbolicEliminationLinearEquationSolver.h @@ -15,7 +15,9 @@ namespace storm { class SymbolicEliminationLinearEquationSolver : public SymbolicLinearEquationSolver { public: SymbolicEliminationLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs); - + + SymbolicEliminationLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs); + virtual storm::dd::Add solveEquations(storm::dd::Add const& x, storm::dd::Add const& b) const override; private: @@ -34,7 +36,9 @@ namespace storm { template class SymbolicEliminationLinearEquationSolverFactory : public SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; + using SymbolicLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const override; SymbolicEliminationLinearEquationSolverSettings& getSettings(); SymbolicEliminationLinearEquationSolverSettings const& getSettings() const; diff --git a/src/storm/solver/SymbolicLinearEquationSolver.cpp b/src/storm/solver/SymbolicLinearEquationSolver.cpp index 75fe87254..066b7b19b 100644 --- a/src/storm/solver/SymbolicLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicLinearEquationSolver.cpp @@ -20,10 +20,15 @@ namespace storm { namespace solver { template - SymbolicLinearEquationSolver::SymbolicLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : A(A), allRows(allRows), rowMetaVariables(rowMetaVariables), columnMetaVariables(columnMetaVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs) { + SymbolicLinearEquationSolver::SymbolicLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : SymbolicLinearEquationSolver(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs) { + this->setMatrix(A); + } + + template + SymbolicLinearEquationSolver::SymbolicLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) : allRows(allRows), rowMetaVariables(rowMetaVariables), columnMetaVariables(columnMetaVariables), rowColumnMetaVariablePairs(rowColumnMetaVariablePairs) { // Intentionally left empty. } - + template storm::dd::Add SymbolicLinearEquationSolver::multiply(storm::dd::Add const& x, storm::dd::Add const* b, uint_fast64_t n) const { storm::dd::Add xCopy = x; @@ -46,21 +51,33 @@ namespace storm { } template - std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + storm::dd::DdManager& SymbolicLinearEquationSolver::getDdManager() const { + return this->allRows.getDdManager(); + } + + template + std::unique_ptr> SymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + std::unique_ptr> solver = this->create(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + solver->setMatrix(A); + return solver; + } + + template + std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { storm::solver::EquationSolverType equationSolver = storm::settings::getModule().getEquationSolver(); switch (equationSolver) { - case storm::solver::EquationSolverType::Elimination: return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + case storm::solver::EquationSolverType::Elimination: return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); break; - case storm::solver::EquationSolverType::Native: return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + case storm::solver::EquationSolverType::Native: return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); break; default: STORM_LOG_WARN("The selected equation solver is not available in the dd engine. Falling back to native solver."); - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); } } template - std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { auto const& coreSettings = storm::settings::getModule(); storm::solver::EquationSolverType equationSolver = coreSettings.getEquationSolver(); @@ -74,27 +91,27 @@ namespace storm { } switch (equationSolver) { - case storm::solver::EquationSolverType::Elimination: return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + case storm::solver::EquationSolverType::Elimination: return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); break; case storm::solver::EquationSolverType::Native: - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); break; default: STORM_LOG_WARN("The selected equation solver is not available in the dd engine. Falling back to elimination solver."); - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); } } template - std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + std::unique_ptr> GeneralSymbolicLinearEquationSolverFactory::create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { storm::solver::EquationSolverType equationSolver = storm::settings::getModule().getEquationSolver(); switch (equationSolver) { - case storm::solver::EquationSolverType::Elimination: return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + case storm::solver::EquationSolverType::Elimination: return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); break; default: STORM_LOG_WARN("The selected equation solver is not available in the DD setting. Falling back to elimination solver."); - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs); } } diff --git a/src/storm/solver/SymbolicLinearEquationSolver.h b/src/storm/solver/SymbolicLinearEquationSolver.h index 15b503175..9b3c3b490 100644 --- a/src/storm/solver/SymbolicLinearEquationSolver.h +++ b/src/storm/solver/SymbolicLinearEquationSolver.h @@ -5,6 +5,7 @@ #include #include "storm/storage/expressions/Variable.h" +#include "storm/storage/dd/DdManager.h" #include "storm/storage/dd/DdType.h" #include "storm/adapters/RationalFunctionAdapter.h" @@ -46,7 +47,20 @@ namespace storm { * variables. */ SymbolicLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs); - + + /*! + * Constructs a symbolic linear equation solver with the given meta variable sets and pairs. Note that in + * this version, the coefficient matrix has to be set manually afterwards. + * + * @param diagonal An ADD characterizing the elements on the diagonal of the matrix. + * @param allRows A BDD characterizing all rows of the equation system. + * @param rowMetaVariables The meta variables used to encode the rows of the matrix. + * @param columnMetaVariables The meta variables used to encode the columns of the matrix. + * @param rowColumnMetaVariablePairs The pairs of row meta variables and the corresponding column meta + * variables. + */ + SymbolicLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs); + /*! * Solves the equation system A*x = b. The matrix A is required to be square and have a unique solution. * The solution of the set of linear equations will be written to the vector x. Note that the matrix A has @@ -74,6 +88,8 @@ namespace storm { void setMatrix(storm::dd::Add const& newA); protected: + storm::dd::DdManager& getDdManager() const; + // The matrix defining the coefficients of the linear equation system. storm::dd::Add A; @@ -93,25 +109,33 @@ namespace storm { template class SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const = 0; + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const = 0; + + std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; }; template class GeneralSymbolicLinearEquationSolverFactory : public SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; + using SymbolicLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; }; template class GeneralSymbolicLinearEquationSolverFactory : public SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; + using SymbolicLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; }; template class GeneralSymbolicLinearEquationSolverFactory : public SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; + using SymbolicLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; }; } // namespace solver diff --git a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp index 9dc9e7c93..18fa0fcd3 100644 --- a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp @@ -107,6 +107,11 @@ namespace storm { uint_fast64_t iterations = 0; bool converged = false; + // If we were given an initial scheduler, we take its solution as the starting point. + if (this->hasInitialScheduler()) { + xCopy = solveEquationsWithScheduler(this->getInitialScheduler(), xCopy, b); + } + while (!converged && iterations < this->settings.getMaximalNumberOfIterations()) { // Compute tmp = A * x + b storm::dd::Add xCopyAsColumn = xCopy.swapVariables(this->rowColumnMetaVariablePairs); @@ -137,6 +142,30 @@ namespace storm { return xCopy; } + template + storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsWithScheduler(storm::dd::Bdd const& scheduler, storm::dd::Add const& x, storm::dd::Add const& b) const { + + std::unique_ptr> solver = linearEquationSolverFactory->create(this->allRows, this->rowMetaVariables, this->columnMetaVariables, this->rowColumnMetaVariablePairs); + storm::dd::Add diagonal = (storm::utility::dd::getRowColumnDiagonal(x.getDdManager(), this->rowColumnMetaVariablePairs) && this->allRows).template toAdd(); + return solveEquationsWithScheduler(*solver, scheduler, x, b, diagonal); + } + + template + storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsWithScheduler(SymbolicLinearEquationSolver& solver, storm::dd::Bdd const& scheduler, storm::dd::Add const& x, storm::dd::Add const& b, storm::dd::Add const& diagonal) const { + + // Apply scheduler to the matrix and vector. + storm::dd::Add schedulerA = diagonal - scheduler.ite(this->A, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); + storm::dd::Add schedulerB = scheduler.ite(b, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); + + // Set the matrix for the solver. + solver.setMatrix(schedulerA); + + // Solve for the value of the scheduler. + storm::dd::Add schedulerX = solver.solveEquations(x, schedulerB); + + return schedulerX; + } + template storm::dd::Add SymbolicMinMaxLinearEquationSolver::solveEquationsPolicyIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const { // Set up the environment. @@ -148,17 +177,12 @@ namespace storm { // Choose initial scheduler. storm::dd::Bdd scheduler = this->hasInitialScheduler() ? this->getInitialScheduler() : this->A.sumAbstract(this->columnMetaVariables).maxAbstractRepresentative(this->choiceVariables); - // And apply it to the matrix and vector. - storm::dd::Add schedulerA = diagonal - scheduler.ite(this->A, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); - storm::dd::Add schedulerB = scheduler.ite(b, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); - // Initialize linear equation solver. - std::unique_ptr> linearEquationSolver = linearEquationSolverFactory->create(schedulerA, this->allRows, this->rowMetaVariables, this->columnMetaVariables, this->rowColumnMetaVariablePairs); + std::unique_ptr> linearEquationSolver = linearEquationSolverFactory->create(this->allRows, this->rowMetaVariables, this->columnMetaVariables, this->rowColumnMetaVariablePairs); // Iteratively solve and improve the scheduler. while (!converged && iterations < this->settings.getMaximalNumberOfIterations()) { - // Solve for the value of the scheduler. - storm::dd::Add schedulerX = linearEquationSolver->solveEquations(currentSolution, schedulerB); + storm::dd::Add schedulerX = solveEquationsWithScheduler(*linearEquationSolver, scheduler, currentSolution, b, diagonal); // Policy improvement step. storm::dd::Add choiceValues = this->A.multiplyMatrix(schedulerX.swapVariables(this->rowColumnMetaVariablePairs), this->columnMetaVariables) + b; @@ -177,9 +201,6 @@ namespace storm { // Set up next iteration. if (!converged) { scheduler = nextScheduler; - schedulerA = diagonal - scheduler.ite(this->A, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); - linearEquationSolver->setMatrix(schedulerA); - schedulerB = scheduler.ite(b, scheduler.getDdManager().template getAddZero()).sumAbstract(this->choiceVariables); } currentSolution = schedulerX; diff --git a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h index e9e76ee6e..b0f70ac39 100644 --- a/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h +++ b/src/storm/solver/SymbolicMinMaxLinearEquationSolver.h @@ -139,6 +139,9 @@ namespace storm { bool isRequirementsCheckedSet() const; private: + storm::dd::Add solveEquationsWithScheduler(storm::dd::Bdd const& scheduler, storm::dd::Add const& x, storm::dd::Add const& b) const; + storm::dd::Add solveEquationsWithScheduler(SymbolicLinearEquationSolver& solver, storm::dd::Bdd const& scheduler, storm::dd::Add const& x, storm::dd::Add const& b, storm::dd::Add const& diagonal) const; + storm::dd::Add solveEquationsValueIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const; storm::dd::Add solveEquationsPolicyIteration(storm::solver::OptimizationDirection const& dir, storm::dd::Add const& x, storm::dd::Add const& b) const; diff --git a/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp b/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp index 2d0e82a1d..9132ac710 100644 --- a/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp +++ b/src/storm/solver/SymbolicNativeLinearEquationSolver.cpp @@ -54,13 +54,18 @@ namespace storm { } template - SymbolicNativeLinearEquationSolver::SymbolicNativeLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs, SymbolicNativeLinearEquationSolverSettings const& settings) : SymbolicLinearEquationSolver(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs), settings(settings) { + SymbolicNativeLinearEquationSolver::SymbolicNativeLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs, SymbolicNativeLinearEquationSolverSettings const& settings) : SymbolicNativeLinearEquationSolver(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs, settings) { + this->setMatrix(A); + } + + template + SymbolicNativeLinearEquationSolver::SymbolicNativeLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs, SymbolicNativeLinearEquationSolverSettings const& settings) : SymbolicLinearEquationSolver(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs), settings(settings) { // Intentionally left empty. } template storm::dd::Add SymbolicNativeLinearEquationSolver::solveEquations(storm::dd::Add const& x, storm::dd::Add const& b) const { - storm::dd::DdManager& manager = this->A.getDdManager(); + storm::dd::DdManager& manager = this->getDdManager(); // Start by computing the Jacobi decomposition of the matrix A. storm::dd::Bdd diagonal = storm::utility::dd::getRowColumnDiagonal(x.getDdManager(), this->rowColumnMetaVariablePairs); @@ -106,8 +111,8 @@ namespace storm { } template - std::unique_ptr> SymbolicNativeLinearEquationSolverFactory::create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { - return std::make_unique>(A, allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs, settings); + std::unique_ptr> SymbolicNativeLinearEquationSolverFactory::create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const { + return std::make_unique>(allRows, rowMetaVariables, columnMetaVariables, rowColumnMetaVariablePairs, settings); } template diff --git a/src/storm/solver/SymbolicNativeLinearEquationSolver.h b/src/storm/solver/SymbolicNativeLinearEquationSolver.h index 60e00ddf7..23b166a7c 100644 --- a/src/storm/solver/SymbolicNativeLinearEquationSolver.h +++ b/src/storm/solver/SymbolicNativeLinearEquationSolver.h @@ -50,7 +50,20 @@ namespace storm { * @param settings The settings to use. */ SymbolicNativeLinearEquationSolver(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs, SymbolicNativeLinearEquationSolverSettings const& settings = SymbolicNativeLinearEquationSolverSettings()); - + + /*! + * Constructs a symbolic linear equation solver with the given meta variable sets and pairs. + * + * @param diagonal An ADD characterizing the elements on the diagonal of the matrix. + * @param allRows A BDD characterizing all rows of the equation system. + * @param rowMetaVariables The meta variables used to encode the rows of the matrix. + * @param columnMetaVariables The meta variables used to encode the columns of the matrix. + * @param rowColumnMetaVariablePairs The pairs of row meta variables and the corresponding column meta + * variables. + * @param settings The settings to use. + */ + SymbolicNativeLinearEquationSolver(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs, SymbolicNativeLinearEquationSolverSettings const& settings = SymbolicNativeLinearEquationSolverSettings()); + /*! * Solves the equation system A*x = b. The matrix A is required to be square and have a unique solution. * The solution of the set of linear equations will be written to the vector x. Note that the matrix A has @@ -70,9 +83,11 @@ namespace storm { }; template - class SymbolicNativeLinearEquationSolverFactory { + class SymbolicNativeLinearEquationSolverFactory : SymbolicLinearEquationSolverFactory { public: - virtual std::unique_ptr> create(storm::dd::Add const& A, storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const; + using SymbolicLinearEquationSolverFactory::create; + + virtual std::unique_ptr> create(storm::dd::Bdd const& allRows, std::set const& rowMetaVariables, std::set const& columnMetaVariables, std::vector> const& rowColumnMetaVariablePairs) const override; SymbolicNativeLinearEquationSolverSettings& getSettings(); SymbolicNativeLinearEquationSolverSettings const& getSettings() const; diff --git a/src/storm/utility/graph.cpp b/src/storm/utility/graph.cpp index 4464ed2be..1cd70c0fd 100644 --- a/src/storm/utility/graph.cpp +++ b/src/storm/utility/graph.cpp @@ -896,7 +896,7 @@ namespace storm { uint_fast64_t iterations = 0; while (!frontier.isZero()) { - storm::dd::Bdd statesAndChoicesWithProbabilityGreater0E = statesWithProbabilityGreater0E.inverseRelationalProduct(transitionMatrix, model.getRowVariables(), model.getColumnVariables()); + storm::dd::Bdd statesAndChoicesWithProbabilityGreater0E = statesWithProbabilityGreater0E.inverseRelationalProductWithExtendedRelation(transitionMatrix, model.getRowVariables(), model.getColumnVariables()); frontier = phiStates && statesAndChoicesWithProbabilityGreater0E.existsAbstract(model.getNondeterminismVariables()) && !statesWithProbabilityGreater0E; scheduler = scheduler || (frontier && statesAndChoicesWithProbabilityGreater0E).existsAbstractRepresentative(model.getNondeterminismVariables()); statesWithProbabilityGreater0E |= frontier; @@ -1019,6 +1019,41 @@ namespace storm { return statesWithProbability1E; } + template + storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E) { + // Initialize environment for backward search. + storm::dd::DdManager const& manager = model.getManager(); + storm::dd::Bdd scheduler = manager.getBddZero(); + + storm::dd::Bdd innerStates = manager.getBddZero(); + + uint64_t iterations = 0; + bool innerLoopDone = false; + while (!innerLoopDone) { + storm::dd::Bdd temporary = statesWithProbability1E.swapVariables(model.getRowColumnMetaVariablePairs()); + temporary = transitionMatrix.implies(temporary).universalAbstract(model.getColumnVariables()); + + storm::dd::Bdd temporary2 = innerStates.inverseRelationalProductWithExtendedRelation(transitionMatrix, model.getRowVariables(), model.getColumnVariables()); + temporary &= temporary2; + temporary &= phiStates; + + // Extend the scheduler for those states that have not been seen as inner states before. + scheduler |= (temporary && !innerStates).existsAbstractRepresentative(model.getNondeterminismVariables()); + + temporary = temporary.existsAbstract(model.getNondeterminismVariables()); + temporary |= psiStates; + + if (innerStates == temporary) { + innerLoopDone = true; + } else { + innerStates = temporary; + } + ++iterations; + } + + return scheduler; + } + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates) { std::pair, storm::dd::Bdd> result; @@ -1512,6 +1547,8 @@ namespace storm { template storm::dd::Bdd performProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbabilityGreater0E); + template storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E); + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template std::pair, storm::dd::Bdd> performProb01Min(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1546,6 +1583,8 @@ namespace storm { template storm::dd::Bdd performProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbabilityGreater0E); + template storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E); + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template std::pair, storm::dd::Bdd> performProb01Min(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1580,6 +1619,8 @@ namespace storm { template storm::dd::Bdd performProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbabilityGreater0E); + template storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E); + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template std::pair, storm::dd::Bdd> performProb01Min(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); @@ -1610,6 +1651,8 @@ namespace storm { template storm::dd::Bdd performProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbabilityGreater0E); + template storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E); + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); template std::pair, storm::dd::Bdd> performProb01Min(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); diff --git a/src/storm/utility/graph.h b/src/storm/utility/graph.h index 69a07770c..010e68feb 100644 --- a/src/storm/utility/graph.h +++ b/src/storm/utility/graph.h @@ -521,6 +521,12 @@ namespace storm { template storm::dd::Bdd performProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbabilityGreater0E); + /*! + * Computes a scheduler satisfying phi until psi with probability 1. + */ + template + storm::dd::Bdd computeSchedulerProb1E(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& transitionMatrix, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates, storm::dd::Bdd const& statesWithProbability1E); + template std::pair, storm::dd::Bdd> performProb01Max(storm::models::symbolic::NondeterministicModel const& model, storm::dd::Bdd const& phiStates, storm::dd::Bdd const& psiStates); From 83fdffadc66607901195a36fc39d9fb73f3eec20 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 6 Sep 2017 11:27:25 +0200 Subject: [PATCH 87/95] adapted tests; in particular enabled previously disabled rewards test --- .../modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp | 4 +--- .../SymbolicMdpPrctlModelCheckerTest.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp index e771b3e0a..f0858e2ca 100644 --- a/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/GmmxxMdpPrctlModelCheckerTest.cpp @@ -242,9 +242,7 @@ TEST(GmmxxMdpPrctlModelCheckerTest, SchedulerGeneration) { EXPECT_EQ(0ull, scheduler2.getChoice(3).getDeterministicChoice()); } -// Test is currently disabled as the computation of this property requires eliminating the zero-reward MECs, which is -// currently not implemented and also not supported by PRISM. -TEST(DISABLED_GmmxxMdpPrctlModelCheckerTest, TinyRewards) { +TEST(GmmxxMdpPrctlModelCheckerTest, TinyRewards) { storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/tiny_rewards.nm"); // A parser that we use for conveniently constructing the formulas. diff --git a/src/test/storm/modelchecker/SymbolicMdpPrctlModelCheckerTest.cpp b/src/test/storm/modelchecker/SymbolicMdpPrctlModelCheckerTest.cpp index d5906064e..ebeb02282 100644 --- a/src/test/storm/modelchecker/SymbolicMdpPrctlModelCheckerTest.cpp +++ b/src/test/storm/modelchecker/SymbolicMdpPrctlModelCheckerTest.cpp @@ -103,8 +103,8 @@ TEST(SymbolicMdpPrctlModelCheckerTest, Dice_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::SymbolicQuantitativeCheckResult& quantitativeResult7 = result->asSymbolicQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -201,8 +201,8 @@ TEST(SymbolicMdpPrctlModelCheckerTest, Dice_Sylvan) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::SymbolicQuantitativeCheckResult& quantitativeResult7 = result->asSymbolicQuantitativeCheckResult(); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(7.3333294987678528, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(7.3333317041397095, quantitativeResult7.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"done\"]"); @@ -281,8 +281,8 @@ TEST(SymbolicMdpPrctlModelCheckerTest, AsynchronousLeader_Cudd) { result->filter(storm::modelchecker::SymbolicQualitativeCheckResult(model->getReachableStates(), model->getInitialStates())); storm::modelchecker::SymbolicQuantitativeCheckResult& quantitativeResult5 = result->asSymbolicQuantitativeCheckResult(); - EXPECT_NEAR(4.2856890848060498, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); - EXPECT_NEAR(4.2856890848060498, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904569131631, quantitativeResult5.getMin(), storm::settings::getModule().getPrecision()); + EXPECT_NEAR(4.2856904569131631, quantitativeResult5.getMax(), storm::settings::getModule().getPrecision()); formula = formulaParser.parseSingleFormulaFromString("Rmax=? [F \"elected\"]"); From b7e2aec82c5f6439bfbec013c0a9ed97ee119b35 Mon Sep 17 00:00:00 2001 From: TimQu Date: Wed, 6 Sep 2017 11:43:33 +0200 Subject: [PATCH 88/95] Fixed issue where variable names were reserved symbols of Exprtk --- CHANGELOG.md | 1 + .../storage/expressions/ExprtkExpressionEvaluator.cpp | 8 +++++--- src/storm/storage/expressions/ToExprtkStringVisitor.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75d2a807c..8e2e6c883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Long run average computation via ValueIteration, LP based MDP model checking, pa - storm-cli-utilities now contains cli related stuff, instead of storm-lib - storm-pars: support for welldefinedness constraints in mdps. - symbolic (MT/BDD) bisimulation +- Fixed issue related to variable names that can not be used in Exprtk. ### Version 1.1.0 (2017/8) diff --git a/src/storm/storage/expressions/ExprtkExpressionEvaluator.cpp b/src/storm/storage/expressions/ExprtkExpressionEvaluator.cpp index 42a405e49..70cd6e162 100755 --- a/src/storm/storage/expressions/ExprtkExpressionEvaluator.cpp +++ b/src/storm/storage/expressions/ExprtkExpressionEvaluator.cpp @@ -1,3 +1,5 @@ +#include + #include "storm/storage/expressions/ExprtkExpressionEvaluator.h" #include "storm/storage/expressions/ExpressionManager.h" @@ -13,11 +15,11 @@ namespace storm { for (auto const& variableTypePair : manager) { if (variableTypePair.second.isBooleanType()) { - symbolTable->add_variable(variableTypePair.first.getName(), this->booleanValues[variableTypePair.first.getOffset()]); + symbolTable->add_variable("v" + std::to_string(variableTypePair.first.getIndex()), this->booleanValues[variableTypePair.first.getOffset()]); } else if (variableTypePair.second.isIntegerType()) { - symbolTable->add_variable(variableTypePair.first.getName(), this->integerValues[variableTypePair.first.getOffset()]); + symbolTable->add_variable("v" + std::to_string(variableTypePair.first.getIndex()), this->integerValues[variableTypePair.first.getOffset()]); } else if (variableTypePair.second.isRationalType()) { - symbolTable->add_variable(variableTypePair.first.getName(), this->rationalValues[variableTypePair.first.getOffset()]); + symbolTable->add_variable("v" + std::to_string(variableTypePair.first.getIndex()), this->rationalValues[variableTypePair.first.getOffset()]); } } } diff --git a/src/storm/storage/expressions/ToExprtkStringVisitor.cpp b/src/storm/storage/expressions/ToExprtkStringVisitor.cpp index e0326dd09..d9098af2b 100644 --- a/src/storm/storage/expressions/ToExprtkStringVisitor.cpp +++ b/src/storm/storage/expressions/ToExprtkStringVisitor.cpp @@ -167,7 +167,7 @@ namespace storm { } boost::any ToExprtkStringVisitor::visit(VariableExpression const& expression, boost::any const&) { - stream << expression.getVariableName(); + stream << "v" + std::to_string(expression.getVariable().getIndex()); return boost::any(); } From 45e079622827c27acdb57d530444123a1b2b4032 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 6 Sep 2017 14:52:08 +0200 Subject: [PATCH 89/95] updated changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2e6c883..9fafa9849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ The releases of major and minor versions contain an overview of changes since th Version 1.1.x ------------- -Long run average computation via ValueIteration, LP based MDP model checking, parametric model checking has an own binary +- long run average computation via value iteration +- LP based MDP model checking +- parametric model checking has an own binary +- solvers can now expose requirements +- unbounded reachability and reachability rewards now correctly respect solver requirements ### Version 1.1.1 - c++ api changes: Building model takes BuilderOptions instead of extended list of Booleans, does not depend on settings anymore. From 6e548627ee4bf6f1366418f6e2462fbfd11dff28 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 10 Sep 2017 09:11:26 +0200 Subject: [PATCH 90/95] adding storm-pgcl as a dependency to target binaries --- src/storm-pgcl-cli/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storm-pgcl-cli/CMakeLists.txt b/src/storm-pgcl-cli/CMakeLists.txt index 4778d1e93..4f2799d4d 100644 --- a/src/storm-pgcl-cli/CMakeLists.txt +++ b/src/storm-pgcl-cli/CMakeLists.txt @@ -2,5 +2,7 @@ add_executable(storm-pgcl-cli ${PROJECT_SOURCE_DIR}/src/storm-pgcl-cli/storm-pgc target_link_libraries(storm-pgcl-cli storm-pgcl storm-cli-utilities) set_target_properties(storm-pgcl-cli PROPERTIES OUTPUT_NAME "storm-pgcl") +add_dependencies(binaries storm-pgcl-cli) + # installation install(TARGETS storm-pgcl-cli RUNTIME DESTINATION bin LIBRARY DESTINATION lib OPTIONAL) \ No newline at end of file From 2d99ff312615c19a06d4c2bc48a31acf8d7a7c38 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 14 Sep 2017 10:47:14 +0200 Subject: [PATCH 91/95] preserving action knowledge from first to second PRISM parser pass --- src/storm/parser/PrismParser.cpp | 25 +++++++++++++------------ src/storm/parser/PrismParser.h | 26 ++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/storm/parser/PrismParser.cpp b/src/storm/parser/PrismParser.cpp index 0230fbaca..38ed0cb12 100644 --- a/src/storm/parser/PrismParser.cpp +++ b/src/storm/parser/PrismParser.cpp @@ -216,19 +216,19 @@ namespace storm { moduleDefinitionList %= +(moduleRenaming(qi::_r1) | moduleDefinition(qi::_r1))[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::modules, qi::_r1), qi::_1)]; moduleDefinitionList.name("module list"); - start = (qi::eps[phoenix::bind(&PrismParser::removeInitialConstruct, phoenix::ref(*this), qi::_a)] - > *(modelTypeDefinition[phoenix::bind(&PrismParser::setModelType, phoenix::ref(*this), qi::_a, qi::_1)] - | definedConstantDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::constants, qi::_a), qi::_1)] - | undefinedConstantDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::constants, qi::_a), qi::_1)] - | formulaDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::formulas, qi::_a), qi::_1)] - | globalVariableDefinition(qi::_a) - | (moduleRenaming(qi::_a) | moduleDefinition(qi::_a))[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::modules, qi::_a), qi::_1)] - | initialStatesConstruct(qi::_a) - | rewardModelDefinition(qi::_a)[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::rewardModels, qi::_a), qi::_1)] - | labelDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::labels, qi::_a), qi::_1)] - | formulaDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::formulas, qi::_a), qi::_1)] + start = (qi::eps[phoenix::bind(&PrismParser::removeInitialConstruct, phoenix::ref(*this), phoenix::ref(globalProgramInformation))] + > *(modelTypeDefinition[phoenix::bind(&PrismParser::setModelType, phoenix::ref(*this), phoenix::ref(globalProgramInformation), qi::_1)] + | definedConstantDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::constants, phoenix::ref(globalProgramInformation)), qi::_1)] + | undefinedConstantDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::constants, phoenix::ref(globalProgramInformation)), qi::_1)] + | formulaDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::formulas, phoenix::ref(globalProgramInformation)), qi::_1)] + | globalVariableDefinition(phoenix::ref(globalProgramInformation)) + | (moduleRenaming(phoenix::ref(globalProgramInformation)) | moduleDefinition(phoenix::ref(globalProgramInformation)))[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::modules, phoenix::ref(globalProgramInformation)), qi::_1)] + | initialStatesConstruct(phoenix::ref(globalProgramInformation)) + | rewardModelDefinition(phoenix::ref(globalProgramInformation))[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::rewardModels, phoenix::ref(globalProgramInformation)), qi::_1)] + | labelDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::labels, phoenix::ref(globalProgramInformation)), qi::_1)] + | formulaDefinition[phoenix::push_back(phoenix::bind(&GlobalProgramInformation::formulas, phoenix::ref(globalProgramInformation)), qi::_1)] ) - > -(systemCompositionConstruct(qi::_a)) > qi::eoi)[qi::_val = phoenix::bind(&PrismParser::createProgram, phoenix::ref(*this), qi::_a)]; + > -(systemCompositionConstruct(phoenix::ref(globalProgramInformation))) > qi::eoi)[qi::_val = phoenix::bind(&PrismParser::createProgram, phoenix::ref(*this), phoenix::ref(globalProgramInformation))]; start.name("probabilistic program"); // Enable location tracking for important entities. @@ -267,6 +267,7 @@ namespace storm { this->secondRun = true; this->expressionParser->setIdentifierMapping(&this->identifiers_); + this->globalProgramInformation.moveToSecondRun(); } void PrismParser::allowDoubleLiterals(bool flag) { diff --git a/src/storm/parser/PrismParser.h b/src/storm/parser/PrismParser.h index f285c5cc9..129cd7b43 100644 --- a/src/storm/parser/PrismParser.h +++ b/src/storm/parser/PrismParser.h @@ -30,6 +30,25 @@ namespace storm { actionIndices.emplace("", 0); } + void moveToSecondRun() { + // Clear all data except the action to indices mapping. + modelType = storm::prism::Program::ModelType::UNDEFINED; + constants.clear(); + formulas.clear(); + globalBooleanVariables.clear(); + globalIntegerVariables.clear(); + moduleToIndexMap.clear(); + modules.clear(); + rewardModels.clear(); + labels.clear(); + hasInitialConstruct = false; + initialConstruct = storm::prism::InitialConstruct(); + systemCompositionConstruct = boost::none; + + currentCommandIndex = 0; + currentUpdateIndex = 0; + } + // Members for all essential information that needs to be collected. storm::prism::Program::ModelType modelType; std::vector constants; @@ -50,7 +69,7 @@ namespace storm { uint_fast64_t currentUpdateIndex; }; - class PrismParser : public qi::grammar, Skipper> { + class PrismParser : public qi::grammar { public: /*! * Parses the given file into the PRISM storage classes assuming it complies with the PRISM syntax. @@ -161,8 +180,11 @@ namespace storm { // A function used for annotating the entities with their position. phoenix::function annotate; + // An object gathering information about the program while parsing. + GlobalProgramInformation globalProgramInformation; + // The starting point of the grammar. - qi::rule, Skipper> start; + qi::rule start; // Rules for model type. qi::rule modelTypeDefinition; From bac50a32ab39a89f7d1dfada1dfa693cb06bea76 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 14 Sep 2017 13:35:46 +0200 Subject: [PATCH 92/95] warkaround for gcc 7.2.0: make modernjson compile again --- resources/3rdparty/modernjson/src/json.hpp | 3 ++- src/storm/storage/jani/JSONExporter.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/3rdparty/modernjson/src/json.hpp b/resources/3rdparty/modernjson/src/json.hpp index 596095aff..1b279a804 100755 --- a/resources/3rdparty/modernjson/src/json.hpp +++ b/resources/3rdparty/modernjson/src/json.hpp @@ -5650,7 +5650,8 @@ Format](http://rfc7159.net/rfc7159) { case value_t::array: { - return *lhs.m_value.array < *rhs.m_value.array; + // Workaround for gcc 7.2.0, which parses array< as a template. + return (*lhs.m_value.array) < *rhs.m_value.array; } case value_t::object: { diff --git a/src/storm/storage/jani/JSONExporter.h b/src/storm/storage/jani/JSONExporter.h index e26cf287f..17fa97ad6 100644 --- a/src/storm/storage/jani/JSONExporter.h +++ b/src/storm/storage/jani/JSONExporter.h @@ -9,7 +9,7 @@ // JSON parser #include "json.hpp" namespace modernjson { - using json = nlohmann::basic_json; + using json = nlohmann::json; } namespace storm { From fcd277c42a9c61fae03aa60fb4ce954d46242a2f Mon Sep 17 00:00:00 2001 From: TimQu Date: Wed, 20 Sep 2017 10:12:31 +0200 Subject: [PATCH 93/95] added an option that enables building of state valuations. Also include the state valuations when the model is exported to .dot format --- src/storm-cli-utilities/model-handling.h | 1 + src/storm/models/sparse/Model.cpp | 10 +++++++--- src/storm/settings/modules/IOSettings.cpp | 8 +++++++- src/storm/settings/modules/IOSettings.h | 7 +++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/storm-cli-utilities/model-handling.h b/src/storm-cli-utilities/model-handling.h index 588d0d330..22b91af71 100644 --- a/src/storm-cli-utilities/model-handling.h +++ b/src/storm-cli-utilities/model-handling.h @@ -179,6 +179,7 @@ namespace storm { auto counterexampleGeneratorSettings = storm::settings::getModule(); storm::builder::BuilderOptions options(createFormulasToRespect(input.properties)); options.setBuildChoiceLabels(ioSettings.isBuildChoiceLabelsSet()); + options.setBuildStateValuations(ioSettings.isBuildStateValuationsSet()); options.setBuildChoiceOrigins(counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet()); options.setBuildAllLabels(ioSettings.isBuildFullModelSet()); options.setBuildAllRewardModels(ioSettings.isBuildFullModelSet()); diff --git a/src/storm/models/sparse/Model.cpp b/src/storm/models/sparse/Model.cpp index 062a7fca6..288b46a1a 100644 --- a/src/storm/models/sparse/Model.cpp +++ b/src/storm/models/sparse/Model.cpp @@ -317,12 +317,16 @@ namespace storm { for (uint_fast64_t state = 0, highestStateIndex = this->getNumberOfStates() - 1; state <= highestStateIndex; ++state) { if (subsystem == nullptr || subsystem->get(state)) { outStream << "\t" << state; - if (includeLabeling || firstValue != nullptr || secondValue != nullptr || stateColoring != nullptr) { + if (includeLabeling || firstValue != nullptr || secondValue != nullptr || stateColoring != nullptr || hasStateValuations()) { outStream << " [ "; // If we need to print some extra information, do so now. - if (includeLabeling || firstValue != nullptr || secondValue != nullptr) { - outStream << "label = \"" << state << ": "; + if (includeLabeling || firstValue != nullptr || secondValue != nullptr || hasStateValuations()) { + outStream << "label = \"" << state; + if (hasStateValuations()) { + outStream << " " << getStateValuations().getStateInfo(state); + } + outStream << ": "; // Now print the state labeling to the stream if requested. if (includeLabeling) { diff --git a/src/storm/settings/modules/IOSettings.cpp b/src/storm/settings/modules/IOSettings.cpp index 7d26b54ac..6227570ea 100644 --- a/src/storm/settings/modules/IOSettings.cpp +++ b/src/storm/settings/modules/IOSettings.cpp @@ -46,6 +46,7 @@ namespace storm { const std::string IOSettings::noBuildOptionName = "nobuild"; const std::string IOSettings::fullModelBuildOptionName = "buildfull"; const std::string IOSettings::buildChoiceLabelOptionName = "buildchoicelab"; + const std::string IOSettings::buildStateValuationsOptionName = "buildstateval"; const std::string IOSettings::janiPropertyOptionName = "janiproperty"; const std::string IOSettings::janiPropertyOptionShortName = "jprop"; const std::string IOSettings::propertyOptionName = "prop"; @@ -76,7 +77,8 @@ namespace storm { this->addOption(storm::settings::OptionBuilder(moduleName, prismToJaniOptionName, false, "If set, the input PRISM model is transformed to JANI.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, jitOptionName, false, "If set, the model is built using the JIT model builder.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, fullModelBuildOptionName, false, "If set, include all rewards and labels.").build()); - this->addOption(storm::settings::OptionBuilder(moduleName, buildChoiceLabelOptionName, false, "If set, include choice labels").build()); + this->addOption(storm::settings::OptionBuilder(moduleName, buildChoiceLabelOptionName, false, "If set, also build the choice labels").build()); + this->addOption(storm::settings::OptionBuilder(moduleName, buildStateValuationsOptionName, false, "If set, also build the state valuations").build()); this->addOption(storm::settings::OptionBuilder(moduleName, noBuildOptionName, false, "If set, do not build the model.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, propertyOptionName, false, "Specifies the properties to be checked on the model.").setShortName(propertyOptionShortName) .addArgument(storm::settings::ArgumentBuilder::createStringArgument("property or filename", "The formula or the file containing the formulas.").build()) @@ -266,6 +268,10 @@ namespace storm { return this->getOption(buildChoiceLabelOptionName).getHasOptionBeenSet(); } + bool IOSettings::isBuildStateValuationsSet() const { + return this->getOption(buildStateValuationsOptionName).getHasOptionBeenSet(); + } + bool IOSettings::isPropertySet() const { return this->getOption(propertyOptionName).getHasOptionBeenSet(); } diff --git a/src/storm/settings/modules/IOSettings.h b/src/storm/settings/modules/IOSettings.h index e68c6b515..7bf0422cc 100644 --- a/src/storm/settings/modules/IOSettings.h +++ b/src/storm/settings/modules/IOSettings.h @@ -325,6 +325,12 @@ namespace storm { */ bool isBuildChoiceLabelsSet() const; + /*! + * Retrieves whether the choice labels should be build + * @return + */ + bool isBuildStateValuationsSet() const; + bool check() const override; void finalize() override; @@ -362,6 +368,7 @@ namespace storm { static const std::string fullModelBuildOptionName; static const std::string noBuildOptionName; static const std::string buildChoiceLabelOptionName; + static const std::string buildStateValuationsOptionName; static const std::string janiPropertyOptionName; static const std::string janiPropertyOptionShortName; static const std::string propertyOptionName; From 904e49dab30369b63d16d8502dadae545e682a76 Mon Sep 17 00:00:00 2001 From: hbruintjes Date: Fri, 22 Sep 2017 11:48:37 +0200 Subject: [PATCH 94/95] Fix wrong type --- src/storm-dft/transformations/DftToGspnTransformator.cpp | 2 +- src/storm/storage/dd/DdManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storm-dft/transformations/DftToGspnTransformator.cpp b/src/storm-dft/transformations/DftToGspnTransformator.cpp index 8c3ef0448..975d01f4a 100644 --- a/src/storm-dft/transformations/DftToGspnTransformator.cpp +++ b/src/storm-dft/transformations/DftToGspnTransformator.cpp @@ -416,7 +416,7 @@ namespace storm { cucNodes.push_back(nodeCUC); builder.setPlaceLayoutInfo(nodeCUC, storm::gspn::LayoutInfo(xcenter-9.0+j*14.0, ycenter+5.0)); if (j > 0) { - uint64 tclaim = builder.addImmediateTransition(getFailPriority(dftSpare), 0.0, dftSpare->name() + "_claim_" + child->name()); + uint64_t tclaim = builder.addImmediateTransition(getFailPriority(dftSpare), 0.0, dftSpare->name() + "_claim_" + child->name()); builder.setTransitionLayoutInfo(tclaim, storm::gspn::LayoutInfo(xcenter-9.0+j*14.0, ycenter)); builder.addInhibitionArc(unavailableNodes.at(child->id()), tclaim); builder.addInputArc(considerNodes.back(), tclaim); diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index 6a00b4cbf..5cce07412 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -265,7 +265,7 @@ namespace storm { std::stringstream tmp1; std::vector result; - for (uint64 layer = 0; layer < numberOfLayers; ++layer) { + for (uint64_t layer = 0; layer < numberOfLayers; ++layer) { if (type == MetaVariableType::Int) { result.emplace_back(manager->declareIntegerVariable(name + tmp1.str())); } else if (type == MetaVariableType::Bool) { @@ -279,7 +279,7 @@ namespace storm { std::vector>> variables(numberOfLayers); for (std::size_t i = 0; i < numberOfDdVariables; ++i) { std::vector> ddVariables = internalDdManager.createDdVariables(numberOfLayers, level); - for (uint64 layer = 0; layer < numberOfLayers; ++layer) { + for (uint64_t layer = 0; layer < numberOfLayers; ++layer) { variables[layer].emplace_back(Bdd(*this, ddVariables[layer], {result[layer]})); } From 142d0347659f25c5c2dcd63abeb1bb3dcbbf7d19 Mon Sep 17 00:00:00 2001 From: TimQu Date: Fri, 22 Sep 2017 16:47:26 +0200 Subject: [PATCH 95/95] New methods for the SparseMatrix: SetRowGroupIndices and filterEntries --- src/storm/storage/SparseMatrix.cpp | 62 ++++++++++++++++++++++-------- src/storm/storage/SparseMatrix.h | 43 ++++++++++++++------- 2 files changed, 76 insertions(+), 29 deletions(-) diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 49d0cddad..c0ef84d19 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -584,6 +584,27 @@ namespace storm { return rowGroupIndices.get(); } + template + void SparseMatrix::setRowGroupIndices(std::vector const& newRowGroupIndices) { + trivialRowGrouping = false; + rowGroupIndices = newRowGroupIndices; + } + + template + bool SparseMatrix::hasTrivialRowGrouping() const { + return trivialRowGrouping; + } + + template + void SparseMatrix::makeRowGroupingTrivial() { + if (trivialRowGrouping) { + STORM_LOG_ASSERT(!rowGroupIndices || rowGroupIndices.get() == storm::utility::vector::buildVectorForRange(0, this->getRowGroupCount() + 1), "Row grouping is supposed to be trivial but actually it is not."); + } else { + trivialRowGrouping = true; + rowGroupIndices = boost::none; + } + } + template storm::storage::BitVector SparseMatrix::getRowFilter(storm::storage::BitVector const& groupConstraint) const { storm::storage::BitVector res(this->getRowCount(), false); @@ -984,6 +1005,30 @@ namespace storm { return res; } + template + SparseMatrix SparseMatrix::filterEntries(storm::storage::BitVector const& rowFilter) const { + // Count the number of entries in the resulting matrix. + index_type entryCount = 0; + for (auto const& row : rowFilter) { + entryCount += getRow(row).getNumberOfEntries(); + } + + // Build the resulting matrix. + SparseMatrixBuilder builder(getRowCount(), getColumnCount(), entryCount); + for (auto const& row : rowFilter) { + for (auto const& entry : getRow(row)) { + builder.addNextValue(row, entry.getColumn(), entry.getValue()); + } + } + SparseMatrix result = builder.build(); + + // Add a row grouping if necessary. + if (!hasTrivialRowGrouping()) { + result.setRowGroupIndices(getRowGroupIndices()); + } + return result; + } + template SparseMatrix SparseMatrix::selectRowsFromRowGroups(std::vector const& rowGroupToRowIndexMapping, bool insertDiagonalEntries) const { // First, we need to count how many non-zero entries the resulting matrix will have and reserve space for @@ -1547,22 +1592,7 @@ namespace storm { typename SparseMatrix::iterator SparseMatrix::end() { return this->columnsAndValues.begin() + this->rowIndications[rowCount]; } - - template - bool SparseMatrix::hasTrivialRowGrouping() const { - return trivialRowGrouping; - } - - template - void SparseMatrix::makeRowGroupingTrivial() { - if (trivialRowGrouping) { - STORM_LOG_ASSERT(!rowGroupIndices || rowGroupIndices.get() == storm::utility::vector::buildVectorForRange(0, this->getRowGroupCount() + 1), "Row grouping is supposed to be trivial but actually it is not."); - } else { - trivialRowGrouping = true; - rowGroupIndices = boost::none; - } - } - + template ValueType SparseMatrix::getRowSum(index_type row) const { ValueType sum = storm::utility::zero(); diff --git a/src/storm/storage/SparseMatrix.h b/src/storm/storage/SparseMatrix.h index 6f4dba96f..b6b9a9622 100644 --- a/src/storm/storage/SparseMatrix.h +++ b/src/storm/storage/SparseMatrix.h @@ -563,6 +563,27 @@ namespace storm { */ std::vector const& getRowGroupIndices() const; + /*! + * Sets the row grouping to the given one. + * @note It is assumed that the new row grouping is non-trivial. + * + * @param newRowGroupIndices The new row group indices. + */ + void setRowGroupIndices(std::vector const& newRowGroupIndices); + + /*! + * Retrieves whether the matrix has a trivial row grouping. + * + * @return True iff the matrix has a trivial row grouping. + */ + bool hasTrivialRowGrouping() const; + + /*! + * Makes the row grouping of this matrix trivial. + * Has no effect when the row grouping is already trivial. + */ + void makeRowGroupingTrivial(); + /*! * Returns the indices of the rows that belong to one of the selected row groups. * @@ -665,6 +686,15 @@ namespace storm { */ SparseMatrix restrictRows(storm::storage::BitVector const& rowsToKeep, bool allowEmptyRowGroups = false) const; + /*! + * Returns a copy of this matrix that only considers entries in the selected rows. + * Non-selected rows will not have any entries + * + * @note does not change the dimensions (row-, column-, and rowGroup count) of this matrix + * @param rowFilter the selected rows + */ + SparseMatrix filterEntries(storm::storage::BitVector const& rowFilter) const; + /** * Compares two rows. * @param i1 Index of first row @@ -1004,19 +1034,6 @@ namespace storm { */ iterator end(); - /*! - * Retrieves whether the matrix has a trivial row grouping. - * - * @return True iff the matrix has a trivial row grouping. - */ - bool hasTrivialRowGrouping() const; - - /*! - * Makes the row grouping of this matrix trivial. - * Has no effect when the row grouping is already trivial. - */ - void makeRowGroupingTrivial(); - /*! * Returns a copy of the matrix with the chosen internal data type */

    o7(uZli2vPix~XbO&tRM z>KYk)th-Qs%Sk7~ETZ-tR-Iq>0lafv@C9D@&4&1d{M#eU$=)2;rh-QYV(Kll@J znnro}^fxo$N0#(H^!ovOr1znPAL)H);YWHOTKJLPhk_r^rb{$Z;Ky^FOTsXIJWs#z z;{{^y<3;Ka@Z(b0)W(m?#Nfvj>Ja0{Rrm!gdt{CL^1@k6y7_)*nx;D>6rILG** z8qWC9u#fRWwVd%oH5~Y%+AXdJeq0Ni+W2vu81cSA9fEk@44WGKP`~gQKUB-1zfnN_ zaf;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bi_Z6Z&a?OX zd*1hGcG%hZobU5I=lMP7_r7y}uXi_`{ZSYHmeX%Lj{05BBK`l+A$#n{l(X-5@t-?= z+HurpIE(l%IeNw(`|--zUvu%_IQ^~TsK4VZ;=kwUHGAyG2aXPAUSE~(KYBhwJwMVv z3_`=}=aVq%|5+F|dOm{x7t!JWl|0KH_5CJ#z{2?m{y#*A|4;IF_Nd=4(E}FFNARB$ z9sYmFzuBWce>pmteLvRo5#p8Bp^FXimI$LBHNvpc^AY@)i4OldaxHt*W4Y)73+E&F z*NYDS2J#B_sK-jt0~XFl@Lw%D{2R%u*rOgz99_uVFTr3@ZK0nBTX6e4&e%Q=F}CNq z#`ZkW*q-MY+w%bKpiT1oi+ks(RKoL?HN5_d>G~_}?>YOmw7-UD#sLZd=`LCz{V0OJ}XWvTuq0D+UmfHO9_|3A22(^L!k?}lwqcE-^`zNP xSoe{qs^*9FwLY*vEB?^WIga{y&SJfOj$UN*)BQla0f~q8u8?Pvf0+1h`v)imu=D@` literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/lifts.7.bdd b/resources/3rdparty/sylvan/models/lifts.7.bdd new file mode 100644 index 0000000000000000000000000000000000000000..6eb3d0fd637bce8f6772ecd9a4d64b86b7762fca GIT binary patch literal 409772 zcmeFa2fSC+l|BAI1bY_{P4Wdh9mR?$9RZ~aB1I6v-h03HBt}g&Ju%TlV|ug4pr%LD z6JvUvOv+5kOfu>Dt+meGZ?Ag;4h|-NXa4Sw+`ZR6=iYnnUi<8G-uJ%mbGNRpuHN|9 zqt-p4VADDe;Q~m}yt(bAFWPCkfSH=Ea zUrVfWzmk~u==xG(-oNV$i8;ou&n4z_bv>5256#ac-h}3-5^qZL6NxvY`LV>C(|jcH z7Btr+-je1+iMOKpVB)Q5-k*3In)fE&mge1wx1;%?#M{&SK;j)}zAy2PG~biBFU@x) z?nm>k#QkaBnRq9fZ%;gc=Ix1hruo*yyU@Hf@$+cDDe?1Zz9I1oXud9ShvsV%52SfZ z;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;9UCmcW(7skhs+= z9%uDhm~qWt1WeQXMT@@>sCq4yW1!V5K9i_kOZd3zwWM>^Ybocd*8u0L*V4{auVtKD zy_O|z^;!4U1@TFzCEwVhl2)*){7i^p00)?-}r*9X%ye}m$$3#xt_<``)8+X$}uZ49QV zew(BZs(za~SN%3~uKI26T=m<+xz%qVajV}TxayZS7)SLh){cFq{gr$uPOVRS7`)b} zJse)^(;fk@^=XfUt3GN0tQ|+y$66%nQp;_aJbpv2v;@Rh(2y$S3OL{S=k01!oM_olBo1oJ*f0olBpioSQyJ6E}U1flHsXV{xQUo zd|c~4(Ye-tl5?&9WanD{DbBV2Q=QxTPa|&YKOL_1p8=+6{bv^cI8gOXI}2x2J-OjCa6rw=MWlQ8as*%ITXyQL7{*_2{68s*V!%DJuoYT}msHE@Y@EtsbITvvQa z8TGk7$3WHRhQiMVM;0Qu5qCu8H{lNNx@Iw~Ub8re@u3_VyA>Exh+tY=>34e#b=3b3 z;?nOKb!&3>i-B_ z>wgqX)A}DvAJqCEcdqq6;aux~(z(|Elyh7E)5LB4&%m{QEwP%`|6E}Yfm_z0=W$j4 zv~_Xx;1@CgT7ECWmETKXn(})&eNg$m;#~Q?>RkD~=3M#dEw!5E_XbhRFW#E1KBE~| zerfss_*Mo$TmRc|t$!?-ruDy*KB)DNbFTG|cdqrn>s;%9&$+Gted4zM58zt=hhUo4 z|55SBfU3{Og$JlUpA`NJaAYBZU*e9a{8QZFm4Ajitn$xsht}VniIE}on#FAd21hgw UUvV5%`PaAuoA0CF)NpwJ3(guf8~^|S literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/lifts.7.ldd b/resources/3rdparty/sylvan/models/lifts.7.ldd new file mode 100644 index 0000000000000000000000000000000000000000..0d357553ff0da73f9fef9ecbaea8766bac5a249e GIT binary patch literal 99124 zcmeFa4~SMvx8}D`AIBKS@tVFJ$8j9*d;0Y4+tcIiI6aQ^7$f2sV~lj9W5kFfrV%k> zM2s*#mR z`R=*7gnR|Px_z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EF@W5zSSD@R2j;3_>UmB0rxEK#z7ESr{0-A5*mlz}{4L?18~IF}ICzhz z{&!5z{0sz~`9IW({;s^vM*iyhOmt;@#1C3NqVEg;GUE8?-|IvCL({_#1)TXuYNfx& a@^;pa&*y`DPc0w)Jrn-5p-&C}c>N81Yb)6R literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/schedule_world.2.8-rgs.bdd b/resources/3rdparty/sylvan/models/schedule_world.2.8-rgs.bdd deleted file mode 100755 index 7c5354aef1d1c178c65ea8258707736f924766d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73472 zcmZwQ1-Mn^*7otaXc0lN5s_9Akrt5d#ttk(5in3hR7BjgfQW)1VPFS{3W_w?Ep`WX zD|X}izZdIq-1}VbxIWLCzcu;Z!b<`J;8= z68Zyc!X@QZ;ZpL-aB2C0a2a`dxU76%SpQzxvhWV_(r|hC?(mNCo#6`d?ctr|Tf-IQ zo5Pjl#bNzSvKw;QE_zILU7WA1=N5){mFI_dljntZm#+!$AK!syrpUuRJMSO`Z_mPcF)3)%BQaT%50==f;L>%45Q{|-@~Wr@YnF^I{Z02 zM2A0y&(Pu4@K7Co7apd=Z^FZM_*M8!9exo$ONXC@&(`55;d6BOQFw$7w}j8t;rrq9 zbog#~qz>N>pRdC=!=rTgdiVkzz8W5_!hMJ(G@i<`7XlaS@VW399X=DjM2Am> z$LjEj@TEF@EIdw!kAyGN;U-#u9#d^d2U#{=hwH)-Gjw=o_zE4~9-gVgTfM;N0_UH1a^8ZJ+`&vENe|i4@RQ_Lb`}qZW$p4Sp?)-ms z{)e#Li}aBHp>22mUp4F}&@{#QRd zyhMjX!}&{PNcbKdo)*quT7$y(>Tp0fe<_|4zF&tYh4Ytg|L_VO9v{wM>c@s3)Zx+L zl{!2!{E!Y053kZ;-|%W3_71PnVbAbd9d-||(_z=}dL4ESZ_r`K@J1cB4{y?8+wj9W zY#n|?hpobo>aa!lF&#D!Kd!^3;U{$1IQ*mz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z;lFP4_SR68r}c%h`g7J7%E{Ijc95+vl$Wh9>?m7bs32Qk*h#j&P*JwNP)WAFu(ND^ zVHer@LS@NJc}}>AJUiS}zB=4Y zzKWNE^_c21UMhBvODA|qS&hmNTF7mnIu5!C@H@R)NyWA$+Lv9`JDIXT@CASLqmRpAV$SuNs zxwoftT#u*YlE|`#N6o zb1&j0LH9ylGITHCB}MmqUUGC_%Ui|V^N48oTq4|k4H562Lkn=vrbW1~riHk#qQ$r` zqXoIg(W2a!(!$(hX>smLXo2oAv`F{Gv{3g&d~c!qLOw#{9?eH=+!tioP3}>AM8|zT zAK`J2RE=Yh>^PuA3<`r<|9h(!}ti3yA>aCa<}9oQ0^9d zM9O_A-$&qX&WPe}#t7qX%827`!U*JU%!uS}#0ceX$cW`8{~vOb|Et{O|7th+zs61e zuXU6E>)ho3dN=vM!A<^ebd&#^+~ohmZu0*TH~IgloBV&wP5wXbCiI6C{6yjL{{Yd@ BL5ctX diff --git a/resources/3rdparty/sylvan/models/schedule_world.2.bdd b/resources/3rdparty/sylvan/models/schedule_world.2.bdd new file mode 100644 index 0000000000000000000000000000000000000000..ad61659786b97c471a7905d3083ce9f00124b897 GIT binary patch literal 18556 zcmeHOi@#Py6&*xW418r~26=hEL_|a)BDoboj*Z})fS_q#KD&CEGxX79E4?D@oTDWwtN@3M2q=!^aTX}Ujp&Z!k0q)lQ7rz zuJCAxr-d(vcuM$75Z@La1MyAau@GMuz5?P&;VU7&B77CZmxQl|_=4~?5T6tNGQ?+u zuZ8&gl)j>_l%5v24&v{GzY6iU!q-FmjqukXJ|%nu#76k*5PzN0ICZ7;D}nJ4e<}P8 zh`$iN5#rBAV+X}Y>n+95Cl z;)B97A#N3(1@Qsln;_mVJR9PD!Z$;_S9lJ@^}@G6yhnI0#Jf|vRb46lP+%U!Rl>JH zyep;o>PqPc0=Gl_zVHHw-xK~O#5;u-Lj11qw;(PNUIg(w!rz9-D)%i$!-q2FRDLAm zJJ4`Z881P@O=R4QCTyNdp_20W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SBc+$smZOWqtYFwOAIYn9^|{Eiu(%nHN&nVwo5EiN!K6q`bv4 zFSLopGB31Ah-I|NejhD1u~^p1$wDlnZPrw=G}wqXF&jmjuuq?8DC(OH=61c4uH#dz z7`yJN&bK~|^Dbd|bZ}qh(c!AiJbJVqVIJK&-{w~~nOB`}bF1@hPUR=FtMiSD%O9jo z{s*xOdUf4i8t>4yYgAmK;7a^9>FG4J%xk4frSJG?kL) zb7>*4bLrtA;MPEhQhG{@E?0}UWvF4>jU#)@Y->hB+*94hc58eT#GTcBY=_3V-0i|V zw;mMc_O=O=BU^>3jxECE$OFPu-)3QQm>gMO z<#oY_$Px1)FXYI|iX$t0v|N>z3zH)uR+A$kR+A&Wnoo{|SWS*B);KvrBjvsxH0J0d ztZ{C5iyocrbVQ&1lar}Mst?JJHrsmu0Q+h*~pMPDLIgQ<^y^td(9hG?UsxUe7 ziZD6yvM@RFk}x^)qA)q~f-pJqyf8WPoG>}^tS~w9j4(NJ;?s9_pFxfsb5yu;RG1t& zB211P7G^v-B+NK+P?#K%59i+i_kH@#PHy;PfurO|;3zq=+9#&e194S9IHEONu(O8T z@TJXgp>SmQtm!CZD4#VUeDSRDO*4)RpEa(Id_Ni@XARF7-v_P2W(R^W^ zNArYv9?cczc{E3u=h19oo<||p@I10%bh&Q4El)LUyXojanQaZv>?eiE=O={84Hp9od;k-T1T+>!>5k>!=$a4?LodLV`gZ*(SQ`=&Zl2 z{CAH}gvq0ig{h;DgsGzsh57jpgsG$Vg{hv`&^c(F?M0}09@jVUuT1xUY`el-@ z<^TUhzLw*Wd@bL}5`fqbPQ59BKic_3eDF37nQY`}BLc*rxm7%Bx{;<6HZUi0<0$<4SK>nBG!8;xQ%ke5Ru literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/schedule_world.2.ldd b/resources/3rdparty/sylvan/models/schedule_world.2.ldd new file mode 100644 index 0000000000000000000000000000000000000000..9bd77e0e926072755e57dd8a5a120cfc35568105 GIT binary patch literal 4728 zcm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ns{hs&_W9I*v_%CD3zZ3rxJW;*fdLrI%(%(rOe-xW{ zs<(Sy)VHrsya9f!4JMu&e7q`p<9R+v7o_k%yv{mH8Du1EcQy&zp3`YJEon&1ywM_7+1-k5m0@wb!yP2+o4<8lB1 literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/models/schedule_world.3.8-rgs.bdd b/resources/3rdparty/sylvan/models/schedule_world.3.8-rgs.bdd deleted file mode 100755 index a4e3e444d0d0d25ba351a6868a75f94e5c72dc1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97456 zcmZtP3Ak0``^NFLkA%!KnL`pXha`yxN#=Q~G>?QN$$BEDI_tgPXT59heJW*HwxxdUpkMoy=(niSe0SeCSnz?p z!}(st@Mb>0N4T85TX=JOmvDJ|r|=f`4q^YfvhBiK+1rFG*cHNC+gpaWvCD_IwabOK zvrEF;+gaFuC)vhAwxhSHHspT`xpwmJ>%u$Re}#9k*M@hs{|N79uL|#OuL$p9FAwi& z{~E4nFAMKw{}kTaUK-xV{yw~~y(GM!y||F=?`^8D^b4X?OEX?>>1%|_O$Sk_LM?)l((tgit|VN z*c;(v?AOA_+OLF%y1X9mAK|?ZcPbZNpdCt;1K^EyGvY&BIsQ&BE8%O~Os=tHVw0E5ps~ z%fr{&mxi0$7l&Ke7lvEf=Z9O_=Z0I`jl*s1M&Y)0!*DyhLAbqLFWkXCBizxh6YgZ! z4qs>23SV#640pC`gm17<4Bu#158q@T7w%#o6TaC#D%{ns7QV$kJlxH$8ot%867FtS z4&P=U6z*YH3g2$;A1<}`4c}q!9qwsY4EM742=}&k3-_^i3HP;k3g2n(5bkGh7w&Iw z6CPk!2oJQk4Bus!58rK<3lFkO!uQx&c(A$Azip~}z1dKNHbcC-E_|PN{|XQF?%MGE z-u)vy%)6_?4|sP)c(`|$hadFrui+8iT^4@GyFZ0TdUt8~Veft)9_8I7;YYl?I6T_B zUxy#{?w8>)-u*oMn0G%7kM-`y;m5uEVR)Q(-w!|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WrWKe)x1^SwD00F!zP!xuiVQo~b?lh2>$*7gV3(H9vmM zPds&r=Pjd_?+c&D634?E=zD@EjpGdYGANI_XO{5f?GPU{`g-M_`@3^*6`ht|+C%x@+*pBH2N zRw53~!MuBla~+;j{HiM*;-fCC9O-tFc=X`$(jh*reMpCshO|Yjw57NqZH*I$j`jYc3v9H*_nN;{ zTsJd?iP6~+r*p%PO^(iZ(pYJXy3*oIv8m%)l<#!n(IoYyMb(0b_Ns5=BstQ6?w|Ez z51lDv#Ir8lKR)by{)%Nyx_^Aw`P`{FP8|2&Hg4D3od)xYeOKbUjWM?w6Mv5}=Jv$* zCcZy-L-n$czELm7@9c-edN6)oUA_F??i=}|`n~VrFgI04yL+;IKJs_fNOikq)c(=v zH&<%ckJIz1_gIZo_e2<5DsqQ?J5fwu5BzjL+`-QpV?Jlhe9s5pWM0gTiFN+yvTx+K zp00bL9}eq9W8z;j#@v(m<=|VZx4kdO_eapah`c?1j{d%^X6cx36n{tW4C|`IS61em z-Zs}aBl~Tb`Ui|LUrYQ(;x`k&mH6$%?<9UV@q3BiPkb=(2f?ly9MU^G>KpVx;C;O_ zEa|bmABJ4Ni$cEAH$HDonmL3&6mtHk4eTc`^!;}(E_4)ht z$*GZ%-aa+P{4DsP>TTa&_B&li)O{|a_J@p#|H2saaPT9^tNWCDuKUxt?nj)@`~Ny$ z{ub^V_sw74-i|mF`%7ca<11tGzfSy(G3K|%#NWI zTYaNmd&6D#S3exq-^RrMlQ=%&=9^EDwW;8})zjV&UngHbp^H-f;>6RzugqD`*F)&i zl)o(T^59o%z4rZQeXbw$yE5gkGR9nOOwl#L2QW)(^+Y|_BcZb?e_inFBwKsZY|Lkj FPXff)gt`C# literal 0 HcmV?d00001 diff --git a/resources/3rdparty/sylvan/src/CMakeLists.txt b/resources/3rdparty/sylvan/src/CMakeLists.txt old mode 100755 new mode 100644 index 0c516c483..7e36c6741 --- a/resources/3rdparty/sylvan/src/CMakeLists.txt +++ b/resources/3rdparty/sylvan/src/CMakeLists.txt @@ -37,6 +37,8 @@ set(HEADERS sylvan_table.h sylvan_tls.h storm_wrapper.h + sylvan_bdd_storm.h + sylvan_mtbdd_storm.h sylvan_storm_rational_function.h sylvan_storm_rational_number.h ) @@ -47,10 +49,8 @@ option(BUILD_STATIC_LIBS "Enable/disable creation of static libraries" ON) add_library(sylvan ${SOURCES}) find_package(GMP REQUIRED) -find_package(Hwloc REQUIRED) -include_directories(sylvan ${HWLOC_INCLUDE_DIR} ${GMP_INCLUDE_DIR}) -target_link_libraries(sylvan m pthread ${GMP_LIBRARIES} ${HWLOC_LIBRARIES}) +target_link_libraries(sylvan m pthread ${GMP_LIBRARIES}) if(UNIX AND NOT APPLE) target_link_libraries(sylvan rt) @@ -60,12 +60,10 @@ option(SYLVAN_STATS "Collect statistics" OFF) if(SYLVAN_STATS) set_target_properties(sylvan PROPERTIES COMPILE_DEFINITIONS "SYLVAN_STATS") endif() -set_target_properties(sylvan PROPERTIES COMPILE_DEFINITIONS "STORM_SILENCE_WARNINGS") install(TARGETS sylvan DESTINATION "${CMAKE_INSTALL_LIBDIR}") install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - # MODIFICATIONS NEEDED MADE FOR STORM # We need to make sure that the binary is put into a folder that is independent of the diff --git a/resources/3rdparty/sylvan/src/avl.h b/resources/3rdparty/sylvan/src/avl.h index 38277523d..858859d6b 100755 --- a/resources/3rdparty/sylvan/src/avl.h +++ b/resources/3rdparty/sylvan/src/avl.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/resources/3rdparty/sylvan/src/lace.c b/resources/3rdparty/sylvan/src/lace.c index abdbbca39..08e9f8843 100755 --- a/resources/3rdparty/sylvan/src/lace.c +++ b/resources/3rdparty/sylvan/src/lace.c @@ -15,6 +15,7 @@ * limitations under the License. */ +#define _GNU_SOURCE #include // for errno #include // for sched_getaffinity #include // for fprintf @@ -26,28 +27,46 @@ #include #include -// work around for missing MAP_ANONYMOUS definition in sys/mman.h on -// older OS X versions -#if !(defined MAP_ANONYMOUS) && defined MAP_ANON -#define MAP_ANONYMOUS MAP_ANON -#endif - #include -#include -// public Worker data -static Worker **workers = NULL; -static size_t default_stacksize = 0; // set by lace_init -static size_t default_dqsize = 100000; +#if LACE_USE_HWLOC +#include +/** + * HWLOC information + */ static hwloc_topology_t topo; static unsigned int n_nodes, n_cores, n_pus; +#endif + +/** + * (public) Worker data + */ +static Worker **workers = NULL; + +/** + * Default sizes for program stack and task deque + */ +static size_t default_stacksize = 0; // 0 means "set by lace_init" +static size_t default_dqsize = 100000; +/** + * Verbosity flag, set with lace_set_verbosity + */ static int verbosity = 0; -static int n_workers = 0; -static int enabled_workers = 0; +/** + * Number of workers and number of enabled/active workers + */ +static unsigned int n_workers = 0; +static unsigned int enabled_workers = 0; +/** + * Datastructure of the task deque etc for each worker. + * - first public cachelines (accessible via global "workers" variable) + * - then private cachelines + * - then the deque array + */ typedef struct { Worker worker_public; char pad1[PAD(sizeof(Worker), LINE_SIZE)]; @@ -56,26 +75,51 @@ typedef struct { Task deque[]; } worker_data; +/** + * (Secret) holds pointers to the memory block allocated for each worker + */ static worker_data **workers_memory = NULL; + +/** + * Number of bytes allocated for each worker's worker data. + */ static size_t workers_memory_size = 0; -// private Worker data (just for stats at end ) +/** + * (Secret) holds pointer to private Worker data, just for stats collection at end + */ static WorkerP **workers_p; -// set to 0 when quitting +/** + * Flag to signal all workers to quit. + */ static int lace_quits = 0; -// for storing private Worker data +/** + * Thread-specific mechanism to access current worker data + */ #ifdef __linux__ // use gcc thread-local storage (i.e. __thread variables) static __thread WorkerP *current_worker; #else static pthread_key_t worker_key; #endif + +/** + * worker_attr used for creating threads + * - initialized by lace_init + * - used by lace_spawn_worker + */ static pthread_attr_t worker_attr; +/** + * The condition/mutex pair for when the root thread sleeps until the end of the program + */ static pthread_cond_t wait_until_done = PTHREAD_COND_INITIALIZER; static pthread_mutex_t wait_until_done_mutex = PTHREAD_MUTEX_INITIALIZER; +/** + * Data structure that contains the stack and stack size for each worker. + */ struct lace_worker_init { void* stack; @@ -84,8 +128,14 @@ struct lace_worker_init static struct lace_worker_init *workers_init; +/** + * Global newframe variable used for the implementation of NEWFRAME and TOGETHER + */ lace_newframe_t lace_newframe; +/** + * Get the private Worker data of the current thread + */ WorkerP* lace_get_worker() { @@ -96,14 +146,20 @@ lace_get_worker() #endif } +/** + * Find the head of the task deque, using the given private Worker data + */ Task* lace_get_head(WorkerP *self) { Task *dq = self->dq; + + /* First check the first tasks linearly */ if (dq[0].thief == 0) return dq; if (dq[1].thief == 0) return dq+1; if (dq[2].thief == 0) return dq+2; + /* Then fast search for a low/high bound using powers of 2: 4, 8, 16... */ size_t low = 2; size_t high = self->end - self->dq; @@ -118,6 +174,7 @@ lace_get_head(WorkerP *self) } } + /* Finally zoom in using binary search */ while (low < high) { size_t mid = low + (high-low)/2; if (dq[mid].thief == 0) high = mid; @@ -127,22 +184,27 @@ lace_get_head(WorkerP *self) return dq+low; } -size_t +/** + * Get the number of workers + */ +unsigned int lace_workers() { return n_workers; } +/** + * Get the default stack size (or 0 for automatically determine) + */ size_t lace_default_stacksize() { return default_stacksize; } -#ifndef cas -#define cas(ptr, old, new) (__sync_bool_compare_and_swap((ptr),(old),(new))) -#endif - +/** + * If we are collecting PIE times, then we need some helper functions. + */ #if LACE_PIE_TIMES static uint64_t count_at_start, count_at_end; static long long unsigned us_elapsed_timer; @@ -169,7 +231,9 @@ us_elapsed(void) } #endif -/* Barrier */ +/** + * Lace barrier implementation, that synchronizes on all currently enabled workers. + */ typedef struct { volatile int __attribute__((aligned(LINE_SIZE))) count; volatile int __attribute__((aligned(LINE_SIZE))) leaving; @@ -178,11 +242,14 @@ typedef struct { barrier_t lace_bar; +/** + * Enter the Lace barrier and wait until all workers have entered the Lace barrier. + */ void lace_barrier() { int wait = lace_bar.wait; - if (enabled_workers == __sync_add_and_fetch(&lace_bar.count, 1)) { + if ((int)enabled_workers == __sync_add_and_fetch(&lace_bar.count, 1)) { lace_bar.count = 0; lace_bar.leaving = enabled_workers; lace_bar.wait = 1 - wait; // flip wait @@ -193,12 +260,18 @@ lace_barrier() __sync_add_and_fetch(&lace_bar.leaving, -1); } +/** + * Initialize the Lace barrier + */ static void lace_barrier_init() { memset(&lace_bar, 0, sizeof(barrier_t)); } +/** + * Destroy the Lace barrier (just wait until all are exited) + */ static void lace_barrier_destroy() { @@ -206,9 +279,13 @@ lace_barrier_destroy() while (lace_bar.leaving != 0) continue; } -static void +/** + * For debugging purposes, check if memory is allocated on the correct memory nodes. + */ +static void __attribute__((unused)) lace_check_memory(void) { +#if LACE_USE_HWLOC // get our current worker WorkerP *w = lace_get_worker(); void* mem = workers_memory[w->worker]; @@ -229,14 +306,10 @@ lace_check_memory(void) hwloc_membind_policy_t policy; int res = hwloc_get_area_membind_nodeset(topo, mem, sizeof(worker_data), memlocation, &policy, HWLOC_MEMBIND_STRICT); if (res == -1) { -#ifndef STORM_SILENCE_WARNINGS fprintf(stderr, "Lace warning: hwloc_get_area_membind_nodeset returned -1!\n"); -#endif } if (policy != HWLOC_MEMBIND_BIND) { -#ifndef STORM_SILENCE_WARNINGS fprintf(stderr, "Lace warning: Lace worker memory not bound with BIND policy!\n"); -#endif } #endif @@ -258,22 +331,27 @@ lace_check_memory(void) hwloc_bitmap_free(cpuset); hwloc_bitmap_free(cpunodes); hwloc_bitmap_free(memlocation); +#endif } -WorkerP * -lace_init_worker(int worker) +void +lace_pin_worker(void) { - // Get our core +#if LACE_USE_HWLOC + // Get our worker + unsigned int worker = lace_get_worker()->worker; + + // Get our core (hwloc object) hwloc_obj_t pu = hwloc_get_obj_by_type(topo, HWLOC_OBJ_CORE, worker % n_cores); // Get our copy of the bitmap hwloc_cpuset_t bmp = hwloc_bitmap_dup(pu->cpuset); - // Get number of PUs in set + // Get number of PUs in bitmap int n = -1, count=0; while ((n=hwloc_bitmap_next(bmp, n)) != -1) count++; - // Check if we actually have logical processors + // Check if we actually have any logical processors if (count == 0) { fprintf(stderr, "Lace error: trying to pin a worker on an empty core?\n"); exit(-1); @@ -293,18 +371,46 @@ lace_init_worker(int worker) // Pin our thread... if (hwloc_set_cpubind(topo, bmp, HWLOC_CPUBIND_THREAD) == -1) { -#ifndef STORM_SILENCE_WARNINGS fprintf(stderr, "Lace warning: hwloc_set_cpubind returned -1!\n"); -#endif } - // Free allocated memory + // Free our copy of the bitmap hwloc_bitmap_free(bmp); - // Get allocated memory - Worker *wt = &workers_memory[worker]->worker_public; - WorkerP *w = &workers_memory[worker]->worker_private; + // Pin the memory area (using the appropriate hwloc function) +#ifdef HWLOC_MEMBIND_BYNODESET + int res = hwloc_set_area_membind(topo, workers_memory[worker], workers_memory_size, pu->nodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT | HWLOC_MEMBIND_MIGRATE | HWLOC_MEMBIND_BYNODESET); +#else + int res = hwloc_set_area_membind_nodeset(topo, workers_memory[worker], workers_memory_size, pu->nodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT | HWLOC_MEMBIND_MIGRATE); +#endif + if (res != 0) { + fprintf(stderr, "Lace error: Unable to bind worker memory to node!\n"); + } + + // Check if everything is on the correct node + lace_check_memory(); +#endif +} + +void +lace_init_worker(unsigned int worker) +{ + // Allocate our memory + workers_memory[worker] = mmap(NULL, workers_memory_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if (workers_memory[worker] == MAP_FAILED) { + fprintf(stderr, "Lace error: Unable to allocate memory for the Lace worker!\n"); + exit(1); + } + + // Set pointers + Worker *wt = workers[worker] = &workers_memory[worker]->worker_public; + WorkerP *w = workers_p[worker] = &workers_memory[worker]->worker_private; w->dq = workers_memory[worker]->deque; +#ifdef __linux__ + current_worker = w; +#else + pthread_setspecific(worker_key, w); +#endif // Initialize public worker data wt->dq = w->dq; @@ -318,7 +424,11 @@ lace_init_worker(int worker) w->split = w->dq; w->allstolen = 0; w->worker = worker; +#if LACE_USE_HWLOC w->pu = worker % n_cores; +#else + w->pu = -1; +#endif w->enabled = 1; if (workers_init[worker].stack != 0) { w->stack_trigger = ((size_t)workers_init[worker].stack) + workers_init[worker].stacksize/20; @@ -328,20 +438,10 @@ lace_init_worker(int worker) w->rng = (((uint64_t)rand())<<32 | rand()); #if LACE_COUNT_EVENTS - // Reset counters + // Initialize counters { int k; for (k=0; kctr[k] = 0; } #endif - // Set pointers -#ifdef __linux__ - current_worker = w; -#else - pthread_setspecific(worker_key, w); -#endif - - // Check if everything is on the correct node - lace_check_memory(); - // Synchronize with others lace_barrier(); @@ -350,9 +450,14 @@ lace_init_worker(int worker) w->level = 0; #endif - return w; + if (worker == 0) { + lace_time_event(w, 1); + } } +/** + * Some OSX systems do not implement pthread_barrier_t, so we provide an implementation here. + */ #if defined(__APPLE__) && !defined(pthread_barrier_t) typedef int pthread_barrierattr_t; @@ -442,13 +547,13 @@ lace_resume() } /** - * With set_workers, all workers 0..(N-1) are enabled and N..max are disabled. - * You can never disable the current worker or reduce the number of workers below 1. + * Disable worker . + * If the given worker is the current worker, this function does nothing. */ void -lace_disable_worker(int worker) +lace_disable_worker(unsigned int worker) { - int self = lace_get_worker()->worker; + unsigned int self = lace_get_worker()->worker; if (worker == self) return; if (workers_p[worker]->enabled == 1) { workers_p[worker]->enabled = 0; @@ -456,10 +561,14 @@ lace_disable_worker(int worker) } } +/** + * Enable worker . + * If the given worker is the current worker, this function does nothing. + */ void -lace_enable_worker(int worker) +lace_enable_worker(unsigned int worker) { - int self = lace_get_worker()->worker; + unsigned int self = lace_get_worker()->worker; if (worker == self) return; if (workers_p[worker]->enabled == 0) { workers_p[worker]->enabled = 1; @@ -467,26 +576,38 @@ lace_enable_worker(int worker) } } +/** + * Enables all workers 0..(N-1) and disables workers N..max. + * This function _should_ be called by worker 0. + * Ignores the current worker if >= N. + * The number of workers is never reduces below 1. + */ void -lace_set_workers(int workercount) +lace_set_workers(unsigned int workercount) { if (workercount < 1) workercount = 1; if (workercount > n_workers) workercount = n_workers; enabled_workers = workercount; - int self = lace_get_worker()->worker; + unsigned int self = lace_get_worker()->worker; if (self >= workercount) workercount--; - int i; - for (i=0; ienabled = (i < workercount || i == self) ? 1 : 0; } } -int +/** + * Get the number of currently enabled workers. + */ +unsigned int lace_enabled_workers() { return enabled_workers; } +/** + * Simple random number generated (like rand) using the given seed. + * (Used for thread-specific (scalable) random number generation. + */ static inline uint32_t rng(uint32_t *seed, int max) { @@ -500,6 +621,9 @@ rng(uint32_t *seed, int max) return next % max; } +/** + * (Try to) steal and execute a task from a random worker. + */ VOID_TASK_0(lace_steal_random) { Worker *victim = workers[(__lace_worker->worker + 1 + rng(&__lace_worker->seed, n_workers-1)) % n_workers]; @@ -515,26 +639,19 @@ VOID_TASK_0(lace_steal_random) } } -VOID_TASK_1(lace_steal_random_loop, int*, quit) -{ - while(!(*(volatile int*)quit)) { - lace_steal_random(); - - if (must_suspend) { - lace_barrier(); - do { - pthread_barrier_wait(&suspend_barrier); - } while (__lace_worker->enabled == 0); - } - } -} - +/** + * Variable to hold the main/root task. + */ static lace_startup_cb main_cb; +/** + * Wrapper around the main/root task. + */ static void* lace_main_wrapper(void *arg) { - lace_init_main(); + lace_init_worker(0); + lace_pin_worker(); LACE_ME; WRAP(main_cb, arg); lace_exit(); @@ -547,7 +664,10 @@ lace_main_wrapper(void *arg) return NULL; } -#define lace_steal_loop(quit) CALL(lace_steal_loop, quit) +/** + * Main Lace worker implementation. + * Steal from random victims until "quit" is set. + */ VOID_TASK_1(lace_steal_loop, int*, quit) { // Determine who I am @@ -599,12 +719,12 @@ VOID_TASK_1(lace_steal_loop, int*, quit) /** * Initialize worker 0. + * Calls lace_init_worker and then signals the event. */ void lace_init_main() { - WorkerP * __attribute__((unused)) __lace_worker = lace_init_worker(0); - lace_time_event(__lace_worker, 1); + lace_init_worker(0); } /** @@ -614,16 +734,13 @@ lace_init_main() * For worker 0, use lace_init_main */ void -lace_run_worker(int worker) +lace_run_worker(void) { - // Initialize local datastructure - WorkerP *__lace_worker = lace_init_worker(worker); - Task *__lace_dq_head = __lace_worker->dq; - - // Steal for a while - lace_steal_loop(&lace_quits); + // Run the steal loop + LACE_ME; + CALL(lace_steal_loop, &lace_quits); - // Time the quit event + // Time worker exit event lace_time_event(__lace_worker, 9); // Synchronize with lace_exit @@ -633,7 +750,10 @@ lace_run_worker(int worker) static void* lace_default_worker_thread(void* arg) { - lace_run_worker((int)(size_t)arg); + int worker = (int)(size_t)arg; + lace_init_worker(worker); + lace_pin_worker(); + lace_run_worker(); return NULL; } @@ -646,6 +766,7 @@ lace_spawn_worker(int worker, size_t stacksize, void* (*fun)(void*), void* arg) size_t pagesize = sysconf(_SC_PAGESIZE); stacksize = (stacksize + pagesize - 1) & ~(pagesize - 1); // ceil(stacksize, pagesize) +#if LACE_USE_HWLOC // Get our logical processor hwloc_obj_t pu = hwloc_get_obj_by_type(topo, HWLOC_OBJ_PU, worker % n_pus); @@ -655,6 +776,9 @@ lace_spawn_worker(int worker, size_t stacksize, void* (*fun)(void*), void* arg) fprintf(stderr, "Lace error: Unable to allocate memory for the pthread stack!\n"); exit(1); } +#else + void *stack_location = mmap(NULL, stacksize+ pagesize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); +#endif if (0 != mprotect(stack_location, pagesize, PROT_NONE)) { fprintf(stderr, "Lace error: Unable to protect the allocated program stack with a guard page!\n"); @@ -679,22 +803,23 @@ lace_spawn_worker(int worker, size_t stacksize, void* (*fun)(void*), void* arg) return res; } -static int -get_cpu_count() -{ - int count = hwloc_get_nbobjs_by_type(topo, HWLOC_OBJ_PU); - return count < 1 ? 1 : count; -} - +/** + * Set the verbosity of Lace. + */ void lace_set_verbosity(int level) { verbosity = level; } +/** + * Initialize Lace for work-stealing with workers, where + * each worker gets a task deque with elements. + */ void -lace_init(int _n_workers, size_t dqsize) +lace_init(unsigned int _n_workers, size_t dqsize) { +#if LACE_USE_HWLOC // Initialize topology and information about cpus hwloc_topology_init(&topo); hwloc_topology_load(topo); @@ -702,15 +827,23 @@ lace_init(int _n_workers, size_t dqsize) n_nodes = hwloc_get_nbobjs_by_type(topo, HWLOC_OBJ_NODE); n_cores = hwloc_get_nbobjs_by_type(topo, HWLOC_OBJ_CORE); n_pus = hwloc_get_nbobjs_by_type(topo, HWLOC_OBJ_PU); +#elif defined(sched_getaffinity) + cpu_set_t cs; + CPU_ZERO(&cs); + sched_getaffinity(0, sizeof(cs), &cs); + unsigned int n_pus = CPU_COUNT(&cs); +#else + unsigned int n_pus = sysconf(_SC_NPROCESSORS_ONLN); +#endif // Initialize globals - n_workers = _n_workers; - if (n_workers == 0) n_workers = get_cpu_count(); + n_workers = _n_workers == 0 ? n_pus : _n_workers; enabled_workers = n_workers; if (dqsize != 0) default_dqsize = dqsize; + else dqsize = default_dqsize; lace_quits = 0; - // Create barrier for all workers + // Initialize Lace barrier lace_barrier_init(); // Create suspend barrier @@ -724,37 +857,9 @@ lace_init(int _n_workers, size_t dqsize) exit(1); } - // Allocate memory for each worker + // Compute memory size for each worker workers_memory_size = sizeof(worker_data) + sizeof(Task) * dqsize; - for (int i=0; iworker_public; - workers_p[i] = &workers_memory[i]->worker_private; - } - - // Pin allocated memory of each worker - for (int i=0; inodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT | HWLOC_MEMBIND_MIGRATE | HWLOC_MEMBIND_BYNODESET); -#else - int res = hwloc_set_area_membind_nodeset(topo, workers_memory[i], workers_memory_size, core->nodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT | HWLOC_MEMBIND_MIGRATE); -#endif - if (res != 0) { -#ifndef STORM_SILENCE_WARNINGS - fprintf(stderr, "Lace error: Unable to bind worker memory to node!\n"); -#endif - } - } - // Create pthread key #ifndef __linux__ pthread_key_create(&worker_key, NULL); @@ -773,7 +878,11 @@ lace_init(int _n_workers, size_t dqsize) } if (verbosity) { +#if LACE_USE_HWLOC fprintf(stderr, "Initializing Lace, %u nodes, %u cores, %u logical processors, %d workers.\n", n_nodes, n_cores, n_pus, n_workers); +#else + fprintf(stderr, "Initializing Lace, %u available cores, %d workers.\n", n_pus, n_workers); +#endif } // Prepare lace_init structure @@ -788,11 +897,18 @@ lace_init(int _n_workers, size_t dqsize) #endif } +/** + * Start the worker threads. + * If cb is set, then the current thread is suspended and Worker 0 is a new thread that starts with + * the given cb(arg) as the root task. + * If cb is not set, then the current thread is Worker 0 and this function returns. + */ void lace_startup(size_t stacksize, lace_startup_cb cb, void *arg) { if (stacksize == 0) stacksize = default_stacksize; + /* Report startup if verbose */ if (verbosity) { if (cb != 0) { fprintf(stderr, "Lace startup, creating %d worker threads with program stack %zu bytes.\n", n_workers, stacksize); @@ -803,22 +919,21 @@ lace_startup(size_t stacksize, lace_startup_cb cb, void *arg) } } - /* Spawn workers */ - int i; - for (i=1; id.args.arg_1 = t; t2->d.args.arg_2 = &done; - while (!cas(&lace_newframe.t, 0, &_t2)) lace_yield(__lace_worker, __lace_dq_head); + while (!__sync_bool_compare_and_swap(&lace_newframe.t, 0, &_t2)) lace_yield(__lace_worker, __lace_dq_head); lace_sync_and_exec(__lace_worker, __lace_dq_head, &_t2); } @@ -1113,10 +1238,13 @@ lace_do_newframe(WorkerP *__lace_worker, Task *__lace_dq_head, Task *t) compiler_barrier(); - while (!cas(&lace_newframe.t, 0, &_s)) lace_yield(__lace_worker, __lace_dq_head); + while (!__sync_bool_compare_and_swap(&lace_newframe.t, 0, &_s)) lace_yield(__lace_worker, __lace_dq_head); lace_sync_and_exec(__lace_worker, __lace_dq_head, &_t2); } +/** + * Called by _SPAWN functions when the Task stack is full. + */ void lace_abort_stack_overflow(void) { diff --git a/resources/3rdparty/sylvan/src/lace.h b/resources/3rdparty/sylvan/src/lace.h index 4f49f63dc..0b4b7a06f 100755 --- a/resources/3rdparty/sylvan/src/lace.h +++ b/resources/3rdparty/sylvan/src/lace.h @@ -23,40 +23,281 @@ #ifndef __LACE_H__ #define __LACE_H__ +#ifdef __has_include +# if __has_include("lace_config.h") +# include +# else +# define LACE_PIE_TIMES 0 +# define LACE_COUNT_TASKS 0 +# define LACE_COUNT_STEALS 0 +# define LACE_COUNT_SPLITS 0 +# define LACE_USE_HWLOC 0 +# endif +#endif + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/* Some flags */ +/** + * Using Lace. + * + * Optionally set the verbosity level with lace_set_verbosity. + * Then call lace_init to initialize the system. + * - lace_init(n_workers, deque_size); + * set both parameters to 0 for reasonable defaults, using all available cores. + * + * You can create Worker threads yourself or let Lace create threads with lace_startup. + * + * When creating threads yourself, call the following functions: + * - lace_init_worker to allocate and initialize the worker data structures + * this method returns when all workers have called lace_init_worker + * - lace_pin_worker (optional) to pin the thread and memory to a core + * The main worker can now start its root task. All other workers: + * - lace_run_worker to perform work-stealing until the main worker calls lace_exit + * + * When letting Lace create threads with lace_startup + * - Call lace_startup with a callback to create N threads. + * Returns after the callback has returned and all created threads are destroyed + * - Call lace_startup without a callback to create N-1 threads. + * Returns control to the caller. When lace_exit is called, all created threads are terminated. + */ -#ifndef LACE_DEBUG_PROGRAMSTACK /* Write to stderr when 95% program stack reached */ -#define LACE_DEBUG_PROGRAMSTACK 0 -#endif +/** + * Type definitions used in the functions below. + * - WorkerP contains the (private) Worker data + * - Task contains a single Task + */ +typedef struct _WorkerP WorkerP; +typedef struct _Task Task; -#ifndef LACE_LEAP_RANDOM /* Use random leaping when leapfrogging fails */ -#define LACE_LEAP_RANDOM 0 -#endif +/** + * The macro LACE_TYPEDEF_CB(typedefname, taskname, parametertypes) defines + * a Task for use as a callback function. + */ +#define LACE_TYPEDEF_CB(t, f, ...) typedef t (*f)(WorkerP *, Task *, ##__VA_ARGS__); -#ifndef LACE_PIE_TIMES /* Record time spent stealing and leapfrogging */ -#define LACE_PIE_TIMES 0 -#endif +/** + * The lace_startup_cb type for a void Task with one void* parameter. + */ +LACE_TYPEDEF_CB(void, lace_startup_cb, void*); -#ifndef LACE_COUNT_TASKS /* Count number of tasks executed */ -#define LACE_COUNT_TASKS 0 -#endif +/** + * Set verbosity level (0 = no startup messages, 1 = startup messages) + * Default level: 0 + */ +void lace_set_verbosity(int level); + +/** + * Initialize Lace for workers with a deque size of per worker. + * If is set to 0, automatically detects available cores. + * If is est to 0, uses a reasonable default value. + */ +void lace_init(unsigned int n_workers, size_t dqsize); + +/** + * Let Lace create worker threads. + * If is set to 0, uses a reaonable default value. + * If cb, arg are set to 0, then the current thread is initialized as the main Worker (Worker 0). + * + * If cb,arg are set, then the current thread is suspended. A new thread is made for Worker 0 and + * the task cb with paremeter arg is called; when cb returns, Lace is exited automatically. + */ +void lace_startup(size_t stacksize, lace_startup_cb, void* arg); + +/** + * Initialize worker , allocating memory. + * If is 0, then the current thread is the main worker. + */ +void lace_init_worker(unsigned int worker); + +/** + * Use hwloc to pin the current thread to a CPU and its allocated memory in the closest domain. + * Call this *after* lace_init_worker and *before* lace_run_worker. + */ +void lace_pin_worker(void); + +/** + * Perform work-stealing until lace_exit is called. + */ +void lace_run_worker(void); + +/** + * Steal a random task. + */ +#define lace_steal_random() CALL(lace_steal_random) +void lace_steal_random_CALL(WorkerP*, Task*); + +/** + * Enter the Lace barrier. (all active workers must enter it before we can continue) + */ +void lace_barrier(); + +/** + * Suspend all workers except the current worker. + * May only be used when all other workers are idle. + */ +void lace_suspend(); + +/** + * Resume all workers. + */ +void lace_resume(); + +/** + * When all other workers are suspended, some workers can be disabled using the following functions. + * With set_workers, all workers 0..(N-1) are enabled and N..max are disabled. + * You can never disable the current worker or reduce the number of workers below 1. + * You cannot add workers. + */ +void lace_set_workers(unsigned int workercount); + +/** + * Disable a suspended worker. + */ +void lace_disable_worker(unsigned int worker); + +/** + * Enable a suspended worker. + */ +void lace_enable_worker(unsigned int worker); + +/** + * Retrieve the number of enabled/active workers. + */ +unsigned int lace_enabled_workers(); + +/** + * Retrieve the number of Lace workers + */ +unsigned int lace_workers(); + +/** + * Retrieve the default program stack size + */ +size_t lace_default_stacksize(); + +/** + * Retrieve the current worker data. + */ +WorkerP *lace_get_worker(); + +/** + * Retrieve the current head of the deque + */ +Task *lace_get_head(WorkerP *); + +/** + * Exit Lace. + * This function is automatically called when lace_startup is called with a callback. + * This function must be called to exit Lace when lace_startup is called without a callback. + */ +void lace_exit(); + +/** + * Create a pointer to a Tasks main function. + */ +#define TASK(f) ( f##_CALL ) + +/** + * Call a Tasks implementation (adds Lace variables to call) + */ +#define WRAP(f, ...) ( f((WorkerP *)__lace_worker, (Task *)__lace_dq_head, ##__VA_ARGS__) ) + +/** + * Sync a task. + */ +#define SYNC(f) ( __lace_dq_head--, WRAP(f##_SYNC) ) + +/** + * Sync a task, but if the task is not stolen, then do not execute it. + */ +#define DROP() ( __lace_dq_head--, WRAP(lace_drop) ) + +/** + * Spawn a task. + */ +#define SPAWN(f, ...) ( WRAP(f##_SPAWN, ##__VA_ARGS__), __lace_dq_head++ ) + +/** + * Directly execute a task. + */ +#define CALL(f, ...) ( WRAP(f##_CALL, ##__VA_ARGS__) ) + +/** + * Signal all workers to interrupt their current tasks and instead perform (a personal copy of) the given task. + */ +#define TOGETHER(f, ...) ( WRAP(f##_TOGETHER, ##__VA_ARGS__) ) + +/** + * Signal all workers to interrupt their current tasks and help the current thread with the given task. + */ +#define NEWFRAME(f, ...) ( WRAP(f##_NEWFRAME, ##__VA_ARGS__) ) + +/** + * (Try to) steal a task from a random worker. + */ +#define STEAL_RANDOM() ( CALL(lace_steal_random) ) + +/** + * Get the current worker id. + */ +#define LACE_WORKER_ID ( __lace_worker->worker ) + +/** + * Get the core where the current worker is pinned. + */ +#define LACE_WORKER_PU ( __lace_worker->pu ) + +/** + * Initialize local variables __lace_worker and __lace_dq_head which are required for most Lace functionality. + */ +#define LACE_ME WorkerP * __attribute__((unused)) __lace_worker = lace_get_worker(); Task * __attribute__((unused)) __lace_dq_head = lace_get_head(__lace_worker); -#ifndef LACE_COUNT_STEALS /* Count number of steals performed */ -#define LACE_COUNT_STEALS 0 +/** + * Check if current tasks must be interrupted, and if so, interrupt. + */ +void lace_yield(WorkerP *__lace_worker, Task *__lace_dq_head); +#define YIELD_NEWFRAME() { if (unlikely((*(Task* volatile *)&lace_newframe.t) != NULL)) lace_yield(__lace_worker, __lace_dq_head); } + +/** + * True if the given task is stolen, False otherwise. + */ +#define TASK_IS_STOLEN(t) ((size_t)t->thief > 1) + +/** + * True if the given task is completed, False otherwise. + */ +#define TASK_IS_COMPLETED(t) ((size_t)t->thief == 2) + +/** + * Retrieves a pointer to the result of the given task. + */ +#define TASK_RESULT(t) (&t->d[0]) + +/** + * Compute a random number, thread-local (so scalable) + */ +#define LACE_TRNG (__lace_worker->rng = 2862933555777941757ULL * __lace_worker->rng + 3037000493ULL) + +/* Some flags that influence Lace behavior */ + +#ifndef LACE_DEBUG_PROGRAMSTACK /* Write to stderr when 95% program stack reached */ +#define LACE_DEBUG_PROGRAMSTACK 0 #endif -#ifndef LACE_COUNT_SPLITS /* Count number of times the split point is moved */ -#define LACE_COUNT_SPLITS 0 +#ifndef LACE_LEAP_RANDOM /* Use random leaping when leapfrogging fails */ +#define LACE_LEAP_RANDOM 1 #endif #ifndef LACE_COUNT_EVENTS #define LACE_COUNT_EVENTS (LACE_PIE_TIMES || LACE_COUNT_TASKS || LACE_COUNT_STEALS || LACE_COUNT_SPLITS) #endif +/** + * Now follows the implementation of Lace + */ + /* Typical cacheline size of system architectures */ #ifndef LINE_SIZE #define LINE_SIZE 64 @@ -167,10 +408,6 @@ typedef enum { CTR_MAX } CTR_index; -struct _WorkerP; -struct _Worker; -struct _Task; - #define THIEF_EMPTY ((struct _Worker*)0x0) #define THIEF_TASK ((struct _Worker*)0x1) #define THIEF_COMPLETED ((struct _Worker*)0x2) @@ -215,7 +452,7 @@ typedef struct _WorkerP { size_t stack_trigger; // for stack overflow detection uint64_t rng; // my random seed (for lace_trng) uint32_t seed; // my random seed (for lace_steal_random) - int16_t worker; // what is my worker id? + uint16_t worker; // what is my worker id? uint8_t allstolen; // my allstolen volatile int8_t enabled; // if this worker is enabled @@ -228,145 +465,10 @@ typedef struct _WorkerP { int16_t pu; // my pu (for HWLOC) } WorkerP; -#define LACE_TYPEDEF_CB(t, f, ...) typedef t (*f)(WorkerP *, Task *, ##__VA_ARGS__); -LACE_TYPEDEF_CB(void, lace_startup_cb, void*); - -/** - * Using Lace. - * - * Optionally set the verbosity level with lace_set_verbosity. - * Call lace_init to allocate all data structures. - * - * You can create threads yourself or let Lace create threads with lace_startup. - * - * When creating threads yourself: - * - call lace_init_main for worker 0 - * this method returns when all other workers have started - * - call lace_run_worker for all other workers - * workers perform work-stealing until worker 0 calls lace_exit - * - * When letting Lace create threads with lace_startup - * - calling with startup callback creates N threads and returns - * after the callback has returned, and all created threads are destroyed - * - calling without a startup callback creates N-1 threads and returns - * control to the caller. When lace_exit is called, all created threads are terminated. - */ - -/** - * Set verbosity level (0 = no startup messages, 1 = startup messages) - * Default level: 0 - */ -void lace_set_verbosity(int level); - -/** - * Initialize master structures for Lace with workers - * and default deque size of . - * Does not create new threads. - * Tries to detect number of cpus, if n_workers equals 0. - */ -void lace_init(int n_workers, size_t dqsize); - -/** - * After lace_init, start all worker threads. - * If cb,arg are set, suspend this thread, call cb(arg) in a new thread - * and exit Lace upon return - * Otherwise, the current thread is initialized as worker 0. - */ -void lace_startup(size_t stacksize, lace_startup_cb, void* arg); - -/** - * Initialize worker 0. This method returns when all other workers are initialized - * (using lace_run_worker). - * - * When done, run lace_exit so all worker threads return from lace_run_worker. - */ -void lace_init_main(); - -/** - * Initialize the current thread as the Lace thread of worker , and perform - * work-stealing until lace_exit is called. - * - * For worker 0, call lace_init_main instead. - */ -void lace_run_worker(int worker); - -/** - * Steal a random task. - */ -#define lace_steal_random() CALL(lace_steal_random) -void lace_steal_random_CALL(WorkerP*, Task*); - -/** - * Barrier (all workers must enter it before progressing) - */ -void lace_barrier(); - -/** - * Suspend and resume all other workers. - * May only be used when all other workers are idle. - */ -void lace_suspend(); -void lace_resume(); - -/** - * When all tasks are suspended, workers can be temporarily disabled. - * With set_workers, all workers 0..(N-1) are enabled and N..max are disabled. - * You can never disable the current worker or reduce the number of workers below 1. - * You cannot add workers. - */ -void lace_disable_worker(int worker); -void lace_enable_worker(int worker); -void lace_set_workers(int workercount); -int lace_enabled_workers(); - -/** - * Retrieve number of Lace workers - */ -size_t lace_workers(); - -/** - * Retrieve default program stack size - */ -size_t lace_default_stacksize(); - -/** - * Retrieve current worker. - */ -WorkerP *lace_get_worker(); - -/** - * Retrieve the current head of the deque - */ -Task *lace_get_head(WorkerP *); - -/** - * Exit Lace. Automatically called when started with cb,arg. - */ -void lace_exit(); - #define LACE_STOLEN ((Worker*)0) #define LACE_BUSY ((Worker*)1) #define LACE_NOWORK ((Worker*)2) -#define TASK(f) ( f##_CALL ) -#define WRAP(f, ...) ( f((WorkerP *)__lace_worker, (Task *)__lace_dq_head, ##__VA_ARGS__) ) -#define SYNC(f) ( __lace_dq_head--, WRAP(f##_SYNC) ) -#define DROP() ( __lace_dq_head--, WRAP(lace_drop) ) -#define SPAWN(f, ...) ( WRAP(f##_SPAWN, ##__VA_ARGS__), __lace_dq_head++ ) -#define CALL(f, ...) ( WRAP(f##_CALL, ##__VA_ARGS__) ) -#define TOGETHER(f, ...) ( WRAP(f##_TOGETHER, ##__VA_ARGS__) ) -#define NEWFRAME(f, ...) ( WRAP(f##_NEWFRAME, ##__VA_ARGS__) ) -#define STEAL_RANDOM() ( CALL(lace_steal_random) ) -#define LACE_WORKER_ID ( __lace_worker->worker ) -#define LACE_WORKER_PU ( __lace_worker->pu ) - -/* Use LACE_ME to initialize Lace variables, in case you want to call multiple Lace tasks */ -#define LACE_ME WorkerP * __attribute__((unused)) __lace_worker = lace_get_worker(); Task * __attribute__((unused)) __lace_dq_head = lace_get_head(__lace_worker); - -#define TASK_IS_STOLEN(t) ((size_t)t->thief > 1) -#define TASK_IS_COMPLETED(t) ((size_t)t->thief == 2) -#define TASK_RESULT(t) (&t->d[0]) - #if LACE_DEBUG_PROGRAMSTACK static inline void CHECKSTACK(WorkerP *w) { @@ -402,14 +504,6 @@ extern lace_newframe_t lace_newframe; void lace_do_together(WorkerP *__lace_worker, Task *__lace_dq_head, Task *task); void lace_do_newframe(WorkerP *__lace_worker, Task *__lace_dq_head, Task *task); -void lace_yield(WorkerP *__lace_worker, Task *__lace_dq_head); -#define YIELD_NEWFRAME() { if (unlikely((*(Task* volatile *)&lace_newframe.t) != NULL)) lace_yield(__lace_worker, __lace_dq_head); } - -/** - * Compute a random number, thread-local - */ -#define LACE_TRNG (__lace_worker->rng = 2862933555777941757ULL * __lace_worker->rng + 3037000493ULL) - /** * Make all tasks of the current worker shared. */ diff --git a/resources/3rdparty/sylvan/src/sylvan.h b/resources/3rdparty/sylvan/src/sylvan.h index aac4026ae..41ae81948 100755 --- a/resources/3rdparty/sylvan/src/sylvan.h +++ b/resources/3rdparty/sylvan/src/sylvan.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,49 @@ /** * Sylvan: parallel MTBDD/ListDD package. - * - * This is a multi-core implementation of MTBDDs with complement edges. - * - * This package requires parallel the work-stealing framework Lace. - * Lace must be initialized before initializing Sylvan + * Include this file. */ #include +#include +#include #include #include // for FILE #include // for realloc +#include +#include + +#if SYLVAN_STATS +#ifdef __MACH__ +#include +#else +#include +#endif +#endif + +/** + * Sylvan header files outside the namespace + */ #include #include +#ifdef __cplusplus +//namespace sylvan { +#endif + +/** + * Sylvan header files inside the namespace + */ + #include #include +#include #include #include #include + +#ifdef __cplusplus +//} +#endif diff --git a/resources/3rdparty/sylvan/src/sylvan_bdd.c b/resources/3rdparty/sylvan/src/sylvan_bdd.c index bb1aa0aed..e874d7276 100755 --- a/resources/3rdparty/sylvan/src/sylvan_bdd.c +++ b/resources/3rdparty/sylvan/src/sylvan_bdd.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,20 +15,12 @@ * limitations under the License. */ -#include +#include -#include #include #include -#include -#include -#include -#include #include -#include -#include - #include static int granularity = 1; // default @@ -45,12 +37,6 @@ sylvan_get_granularity() return granularity; } -BDD -sylvan_ithvar(BDDVAR level) -{ - return sylvan_makenode(level, sylvan_false, sylvan_true); -} - /** * Implementation of unary, binary and if-then-else operators. */ @@ -1834,10 +1820,10 @@ TASK_IMPL_3(BDD, sylvan_union_cube, BDD, bdd, BDDSET, vars, uint8_t *, cube) } else if (v > n_level) { BDD high = node_high(bdd, n); BDD low = node_low(bdd, n); - SPAWN(sylvan_union_cube, high, vars, cube); + bdd_refs_spawn(SPAWN(sylvan_union_cube, high, vars, cube)); BDD new_low = sylvan_union_cube(low, vars, cube); bdd_refs_push(new_low); - BDD new_high = SYNC(sylvan_union_cube); + BDD new_high = bdd_refs_sync(SYNC(sylvan_union_cube)); bdd_refs_pop(1); if (new_low != low || new_high != high) { result = sylvan_makenode(n_level, new_low, new_high); diff --git a/resources/3rdparty/sylvan/src/sylvan_bdd.h b/resources/3rdparty/sylvan/src/sylvan_bdd.h index 4d32fc910..f7ae74091 100755 --- a/resources/3rdparty/sylvan/src/sylvan_bdd.h +++ b/resources/3rdparty/sylvan/src/sylvan_bdd.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,19 @@ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - + /* For strictly non-MT BDDs */ -#define sylvan_isconst(bdd) (bdd == sylvan_true || bdd == sylvan_false) -#define sylvan_isnode(bdd) (bdd != sylvan_true && bdd != sylvan_false) +static inline int +sylvan_isconst(MTBDD bdd) +{ + return bdd == mtbdd_true || bdd == mtbdd_false ? 1 : 0; +} + +static inline int +sylvan_isnode(MTBDD bdd) +{ + return bdd != mtbdd_true && bdd != mtbdd_false ? 1 : 0; +} /** * Granularity (BDD only) determines usage of operation cache. @@ -43,15 +52,16 @@ extern "C" { void sylvan_set_granularity(int granularity); int sylvan_get_granularity(void); -/* Create a BDD representing just or the negation of */ -BDD sylvan_ithvar(BDDVAR var); -#define sylvan_nithvar(var) sylvan_not(sylvan_ithvar(var)) - /* * Unary, binary and if-then-else operations. * These operations are all implemented by NOT, AND and XOR. */ -#define sylvan_not(a) (((BDD)a)^sylvan_complement) +static inline BDD +sylvan_not(BDD a) +{ + return a ^ sylvan_complement; +} + TASK_DECL_4(BDD, sylvan_ite, BDD, BDD, BDD, BDDVAR); #define sylvan_ite(a,b,c) (CALL(sylvan_ite,a,b,c,0)) TASK_DECL_3(BDD, sylvan_and, BDD, BDD, BDDVAR); @@ -68,6 +78,13 @@ TASK_DECL_3(BDD, sylvan_xor, BDD, BDD, BDDVAR); #define sylvan_diff(a,b) sylvan_and(a,sylvan_not(b)) #define sylvan_less(a,b) sylvan_and(sylvan_not(a),b) +/* Create a BDD representing just or the negation of */ +static inline BDD +sylvan_nithvar(uint32_t var) +{ + return sylvan_not(sylvan_ithvar(var)); +} + /** * Existential and universal quantification. */ @@ -265,7 +282,11 @@ sylvan_fprint(FILE *f, BDD bdd) sylvan_serialize_totext(f); } -#define sylvan_print(dd) sylvan_fprint(stdout, dd) +static void __attribute__((unused)) +sylvan_print(BDD bdd) +{ + return sylvan_fprint(stdout, bdd); +} #include "sylvan_bdd_storm.h" diff --git a/resources/3rdparty/sylvan/src/sylvan_bdd_storm.h b/resources/3rdparty/sylvan/src/sylvan_bdd_storm.h index f28259a84..737ca0c65 100644 --- a/resources/3rdparty/sylvan/src/sylvan_bdd_storm.h +++ b/resources/3rdparty/sylvan/src/sylvan_bdd_storm.h @@ -1,6 +1,14 @@ +#ifdef __cplusplus +extern "C" { +#endif + #define bdd_isnegated(dd) ((dd & sylvan_complement) ? 1 : 0) #define bdd_regular(dd) (dd & ~sylvan_complement) #define bdd_isterminal(dd) (dd == sylvan_false || dd == sylvan_true) TASK_DECL_3(BDD, sylvan_existsRepresentative, BDD, BDD, BDDVAR); #define sylvan_existsRepresentative(a, vars) (CALL(sylvan_existsRepresentative, a, vars, 0)) + +#ifdef __cplusplus +} +#endif diff --git a/resources/3rdparty/sylvan/src/sylvan_cache.c b/resources/3rdparty/sylvan/src/sylvan_cache.c index 295679f59..8a39d751a 100755 --- a/resources/3rdparty/sylvan/src/sylvan_cache.c +++ b/resources/3rdparty/sylvan/src/sylvan_cache.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,19 +15,20 @@ * limitations under the License. */ +#include + #include // for errno -#include // for fprintf -#include // for uint32_t etc -#include // for exit #include // for strerror #include // for mmap -#include - #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif +#ifndef CACHE_MASK +#define CACHE_MASK 1 +#endif + #ifndef compiler_barrier #define compiler_barrier() { asm volatile("" ::: "memory"); } #endif diff --git a/resources/3rdparty/sylvan/src/sylvan_cache.h b/resources/3rdparty/sylvan/src/sylvan_cache.h index e40185454..88afb1af1 100755 --- a/resources/3rdparty/sylvan/src/sylvan_cache.h +++ b/resources/3rdparty/sylvan/src/sylvan_cache.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,21 +15,15 @@ * limitations under the License. */ -#include +/* Do not include this file directly. Instead, include sylvan_int.h */ -#include // for uint32_t etc - -#ifndef CACHE_H -#define CACHE_H +#ifndef SYLVAN_CACHE_H +#define SYLVAN_CACHE_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#ifndef CACHE_MASK -#define CACHE_MASK 1 -#endif - /** * Operation cache * diff --git a/resources/3rdparty/sylvan/src/sylvan_common.c b/resources/3rdparty/sylvan/src/sylvan_common.c index 38d3a8876..71f748f8c 100755 --- a/resources/3rdparty/sylvan/src/sylvan_common.c +++ b/resources/3rdparty/sylvan/src/sylvan_common.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/resources/3rdparty/sylvan/src/sylvan_common.h b/resources/3rdparty/sylvan/src/sylvan_common.h index bc6841134..4e55d9153 100755 --- a/resources/3rdparty/sylvan/src/sylvan_common.h +++ b/resources/3rdparty/sylvan/src/sylvan_common.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +/* Do not include this file directly. Instead, include sylvan.h */ + #ifndef SYLVAN_COMMON_H #define SYLVAN_COMMON_H diff --git a/resources/3rdparty/sylvan/src/sylvan_gmp.c b/resources/3rdparty/sylvan/src/sylvan_gmp.c index bda6c2eee..394033f6f 100755 --- a/resources/3rdparty/sylvan/src/sylvan_gmp.c +++ b/resources/3rdparty/sylvan/src/sylvan_gmp.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,11 @@ */ #include +#include -#include #include #include -#include -#include - static uint32_t gmp_type; /** diff --git a/resources/3rdparty/sylvan/src/sylvan_gmp.h b/resources/3rdparty/sylvan/src/sylvan_gmp.h index 7675999c0..8bf3b909a 100755 --- a/resources/3rdparty/sylvan/src/sylvan_gmp.h +++ b/resources/3rdparty/sylvan/src/sylvan_gmp.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,13 +19,14 @@ * This is an implementation of GMP mpq custom leaves of MTBDDs */ -#ifndef SYLVAN_GMP_H -#define SYLVAN_GMP_H - #include #include +#ifndef SYLVAN_GMP_H +#define SYLVAN_GMP_H + #ifdef __cplusplus +namespace sylvan { extern "C" { #endif /* __cplusplus */ @@ -185,6 +186,7 @@ TASK_DECL_2(MTBDD, gmp_strict_threshold_d, MTBDD, double); #ifdef __cplusplus } +} #endif /* __cplusplus */ #endif diff --git a/resources/3rdparty/sylvan/src/sylvan_int.h b/resources/3rdparty/sylvan/src/sylvan_int.h index e8a96df81..0a54d34ce 100755 --- a/resources/3rdparty/sylvan/src/sylvan_int.h +++ b/resources/3rdparty/sylvan/src/sylvan_int.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,22 @@ */ /** - * Internals of Sylvan + * Sylvan: parallel MTBDD/ListDD package. + * Include this file for access to internals. */ #include +#ifdef __cplusplus +namespace sylvan { +#endif + +/** + * Sylvan internal header files inside the namespace + */ + #include #include -#include #ifndef SYLVAN_INT_H #define SYLVAN_INT_H @@ -42,68 +50,68 @@ extern llmsset_t nodes; */ // BDD operations -#define CACHE_BDD_ITE (0LL<<40) -#define CACHE_BDD_AND (1LL<<40) -#define CACHE_BDD_XOR (2LL<<40) -#define CACHE_BDD_EXISTS (3LL<<40) -#define CACHE_BDD_PROJECT (4LL<<40) -#define CACHE_BDD_AND_EXISTS (5LL<<40) -#define CACHE_BDD_AND_PROJECT (6LL<<40) -#define CACHE_BDD_RELNEXT (7LL<<40) -#define CACHE_BDD_RELPREV (8LL<<40) -#define CACHE_BDD_SATCOUNT (9LL<<40) -#define CACHE_BDD_COMPOSE (10LL<<40) -#define CACHE_BDD_RESTRICT (11LL<<40) -#define CACHE_BDD_CONSTRAIN (12LL<<40) -#define CACHE_BDD_CLOSURE (13LL<<40) -#define CACHE_BDD_ISBDD (14LL<<40) -#define CACHE_BDD_SUPPORT (15LL<<40) -#define CACHE_BDD_PATHCOUNT (16LL<<40) +static const uint64_t CACHE_BDD_ITE = (0LL<<40); +static const uint64_t CACHE_BDD_AND = (1LL<<40); +static const uint64_t CACHE_BDD_XOR = (2LL<<40); +static const uint64_t CACHE_BDD_EXISTS = (3LL<<40); +static const uint64_t CACHE_BDD_PROJECT = (4LL<<40); +static const uint64_t CACHE_BDD_AND_EXISTS = (5LL<<40); +static const uint64_t CACHE_BDD_AND_PROJECT = (6LL<<40); +static const uint64_t CACHE_BDD_RELNEXT = (7LL<<40); +static const uint64_t CACHE_BDD_RELPREV = (8LL<<40); +static const uint64_t CACHE_BDD_SATCOUNT = (9LL<<40); +static const uint64_t CACHE_BDD_COMPOSE = (10LL<<40); +static const uint64_t CACHE_BDD_RESTRICT = (11LL<<40); +static const uint64_t CACHE_BDD_CONSTRAIN = (12LL<<40); +static const uint64_t CACHE_BDD_CLOSURE = (13LL<<40); +static const uint64_t CACHE_BDD_ISBDD = (14LL<<40); +static const uint64_t CACHE_BDD_SUPPORT = (15LL<<40); +static const uint64_t CACHE_BDD_PATHCOUNT = (16LL<<40); // MDD operations -#define CACHE_MDD_RELPROD (20LL<<40) -#define CACHE_MDD_MINUS (21LL<<40) -#define CACHE_MDD_UNION (22LL<<40) -#define CACHE_MDD_INTERSECT (23LL<<40) -#define CACHE_MDD_PROJECT (24LL<<40) -#define CACHE_MDD_JOIN (25LL<<40) -#define CACHE_MDD_MATCH (26LL<<40) -#define CACHE_MDD_RELPREV (27LL<<40) -#define CACHE_MDD_SATCOUNT (28LL<<40) -#define CACHE_MDD_SATCOUNTL1 (29LL<<40) -#define CACHE_MDD_SATCOUNTL2 (30LL<<40) +static const uint64_t CACHE_MDD_RELPROD = (20LL<<40); +static const uint64_t CACHE_MDD_MINUS = (21LL<<40); +static const uint64_t CACHE_MDD_UNION = (22LL<<40); +static const uint64_t CACHE_MDD_INTERSECT = (23LL<<40); +static const uint64_t CACHE_MDD_PROJECT = (24LL<<40); +static const uint64_t CACHE_MDD_JOIN = (25LL<<40); +static const uint64_t CACHE_MDD_MATCH = (26LL<<40); +static const uint64_t CACHE_MDD_RELPREV = (27LL<<40); +static const uint64_t CACHE_MDD_SATCOUNT = (28LL<<40); +static const uint64_t CACHE_MDD_SATCOUNTL1 = (29LL<<40); +static const uint64_t CACHE_MDD_SATCOUNTL2 = (30LL<<40); // MTBDD operations -#define CACHE_MTBDD_APPLY (40LL<<40) -#define CACHE_MTBDD_UAPPLY (41LL<<40) -#define CACHE_MTBDD_ABSTRACT (42LL<<40) -#define CACHE_MTBDD_ITE (43LL<<40) -#define CACHE_MTBDD_AND_ABSTRACT_PLUS (44LL<<40) -#define CACHE_MTBDD_AND_ABSTRACT_MAX (45LL<<40) -#define CACHE_MTBDD_SUPPORT (46LL<<40) -#define CACHE_MTBDD_COMPOSE (47LL<<40) -#define CACHE_MTBDD_EQUAL_NORM (48LL<<40) -#define CACHE_MTBDD_EQUAL_NORM_REL (49LL<<40) -#define CACHE_MTBDD_MINIMUM (50LL<<40) -#define CACHE_MTBDD_MAXIMUM (51LL<<40) -#define CACHE_MTBDD_LEQ (52LL<<40) -#define CACHE_MTBDD_LESS (53LL<<40) -#define CACHE_MTBDD_GEQ (54LL<<40) -#define CACHE_MTBDD_GREATER (55LL<<40) -#define CACHE_MTBDD_EVAL_COMPOSE (56LL<<40) -#define CACHE_MTBDD_NONZERO_COUNT (57LL<<40) -#define CACHE_MTBDD_AND_EXISTS_RN (58LL<<40) -#define CACHE_MTBDD_MINIMUM_RN (59LL<<40) -#define CACHE_MTBDD_MAXIMUM_RN (60LL<<40) -#define CACHE_MTBDD_EQUAL_NORM_RN (61LL<<40) -#define CACHE_MTBDD_EQUAL_NORM_REL_RN (62LL<<40) -#define CACHE_MTBDD_AND_EXISTS_RF (63LL<<40) -#define CACHE_MTBDD_MINIMUM_RF (64LL<<40) -#define CACHE_MTBDD_MAXIMUM_RF (65LL<<40) -#define CACHE_MTBDD_EQUAL_NORM_RF (66LL<<40) -#define CACHE_MTBDD_EQUAL_NORM_REL_RF (67LL<<40) - -#define CACHE_MTBDD_ABSTRACT_REPRESENTATIVE (68LL<<40) +static const uint64_t CACHE_MTBDD_APPLY = (40LL<<40); +static const uint64_t CACHE_MTBDD_UAPPLY = (41LL<<40); +static const uint64_t CACHE_MTBDD_ABSTRACT = (42LL<<40); +static const uint64_t CACHE_MTBDD_ITE = (43LL<<40); +static const uint64_t CACHE_MTBDD_AND_ABSTRACT_PLUS = (44LL<<40); +static const uint64_t CACHE_MTBDD_AND_ABSTRACT_MAX = (45LL<<40); +static const uint64_t CACHE_MTBDD_SUPPORT = (46LL<<40); +static const uint64_t CACHE_MTBDD_COMPOSE = (47LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM = (48LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM_REL = (49LL<<40); +static const uint64_t CACHE_MTBDD_MINIMUM = (50LL<<40); +static const uint64_t CACHE_MTBDD_MAXIMUM = (51LL<<40); +static const uint64_t CACHE_MTBDD_LEQ = (52LL<<40); +static const uint64_t CACHE_MTBDD_LESS = (53LL<<40); +static const uint64_t CACHE_MTBDD_GEQ = (54LL<<40); +static const uint64_t CACHE_MTBDD_GREATER = (55LL<<40); +static const uint64_t CACHE_MTBDD_EVAL_COMPOSE = (56LL<<40); +static const uint64_t CACHE_MTBDD_NONZERO_COUNT = (57LL<<40); +static const uint64_t CACHE_MTBDD_AND_EXISTS_RN = (58LL<<40); +static const uint64_t CACHE_MTBDD_MINIMUM_RN = (59LL<<40); +static const uint64_t CACHE_MTBDD_MAXIMUM_RN = (60LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM_RN = (61LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM_REL_RN = (62LL<<40); +static const uint64_t CACHE_MTBDD_AND_EXISTS_RF = (63LL<<40); +static const uint64_t CACHE_MTBDD_MINIMUM_RF = (64LL<<40); +static const uint64_t CACHE_MTBDD_MAXIMUM_RF = (65LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM_RF = (66LL<<40); +static const uint64_t CACHE_MTBDD_EQUAL_NORM_REL_RF = (67LL<<40); + +static const uint64_t CACHE_MTBDD_ABSTRACT_REPRESENTATIVE = (68LL<<40); #ifdef __cplusplus } @@ -112,4 +120,8 @@ extern llmsset_t nodes; #include #include +#ifdef __cplusplus +} /* namespace */ +#endif + #endif diff --git a/resources/3rdparty/sylvan/src/sylvan_ldd.c b/resources/3rdparty/sylvan/src/sylvan_ldd.c index 6449e2f7d..0835933de 100755 --- a/resources/3rdparty/sylvan/src/sylvan_ldd.c +++ b/resources/3rdparty/sylvan/src/sylvan_ldd.c @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,20 +15,12 @@ * limitations under the License. */ -#include +#include -#include #include #include -#include -#include -#include -#include #include -#include -#include - #include #include #include @@ -54,13 +46,15 @@ VOID_TASK_IMPL_1(lddmc_gc_mark_rec, MDD, mdd) * External references */ -refs_table_t mdd_refs; +refs_table_t lddmc_refs; +refs_table_t lddmc_protected; +static int lddmc_protected_created = 0; MDD lddmc_ref(MDD a) { if (a == lddmc_true || a == lddmc_false) return a; - refs_up(&mdd_refs, a); + refs_up(&lddmc_refs, a); return a; } @@ -68,13 +62,36 @@ void lddmc_deref(MDD a) { if (a == lddmc_true || a == lddmc_false) return; - refs_down(&mdd_refs, a); + refs_down(&lddmc_refs, a); } size_t lddmc_count_refs() { - return refs_count(&mdd_refs); + return refs_count(&lddmc_refs); +} + +void +lddmc_protect(MDD *a) +{ + if (!lddmc_protected_created) { + // In C++, sometimes lddmc_protect is called before Sylvan is initialized. Just create a table. + protect_create(&lddmc_protected, 4096); + lddmc_protected_created = 1; + } + protect_up(&lddmc_protected, (size_t)a); +} + +void +lddmc_unprotect(MDD *a) +{ + if (lddmc_protected.refs_table != NULL) protect_down(&lddmc_protected, (size_t)a); +} + +size_t +lddmc_count_protected(void) +{ + return protect_count(&lddmc_protected); } /* Called during garbage collection */ @@ -82,9 +99,24 @@ VOID_TASK_0(lddmc_gc_mark_external_refs) { // iterate through refs hash table, mark all found size_t count=0; - uint64_t *it = refs_iter(&mdd_refs, 0, mdd_refs.refs_size); + uint64_t *it = refs_iter(&lddmc_refs, 0, lddmc_refs.refs_size); while (it != NULL) { - SPAWN(lddmc_gc_mark_rec, refs_next(&mdd_refs, &it, mdd_refs.refs_size)); + SPAWN(lddmc_gc_mark_rec, refs_next(&lddmc_refs, &it, lddmc_refs.refs_size)); + count++; + } + while (count--) { + SYNC(lddmc_gc_mark_rec); + } +} + +VOID_TASK_0(lddmc_gc_mark_protected) +{ + // iterate through refs hash table, mark all found + size_t count=0; + uint64_t *it = protect_iter(&lddmc_protected, 0, lddmc_protected.refs_size); + while (it != NULL) { + MDD *to_mark = (MDD*)protect_next(&lddmc_protected, &it, lddmc_protected.refs_size); + SPAWN(lddmc_gc_mark_rec, *to_mark); count++; } while (count--) { @@ -93,33 +125,77 @@ VOID_TASK_0(lddmc_gc_mark_external_refs) } /* Infrastructure for internal markings */ +typedef struct lddmc_refs_task +{ + Task *t; + void *f; +} *lddmc_refs_task_t; + +typedef struct lddmc_refs_internal +{ + const MDD **pbegin, **pend, **pcur; + MDD *rbegin, *rend, *rcur; + lddmc_refs_task_t sbegin, send, scur; +} *lddmc_refs_internal_t; + DECLARE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); -VOID_TASK_0(lddmc_refs_mark_task) +VOID_TASK_2(lddmc_refs_mark_p_par, const MDD**, begin, size_t, count) { - LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); - size_t i, j=0; - for (i=0; ir_count; i++) { - if (j >= 40) { - while (j--) SYNC(lddmc_gc_mark_rec); - j=0; + if (count < 32) { + while (count) { + lddmc_gc_mark_rec(**(begin++)); + count--; } - SPAWN(lddmc_gc_mark_rec, lddmc_refs_key->results[i]); - j++; - } - for (i=0; is_count; i++) { - Task *t = lddmc_refs_key->spawns[i]; - if (!TASK_IS_STOLEN(t)) break; - if (TASK_IS_COMPLETED(t)) { - if (j >= 40) { - while (j--) SYNC(lddmc_gc_mark_rec); - j=0; + } else { + SPAWN(lddmc_refs_mark_p_par, begin, count / 2); + CALL(lddmc_refs_mark_p_par, begin + (count / 2), count - count / 2); + SYNC(lddmc_refs_mark_p_par); + } +} + +VOID_TASK_2(lddmc_refs_mark_r_par, MDD*, begin, size_t, count) +{ + if (count < 32) { + while (count) { + lddmc_gc_mark_rec(*begin++); + count--; + } + } else { + SPAWN(lddmc_refs_mark_r_par, begin, count / 2); + CALL(lddmc_refs_mark_r_par, begin + (count / 2), count - count / 2); + SYNC(lddmc_refs_mark_r_par); + } +} + +VOID_TASK_2(lddmc_refs_mark_s_par, lddmc_refs_task_t, begin, size_t, count) +{ + if (count < 32) { + while (count) { + Task *t = begin->t; + if (!TASK_IS_STOLEN(t)) return; + if (t->f == begin->f && TASK_IS_COMPLETED(t)) { + lddmc_gc_mark_rec(*(BDD*)TASK_RESULT(t)); } - SPAWN(lddmc_gc_mark_rec, *(BDD*)TASK_RESULT(t)); - j++; + begin += 1; + count -= 1; } + } else { + if (!TASK_IS_STOLEN(begin->t)) return; + SPAWN(lddmc_refs_mark_s_par, begin, count / 2); + CALL(lddmc_refs_mark_s_par, begin + (count / 2), count - count / 2); + SYNC(lddmc_refs_mark_s_par); } - while (j--) SYNC(lddmc_gc_mark_rec); +} + +VOID_TASK_0(lddmc_refs_mark_task) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + SPAWN(lddmc_refs_mark_p_par, lddmc_refs_key->pbegin, lddmc_refs_key->pcur-lddmc_refs_key->pbegin); + SPAWN(lddmc_refs_mark_r_par, lddmc_refs_key->rbegin, lddmc_refs_key->rcur-lddmc_refs_key->rbegin); + CALL(lddmc_refs_mark_s_par, lddmc_refs_key->sbegin, lddmc_refs_key->scur-lddmc_refs_key->sbegin); + SYNC(lddmc_refs_mark_r_par); + SYNC(lddmc_refs_mark_p_par); } VOID_TASK_0(lddmc_refs_mark) @@ -130,12 +206,12 @@ VOID_TASK_0(lddmc_refs_mark) VOID_TASK_0(lddmc_refs_init_task) { lddmc_refs_internal_t s = (lddmc_refs_internal_t)malloc(sizeof(struct lddmc_refs_internal)); - s->r_size = 128; - s->r_count = 0; - s->s_size = 128; - s->s_count = 0; - s->results = (BDD*)malloc(sizeof(BDD) * 128); - s->spawns = (Task**)malloc(sizeof(Task*) * 128); + s->pcur = s->pbegin = (const MDD**)malloc(sizeof(MDD*) * 1024); + s->pend = s->pbegin + 1024; + s->rcur = s->rbegin = (MDD*)malloc(sizeof(MDD) * 1024); + s->rend = s->rbegin + 1024; + s->scur = s->sbegin = (lddmc_refs_task_t)malloc(sizeof(struct lddmc_refs_task) * 1024); + s->send = s->sbegin + 1024; SET_THREAD_LOCAL(lddmc_refs_key, s); } @@ -146,6 +222,83 @@ VOID_TASK_0(lddmc_refs_init) sylvan_gc_add_mark(TASK(lddmc_refs_mark)); } +void +lddmc_refs_ptrs_up(lddmc_refs_internal_t lddmc_refs_key) +{ + size_t size = lddmc_refs_key->pend - lddmc_refs_key->pbegin; + lddmc_refs_key->pbegin = (const MDD**)realloc(lddmc_refs_key->pbegin, sizeof(MDD*) * size * 2); + lddmc_refs_key->pcur = lddmc_refs_key->pbegin + size; + lddmc_refs_key->pend = lddmc_refs_key->pbegin + (size * 2); +} + +MDD __attribute__((noinline)) +lddmc_refs_refs_up(lddmc_refs_internal_t lddmc_refs_key, MDD res) +{ + long size = lddmc_refs_key->rend - lddmc_refs_key->rbegin; + lddmc_refs_key->rbegin = (MDD*)realloc(lddmc_refs_key->rbegin, sizeof(MDD) * size * 2); + lddmc_refs_key->rcur = lddmc_refs_key->rbegin + size; + lddmc_refs_key->rend = lddmc_refs_key->rbegin + (size * 2); + return res; +} + +void __attribute__((noinline)) +lddmc_refs_tasks_up(lddmc_refs_internal_t lddmc_refs_key) +{ + long size = lddmc_refs_key->send - lddmc_refs_key->sbegin; + lddmc_refs_key->sbegin = (lddmc_refs_task_t)realloc(lddmc_refs_key->sbegin, sizeof(struct lddmc_refs_task) * size * 2); + lddmc_refs_key->scur = lddmc_refs_key->sbegin + size; + lddmc_refs_key->send = lddmc_refs_key->sbegin + (size * 2); +} + +void __attribute__((unused)) +lddmc_refs_pushptr(const MDD *ptr) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + *lddmc_refs_key->pcur++ = ptr; + if (lddmc_refs_key->pcur == lddmc_refs_key->pend) lddmc_refs_ptrs_up(lddmc_refs_key); +} + +void __attribute__((unused)) +lddmc_refs_popptr(size_t amount) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + lddmc_refs_key->pcur -= amount; +} + +MDD __attribute__((unused)) +lddmc_refs_push(MDD lddmc) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + *(lddmc_refs_key->rcur++) = lddmc; + if (lddmc_refs_key->rcur == lddmc_refs_key->rend) return lddmc_refs_refs_up(lddmc_refs_key, lddmc); + else return lddmc; +} + +void __attribute__((unused)) +lddmc_refs_pop(long amount) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + lddmc_refs_key->rcur -= amount; +} + +void __attribute__((unused)) +lddmc_refs_spawn(Task *t) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + lddmc_refs_key->scur->t = t; + lddmc_refs_key->scur->f = t->f; + lddmc_refs_key->scur += 1; + if (lddmc_refs_key->scur == lddmc_refs_key->send) lddmc_refs_tasks_up(lddmc_refs_key); +} + +MDD __attribute__((unused)) +lddmc_refs_sync(MDD result) +{ + LOCALIZE_THREAD_LOCAL(lddmc_refs_key, lddmc_refs_internal_t); + lddmc_refs_key->scur -= 1; + return result; +} + VOID_TASK_DECL_0(lddmc_gc_mark_serialize); /** @@ -155,7 +308,7 @@ VOID_TASK_DECL_0(lddmc_gc_mark_serialize); static void lddmc_quit() { - refs_free(&mdd_refs); + refs_free(&lddmc_refs); } void @@ -163,9 +316,14 @@ sylvan_init_ldd() { sylvan_register_quit(lddmc_quit); sylvan_gc_add_mark(TASK(lddmc_gc_mark_external_refs)); + sylvan_gc_add_mark(TASK(lddmc_gc_mark_protected)); sylvan_gc_add_mark(TASK(lddmc_gc_mark_serialize)); - refs_create(&mdd_refs, 1024); + refs_create(&lddmc_refs, 1024); + if (!lddmc_protected_created) { + protect_create(&lddmc_protected, 4096); + lddmc_protected_created = 1; + } LACE_ME; CALL(lddmc_refs_init); @@ -2000,7 +2158,7 @@ VOID_TASK_3(lddmc_match_sat, struct lddmc_match_sat_info *, info, lddmc_enum_cb, ri->mdd = mddnode_getright(na); di->mdd = mddnode_getdown(na); ri->match = b; - di->match = mddnode_getdown(nb); + di->match = p_val == 1 ? mddnode_getdown(nb) : b; ri->proj = proj; di->proj = mddnode_getdown(p_node); ri->count = info->count; diff --git a/resources/3rdparty/sylvan/src/sylvan_ldd.h b/resources/3rdparty/sylvan/src/sylvan_ldd.h index 394e773ce..8ee19caa0 100755 --- a/resources/3rdparty/sylvan/src/sylvan_ldd.h +++ b/resources/3rdparty/sylvan/src/sylvan_ldd.h @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 Formal Methods and Tools, University of Twente - * Copyright 2016 Tom van Dijk, Johannes Kepler University Linz + * Copyright 2016-2017 Tom van Dijk, Johannes Kepler University Linz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,10 @@ extern "C" { #endif /* __cplusplus */ - typedef uint64_t MDD; // Note: low 40 bits only -#define lddmc_false ((MDD)0) -#define lddmc_true ((MDD)1) +static const MDD lddmc_false = 0; +static const MDD lddmc_true = 1; /* Initialize LDD functionality */ void sylvan_init_ldd(void); @@ -53,19 +52,49 @@ MDD lddmc_make_copynode(MDD ifeq, MDD ifneq); int lddmc_iscopy(MDD mdd); MDD lddmc_followcopy(MDD mdd); -/* Add or remove external reference to MDD */ -MDD lddmc_ref(MDD a); -void lddmc_deref(MDD a); +/** + * Infrastructure for external references using a hash table. + * Two hash tables store external references: a pointers table and a values table. + * The pointers table stores pointers to MDD variables, manipulated with protect and unprotect. + * The values table stores MDD, manipulated with ref and deref. + * We strongly recommend using the pointers table whenever possible. + */ -/* For use in custom mark functions */ -VOID_TASK_DECL_1(lddmc_gc_mark_rec, MDD) -#define lddmc_gc_mark_rec(mdd) CALL(lddmc_gc_mark_rec, mdd) +/** + * Store the pointer in the pointers table. + */ +void lddmc_protect(MDD* ptr); + +/** + * Delete the pointer from the pointers table. + */ +void lddmc_unprotect(MDD* ptr); + +/** + * Compute the number of pointers in the pointers table. + */ +size_t lddmc_count_protected(void); + +/** + * Store the MDD