Browse Source

include header

Former-commit-id: 9fee7d7e6c
tempestpy_adaptions
ThomasH 9 years ago
parent
commit
8e680bda96
  1. 3
      src/parser/GspnParser.cpp
  2. 1
      src/parser/GspnParser.h
  3. 16
      src/storage/gspn/Marking.h
  4. 10
      src/storm-gspn.cpp

3
src/parser/GspnParser.cpp

@ -1,5 +1,8 @@
#include "src/parser/GspnParser.h" #include "src/parser/GspnParser.h"
storm::gspn::GSPN storm::parser::GspnParser::parse(const std::string &filename) { storm::gspn::GSPN storm::parser::GspnParser::parse(const std::string &filename) {
//xercesc::XercesDOMParser;
return storm::gspn::GSPN(); return storm::gspn::GSPN();
} }

1
src/parser/GspnParser.h

@ -2,6 +2,7 @@
#define STORM_GSPNPARSER_H #define STORM_GSPNPARSER_H
#include <string> #include <string>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include "src/storage/gspn/GSPN.h" #include "src/storage/gspn/GSPN.h"
namespace storm { namespace storm {

16
src/storage/gspn/Marking.h

@ -46,6 +46,22 @@ namespace storm {
* @return The number of tokens at the place. * @return The number of tokens at the place.
*/ */
uint_fast64_t getNumberOfTokensAt(uint_fast64_t place); uint_fast64_t getNumberOfTokensAt(uint_fast64_t place);
/*!
* Reset the number of places.
* If the new number of places is larger than the old one, the new places start with 0 tokens.
* If the new number of places is smaller than the old one, the places which are going to be
* erased must not contain any tokens.
*
* @param numberOfPlaces The new number of places.
* @return Return True if the change is made.
*/
bool setNumberOfPlaces(uint_fast64_t numberOfPlaces);
/*!
*
*/
bool setMaxNumberOfTokens(uint_fast64_t maxNumberOfTokens);
private: private:
// the maximal number of places in the gspn // the maximal number of places in the gspn
uint_fast64_t numberOfPlaces; uint_fast64_t numberOfPlaces;

10
src/storm-gspn.cpp

@ -1,12 +1,22 @@
#include <iostream>
#include "src/exceptions/BaseException.h" #include "src/exceptions/BaseException.h"
#include "src/parser/GspnParser.h"
#include "src/storage/gspn/GSPN.h"
#include "src/utility/macros.h" #include "src/utility/macros.h"
#include "src/utility/initialize.h" #include "src/utility/initialize.h"
int main(const int argc, const char** argv) { int main(const int argc, const char** argv) {
if (argc != 2) {
std::cout << "Error: incorrect number of parameters!" << std::endl << std::endl;
std::cout << "Usage:" << std::endl;
std::cout << "storm-gspn <path to pnml file>" << std::endl;
}
try { try {
storm::utility::setUp(); storm::utility::setUp();
// Parse GSPN from xml // Parse GSPN from xml
storm::gspn::GSPN gspn = storm::parser::GspnParser::parse(argv[1]);
// Construct MA // Construct MA

Loading…
Cancel
Save