Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BinaryBooleanFunctionExpression.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace expressions {
9 public:
13 enum class OperatorType { And, Or, Xor, Implies, Iff };
14
24 BinaryBooleanFunctionExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& firstOperand,
25 std::shared_ptr<BaseExpression const> const& secondOperand, OperatorType operatorType);
26
27 // Instantiate constructors and assignments with their default implementations.
32
34
35 // Override base class methods.
36 virtual storm::expressions::OperatorType getOperator() const override;
37 virtual bool evaluateAsBool(Valuation const* valuation = nullptr) const override;
38 virtual std::shared_ptr<BaseExpression const> simplify() const override;
39 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
40 virtual bool isBinaryBooleanFunctionExpression() const override;
41
48
49 protected:
50 // Override base class method.
51 virtual void printToStream(std::ostream& stream) const override;
52
53 private:
54 // The operator of the expression.
55 OperatorType operatorType;
56};
57} // namespace expressions
58} // namespace storm
BinaryBooleanFunctionExpression & operator=(BinaryBooleanFunctionExpression &&)=delete
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
BinaryBooleanFunctionExpression(ExpressionManager const &manager, Type const &type, std::shared_ptr< BaseExpression const > const &firstOperand, std::shared_ptr< BaseExpression const > const &secondOperand, OperatorType operatorType)
Creates a binary boolean function expression with the given return type, operands and operator.
virtual bool evaluateAsBool(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
BinaryBooleanFunctionExpression & operator=(BinaryBooleanFunctionExpression const &other)=delete
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
OperatorType getOperatorType() const
Retrieves the operator associated with the expression.
BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression const &other)=default
BinaryBooleanFunctionExpression(BinaryBooleanFunctionExpression &&)=default
OperatorType
An enum type specifying the different operators applicable.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
virtual storm::expressions::OperatorType getOperator() const override
Retrieves the operator of a function application.
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.
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