7#include <boost/functional/hash.hpp>
32 if (varDesc.
offset.value_or(0) == 0) {
35 }
else if (varDesc.
upper.has_value()) {
44 return varDesc.
offset.value() == std::numeric_limits<int64_t>::min();
53 if (varDesc.
offset.value_or(0) == 0) {
55 }
else if (varDesc.
offset.value() < 0) {
57 int64_t
const minValueStored =
58 varDesc.
type.
bitSize() == 64 ? std::numeric_limits<int64_t>::min() : -(
static_cast<int64_t
>(1) << (varDesc.
type.
bitSize() - 1));
59 return varDesc.
lower.has_value() || minValueStored >= std::numeric_limits<int64_t>::min() - varDesc.
offset.value();
62 int64_t
const maxValueStored =
63 varDesc.
type.
bitSize() == 64 ? std::numeric_limits<int64_t>::max() : (
static_cast<int64_t
>(1) << (varDesc.
type.
bitSize() - 1)) - 1;
64 return varDesc.
upper.has_value() || maxValueStored <= std::numeric_limits<int64_t>::max() - varDesc.
offset.value();
75 "ValuationsStorage for variable type '" << varDesc.
type.
toString() <<
"' are not supported.");
79template<
typename ManagerType>
81 std::vector<typename ValuationsStorage::VariableInformation> variables;
82 uint64_t currentOffset = 0;
83 for (
auto const& varVariant : description.
variables) {
84 if (std::holds_alternative<ValuationClassDescription::Variable>(varVariant)) {
85 auto const& varDesc = std::get<ValuationClassDescription::Variable>(varVariant);
87 if constexpr (std::is_const_v<ManagerType>) {
88 exprVar = expressionManager.getVariable(varDesc.name);
92 switch (varDesc.type.type) {
94 variableType = expressionManager.getBooleanType();
98 variableType = expressionManager.getIntegerType();
102 variableType = expressionManager.getRationalType();
105 variableType = expressionManager.getStringType();
109 "ValuationsStorage for variable type '" << varDesc.type.toString() <<
"' are not supported.");
111 exprVar = expressionManager.declareOrGetVariable(varDesc.name, variableType);
113 if (varDesc.isOptional.value_or(
false)) {
117 .expressionVariable = exprVar, .description = varDesc, .bitOffset = currentOffset, .fits64Bit =
fits64Bit(varDesc)});
118 currentOffset += variables.back().description.type.bitSize();
120 auto const& padding = std::get<ValuationClassDescription::Padding>(varVariant);
121 currentOffset += padding.padding;
125 STORM_LOG_ASSERT(currentOffset % 8 == 0,
"Invalid valuation description detected: size in bits must be a multiple of 8.");
127 .variables = std::move(variables), .expressionManager = expressionManager.shared_from_this(), .sizeInBytes = currentOffset / 8};
133 std::vector<uint64_t> stringMapping, std::vector<char> strings, std::optional<std::vector<uint32_t>> classes,
134 std::vector<std::shared_ptr<storm::expressions::ExpressionManager const>> expressionManagers)
135 : numEntities(numEntities), valuations(
std::move(valuations)), stringMapping(
std::move(stringMapping)), strings(
std::move(strings)) {
136 STORM_LOG_ASSERT(descriptions.size() == expressionManagers.size() || expressionManagers.size() <= 1,
137 "Mismatch between number of descriptions and expression managers.");
141 auto sharedManager = std::make_shared<storm::expressions::ExpressionManager>();
142 for (uint64_t
i = 0;
i < descriptions.size(); ++
i) {
143 if (expressionManagers.empty() || (expressionManagers.size() == 1 && expressionManagers.front() ==
nullptr)) {
146 }
else if (expressionManagers.size() == 1) {
149 }
else if (expressionManagers[
i] ==
nullptr) {
151 auto manager = std::make_shared<storm::expressions::ExpressionManager>();
159 bool const hasStringVariable = std::any_of(descriptions.begin(), descriptions.end(), [](
auto const& classDescr) { return classDescr.hasStringVariable(); });
160 if (hasStringVariable && this->stringMapping.empty()) {
161 this->stringMapping.push_back(0);
163 STORM_LOG_ASSERT(hasStringVariable || this->stringMapping.empty(),
"Non-empty string mapping given but there is no string variable.");
164 STORM_LOG_ASSERT(this->stringMapping.empty() || this->stringMapping.back() == this->strings.size(),
165 "String mapping should end with the total size of the string data.");
168 if (classes.has_value() && this->variableClasses.size() > 1) {
169 STORM_LOG_ASSERT(numEntities == classes->size(),
"Number of entities does not match class mapping size.");
170 this->entityClassMappings = {std::move(*classes), std::vector<uint64_t>({0ull})};
172 this->entityClassMappings->toValuationsMapping.reserve(this->entityClassMappings->toClassMapping.size() + 1);
173 for (uint64_t entity = 0; entity < this->entityClassMappings->toClassMapping.size(); ++entity) {
175 this->entityClassMappings->toClassMapping[entity] < this->variableClasses.size(),
176 "Class index " << this->entityClassMappings->toClassMapping[entity] <<
" out of bounds. Only " << descriptions.size() <<
"classes known.");
177 pos += this->variableClasses[this->entityClassMappings->toClassMapping[entity]].sizeInBytes;
178 this->entityClassMappings->toValuationsMapping.push_back(pos);
180 STORM_LOG_ASSERT(this->valuations.size() == pos,
"Valuation data size does not match class mapping.");
182 STORM_LOG_ASSERT(this->variableClasses.size() == 1,
"Valuation descriptions must be unique if no class mapping is given.");
183 STORM_LOG_ASSERT(!classes.has_value() || std::all_of(classes->begin(), classes->end(), [&](
auto classIndex) { return classIndex == 0; }),
184 "A single description is given but the class mapping is not unique.");
185 STORM_LOG_ASSERT(this->variableClasses.front().sizeInBytes == 0 || this->valuations.size() % this->variableClasses.front().sizeInBytes == 0,
186 "Valuation data size is not a multiple of the unique valuation size.");
187 STORM_LOG_ASSERT(numEntities * this->variableClasses.front().sizeInBytes == this->valuations.size(),
188 "Valuation data size (" << this->valuations.size() <<
") does not match number of entities (" << this->numEntities
189 <<
") times valuation size (" << this->variableClasses.front().sizeInBytes <<
").");
194 std::shared_ptr<storm::expressions::ExpressionManager const> expressionManager)
195 :
ValuationsStorage(numEntities, {description}, std::move(valuations), {}, {}, std::nullopt, {expressionManager}) {
196 STORM_LOG_ASSERT(!description.hasStringVariable(),
"String mapping must be given for descriptions with string variables.");
200 std::vector<std::shared_ptr<storm::expressions::ExpressionManager const>> expressionManagers)
201 :
ValuationsStorage(0, descriptions, {}, {}, {}, std::vector<uint32_t>{}, std::move(expressionManagers)) {}
204 std::shared_ptr<storm::expressions::ExpressionManager const> expressionManager)
205 :
ValuationsStorage(0, {description}, {}, {}, {}, std::nullopt, {expressionManager}) {}
214 return variableClasses.size();
218 return stringMapping.size() > 0 ? stringMapping.size() - 1 : 0;
222 return !stringMapping.empty();
227 if (entityClassMappings) {
228 return entityClassMappings->toClassMapping[entity];
230 STORM_LOG_ASSERT(variableClasses.size() == 1,
"No class mapping given but multiple classes exist.");
236 STORM_LOG_ASSERT(classIndex <
numClasses(),
"Class index " << classIndex <<
" out of bounds. Only " << variableClasses.size() <<
"classes known.");
238 uint64_t currBit = 0;
239 for (
auto const& varInfo : variableClasses[classIndex].variables) {
240 uint64_t padding = varInfo.bitOffset - currBit;
241 if (varInfo.description.isOptional.value_or(
false)) {
242 STORM_LOG_ASSERT(padding >= 1,
"Optional variables must have at least 1 bit preceding its offset.");
248 res.
variables.push_back(varInfo.description);
249 currBit = varInfo.bitOffset + varInfo.description.type.bitSize();
250 STORM_LOG_ASSERT(currBit == res.
sizeInBits(),
"Unexpected bit offset for variable " << varInfo.description.name <<
" in class " << classIndex
251 <<
". Expected " << res.
sizeInBits() <<
", got "
252 << varInfo.bitOffset <<
".");
254 if (uint64_t padding = currBit % 8; padding > 0) {
261 STORM_LOG_ASSERT(!variableClasses.empty(),
"No variable classes given, cannot determine expression manager.");
262 auto const& manager = variableClasses.front().expressionManager;
264 std::all_of(variableClasses.begin() + 1, variableClasses.end(), [&manager](
auto const& varClass) { return varClass.expressionManager == manager; }),
265 storm::exceptions::IllegalFunctionCallException,
"Expression manager is not unique.");
271 "Class index " << classIndex <<
" out of bounds. Only " << variableClasses.size() <<
"classes known.");
272 return *variableClasses[classIndex].expressionManager;
276 auto const& vars = info(entity).variables;
277 auto varInfoIt = std::find_if(vars.begin(), vars.end(), [&variable](
auto const& varInfo) { return varInfo.expressionVariable == variable; });
288 [[maybe_unused]]
auto const& manager =
getManager();
289 std::set<storm::expressions::Variable> result;
290 for (
auto const& varClass : variableClasses) {
291 for (
auto const& varInfo : varClass.variables) {
293 "Expression manager of variable " << varInfo.expressionVariable.getName() <<
" does not match the one of the valuation.");
294 result.insert(varInfo.expressionVariable);
301 auto const& vars = info(entity).variables;
302 return std::any_of(vars.begin(), vars.end(), [&variable](
auto const& varInfo) { return varInfo.expressionVariable == variable; });
307 if (entityClassMappings.has_value()) {
319 if (newEntityCount >
size()) {
323 if (newEntityCount >
size()) {
324 uint64_t
const classSize = variableClasses[classIndex].sizeInBytes;
325 valuations.resize(valuations.size() + (newEntityCount -
size()) * classSize);
326 if (entityClassMappings) {
327 entityClassMappings->toClassMapping.resize(newEntityCount, classIndex);
328 for (uint64_t valEnd = entityClassMappings->toValuationsMapping.back() + classSize; valEnd < valuations.size(); valEnd += classSize) {
329 entityClassMappings->toValuationsMapping.push_back(valEnd);
332 auto const srcBytes = getRawBytes(numEntities);
333 for (uint64_t newEntityIndex = numEntities + 1; newEntityIndex < newEntityCount; ++newEntityIndex) {
334 auto destBytes = getRawBytes(newEntityIndex);
335 std::copy(srcBytes.begin(), srcBytes.end(), destBytes.begin());
337 numEntities = newEntityCount;
339 }
else if (newEntityCount <
size()) {
340 uint64_t
const newValuationsSize =
341 entityClassMappings.has_value() ? entityClassMappings->toValuationsMapping[newEntityCount] : newEntityCount * variableClasses.front().sizeInBytes;
342 valuations.resize(newValuationsSize);
343 if (entityClassMappings) {
344 entityClassMappings->toClassMapping.resize(newEntityCount);
345 entityClassMappings->toValuationsMapping.resize(newEntityCount + 1);
347 numEntities = newEntityCount;
351template<
typename RationalValueType>
353 readCallback(entity, [&evaluator](
auto,
auto const& var,
auto const& value) {
354 using ValueType = std::remove_cvref_t<
decltype(value)>;
355 if constexpr (std::is_same_v<ValueType, bool>) {
356 evaluator.setBooleanValue(var, value);
357 }
else if constexpr (std::is_same_v<ValueType, int64_t> || std::is_same_v<ValueType, uint64_t>) {
358 evaluator.setIntegerValue(var, value);
360 }
else if constexpr (std::is_same_v<ValueType, double> || std::is_same_v<ValueType, storm::RationalNumber>) {
364 (std::is_same_v<ValueType, std::string_view> || std::is_same_v<ValueType, std::string> || std::is_same_v<ValueType, std::nullopt_t>),
365 storm::exceptions::NotSupportedException,
"Unsupported variable value type when reading state values: " <<
typeid(ValueType).name() <<
".");
378std::span<char const> ValuationsStorage::getRawBytes(uint64_t entity)
const {
380 if (entityClassMappings) {
381 auto const start = entityClassMappings->toValuationsMapping[entity];
382 auto const end = entityClassMappings->toValuationsMapping[entity + 1];
383 return std::span<char const>(&valuations[start], end - start);
385 auto const start = entity * variableClasses.front().sizeInBytes;
386 return std::span<char const>(&valuations[start], variableClasses.front().sizeInBytes);
390std::span<char> ValuationsStorage::getRawBytes(uint64_t entity) {
391 if (entityClassMappings) {
392 auto const start = entityClassMappings->toValuationsMapping[entity];
393 auto const end = entityClassMappings->toValuationsMapping[entity + 1];
394 return std::span<char>(&valuations[start], end - start);
396 auto const start = entity * variableClasses.front().sizeInBytes;
397 return std::span<char>(&valuations[start], variableClasses.front().sizeInBytes);
401bool ValuationsStorage::readBit(std::span<char const> bytes, uint64_t
const position)
const {
402 STORM_LOG_ASSERT(position < bytes.size() * 8,
"Bit position exceeds valuation size.");
403 return bytes[position / 8] & (1 << (position % 8));
406void ValuationsStorage::writeBit(std::span<char> bytes, uint64_t
const position,
bool value)
const {
407 STORM_LOG_ASSERT(position < bytes.size() * 8,
"Bit position exceeds valuation size.");
408 char&
byte = bytes[position / 8];
409 char const pos = (1 << (position % 8));
417uint64_t ValuationsStorage::readUint64(std::span<char const> bytes, uint64_t
const bitOffset, uint64_t
const bitSize)
const {
418 STORM_LOG_ASSERT(bitOffset < bytes.size() * 8,
"Variable offset exceeds valuation size.");
420 auto const firstByte = bitOffset / 8;
421 auto const bitOffsetWithinByte = bitOffset % 8;
422 auto const numBytes = (bitOffsetWithinByte + bitSize + 7) / 8;
423 STORM_LOG_ASSERT(numBytes <= 9,
"Invalid number of bytes computed: " << numBytes);
426 std::memcpy(&result, &bytes[firstByte], std::min<uint64_t>(numBytes, 8ull));
427 result >>= bitOffsetWithinByte;
429 if (numBytes == 9ull) {
430 uint64_t upperBits = std::bit_cast<uint8_t>(bytes[firstByte + 8]);
431 upperBits <<= (64 - bitOffsetWithinByte);
436 uint64_t
const relevantBitMask = (1ull << bitSize) - 1;
437 result &= relevantBitMask;
442void ValuationsStorage::writeUint64(std::span<char> bytes, uint64_t
const bitOffset, uint64_t
const bitSize, uint64_t
const value)
const {
443 STORM_LOG_ASSERT(bitOffset < bytes.size() * 8,
"Variable offset exceeds valuation size.");
445 STORM_LOG_THROW(bitSize == 64 || value < (1ull << bitSize), storm::exceptions::OutOfRangeException,
446 "Invalid value " << value <<
" for bit size " << bitSize <<
".");
447 uint64_t
const firstByte = bitOffset / 8;
448 uint8_t
const bitOffsetWithinByte = bitOffset % 8;
449 uint8_t
const numBytes = (bitOffsetWithinByte + bitSize + 7) / 8;
450 uint8_t
const numFullBytes = (bitOffsetWithinByte + bitSize) / 8;
451 STORM_LOG_ASSERT(numBytes <= 9,
"Invalid number of bytes computed: " << numBytes);
452 if (numFullBytes == 0) {
454 char&
byte = bytes[firstByte];
455 uint8_t
const relevantBitsMask = ((1 << bitSize) - 1) << bitOffsetWithinByte;
456 byte &=
static_cast<char>(~relevantBitsMask);
457 byte |=
static_cast<char>((value << bitOffsetWithinByte) & relevantBitsMask);
460 if (bitOffsetWithinByte == 0) {
462 std::memcpy(&bytes[firstByte], &value, numFullBytes);
464 uint64_t
const shiftedValue = (
static_cast<uint64_t
>(bytes[firstByte]) & ((1ull << bitOffsetWithinByte) - 1)) | (value << bitOffsetWithinByte);
465 std::memcpy(&bytes[firstByte], &shiftedValue, numFullBytes);
468 if (numFullBytes != numBytes) {
470 char& lastByte = bytes[firstByte + numFullBytes];
471 uint8_t
const numBitsUsedInLastByte = (bitOffsetWithinByte + bitSize) % 8;
472 lastByte &=
static_cast<char>((1 << numBitsUsedInLastByte) - 1);
473 lastByte |=
static_cast<char>(value >> (numFullBytes * 8 - bitOffsetWithinByte));
479ValuationsStorage::Integer ValuationsStorage::readInteger(std::span<char const> bytes, uint64_t
const bitOffset, uint64_t
const bitSize)
const {
480 auto const num64BitChunks = (bitSize + 63) / 64;
481 auto chunksView = std::ranges::iota_view(0ull, num64BitChunks) | std::ranges::views::transform([
this, &bytes, &bitOffset, &bitSize](
auto i) -> uint64_t {
482 return readUint64(bytes, bitOffset +
i * 64, std::min<uint64_t>(64, bitSize -
i * 64));
485 if constexpr (Signed) {
498void ValuationsStorage::writeInteger(std::span<char> bytes, uint64_t bitOffset, uint64_t bitSize, Integer
const& value)
const {
500 "Value " << value <<
" cannot be encoded in " << bitSize <<
" bits.");
501 auto const num64BitChunks = (bitSize + 63) / 64;
502 std::vector<uint64_t> uint64Encoding;
504 STORM_LOG_ASSERT(uint64Encoding.size() == num64BitChunks,
"Encoding does not fit into the specified bit size.");
505 for (
auto v : uint64Encoding) {
507 writeUint64(bytes, bitOffset, 64, v);
511 uint64_t
const relevantBitMask = (1ull << bitSize) - 1;
513 if (Signed && ((v & (1ull << (bitSize - 1))) != 0)) {
514 STORM_LOG_ASSERT(value < 0,
"Value " << value <<
" is non-negative but the sign bit is set.");
517 "Value " << value <<
" does not fit into the specified bit size of " << bitSize <<
" bits.");
521 v &= relevantBitMask;
524 STORM_LOG_ASSERT((~relevantBitMask & v) == 0,
"Value " << value <<
" does not fit into the specified bit size of " << bitSize <<
" bits.");
526 writeUint64(bytes, bitOffset, bitSize, v);
531 STORM_LOG_ASSERT(bitSize == 0,
"Unexpected integer encoding. Not all bits were written.");
534template void ValuationsStorage::writeInteger<false>(std::span<char>, uint64_t, uint64_t, Integer
const&)
const;
535template void ValuationsStorage::writeInteger<true>(std::span<char>, uint64_t, uint64_t, Integer
const&)
const;
537template<
typename ValueType>
539 if constexpr (std::is_same_v<ValueType, bool>) {
540 writeUint64(bytes, bitOffset, bitSize, value ? 1ul : 0ul);
541 }
else if constexpr (std::is_same_v<ValueType, uint64_t>) {
542 writeUint64(bytes, bitOffset, bitSize, value);
543 }
else if constexpr (std::is_same_v<ValueType, int64_t>) {
546 uint64_t v = ~static_cast<uint64_t>(-(value + 1));
549 v &= (1ull << bitSize) - 1;
551 writeUint64(bytes, bitOffset, bitSize, v);
554 writeUint64(bytes, bitOffset, bitSize,
static_cast<uint64_t
>(value));
556 }
else if constexpr (std::is_same_v<ValueType, double>) {
557 writeUint64(bytes, bitOffset, bitSize, std::bit_cast<uint64_t>(value));
558 }
else if constexpr (std::is_same_v<ValueType, Integer>) {
560 writeInteger<true>(bytes, bitOffset, bitSize, value);
562 writeInteger<false>(bytes, bitOffset, bitSize, value);
564 }
else if constexpr (std::is_same_v<ValueType, storm::RationalNumber>) {
565 STORM_LOG_ASSERT(bitSize % 2 == 0,
"Uneven bitsize for rational number not expected.");
566 auto const numDenSize = bitSize / 2;
568 static_assert(storm::RationalNumberDenominatorAlwaysPositive);
572 static_assert(std::is_same_v<ValueType, std::string_view> || std::is_same_v<ValueType, std::string>);
573 uint64_t
const index = storm::umb::StringsBuilder(strings, stringMapping).findOrPushBack(value);
574 writeUint64(bytes, bitOffset, bitSize, index);
590 result.numEntities = [&selectedEntities]() {
591 if constexpr (std::is_same_v<T, storm::storage::BitVector>) {
592 return selectedEntities.getNumberOfSetBits();
594 return std::ranges::distance(selectedEntities);
597 result.stringMapping = stringMapping;
598 result.strings = strings;
600 if (entityClassMappings) {
601 result.entityClassMappings.emplace();
602 result.entityClassMappings->toValuationsMapping.reserve(result.numEntities + 1);
603 result.entityClassMappings->toValuationsMapping.push_back(0);
604 result.entityClassMappings->toClassMapping.reserve(result.numEntities);
606 result.valuations.reserve(result.numEntities * result.variableClasses.front().sizeInBytes);
608 for (
auto const oldEntityIndex : selectedEntities) {
609 STORM_LOG_ASSERT(oldEntityIndex <
size(),
"Selected entity index " << oldEntityIndex <<
" out of bounds. Only " <<
size() <<
" entities known.");
610 auto const bytes = getRawBytes(oldEntityIndex);
611 result.valuations.insert(result.valuations.end(), bytes.begin(), bytes.end());
612 if (entityClassMappings) {
613 result.entityClassMappings->toValuationsMapping.push_back(result.valuations.size());
614 result.entityClassMappings->toClassMapping.push_back(entityClassMappings->toClassMapping[oldEntityIndex]);
625 auto const hashBytes = std::hash<std::string_view>{};
627 std::size_t seed = hashBytes(std::string_view(valuations.data(), valuations.size()));
628 boost::hash_combine(seed, hashBytes(std::string_view(strings.data(), strings.size())));
This class is responsible for managing a set of typed variables and all expressions using these varia...
std::string const & getName() const
Retrieves the name of the variable.
A bit vector that is internally represented as a vector of 64-bit values.
Stores valuations of variables for a set of entities (e.g.
ValuationsStorage(ValuationsStorage const &)=default
storm::umb::UmbModel::Valuation getRawUmbData() const
Exports a snapshot of the raw UMB model valuation data (packed bytes, optional class mapping,...
bool entityHasVariable(uint64_t entity, storm::expressions::Variable const &variable) const
Returns true iff the variable is relevant for the given entity's class, i.e.
ValuationsStorage selectEntities(T const &selectedEntities) const
Constructs a new ValuationsStorage containing only the selected entities, in the order they appear in...
void resize(uint64_t newEntityCount, uint64_t classIndex=0)
Resizes the entity count to newEntityCount.
std::set< storm::expressions::Variable > getAllVariables() const
Returns all expression variables that this valuation assigns values to for at least one class.
void readCallback(uint64_t entity, Callback const &callback) const
Reads all variables of the given entity and invokes callback for each one.
uint64_t numStrings() const
void writeValue(uint64_t entity, storm::expressions::Variable const &variable, ValueType const &value)
Directly writes value to the given variable of entity.
std::size_t hash() const
Computes a hash of the entire valuation data.
uint64_t getClassOfEntity(uint64_t entity) const
Returns the class index of the given entity.
storm::expressions::ExpressionManager const & getManager() const
Returns the expression manager shared by all classes.
void setValuesInEvaluator(uint64_t entity, storm::expressions::ExpressionEvaluator< RationalValueType > &evaluator) const
Reads the variable values for the given entity and sets them into the given expression evaluator.
VariableInformation const & getVariableInformation(uint64_t entity, storm::expressions::Variable const &variable) const
Looks up compiled variable information for the given entity and variable.
storm::NumberTraits< storm::RationalNumber >::IntegerType Integer
void emplaceBack(uint64_t classIndex, Callback const &callback)
Appends a new entity of the given class and populates its variables via callback.
ValuationClassDescription getClassDescription(uint64_t classIndex=0) const
Reconstructs the ValuationClassDescription for the given class from the stored compiled variable info...
uint64_t numClasses() const
static void appendEncodedInteger(std::vector< uint64_t > &result, typename storm::NumberTraits< storm::RationalNumber >::IntegerType const &value, uint64_t uint64BucketsPerInteger)
static storm::NumberTraits< storm::RationalNumber >::IntegerType decodeArbitraryPrecisionInteger(InputRange &&input)
static uint64_t getSizeOfIntegerEncoding(typename storm::NumberTraits< storm::RationalNumber >::IntegerType const &value)
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
bool fits64Bit(ValuationClassDescription::Variable const &varDesc)
ValuationsStorage::VariablesInformation createVariablesInformation(ManagerType &expressionManager, ValuationClassDescription const &description)
NumberTraits< RationalType >::IntegerType denominator(RationalType const &number)
NumberTraits< RationalType >::IntegerType numerator(RationalType const &number)
ValueType pow(ValueType const &value, int_fast64_t exponent)
TargetType convertNumber(SourceType const &number)
std::optional< int64_t > offset
std::optional< int64_t > upper
storm::umb::SizedType type
std::optional< int64_t > lower
Describes the layout of a class of valuations (e.g.
uint64_t sizeInBits() const
Computes the size in bits of a valuation.
std::vector< std::variant< Padding, Variable > > variables
std::string toString() const
storm::SerializedEnum< storm::umb::TypeDeclaration > type
TO1< uint32_t > valuationToClass