diff --git a/src/storm/models/ModelRepresentation.cpp b/src/storm/models/ModelRepresentation.cpp new file mode 100644 index 000000000..e6f39d2ee --- /dev/null +++ b/src/storm/models/ModelRepresentation.cpp @@ -0,0 +1,26 @@ +#include "storm/models/ModelRepresentation.h" + +#include "storm/exceptions/InvalidTypeException.h" +#include "storm/utility/macros.h" + +namespace storm { + namespace models { + + std::ostream& operator<<(std::ostream& os, ModelRepresentation const& representation) { + switch (representation) { + case ModelRepresentation::Sparse: + os << "sparse"; + break; + case ModelRepresentation::DdCudd: + os << "DD (Cudd)"; + break; + case ModelRepresentation::DdSylvan: + os << "DD (Sylvan)"; + break; + default: + STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Unknown model representation."); + } + return os; + } + } +} diff --git a/src/storm/models/ModelRepresentation.h b/src/storm/models/ModelRepresentation.h new file mode 100644 index 000000000..d26f14edb --- /dev/null +++ b/src/storm/models/ModelRepresentation.h @@ -0,0 +1,42 @@ +#pragma once + +#include + +#include "storm/storage/dd/DdType.h" + +namespace storm { + namespace models { + enum class ModelRepresentation { + Sparse, DdCudd, DdSylvan + }; + std::ostream& operator<<(std::ostream& os, ModelRepresentation const& representation); + + template + struct GetModelRepresentation; + template<> + struct GetModelRepresentation { + static const ModelRepresentation representation = ModelRepresentation::DdCudd; + }; + template<> + struct GetModelRepresentation { + static const ModelRepresentation representation = ModelRepresentation::DdSylvan; + }; + + template + struct GetDdType; + template<> + struct GetDdType { + static const storm::dd::DdType ddType = storm::dd::DdType::Sylvan; + }; + template<> + struct GetDdType { + static const storm::dd::DdType ddType = storm::dd::DdType::CUDD; + }; + template<> + struct GetDdType { + static const storm::dd::DdType ddType = storm::dd::DdType::Sylvan; + }; + + } +} +