#include "theory/arith/arith_msum.h"
#include "theory/datatypes/datatypes_rewriter.h"
+#include "theory/quantifiers/term_util.h"
#include "theory/rewriter.h"
-#include "theory/strings/theory_strings_rewriter.h"
using namespace CVC4::kind;
using namespace std;
childChanged = nc != n[i] || childChanged;
children.push_back(nc);
}
+ // Some commutative operators have rewriters that are agnostic to order,
+ // thus, we sort here.
+ if (TermUtil::isComm(n.getKind()))
+ {
+ childChanged = true;
+ std::sort(children.begin(), children.end());
+ }
if (childChanged)
{
ret = NodeManager::currentNM()->mkNode(n.getKind(), children);
// simple ITE pulling
new_ret = extendedRewritePullIte(ret);
}
- // TODO (as part of #1343)
- // ( ~contains( x, y ) --> false ) => ( ~x=y --> false )
}
else if (ret.getKind() == kind::ITE)
{