summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-03-09 16:18:43 -0500
committerGitHub <noreply@github.com>2020-03-09 16:18:43 -0500
commitdf3fa17542b8bc3f455cb80ede4936b25a44fe5a (patch)
treef77f5337e84c234fa5650af003099a810baf23cc /src
parentc74e9c8ba946387616345b70d63028896a0022c2 (diff)
Fix type issue in arith rewrite equality (#3972)
Fixes #3952 and fixes #3940 and fixes #3941 and fixes #3968.
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/theory_arith_private.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp
index 786296b15..6c226bb61 100644
--- a/src/theory/arith/theory_arith_private.cpp
+++ b/src/theory/arith/theory_arith_private.cpp
@@ -1301,18 +1301,21 @@ Node TheoryArithPrivate::ppRewriteTerms(TNode n) {
Node TheoryArithPrivate::ppRewrite(TNode atom) {
Debug("arith::preprocess") << "arith::preprocess() : " << atom << endl;
- if (atom.getKind() == kind::EQUAL && options::arithRewriteEq()) {
- Node leq = NodeBuilder<2>(kind::LEQ) << atom[0] << atom[1];
- Node geq = NodeBuilder<2>(kind::GEQ) << atom[0] << atom[1];
- leq = ppRewriteTerms(leq);
- geq = ppRewriteTerms(geq);
- Node rewritten = Rewriter::rewrite(leq.andNode(geq));
- Debug("arith::preprocess") << "arith::preprocess() : returning "
- << rewritten << endl;
- return rewritten;
- } else {
- return ppRewriteTerms(atom);
+ if (options::arithRewriteEq())
+ {
+ if (atom.getKind() == kind::EQUAL && atom[0].getType().isReal())
+ {
+ Node leq = NodeBuilder<2>(kind::LEQ) << atom[0] << atom[1];
+ Node geq = NodeBuilder<2>(kind::GEQ) << atom[0] << atom[1];
+ leq = ppRewriteTerms(leq);
+ geq = ppRewriteTerms(geq);
+ Node rewritten = Rewriter::rewrite(leq.andNode(geq));
+ Debug("arith::preprocess")
+ << "arith::preprocess() : returning " << rewritten << endl;
+ return rewritten;
+ }
}
+ return ppRewriteTerms(atom);
}
Theory::PPAssertStatus TheoryArithPrivate::ppAssert(TNode in, SubstitutionMap& outSubstitutions) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback