Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BinaryRelationExpression.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace expressions {
9 public:
19 BinaryRelationExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& firstOperand,
20 std::shared_ptr<BaseExpression const> const& secondOperand, RelationType relationType);
21
22 // Instantiate constructors and assignments with their default implementations.
27
28 virtual ~BinaryRelationExpression() = default;
29
30 // Override base class methods.
31 virtual storm::expressions::OperatorType getOperator() const override;
32 virtual bool evaluateAsBool(Valuation const* valuation = nullptr) const override;
33 virtual std::shared_ptr<BaseExpression const> simplify() const override;
34 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
35 virtual bool isBinaryRelationExpression() const override;
36
43
44 protected:
45 // Override base class method.
46 virtual void printToStream(std::ostream& stream) const override;
47
48 private:
49 // The relation type of the expression.
50 RelationType relationType;
51};
52} // namespace expressions
53} // namespace storm
BinaryExpression(ExpressionManager const &manager, Type const &type, std::shared_ptr< BaseExpression const > const &firstOperand, std::shared_ptr< BaseExpression const > const &secondOperand)
Constructs a binary expression with the given return type and operands.
RelationType getRelationType() const
Retrieves the relation associated with the expression.
BinaryRelationExpression & operator=(BinaryRelationExpression &&)=delete
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
BinaryRelationExpression(BinaryRelationExpression const &other)=default
virtual storm::expressions::OperatorType getOperator() const override
Retrieves the operator of a function application.
BinaryRelationExpression(ExpressionManager const &manager, Type const &type, std::shared_ptr< BaseExpression const > const &firstOperand, std::shared_ptr< BaseExpression const > const &secondOperand, RelationType relationType)
Creates a binary relation expression with the given return type, operands and relation type.
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
BinaryRelationExpression & operator=(BinaryRelationExpression const &other)=delete
BinaryRelationExpression(BinaryRelationExpression &&)=default
virtual bool evaluateAsBool(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
This class is responsible for managing a set of typed variables and all expressions using these varia...
The base class of all valuations of variables.
Definition Valuation.h:15
RelationType
An enum type specifying the different relations applicable.