Skip to content

Commit 029584c

Browse files
committed
SMT2 back-end and solver: it's fp.isInfinite, not fp.isInf
We already had gotten this right in one place, but got in wrong in 5 other places. Fixes: #1782
1 parent a0d4239 commit 029584c

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

regression/cbmc/Float8/smt.desc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE smt-backend
2+
main.c
3+
--smt2 --fpa
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

src/solvers/smt2/smt2_conv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ void smt2_convt::convert_expr(const exprt &expr)
18591859
convert_expr(isfinite_expr.op());
18601860
out << "))";
18611861

1862-
out << "(not (fp.isInf ";
1862+
out << "(not (fp.isInfinite ";
18631863
convert_expr(isfinite_expr.op());
18641864
out << "))";
18651865

src/solvers/smt2/smt2_parser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,14 +1245,14 @@ void smt2_parsert::setup_expressions()
12451245
return unary_predicate_exprt(ID_isnan, op[0]);
12461246
};
12471247

1248-
expressions["fp.isInf"] = [this] {
1248+
expressions["fp.isInfinite"] = [this] {
12491249
auto op = operands();
12501250

12511251
if(op.size() != 1)
1252-
throw error("fp.isInf takes one operand");
1252+
throw error("fp.isInfinite takes one operand");
12531253

12541254
if(op[0].type().id() != ID_floatbv)
1255-
throw error("fp.isInf takes FloatingPoint operand");
1255+
throw error("fp.isInfinite takes FloatingPoint operand");
12561256

12571257
return unary_predicate_exprt(ID_isinf, op[0]);
12581258
};

0 commit comments

Comments
 (0)