22 : name(name), variable(variable), definingExpression(definingExpression), constraintExpression(constraintExpression) {
25 "The constant '" << name <<
"' was set to '" << definingExpression <<
"' which violates the constraint given for this constant: '"
26 << constraintExpression <<
"'.");
41 "The constant '" << name <<
"' was set to '" << expression <<
"' which violates the constraint given for this constant: '"
42 << constraintExpression <<
"'.");
44 this->definingExpression = expression;
69 return definingExpression;
78 return constraintExpression;
84 "The constant '" << name <<
"' was set to '" << definingExpression <<
"' which violates the constraint given for this constant: '"
85 << expression <<
"'.");
87 constraintExpression = expression;
Expression changeManager(ExpressionManager const &newExpressionManager) const
Converts the expression to an expression over the variables of the provided expression manager.
bool isInitialized() const
Checks whether the object encapsulates a base-expression.
std::shared_ptr< ExpressionManager > clone() const
Creates a new expression manager with the same set of variables.
bool isBooleanType() const
Checks whether this type is a boolean type.
bool isIntegerType() const
Checks whether this type is an integral type.
bool isRationalType() const
Checks whether this type is a rational type.
ExpressionManager const & getManager() const
Retrieves the manager responsible for this variable.
Type const & getType() const
Retrieves the type of the variable.
storm::expressions::Expression getExpression() const
Retrieves an expression that represents the variable.
std::string const & getName() const
Retrieves the name of the variable.
std::string const & getName() const
Retrieves the name of the constant.
bool isRealConstant() const
Retrieves whether the constant is a real constant.
void define(storm::expressions::Expression const &expression)
Defines the constant with the given expression.
bool hasConstraint() const
Retrieves whether there is a constraint for the possible values of this constant.
storm::expressions::Expression const & getConstraintExpression() const
Retrieves the expression that constraints the possible values of this constant (if any).
storm::expressions::Type const & getType() const
Retrieves the type of the constant.
void setConstraintExpression(storm::expressions::Expression const &expression)
Sets a constraint expression.
Constant(std::string const &name, storm::expressions::Variable const &variable, storm::expressions::Expression const &definingExpression=storm::expressions::Expression(), storm::expressions::Expression const &constraintExpression=storm::expressions::Expression())
Creates a constant.
bool isIntegerConstant() const
Retrieves whether the constant is an integer constant.
bool isBooleanConstant() const
Retrieves whether the constant is a boolean constant.
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the expression variable associated with this constant.
bool isDefined() const
Retrieves whether the constant is defined in the sense that it has a defining expression.
storm::expressions::Expression const & getExpression() const
Retrieves the expression that defines this constant (if any).
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
bool checkDefiningExpression(storm::expressions::Variable const &var, storm::expressions::Expression const &definingExpression, storm::expressions::Expression const &constaintExpression)
std::unique_ptr< storm::solver::SmtSolver > getSmtSolver(storm::expressions::ExpressionManager &manager)