Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BinaryExpression.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace expressions {
12 public:
21 BinaryExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& firstOperand,
22 std::shared_ptr<BaseExpression const> const& secondOperand);
23
24 // Instantiate constructors and assignments with their default implementations.
25 BinaryExpression(BinaryExpression const& other) = default;
29
30 virtual ~BinaryExpression() = default;
31
32 // Override base class methods.
33 virtual bool isFunctionApplication() const override;
34 virtual bool containsVariables() const override;
35 virtual uint_fast64_t getArity() const override;
36 virtual std::shared_ptr<BaseExpression const> getOperand(uint_fast64_t operandIndex) const override;
37 virtual void gatherVariables(std::set<storm::expressions::Variable>& variables) const override;
38
44 std::shared_ptr<BaseExpression const> const& getFirstOperand() const;
45
51 std::shared_ptr<BaseExpression const> const& getSecondOperand() const;
52
53 private:
54 // The first operand of the expression.
55 std::shared_ptr<BaseExpression const> firstOperand;
56
57 // The second operand of the expression.
58 std::shared_ptr<BaseExpression const> secondOperand;
59};
60} // namespace expressions
61} // namespace storm
BaseExpression(ExpressionManager const &manager, Type const &type)
Constructs a base expression with the given return type.
BinaryExpression & operator=(BinaryExpression const &other)=delete
virtual uint_fast64_t getArity() const override
Returns the arity of the expression.
virtual bool containsVariables() const override
Retrieves whether the expression contains a variable.
BinaryExpression(BinaryExpression const &other)=default
std::shared_ptr< BaseExpression const > const & getSecondOperand() const
Retrieves the second operand of the expression.
BinaryExpression & operator=(BinaryExpression &&)=delete
virtual std::shared_ptr< BaseExpression const > getOperand(uint_fast64_t operandIndex) const override
Retrieves the given operand from the expression.
std::shared_ptr< BaseExpression const > const & getFirstOperand() const
Retrieves the first operand of the expression.
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const override
Retrieves the set of all variables that appear in the expression.
virtual bool isFunctionApplication() const override
Checks if the expression is a function application (of any sort).
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.
BinaryExpression(BinaryExpression &&)=default
This class is responsible for managing a set of typed variables and all expressions using these varia...