Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Formula.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_FORMULA_H_
2#define STORM_STORAGE_PRISM_FORMULA_H_
3
4#include <boost/optional.hpp>
5#include <map>
6
11
12namespace storm {
13namespace prism {
15 public:
24 Formula(storm::expressions::Variable const& variable, storm::expressions::Expression const& expression, std::string const& filename = "",
25 uint_fast64_t lineNumber = 0);
26
35 Formula(std::string const& name, storm::expressions::Expression const& expression, std::string const& filename = "", uint_fast64_t lineNumber = 0);
36
44 Formula(std::string const& name, std::string const& filename = "", uint_fast64_t lineNumber = 0);
45
46 // Create default implementations of constructors/assignment.
47 Formula() = default;
48 Formula(Formula const& other) = default;
49 Formula& operator=(Formula const& other) = default;
50 Formula(Formula&& other) = default;
51 Formula& operator=(Formula&& other) = default;
52
58 std::string const& getName() const;
59
64 bool hasExpressionVariable() const;
65
72
79
85 storm::expressions::Type const& getType() const;
86
94 Formula substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
96
97 friend std::ostream& operator<<(std::ostream& stream, Formula const& formula);
98
99 private:
100 // The name of the formula.
101 std::string name;
102
103 // Expression variable that is used as a placeholder for this formula
104 boost::optional<storm::expressions::Variable> variable;
105
106 // A predicate that needs to be satisfied by states for the label to be attached.
108};
109} // namespace prism
110} // namespace storm
111
112#endif /* STORM_STORAGE_PRISM_FORMULA_H_ */
Formula(Formula const &other)=default
Formula substituteNonStandardPredicates() const
Definition Formula.cpp:51
Formula & operator=(Formula &&other)=default
friend std::ostream & operator<<(std::ostream &stream, Formula const &formula)
Definition Formula.cpp:60
storm::expressions::Expression const & getExpression() const
Retrieves the expression that is associated with this formula.
Definition Formula.cpp:32
bool hasExpressionVariable() const
Retrieves wheter a placeholder variable is used in expressions to represent this formula.
Definition Formula.cpp:24
Formula substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all variables in the expression of the formula according to the given map.
Definition Formula.cpp:42
Formula(Formula &&other)=default
std::string const & getName() const
Retrieves the name that is associated with this formula.
Definition Formula.cpp:20
Formula & operator=(Formula const &other)=default
storm::expressions::Type const & getType() const
Retrieves the return type of the formula, i.e., the return-type of the defining expression.
Definition Formula.cpp:36
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the placeholder variable that is used in expressions to represent this formula.
Definition Formula.cpp:28
LabParser.cpp.
Definition cli.cpp:18