Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MarkovAutomatonSparseTransitionParser.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace storm {
9namespace parser {
10
18template<typename ValueType = double>
20 public:
31 // Intentionally left empty.
32 }
33
36
38 uint_fast64_t highestStateIndex;
39
41 uint_fast64_t numberOfChoices;
42 };
43
48 struct Result {
54 Result(FirstPassResult const& firstPassResult)
55 : transitionMatrixBuilder(firstPassResult.numberOfChoices, firstPassResult.highestStateIndex + 1, firstPassResult.numberOfNonzeroEntries, true,
56 firstPassResult.highestStateIndex + 1),
57 markovianChoices(firstPassResult.numberOfChoices),
58 markovianStates(firstPassResult.highestStateIndex + 1),
59 exitRates(firstPassResult.highestStateIndex + 1) {
60 // Intentionally left empty.
61 }
62
65
68
71
73 std::vector<ValueType> exitRates;
74 };
75
82 static Result parseMarkovAutomatonTransitions(std::string const& filename, ExplicitModelParserOptions const& options = ExplicitModelParserOptions());
83
84 private:
91 static FirstPassResult firstPass(char const* buffer, ExplicitModelParserOptions const& options);
92
100 static Result secondPass(char const* buffer, FirstPassResult const& firstPassResult, ExplicitModelParserOptions const& options);
101};
102
103} // namespace parser
104} // namespace storm
A class providing the functionality to parse the transitions of a Markov automaton.
static Result parseMarkovAutomatonTransitions(std::string const &filename, ExplicitModelParserOptions const &options=ExplicitModelParserOptions())
Parses the given file under the assumption that it contains a Markov automaton specified in the appro...
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
A class that can be used to build a sparse matrix by adding value by value.
Contains all file parsers and helper classes.
#define STORM_PARSERS_API
A structure representing the result of the first pass of this parser.
uint_fast64_t highestStateIndex
The highest state index that appears in the model.
uint_fast64_t numberOfNonzeroEntries
The total number of non-zero entries of the model.
uint_fast64_t numberOfChoices
The total number of nondeterministic choices in the model.
storm::storage::BitVector markovianChoices
A bit vector indicating which choices are Markovian. By duality, all other choices are probabilitic.
storm::storage::BitVector markovianStates
A bit vector indicating which states possess a Markovian choice.
Result(FirstPassResult const &firstPassResult)
Creates a new instance of the struct using the result of the first pass to correctly initialize the c...
std::vector< ValueType > exitRates
A vector that stores the exit rates for each state. For all states that do not possess Markovian choi...
storm::storage::SparseMatrixBuilder< ValueType > transitionMatrixBuilder
A matrix representing the transitions of the model.