11 std::shared_ptr<BaseExpression const>
const& operand,
OperatorType operatorType)
17 return this->operatorType;
32 bool result = this->
getOperand()->evaluateAsBool(valuation);
42 std::shared_ptr<BaseExpression const> operandSimplified = this->
getOperand()->simplify();
45 if (operandSimplified->isTrue()) {
47 }
else if (operandSimplified->isFalse()) {
52 if (operandSimplified.get() == this->getOperand().get()) {
53 return this->shared_from_this();
55 return std::shared_ptr<BaseExpression>(
61 return visitor.
visit(*
this, data);
bool hasBooleanType() const
Retrieves whether the expression has a boolean type.
ExpressionManager const & getManager() const
Retrieves the manager responsible for this expression.
Type const & getType() const
Retrieves the type of the expression.
This class is responsible for managing a set of typed variables and all expressions using these varia...
virtual boost::any visit(IfThenElseExpression const &expression, boost::any const &data)=0
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 this expression.
OperatorType
An enum type specifying the different functions applicable.
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
virtual bool evaluateAsBool(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
UnaryBooleanFunctionExpression(ExpressionManager const &manager, Type const &type, std::shared_ptr< BaseExpression const > const &operand, OperatorType operatorType)
Creates a unary boolean function expression with the given return type, operand and operator.
virtual storm::expressions::OperatorType getOperator() const override
Retrieves the operator of a function application.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
virtual bool isUnaryBooleanFunctionExpression() const override
std::shared_ptr< BaseExpression const > const & getOperand() const
Retrieves the operand of the unary expression.
The base class of all valuations of variables.
#define STORM_LOG_THROW(cond, exception, message)