Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Label.cpp
Go to the documentation of this file.
3
4namespace storm {
5namespace prism {
6Label::Label(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename, uint_fast64_t lineNumber)
7 : LocatedInformation(filename, lineNumber), name(name), statePredicateExpression(statePredicateExpression) {
8 // Intentionally left empty.
9}
10
11std::string const& Label::getName() const {
12 return this->name;
13}
14
16 return this->statePredicateExpression;
17}
18
19Label Label::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const {
20 return Label(this->getName(), this->getStatePredicateExpression().substitute(substitution), this->getFilename(), this->getLineNumber());
21}
22
26
27std::ostream& operator<<(std::ostream& stream, Label const& label) {
28 stream << "label \"" << label.getName() << "\" = " << label.getStatePredicateExpression() << ";";
29 return stream;
30}
31
32ObservationLabel::ObservationLabel(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename,
33 uint_fast64_t lineNumber)
34 : Label(name, statePredicateExpression, filename, lineNumber) {
35 // Intentionally left empty.
36}
37
38ObservationLabel ObservationLabel::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const {
39 return ObservationLabel(this->getName(), this->getStatePredicateExpression().substitute(substitution), this->getFilename(), this->getLineNumber());
40}
41
45
46} // namespace prism
47} // namespace storm
storm::expressions::Expression const & getStatePredicateExpression() const
Retrieves the state predicate expression that is associated with this label.
Definition Label.cpp:15
Label substituteNonStandardPredicates() const
Definition Label.cpp:23
std::string const & getName() const
Retrieves the name that is associated with this label.
Definition Label.cpp:11
Label substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the expression of the label according to the given map.
Definition Label.cpp:19
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.
ObservationLabel substituteNonStandardPredicates() const
Definition Label.cpp:42
ObservationLabel substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the expression of the label according to the given map.
Definition Label.cpp:38
std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)
LabParser.cpp.
Definition cli.cpp:18