Browse Source

minor first step towards input-enabling automata in JANI composition

Former-commit-id: e0fbc490fc [formerly bf28707d89]
Former-commit-id: 9534df5261
tempestpy_adaptions
dehnert 8 years ago
parent
commit
311bc2eaa0
  1. 6
      src/storage/jani/AutomatonComposition.cpp
  2. 11
      src/storage/jani/AutomatonComposition.h

6
src/storage/jani/AutomatonComposition.cpp

@ -3,7 +3,7 @@
namespace storm { namespace storm {
namespace jani { namespace jani {
AutomatonComposition::AutomatonComposition(std::string const& name) : name(name) {
AutomatonComposition::AutomatonComposition(std::string const& name, std::set<std::string> const& inputEnabledActions) : name(name), inputEnabledActions(inputEnabledActions) {
// Intentionally left empty. // Intentionally left empty.
} }
@ -15,6 +15,10 @@ namespace storm {
return name; return name;
} }
std::set<std::string> const& AutomatonComposition::getInputEnabledActions() const {
return inputEnabledActions;
}
void AutomatonComposition::write(std::ostream& stream) const { void AutomatonComposition::write(std::ostream& stream) const {
stream << name; stream << name;
} }

11
src/storage/jani/AutomatonComposition.h

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <set>
#include "src/storage/jani/Composition.h" #include "src/storage/jani/Composition.h"
namespace storm { namespace storm {
@ -10,7 +12,7 @@ namespace storm {
/*! /*!
* Creates a reference to an automaton to be used in a composition. * Creates a reference to an automaton to be used in a composition.
*/ */
AutomatonComposition(std::string const& name);
AutomatonComposition(std::string const& name, std::set<std::string> const& inputEnabledActions = {});
/*! /*!
* Retrieves the name of the automaton this composition element refers to. * Retrieves the name of the automaton this composition element refers to.
@ -21,9 +23,14 @@ namespace storm {
virtual void write(std::ostream& stream) const override; virtual void write(std::ostream& stream) const override;
std::set<std::string> const& getInputEnabledActions() const;
private: private:
// The name of the automaton this composition element refers to.
/// The name of the automaton this composition element refers to.
std::string name; std::string name;
/// The names of the actions for which to make this automaton input-enabled.
std::set<std::string> inputEnabledActions;
}; };
} }
Loading…
Cancel
Save