Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::umb::UmbModel Class Reference

Represents a model in the UMB format. More...

#include <UmbModel.h>

Collaboration diagram for storm::umb::UmbModel:

Classes

struct  ActionLabels
struct  Observations
struct  AppliesToEntity
struct  AnnotationValues
struct  Valuation

Public Types

using Annotation = std::map<std::string, AppliesToEntity<AnnotationValues>>
using Valuations = AppliesToEntity<Valuation>

Public Member Functions

std::string getShortModelInformation () const
 Retrieves a short string that can be used to refer to the model in user output.
std::string getModelInformation () const
 Retrieves a string that describes the model in more detail.
storm::OptionalRef< Annotationannotation (std::string const &annotationType, bool createIfMissing=false)
 Gets the annotation data with the given annotation type.
storm::OptionalRef< Annotation const > annotation (std::string const &annotationType) const
storm::OptionalRef< Annotationaps (bool createIfMissing=false)
storm::OptionalRef< Annotation const > aps () const
storm::OptionalRef< Annotationrewards (bool createIfMissing=false)
storm::OptionalRef< Annotation const > rewards () const
bool validate (std::ostream &errors) const
 Validates the given UMB model and writes potential errors to the given output stream.
void validateOrThrow () const
 Validates the UmbModel.
void encodeRationals ()
 Encodes all rational values stored in the model into their UMB bit representation.
void decodeRationals ()
 Decodes all rational values stored in the model from their UMB bit representation.

Public Attributes

ModelIndex index
CSR stateToChoices
TO1< uint32_t > stateToPlayer
TO1< bool > stateIsInitial
TO1< bool > stateIsMarkovian
TO1< AnyValueTypestateToExitRate
CSR choiceToBranches
TO1< uint64_t > branchToTarget
TO1< AnyValueTypebranchToProbability
std::optional< ActionLabelschoiceActions
std::optional< ActionLabelsbranchActions
std::optional< ObservationsstateObservations
std::optional< ObservationsbranchObservations
std::map< std::string, Annotationannotations
Valuations valuations
std::map< std::filesystem::path, std::vector< char > > nonStandardFiles

Static Public Attributes

static auto constexpr FileNames

Detailed Description

Represents a model in the UMB format.

The data is stored in a way that closely reflects the file structure of the UMB format.

See also
https://pmc-tools.github.io/umb/spec
Note
We use reflexion to associate the data with the expected file names.

Definition at line 21 of file UmbModel.h.

Member Typedef Documentation

◆ Annotation

Definition at line 66 of file UmbModel.h.

◆ Valuations

Member Function Documentation

◆ annotation() [1/2]

storm::OptionalRef< UmbModel::Annotation const > storm::umb::UmbModel::annotation ( std::string const & annotationType) const

Definition at line 72 of file UmbModel.cpp.

◆ annotation() [2/2]

storm::OptionalRef< UmbModel::Annotation > storm::umb::UmbModel::annotation ( std::string const & annotationType,
bool createIfMissing = false )

Gets the annotation data with the given annotation type.

Definition at line 61 of file UmbModel.cpp.

◆ aps() [1/2]

storm::OptionalRef< UmbModel::Annotation const > storm::umb::UmbModel::aps ( ) const

Definition at line 84 of file UmbModel.cpp.

◆ aps() [2/2]

storm::OptionalRef< UmbModel::Annotation > storm::umb::UmbModel::aps ( bool createIfMissing = false)

Definition at line 80 of file UmbModel.cpp.

◆ decodeRationals()

void storm::umb::UmbModel::decodeRationals ( )

Decodes all rational values stored in the model from their UMB bit representation.

Definition at line 181 of file UmbModel.cpp.

◆ encodeRationals()

void storm::umb::UmbModel::encodeRationals ( )

Encodes all rational values stored in the model into their UMB bit representation.

Definition at line 104 of file UmbModel.cpp.

◆ getModelInformation()

std::string storm::umb::UmbModel::getModelInformation ( ) const

Retrieves a string that describes the model in more detail.

Definition at line 24 of file UmbModel.cpp.

◆ getShortModelInformation()

std::string storm::umb::UmbModel::getShortModelInformation ( ) const

Retrieves a short string that can be used to refer to the model in user output.

Definition at line 11 of file UmbModel.cpp.

◆ rewards() [1/2]

storm::OptionalRef< UmbModel::Annotation const > storm::umb::UmbModel::rewards ( ) const

Definition at line 92 of file UmbModel.cpp.

◆ rewards() [2/2]

storm::OptionalRef< UmbModel::Annotation > storm::umb::UmbModel::rewards ( bool createIfMissing = false)

Definition at line 88 of file UmbModel.cpp.

◆ validate()

bool storm::umb::UmbModel::validate ( std::ostream & errors) const

Validates the given UMB model and writes potential errors to the given output stream.

Returns
true if the UMB model is valid.

Definition at line 96 of file UmbModel.cpp.

◆ validateOrThrow()

void storm::umb::UmbModel::validateOrThrow ( ) const

Validates the UmbModel.

If it is invalid, an exception is thrown.

Definition at line 100 of file UmbModel.cpp.

Member Data Documentation

◆ annotations

std::map<std::string, Annotation> storm::umb::UmbModel::annotations

Definition at line 67 of file UmbModel.h.

◆ branchActions

std::optional<ActionLabels> storm::umb::UmbModel::branchActions

Definition at line 43 of file UmbModel.h.

◆ branchObservations

std::optional<Observations> storm::umb::UmbModel::branchObservations

Definition at line 51 of file UmbModel.h.

◆ branchToProbability

TO1<AnyValueType> storm::umb::UmbModel::branchToProbability

Definition at line 35 of file UmbModel.h.

◆ branchToTarget

TO1<uint64_t> storm::umb::UmbModel::branchToTarget

Definition at line 34 of file UmbModel.h.

◆ choiceActions

std::optional<ActionLabels> storm::umb::UmbModel::choiceActions

Definition at line 43 of file UmbModel.h.

◆ choiceToBranches

CSR storm::umb::UmbModel::choiceToBranches

Definition at line 32 of file UmbModel.h.

◆ FileNames

auto constexpr storm::umb::UmbModel::FileNames
staticconstexpr
Initial value:
= {"index.json",
"state-to-choices.bin",
"state-to-player.bin",
"state-is-initial.bin",
"state-is-markovian.bin",
"state-to-exit-rate.bin",
"choice-to-branches.bin",
"branch-to-target.bin",
"branch-to-probability.bin",
"actions/choices/",
"actions/branches/",
"observations/states/",
"observations/branches/",
"annotations/",
"valuations/",
""}

Definition at line 83 of file UmbModel.h.

◆ index

ModelIndex storm::umb::UmbModel::index

Definition at line 24 of file UmbModel.h.

◆ nonStandardFiles

std::map<std::filesystem::path, std::vector<char> > storm::umb::UmbModel::nonStandardFiles

Definition at line 81 of file UmbModel.h.

◆ stateIsInitial

TO1<bool> storm::umb::UmbModel::stateIsInitial

Definition at line 28 of file UmbModel.h.

◆ stateIsMarkovian

TO1<bool> storm::umb::UmbModel::stateIsMarkovian

Definition at line 29 of file UmbModel.h.

◆ stateObservations

std::optional<Observations> storm::umb::UmbModel::stateObservations

Definition at line 51 of file UmbModel.h.

◆ stateToChoices

CSR storm::umb::UmbModel::stateToChoices

Definition at line 26 of file UmbModel.h.

◆ stateToExitRate

TO1<AnyValueType> storm::umb::UmbModel::stateToExitRate

Definition at line 30 of file UmbModel.h.

◆ stateToPlayer

TO1<uint32_t> storm::umb::UmbModel::stateToPlayer

Definition at line 27 of file UmbModel.h.

◆ valuations

Valuations storm::umb::UmbModel::valuations

Definition at line 77 of file UmbModel.h.


The documentation for this class was generated from the following files: