Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Label.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
7
8namespace storm {
9namespace storage {
10namespace expressions {
11class Variable;
12}
13} // namespace storage
14} // namespace storm
15
16namespace storm {
17namespace prism {
18class Label : public LocatedInformation {
19 public:
29 Label(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename = "",
30 uint_fast64_t lineNumber = 0);
31
32 // Create default implementations of constructors/assignment.
33 Label() = default;
34 Label(Label const& other) = default;
35 Label& operator=(Label const& other) = default;
36 Label(Label&& other) = default;
37 Label& operator=(Label&& other) = default;
38
44 std::string const& getName() const;
45
52
59 Label substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
61
62 friend std::ostream& operator<<(std::ostream& stream, Label const& label);
63
64 private:
65 // The name of the label.
66 std::string name;
67
68 // A predicate that needs to be satisfied by states for the label to be attached.
69 storm::expressions::Expression statePredicateExpression;
70};
71
72class ObservationLabel : public Label {
73 public:
83 ObservationLabel(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename = "",
84 uint_fast64_t lineNumber = 0);
85
86 // Create default implementations of constructors/assignment.
87 ObservationLabel() = default;
88 ObservationLabel(ObservationLabel const& other) = default;
92
99 ObservationLabel substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
101};
102
103} // namespace prism
104} // 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
friend std::ostream & operator<<(std::ostream &stream, Label const &label)
Definition Label.cpp:27
Label(std::string const &name, storm::expressions::Expression const &statePredicateExpression, std::string const &filename="", uint_fast64_t lineNumber=0)
Creates a label with the given name and state predicate expression.
Definition Label.cpp:6
Label & operator=(Label &&other)=default
Label(Label &&other)=default
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
Label(Label const &other)=default
Label & operator=(Label const &other)=default
LocatedInformation(std::string const &filename, uint_fast64_t lineNumber)
Constructs a located information with the given filename and line number.
ObservationLabel(ObservationLabel &&other)=default
ObservationLabel substituteNonStandardPredicates() const
Definition Label.cpp:42
ObservationLabel & operator=(ObservationLabel &&other)=default
ObservationLabel(std::string const &name, storm::expressions::Expression const &statePredicateExpression, std::string const &filename="", uint_fast64_t lineNumber=0)
Creates a label with the given name and state predicate expression.
Definition Label.cpp:32
ObservationLabel(ObservationLabel const &other)=default
ObservationLabel & operator=(ObservationLabel const &other)=default
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