Storm 2.0.0.3
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BackendTraits.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string_view>
5#include <type_traits>
6
7#include "storm-config.h"
10#include "storm/dd/DdType.h"
11
12namespace storm {
13namespace dd {
14
25template<typename... Types>
26struct TypeList {
27 template<typename T>
28 static constexpr bool contains = (std::is_same_v<T, Types> || ...);
29};
30
31template<DdType LibraryType>
33
35template<>
37 static constexpr std::string_view name = "cudd";
38
40#ifdef STORM_HAVE_CUDD
41 static constexpr bool available = true;
42#else
43 static constexpr bool available = false;
44#endif
45
47 static constexpr bool orderedInsertion = true;
49 static constexpr bool dynamicReordering = true;
51 static constexpr bool hasUndefined = false;
53 static constexpr bool needsExecuteWrapper = false;
54
56 template<typename ValueType>
57 static constexpr bool supportsValueType = ValueTypes::template contains<ValueType>;
58};
59
61template<>
63 static constexpr std::string_view name = "sylvan";
64
65#ifdef STORM_HAVE_SYLVAN
66 static constexpr bool available = true;
67#else
68 static constexpr bool available = false;
69#endif
70
71 static constexpr bool orderedInsertion = false;
72 static constexpr bool dynamicReordering = false;
73 static constexpr bool hasUndefined = true;
74 static constexpr bool needsExecuteWrapper = true;
75
77 template<typename ValueType>
78 static constexpr bool supportsValueType = ValueTypes::template contains<ValueType>;
79};
80
81} // namespace dd
82} // namespace storm
The contract of a DD backend.
static constexpr bool dynamicReordering
Dynamic variable reordering is available.
static constexpr bool orderedInsertion
DD variables can be inserted at a given level.
TypeList< double, uint_fast64_t > ValueTypes
static constexpr bool needsExecuteWrapper
All DD operations must be executed through InternalDdManager::execute (e.g. inside a thread-pool task...
static constexpr bool hasUndefined
InternalDdManager::getAddUndefined is available.
static constexpr std::string_view name
static constexpr bool available
The library was found/enabled at build time. If false, the backend's classes still exist but throw Mi...
TypeList< double, uint_fast64_t, storm::RationalNumber, storm::RationalFunction > ValueTypes
static constexpr std::string_view name
Static description of a DD backend: which optional capabilities it offers and for which value types i...