7 #include <boost/variant.hpp>
13 namespace expression {
19 std::optional<VisitorFunction>
mPre;
20 std::optional<VisitorFunction>
mPost;
30 if (
mPre) (*mPre)(expression);
32 if (
mPost) (*mPost)(expression);
63 std::optional<VisitorFunction>
mPre;
64 std::optional<VisitorFunction>
mPost;
70 if (tmp !=
nullptr) content = tmp;
74 if (tmp !=
nullptr) content = tmp;
78 if (tmp !=
nullptr) content = tmp;
80 if (content == _content)
return nullptr;
104 if (c ==
nullptr && t ==
nullptr && e ==
nullptr)
return nullptr;
112 if (e ==
nullptr)
return nullptr;
117 if (e ==
nullptr)
return nullptr;
123 if (l ==
nullptr && r ==
nullptr)
return nullptr;
130 bool changed =
false;
133 if (tmp ==
nullptr) res.push_back(e);
139 if (!changed)
return nullptr;
const ExpressionContent * operator()(const NaryExpression &expr)
void setPost(const VisitorFunction &f)
const ExpressionContent * operator()(carl::Variable::Arg)
std::optional< VisitorFunction > mPost
const ExpressionContent * operator()(const QuantifierExpression &expr)
void setPre(const VisitorFunction &f)
std::optional< VisitorFunction > mPre
std::function< const ExpressionContent *(const Expression &)> VisitorFunction
const ExpressionContent * operator()(const BinaryExpression &expr)
const ExpressionContent * internalVisit(const ExpressionContent *_content)
const ExpressionContent * operator()(const ITEExpression &expr)
const ExpressionContent * operator()(const UnaryExpression &expr)
Expression visit(const Expression &expression)
const ExpressionContent * create(carl::Variable::Arg var)
void operator()(const UnaryExpression &expr)
void operator()(const BinaryExpression &expr)
std::optional< VisitorFunction > mPre
void setPre(const VisitorFunction &f)
std::optional< VisitorFunction > mPost
void visit(const Expression &expression)
std::function< void(const Expression &)> VisitorFunction
void operator()(carl::Variable::Arg)
void operator()(const QuantifierExpression &expr)
void operator()(const NaryExpression &expr)
void setPost(const VisitorFunction &f)
void operator()(const ITEExpression &expr)
const ExpressionContent * mContent
const ExpressionContent & getContent() const
std::vector< Expression > Expressions
Class to create the formulas for axioms.
expression::Expression Expression
std::vector< carl::Variable > variables