You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

  1. #pragma once
  2. #include "storm-gspn/storage/gspn/GSPN.h"
  3. #include "storm/storage/jani/Model.h"
  4. #include "storm/storage/jani/Property.h"
  5. #include "storm/storage/expressions/ExpressionManager.h"
  6. namespace storm {
  7. namespace builder {
  8. class JaniGSPNBuilder {
  9. public:
  10. JaniGSPNBuilder(storm::gspn::GSPN const& gspn)
  11. : gspn(gspn), expressionManager(gspn.getExpressionManager()) {
  12. }
  13. virtual ~JaniGSPNBuilder() {
  14. // Intentionally left empty.
  15. }
  16. storm::jani::Model* build(std::string const& automatonName = "gspn_automaton");
  17. storm::jani::Variable const& getPlaceVariable(uint64_t placeId) {
  18. return *vars.at(placeId);
  19. }
  20. private:
  21. void addVariables(storm::jani::Model* model);
  22. uint64_t addLocation(storm::jani::Automaton& automaton);
  23. void addEdges(storm::jani::Automaton& automaton, uint64_t locId);
  24. const uint64_t janiVersion = 1;
  25. storm::gspn::GSPN const& gspn;
  26. std::map<uint64_t, storm::jani::Variable const*> vars;
  27. std::shared_ptr<storm::expressions::ExpressionManager> expressionManager;
  28. };
  29. }
  30. }