diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-01-15 10:54:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 10:54:02 -0600 |
commit | da504025a3a77e9a3201af33ee6f96f937802807 (patch) | |
tree | cd23822d9806e5f0cc29fe871b0c1cf24a89921d /src/theory/fp | |
parent | 448ee080458373fbd3aabe97396101d98d68f0c0 (diff) |
Fix unsound double abs rewrite rule for FP (#2792)
Diffstat (limited to 'src/theory/fp')
-rw-r--r-- | src/theory/fp/theory_fp_rewriter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/theory/fp/theory_fp_rewriter.cpp b/src/theory/fp/theory_fp_rewriter.cpp index 21644161e..875471ded 100644 --- a/src/theory/fp/theory_fp_rewriter.cpp +++ b/src/theory/fp/theory_fp_rewriter.cpp @@ -76,9 +76,12 @@ namespace rewrite { RewriteResponse compactAbs (TNode node, bool) { Assert(node.getKind() == kind::FLOATINGPOINT_ABS); - if (node[0].getKind() == kind::FLOATINGPOINT_NEG || - node[0].getKind() == kind::FLOATINGPOINT_ABS) { - return RewriteResponse(REWRITE_AGAIN, node[0][0]); + if (node[0].getKind() == kind::FLOATINGPOINT_NEG + || node[0].getKind() == kind::FLOATINGPOINT_ABS) + { + Node ret = + NodeManager::currentNM()->mkNode(kind::FLOATINGPOINT_ABS, node[0][0]); + return RewriteResponse(REWRITE_AGAIN, ret); } return RewriteResponse(REWRITE_DONE, node); |