Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Constant.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include <boost/optional.hpp>
6
9
10namespace storm {
11namespace jani {
12
13class Constant {
14 public:
18 Constant(std::string const& name, storm::expressions::Variable const& variable,
21
25 std::string const& getName() const;
26
30 bool isDefined() const;
31
36 void define(storm::expressions::Expression const& expression);
37
41 storm::expressions::Type const& getType() const;
42
46 bool isBooleanConstant() const;
47
51 bool isIntegerConstant() const;
52
56 bool isRealConstant() const;
57
62
67
71 bool hasConstraint() const;
72
77
82
83 private:
84 // The name of the constant.
85 std::string name;
86
87 // The expression variable associated with the constant.
89
90 // The expression defining the constant (if any).
91 storm::expressions::Expression definingExpression;
92
93 // The expression constraining possible values of the constant (if any).
94 storm::expressions::Expression constraintExpression;
95};
96
97} // namespace jani
98} // namespace storm
std::string const & getName() const
Retrieves the name of the constant.
Definition Constant.cpp:30
bool isRealConstant() const
Retrieves whether the constant is a real constant.
Definition Constant.cpp:59
void define(storm::expressions::Expression const &expression)
Defines the constant with the given expression.
Definition Constant.cpp:38
bool hasConstraint() const
Retrieves whether there is a constraint for the possible values of this constant.
Definition Constant.cpp:72
storm::expressions::Expression const & getConstraintExpression() const
Retrieves the expression that constraints the possible values of this constant (if any).
Definition Constant.cpp:76
storm::expressions::Type const & getType() const
Retrieves the type of the constant.
Definition Constant.cpp:47
void setConstraintExpression(storm::expressions::Expression const &expression)
Sets a constraint expression.
Definition Constant.cpp:81
bool isIntegerConstant() const
Retrieves whether the constant is an integer constant.
Definition Constant.cpp:55
bool isBooleanConstant() const
Retrieves whether the constant is a boolean constant.
Definition Constant.cpp:51
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the expression variable associated with this constant.
Definition Constant.cpp:63
bool isDefined() const
Retrieves whether the constant is defined in the sense that it has a defining expression.
Definition Constant.cpp:34
storm::expressions::Expression const & getExpression() const
Retrieves the expression that defines this constant (if any).
Definition Constant.cpp:67
LabParser.cpp.
Definition cli.cpp:18