summaryrefslogtreecommitdiff
path: root/src/theory/fp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-01-15 10:54:02 -0600
committerGitHub <noreply@github.com>2019-01-15 10:54:02 -0600
commitda504025a3a77e9a3201af33ee6f96f937802807 (patch)
treecd23822d9806e5f0cc29fe871b0c1cf24a89921d /src/theory/fp
parent448ee080458373fbd3aabe97396101d98d68f0c0 (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.cpp9
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);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback