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 if (state < lastState && lastState != startIndexComparison) {
46 "Error while parsing " << filename <<
": State " << state <<
" was found but has already been read or skipped previously.");
48 if (state == lastState && choice < lastChoice && lastChoice != startChoiceIndexComparison) {
50 "Error while parsing " << filename <<
": Choice " << choice <<
" was found but has already been read or skipped previously.");
52 if (state >= nondeterministicChoiceIndices.size()) {
53 STORM_LOG_THROW(
false, storm::exceptions::WrongFormatException,
"Error while parsing " << filename <<
": Illegal state " << state <<
".");
55 uint_fast64_t numberOfChoicesForState = nondeterministicChoiceIndices[state + 1] - nondeterministicChoiceIndices[state];
56 if (choice >= numberOfChoicesForState) {
58 false, storm::exceptions::WrongFormatException,
59 "Error while parsing " << filename <<
": Choice " << choice <<
" is illegal for state " << state <<
", because this state has fewer choices.");
64 result[nondeterministicChoiceIndices[state] + choice].insert(label);