Browse Source

fix bug

Former-commit-id: 808ebe2769
tempestpy_adaptions
ThomasH 9 years ago
parent
commit
bfbe63fcb4
  1. 6
      src/parser/GspnParser.cpp
  2. 2
      src/storage/gspn/Marking.cpp

6
src/parser/GspnParser.cpp

@ -148,11 +148,8 @@ void storm::parser::GspnParser::parsePlace(xercesc::DOMNode *node) {
auto name = getName(child);
if (name.compare("initialMarking") == 0) {
auto tokens = parseInitialMarking(child);
std::cout << "place: " << place << "; tokens: " << tokens << std::endl;
//TODO search bug
gspn.setNumberOfPlaces(gspn.getNumberOfPlaces()+1);
//gspn.setInitialTokens(place, tokens);
gspn.setInitialTokens(place, tokens);
} else if (std::all_of(name.begin(), name.end(), isspace)) {
// ignore node (contains only whitespace)
} else if (name.compare("name") == 0 ||
@ -279,6 +276,7 @@ void storm::parser::GspnParser::parseArc(xercesc::DOMNode *node) {
return;
}
}
// TODO add error message
std::cout << "found an arc with no correpsonding transition" << std::endl;
}

2
src/storage/gspn/Marking.cpp

@ -46,6 +46,7 @@ namespace storm {
}
if (numberOfPlaces > this->numberOfPlaces) {
marking.resize(numberOfPlaces * numberOfBits);
this->numberOfPlaces = numberOfPlaces;
return true;
} else {
auto diff = this->numberOfPlaces - numberOfPlaces;
@ -56,6 +57,7 @@ namespace storm {
}
}
marking.resize(numberOfPlaces * numberOfBits);
this->numberOfPlaces = numberOfPlaces;
return true;
}
}

Loading…
Cancel
Save