Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateReward.cpp
Go to the documentation of this file.
3
4namespace storm {
5namespace prism {
6StateReward::StateReward(storm::expressions::Expression const& statePredicateExpression, storm::expressions::Expression const& rewardValueExpression,
7 std::string const& filename, uint_fast64_t lineNumber)
8 : LocatedInformation(filename, lineNumber), statePredicateExpression(statePredicateExpression), rewardValueExpression(rewardValueExpression) {
9 // Nothing to do here.
10}
11
13 return this->statePredicateExpression;
14}
15
17 return this->rewardValueExpression;
18}
19
20StateReward StateReward::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const {
21 return StateReward(this->getStatePredicateExpression().substitute(substitution), this->getRewardValueExpression().substitute(substitution),
22 this->getFilename(), this->getLineNumber());
23}
24
25std::ostream& operator<<(std::ostream& stream, StateReward const& stateReward) {
26 stream << "\t" << stateReward.getStatePredicateExpression() << ": " << stateReward.getRewardValueExpression() << ";";
27 return stream;
28}
29} // namespace prism
30} // namespace storm
uint_fast64_t getLineNumber() const
Retrieves the line number in which the information was found.
std::string const & getFilename() const
Retrieves the name of the file in which the information was found.
storm::expressions::Expression const & getStatePredicateExpression() const
Retrieves the state predicate that is associated with this state reward.
storm::expressions::Expression const & getRewardValueExpression() const
Retrieves the reward value associated with this state reward.
StateReward substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the state reward according to the given map.
std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)
LabParser.cpp.
Definition cli.cpp:18