Skip to content

Commit 50a4004

Browse files
committed
Debugging
1 parent e57229d commit 50a4004

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

regression/cbmc/SIMD1/program.desc

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

regression/cbmc/SIMD1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE broken-smt-backend
22
main.c
3-
--stop-on-fail
3+
--trace
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$

src/solvers/flattening/bv_utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Author: Daniel Kroening, [email protected]
88

99
#include "bv_utils.h"
1010

11+
#include <iostream>
12+
1113
bvt bv_utilst::build_constant(const mp_integer &n, std::size_t width)
1214
{
1315
std::string n_str=integer2binary(n, width);
@@ -382,6 +384,8 @@ bvt bv_utilst::saturating_add_sub(
382384
result.reserve(add_sub_result.size());
383385
if(rep == representationt::UNSIGNED)
384386
{
387+
std::cerr << "Unsigned saturating arithmetic over " << add_sub_result.size()
388+
<< " bits with subtract=" << subtract << std::endl;
385389
// An unsigned overflow has occurred when carry_out is not equal to
386390
// subtract: addition with a carry-out means an overflow beyond the maximum
387391
// representable value, subtraction without a carry-out means an underflow
@@ -396,6 +400,8 @@ bvt bv_utilst::saturating_add_sub(
396400
}
397401
else
398402
{
403+
std::cerr << "Signed saturating arithmetic over " << add_sub_result.size()
404+
<< " bits with subtract=" << subtract << std::endl;
399405
// A signed overflow beyond the maximum representable value occurs when
400406
// adding two positive numbers and the wrap-around result being negative, or
401407
// when subtracting a negative from a positive number (and, again, the

0 commit comments

Comments
 (0)