25 lines
1.1 KiB

  1. #include "storm/storage/prism/RestrictedParallelComposition.h"
  2. #include <boost/algorithm/string/join.hpp>
  3. namespace storm {
  4. namespace prism {
  5. RestrictedParallelComposition::RestrictedParallelComposition(std::shared_ptr<Composition> const& left, std::set<std::string> const& synchronizingActions, std::shared_ptr<Composition> const& right) : storm::prism::ParallelComposition(left, right), synchronizingActions(synchronizingActions) {
  6. // Intentionally left empty.
  7. }
  8. boost::any RestrictedParallelComposition::accept(CompositionVisitor& visitor, boost::any const& data) const {
  9. return visitor.visit(*this, data);
  10. }
  11. std::set<std::string> const& RestrictedParallelComposition::getSynchronizingActions() const {
  12. return synchronizingActions;
  13. }
  14. void RestrictedParallelComposition::writeToStream(std::ostream& stream) const {
  15. stream << "(" << this->getLeftSubcomposition() << " |[" << boost::algorithm::join(synchronizingActions, ", ") << "]| " << this->getRightSubcomposition() << ")";
  16. }
  17. }
  18. }