Skip to content

Commit de154d9

Browse files
authored
Merge pull request #6960 from tautschnig/bugfixes/1782-smt2-isinfinite
SMT2 back-end and solver: it's fp.isInfinite, not fp.isInf
2 parents ad2c6ca + 27ac304 commit de154d9

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

regression/cbmc/Float-no-simp4/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--floatbv --no-simplify
44
^EXIT=0$

regression/cbmc/Float4/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--floatbv
44
^EXIT=0$

regression/cbmc/Float8/smt.desc

+8
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

regression/cbmc/pragma_cprover_enable_all/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--object-bits 8 --bounds-check --pointer-check --pointer-primitive-check --div-by-zero-check --enum-range-check --unsigned-overflow-check --signed-overflow-check --pointer-overflow-check --float-overflow-check --conversion-check --undefined-shift-check --nan-check --pointer-primitive-check
44
^\[main\.pointer_primitives\.\d+\] line 77 pointer invalid in R_OK\(q, \(unsigned (long (long )?)?int\)1\): FAILURE$

src/solvers/smt2/smt2_conv.cpp

+1-1
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

+3-3
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)