Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Label.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_LABEL_H_
2#define STORM_STORAGE_PRISM_LABEL_H_
3
4#include <map>
5
9
10namespace storm {
11namespace storage {
12namespace expressions {
13class Variable;
14}
15} // namespace storage
16} // namespace storm
17
18namespace storm {
19namespace prism {
20class Label : public LocatedInformation {
21 public:
31 Label(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename = "",
32 uint_fast64_t lineNumber = 0);
33
34 // Create default implementations of constructors/assignment.
35 Label() = default;
36 Label(Label const& other) = default;
37 Label& operator=(Label const& other) = default;
38 Label(Label&& other) = default;
39 Label& operator=(Label&& other) = default;
40
46 std::string const& getName() const;
47
54
61 Label substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
63
64 friend std::ostream& operator<<(std::ostream& stream, Label const& label);
65
66 private:
67 // The name of the label.
68 std::string name;
69
70 // A predicate that needs to be satisfied by states for the label to be attached.
71 storm::expressions::Expression statePredicateExpression;
72};
73
74class ObservationLabel : public Label {
75 public:
85 ObservationLabel(std::string const& name, storm::expressions::Expression const& statePredicateExpression, std::string const& filename = "",
86 uint_fast64_t lineNumber = 0);
87
88 // Create default implementations of constructors/assignment.
89 ObservationLabel() = default;
90 ObservationLabel(ObservationLabel const& other) = default;
94
101 ObservationLabel substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
103};
104
105} // namespace prism
106} // namespace storm
107
108#endif /* STORM_STORAGE_PRISM_LABEL_H_ */
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 & 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
ObservationLabel(ObservationLabel &&other)=default
ObservationLabel substituteNonStandardPredicates() const
Definition Label.cpp:42
ObservationLabel & operator=(ObservationLabel &&other)=default
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
LabParser.cpp.
Definition cli.cpp:18