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.

63 lines
2.6 KiB

  1. #ifndef STORM_LOGIC_REWARDOPERATORFORMULA_H_
  2. #define STORM_LOGIC_REWARDOPERATORFORMULA_H_
  3. #include "src/logic/OperatorFormula.h"
  4. #include "src/logic/RewardMeasureType.h"
  5. namespace storm {
  6. namespace logic {
  7. class RewardOperatorFormula : public OperatorFormula {
  8. public:
  9. RewardOperatorFormula(std::shared_ptr<Formula const> const& subformula, boost::optional<std::string> const& rewardModelName = boost::none, OperatorInformation const& operatorInformation = OperatorInformation(), RewardMeasureType rewardMeasureType = RewardMeasureType::Expectation);
  10. virtual ~RewardOperatorFormula() {
  11. // Intentionally left empty.
  12. }
  13. virtual bool isRewardOperatorFormula() const override;
  14. virtual boost::any accept(FormulaVisitor const& visitor, boost::any const& data) const override;
  15. virtual void gatherReferencedRewardModels(std::set<std::string>& referencedRewardModels) const override;
  16. virtual std::ostream& writeToStream(std::ostream& out) const override;
  17. /*!
  18. * Retrieves whether the reward model refers to a specific reward model.
  19. *
  20. * @return True iff the reward model refers to a specific reward model.
  21. */
  22. bool hasRewardModelName() const;
  23. /*!
  24. * Retrieves the optional representing the reward model name this property refers to.
  25. *
  26. * @return The reward model name this property refers to (if any).
  27. */
  28. boost::optional<std::string> const& getOptionalRewardModelName() const;
  29. /*!
  30. * Retrieves the name of the reward model this property refers to (if any). Note that it is illegal to call
  31. * this function if the operator does not have a specific reward model it is referring to.
  32. *
  33. * @return The name of the reward model this propertye refers to.
  34. */
  35. std::string const& getRewardModelName() const;
  36. /*!
  37. * Retrieves the measure type of the operator.
  38. *
  39. * @return The measure type.
  40. */
  41. RewardMeasureType getMeasureType() const;
  42. private:
  43. // The (optional) name of the reward model this property refers to.
  44. boost::optional<std::string> rewardModelName;
  45. // The measure type of the operator.
  46. RewardMeasureType rewardMeasureType;
  47. };
  48. }
  49. }
  50. #endif /* STORM_LOGIC_REWARDOPERATORFORMULA_H_ */