Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Assignment.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
8
9namespace storm {
10namespace prism {
12 public:
21 Assignment(storm::expressions::Variable const& variable, storm::expressions::Expression const& expression, std::string const& filename = "",
22 uint_fast64_t lineNumber = 0);
23
24 // Create default implementations of constructors/assignment.
25 Assignment() = default;
26 Assignment(Assignment const& other) = default;
27 Assignment& operator=(Assignment const& other) = default;
28 Assignment(Assignment&& other) = default;
29 Assignment& operator=(Assignment&& other) = default;
30
36 std::string const& getVariableName() const;
37
44
51
58 Assignment substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
59
61
67 bool isIdentity() const;
68
69 friend std::ostream& operator<<(std::ostream& stream, Assignment const& assignment);
70
71 private:
72 // The variable written in this assignment.
74
75 // The expression that is assigned to the variable.
77};
78} // namespace prism
79} // namespace storm
storm::expressions::Variable const & getVariable() const
Retrieves the variable that is written to by this assignment.
Assignment(Assignment &&other)=default
std::string const & getVariableName() const
Retrieves the name of the variable that this assignment targets.
Assignment & operator=(Assignment &&other)=default
Assignment & operator=(Assignment const &other)=default
storm::expressions::Expression const & getExpression() const
Retrieves the expression that is assigned to the variable.
bool isIdentity() const
Checks whether the assignment is an identity (lhs equals rhs).
Assignment substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all variables in the assignment according to the given map.
Assignment(Assignment const &other)=default
friend std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)
Assignment substituteNonStandardPredicates() const
Assignment(storm::expressions::Variable const &variable, storm::expressions::Expression const &expression, std::string const &filename="", uint_fast64_t lineNumber=0)
Constructs an assignment using the given variable name and expression.
Definition Assignment.cpp:5
LocatedInformation(std::string const &filename, uint_fast64_t lineNumber)
Constructs a located information with the given filename and line number.