if (node[0] == node[1]) {
return RewriteResponse(REWRITE_DONE, NodeManager::currentNM()->mkConst(true));
} else if (!isPreRewrite && (node[0] > node[1])) {
- Node normal = NodeManager::currentNM()->mkNode(kind::EQUAL,node[1],node[0]);
- return RewriteResponse(REWRITE_DONE, normal);
+ Node normal =
+ NodeManager::currentNM()->mkNode(kind::EQUAL, node[1], node[0]);
+ return RewriteResponse(REWRITE_DONE, normal);
} else {
return RewriteResponse(REWRITE_DONE, node);
}
(k == kind::FLOATINGPOINT_MIN_TOTAL) || (k == kind::FLOATINGPOINT_MAX_TOTAL));
#endif
if (node[0] == node[1]) {
- return RewriteResponse(REWRITE_DONE, node[0]);
+ return RewriteResponse(REWRITE_AGAIN, node[0]);
} else {
return RewriteResponse(REWRITE_DONE, node);
}
(childKind == kind::FLOATINGPOINT_ABS)) {
Node rewritten = NodeManager::currentNM()->mkNode(node.getKind(),node[0][0]);
- return RewriteResponse(REWRITE_AGAIN, rewritten);
+ return RewriteResponse(REWRITE_AGAIN_FULL, rewritten);
} else {
return RewriteResponse(REWRITE_DONE, node);
}
// Lift negation out of the LHS so it can be cancelled out
if (working[0].getKind() == kind::FLOATINGPOINT_NEG) {
NodeManager * nm = NodeManager::currentNM();
- working = nm->mkNode(kind::FLOATINGPOINT_NEG,
- nm->mkNode(kind::FLOATINGPOINT_REM, working[0][0], working[1]));
+ working = nm->mkNode(
+ kind::FLOATINGPOINT_NEG,
+ nm->mkNode(kind::FLOATINGPOINT_REM, working[0][0], working[1]));
+ // in contrast to other rewrites here, this requires rewrite again full
+ return RewriteResponse(REWRITE_AGAIN_FULL, working);
}
return RewriteResponse(REWRITE_DONE, working);
--- /dev/null
+; REQUIRES: symfpu
+; EXPECT: unsat
+; COMMAND-LINE: --sygus-out=status
+(set-logic ALL)
+(define-sort FP () (_ FloatingPoint 3 5))
+(synth-fun IC ((t FP)) Bool
+ ((Start Bool (
+ true
+ false
+ (fp.isZero StartFP)
+ (ite Start Start Start)
+ ))
+ (StartFP FP (
+ t
+ (fp.sub StartRM StartFP StartFP)
+ (fp.max StartFP StartFP)
+ ))
+ (StartRM RoundingMode
+ (RNE))
+))
+
+(constraint (not (IC (fp #b0 #b110 #b1001) )))
+(constraint (not (IC (fp #b1 #b101 #b1101) )))
+(constraint (not (IC (fp #b1 #b001 #b0110) )))
+(constraint (IC (fp #b0 #b001 #b0001) ))
+(check-synth)