Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
PredicateExpression.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
5
6namespace storm {
7namespace expressions {
12 public:
14
15 PredicateExpression(ExpressionManager const &manager, Type const &type, std::vector<std::shared_ptr<BaseExpression const>> const &operands,
16 PredicateType predicateType);
17
18 // Instantiate constructors and assignments with their default implementations.
20
22
24
26
27 virtual ~PredicateExpression() = default;
28
29 // Override base class methods.
30 virtual storm::expressions::OperatorType getOperator() const override;
31
32 virtual bool evaluateAsBool(Valuation const *valuation = nullptr) const override;
33
34 virtual std::shared_ptr<BaseExpression const> simplify() const override;
35
36 virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override;
37
38 virtual bool isPredicateExpression() const override;
39
40 virtual bool isFunctionApplication() const override;
41
42 virtual bool containsVariables() const override;
43
44 virtual uint_fast64_t getArity() const override;
45
46 virtual std::shared_ptr<BaseExpression const> getOperand(uint_fast64_t operandIndex) const override;
47
48 virtual void gatherVariables(std::set<storm::expressions::Variable> &variables) const override;
49
56
57 protected:
58 // Override base class method.
59 virtual void printToStream(std::ostream &stream) const override;
60
61 private:
62 PredicateType predicate;
63 std::vector<std::shared_ptr<BaseExpression const>> operands;
64};
65} // namespace expressions
66} // namespace storm
The base class of all expression classes.
This class is responsible for managing a set of typed variables and all expressions using these varia...
The base class of all binary expressions.
PredicateExpression & operator=(PredicateExpression &&)=delete
virtual bool evaluateAsBool(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
PredicateExpression(PredicateExpression const &other)=default
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
PredicateExpression & operator=(PredicateExpression const &other)=delete
PredicateExpression(PredicateExpression &&)=default
virtual std::shared_ptr< BaseExpression const > getOperand(uint_fast64_t operandIndex) const override
Retrieves the given operand from the expression.
PredicateType getPredicateType() const
Retrieves the relation associated with the expression.
virtual uint_fast64_t getArity() const override
Returns the arity of the expression.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const override
Retrieves the set of all variables that appear in the expression.
virtual bool containsVariables() const override
Retrieves whether the expression contains a variable.
virtual bool isPredicateExpression() const override
virtual bool isFunctionApplication() const override
Checks if the expression is a function application (of any sort).
virtual storm::expressions::OperatorType getOperator() const override
Retrieves the operator of a function application.
The base class of all valuations of variables.
Definition Valuation.h:16
LabParser.cpp.
Definition cli.cpp:18