Storm
A Modern Probabilistic Model Checker
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MarkovAutomatonSparseTransitionParser.h
Go to the documentation of this file.
1#ifndef STORM_PARSER_MARKOVAUTOMATONSPARSETRANSITIONPARSER_H_
2#define STORM_PARSER_MARKOVAUTOMATONSPARSETRANSITIONPARSER_H_
3
6
7namespace storm {
8namespace parser {
9
17template<typename ValueType = double>
19 public:
30 // Intentionally left empty.
31 }
32
35
37 uint_fast64_t highestStateIndex;
38
40 uint_fast64_t numberOfChoices;
41 };
42
47 struct Result {
53 Result(FirstPassResult const& firstPassResult)
54 : transitionMatrixBuilder(firstPassResult.numberOfChoices, firstPassResult.highestStateIndex + 1, firstPassResult.numberOfNonzeroEntries, true,
55 firstPassResult.highestStateIndex + 1),
56 markovianChoices(firstPassResult.numberOfChoices),
57 markovianStates(firstPassResult.highestStateIndex + 1),
58 exitRates(firstPassResult.highestStateIndex + 1) {
59 // Intentionally left empty.
60 }
61
64
67
70
72 std::vector<ValueType> exitRates;
73 };
74
81 static Result parseMarkovAutomatonTransitions(std::string const& filename);
82
83 private:
90 static FirstPassResult firstPass(char const* buffer);
91
99 static Result secondPass(char const* buffer, FirstPassResult const& firstPassResult);
100};
101
102} // namespace parser
103} // namespace storm
104
105#endif /* STORM_PARSER_MARKOVAUTOMATONSPARSETRANSITIONPARSER_H_ */
A class providing the functionality to parse the transitions of a Markov automaton.
static Result parseMarkovAutomatonTransitions(std::string const &filename)
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:18
A class that can be used to build a sparse matrix by adding value by value.
LabParser.cpp.
Definition cli.cpp:18
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.