Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateActionReward.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_STATEACTIONREWARD_H_
2#define STORM_STORAGE_PRISM_STATEACTIONREWARD_H_
3
4#include <map>
5
8
9namespace storm {
10namespace storage {
11namespace expressions {
12class Variable;
13}
14} // namespace storage
15} // namespace storm
16
17namespace storm {
18namespace prism {
20 public:
33 StateActionReward(uint_fast64_t actionIndex, std::string const& actionName, storm::expressions::Expression const& statePredicateExpression,
34 storm::expressions::Expression const& rewardValueExpression, std::string const& filename = "", uint_fast64_t lineNumber = 0);
35
36 // Create default implementations of constructors/assignment.
37 StateActionReward() = default;
38 StateActionReward(StateActionReward const& other) = default;
42
48 std::string const& getActionName() const;
49
55 uint_fast64_t getActionIndex() const;
56
63
70
76 bool isLabeled() const;
77
84 StateActionReward substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
85
86 friend std::ostream& operator<<(std::ostream& stream, StateActionReward const& stateActionReward);
87
88 private:
89 // The index of the action name.
90 uint_fast64_t actionIndex;
91
92 // The name of the command this transition-based reward is attached to.
93 std::string actionName;
94
95 // A flag that stores whether the transition reward has an action label.
96 bool labeled;
97
98 // A predicate that needs to be satisfied by states for the reward to be obtained (by taking
99 // a corresponding command transition).
100 storm::expressions::Expression statePredicateExpression;
101
102 // The expression specifying the value of the reward obtained along the transitions.
103 storm::expressions::Expression rewardValueExpression;
104};
105
106} // namespace prism
107} // namespace storm
108
109#endif /* STORM_STORAGE_PRISM_STATEACTIONREWARD_H_ */
StateActionReward(StateActionReward const &other)=default
StateActionReward & operator=(StateActionReward &&other)=default
StateActionReward(StateActionReward &&other)=default
std::string const & getActionName() const
Retrieves the action name that is associated with this transition reward.
storm::expressions::Expression const & getRewardValueExpression() const
Retrieves the reward value expression associated with this state reward.
friend std::ostream & operator<<(std::ostream &stream, StateActionReward const &stateActionReward)
storm::expressions::Expression const & getStatePredicateExpression() const
Retrieves the state predicate expression that is associated with this state reward.
bool isLabeled() const
Retrieves whether the transition reward has an action label.
uint_fast64_t getActionIndex() const
Retrieves the action index of the action associated with this transition reward (if any).
StateActionReward & operator=(StateActionReward const &other)=default
StateActionReward substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the transition reward according to the given map.
LabParser.cpp.