16 std::vector<uint_fast64_t>
const& nondeterministicChoiceIndices, std::string
const& filename) {
19 char const* buf = file.
getData();
21 uint_fast64_t totalNumberOfChoices = nondeterministicChoiceIndices.back();
24 std::vector<storm::storage::FlatSet<uint_fast64_t>> result(totalNumberOfChoices);
27 uint_fast64_t state = 0;
28 uint_fast64_t lastState = (uint_fast64_t)-1;
29 uint_fast64_t lastChoice = (uint_fast64_t)-1;
30 uint_fast64_t
const startIndexComparison = lastState;
31 uint_fast64_t
const startChoiceIndexComparison = lastChoice;
32 uint_fast64_t choice = 0;
33 uint_fast64_t label = 0;
36 while (buf[0] !=
'\0') {
44 STORM_LOG_THROW(state >= lastState || lastState == startIndexComparison, storm::exceptions::WrongFormatException,
45 "Error while parsing " << filename <<
": State " << state <<
" was found but has already been read or skipped previously.");
46 STORM_LOG_THROW(state != lastState || choice >= lastChoice || lastChoice == startChoiceIndexComparison, storm::exceptions::WrongFormatException,
47 "Error while parsing " << filename <<
": Choice " << choice <<
" was found but has already been read or skipped previously.");
48 STORM_LOG_THROW(state < nondeterministicChoiceIndices.size(), storm::exceptions::WrongFormatException,
49 "Error while parsing " << filename <<
": Illegal state " << state <<
".");
50 uint_fast64_t numberOfChoicesForState = nondeterministicChoiceIndices[state + 1] - nondeterministicChoiceIndices[state];
51 if (choice >= numberOfChoicesForState) {
53 false, storm::exceptions::WrongFormatException,
54 "Error while parsing " << filename <<
": Choice " << choice <<
" is illegal for state " << state <<
", because this state has fewer choices.");
59 result[nondeterministicChoiceIndices[state] + choice].insert(label);