SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
DuplicateSimplifier.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "BaseSimplifier.h"
4 #include "../ExpressionPool.h"
5 
6 namespace smtrat {
7 namespace expression {
8 namespace simplifier {
9 
11  const ExpressionContent* simplify(const NaryExpression& expr) const {
12  if (expr.type == IFF) return nullptr;
13  if (expr.type == XOR) return nullptr;
14  Expressions expressions(expr.expressions.begin(), expr.expressions.end());
15  auto it = std::unique(expressions.begin(), expressions.end());
16  if (it == expressions.end()) return nullptr;
17  expressions.erase(it, expressions.end());
18  return ExpressionPool::create(expr.type, std::move(expressions));
19  }
20  };
21 
22 }
23 }
24 }
const ExpressionContent * create(carl::Variable::Arg var)
std::vector< Expression > Expressions
Class to create the formulas for axioms.
const ExpressionContent * simplify(const NaryExpression &expr) const