Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BinaryExpression.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_EXPRESSIONS_BINARYEXPRESSION_H_
2#define STORM_STORAGE_EXPRESSIONS_BINARYEXPRESSION_H_
3
6
7namespace storm {
8namespace expressions {
13 public:
22 BinaryExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& firstOperand,
23 std::shared_ptr<BaseExpression const> const& secondOperand);
24
25 // Instantiate constructors and assignments with their default implementations.
26 BinaryExpression(BinaryExpression const& other) = default;
30
31 virtual ~BinaryExpression() = default;
32
33 // Override base class methods.
34 virtual bool isFunctionApplication() const override;
35 virtual bool containsVariables() const override;
36 virtual uint_fast64_t getArity() const override;
37 virtual std::shared_ptr<BaseExpression const> getOperand(uint_fast64_t operandIndex) const override;
38 virtual void gatherVariables(std::set<storm::expressions::Variable>& variables) const override;
39
45 std::shared_ptr<BaseExpression const> const& getFirstOperand() const;
46
52 std::shared_ptr<BaseExpression const> const& getSecondOperand() const;
53
54 private:
55 // The first operand of the expression.
56 std::shared_ptr<BaseExpression const> firstOperand;
57
58 // The second operand of the expression.
59 std::shared_ptr<BaseExpression const> secondOperand;
60};
61} // namespace expressions
62} // namespace storm
63
64#endif /* STORM_STORAGE_EXPRESSIONS_BINARYEXPRESSION_H_ */
The base class of all expression classes.
The base class of all binary expressions.
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(BinaryExpression &&)=default
This class is responsible for managing a set of typed variables and all expressions using these varia...
LabParser.cpp.
Definition cli.cpp:18