diff --git a/src/storage/jani/Automaton.cpp b/src/storage/jani/Automaton.cpp index 9c618a838..6b11d29a0 100644 --- a/src/storage/jani/Automaton.cpp +++ b/src/storage/jani/Automaton.cpp @@ -148,6 +148,16 @@ namespace storm { std::set const& Automaton::getInitialLocationIndices() const { return initialLocationIndices; } + + std::map Automaton::buildIdToLocationNameMap() const { + std::map mapping; + uint64_t i = 0; + for(auto const& loc : locations) { + mapping[i] = loc.getName(); + ++i; + } + return mapping; + } Automaton::Edges Automaton::getEdgesFromLocation(std::string const& name) { auto it = locationToIndex.find(name); @@ -299,6 +309,7 @@ namespace storm { actionIndices.insert(edge.getActionIndex()); } + std::vector& Automaton::getEdges() { return edges; } diff --git a/src/storage/jani/Automaton.h b/src/storage/jani/Automaton.h index c6219aa1e..539e7df5e 100644 --- a/src/storage/jani/Automaton.h +++ b/src/storage/jani/Automaton.h @@ -193,6 +193,11 @@ namespace storm { */ std::set const& getInitialLocationIndices() const; + /*! + * Builds a map from ID to Location Name. + */ + std::map buildIdToLocationNameMap() const; + /*! * Retrieves the edges of the location with the given name. */ diff --git a/src/storage/jani/Model.cpp b/src/storage/jani/Model.cpp index fc170ac58..619324ae7 100644 --- a/src/storage/jani/Model.cpp +++ b/src/storage/jani/Model.cpp @@ -260,6 +260,16 @@ namespace storm { return result; } + std::map Model::buildActionToNameMap() const { + std::map mapping; + uint64_t i = 0; + for(auto const& act : actions) { + mapping[i] = act.getName(); + ++i; + } + return mapping; + } + std::string const& Model::getSilentActionName() const { return actions[silentActionIndex].getName(); } diff --git a/src/storage/jani/Model.h b/src/storage/jani/Model.h index 2fc06b18f..bade96875 100644 --- a/src/storage/jani/Model.h +++ b/src/storage/jani/Model.h @@ -81,6 +81,11 @@ namespace storm { * Retrieves the actions of the model. */ std::vector const& getActions() const; + + /*! + * Builds a map with action indices mapped to their names + */ + std::map buildActionToNameMap() const; /*! * Retrieves all non-silent action indices of the model.