Skip to content

Commit 0a60788

Browse files
author
martin
committed
Remove clashing parts of my previous implementation.
1 parent 975b5a3 commit 0a60788

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Author: Daniel Kroening, [email protected]
2020
#include <util/ieee_float.h>
2121
#include <util/base_type.h>
2222
#include <util/string2int.h>
23+
#include <util/invariant.h>
2324

2425
#include <ansi-c/string_constant.h>
2526

@@ -34,7 +35,6 @@ Author: Daniel Kroening, [email protected]
3435

3536
// Mark different kinds of error condition
3637
// General
37-
#define UNREACHABLE throw "Supposidly unreachable location reached"
3838
#define PARSERERROR(S) throw S
3939

4040
// Error checking the expression type
@@ -45,7 +45,7 @@ Author: Daniel Kroening, [email protected]
4545
#define UNEXPECTEDCASE(S) throw "Unexpected case: " S
4646

4747
// General todos
48-
#define TODO(S) throw "TODO: " S
48+
#define SMT2_TODO(S) throw "TODO: " S
4949

5050
void smt2_convt::print_assignment(std::ostream &out) const
5151
{
@@ -952,7 +952,7 @@ void smt2_convt::convert_expr(const exprt &expr)
952952
out << "))"; // mk-, let
953953
}
954954
else
955-
TODO("bitnot for vectors");
955+
SMT2_TODO("bitnot for vectors");
956956
}
957957
else
958958
{
@@ -1017,7 +1017,7 @@ void smt2_convt::convert_expr(const exprt &expr)
10171017
out << "))"; // mk-, let
10181018
}
10191019
else
1020-
TODO("unary minus for vector");
1020+
SMT2_TODO("unary minus for vector");
10211021
}
10221022
else
10231023
{
@@ -1363,7 +1363,7 @@ void smt2_convt::convert_expr(const exprt &expr)
13631363
assert(expr.operands().size()==1);
13641364

13651365
out << "false"; // TODO
1366-
TODO("pointer_object_has_type not implemented");
1366+
SMT2_TODO("pointer_object_has_type not implemented");
13671367
}
13681368
else if(expr.id()==ID_string_constant)
13691369
{
@@ -1432,7 +1432,7 @@ void smt2_convt::convert_expr(const exprt &expr)
14321432
convert_expr(tmp);
14331433
out << ")) bin1)"; // bvlshr, extract, =
14341434
#endif
1435-
TODO("smt2: extractbits with non-constant index");
1435+
SMT2_TODO("smt2: extractbits with non-constant index");
14361436
}
14371437
}
14381438
else if(expr.id()==ID_replication)
@@ -1944,7 +1944,7 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
19441944
// This conversion is non-trivial as it requires creating a
19451945
// new bit-vector variable and then asserting that it converts
19461946
// to the required floating-point number.
1947-
TODO("bit-wise floatbv to bv");
1947+
SMT2_TODO("bit-wise floatbv to bv");
19481948
}
19491949
else
19501950
{
@@ -2017,7 +2017,7 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
20172017
out << "(_ bv" << i << " " << to_width << ")";
20182018
}
20192019
else
2020-
TODO("can't convert non-constant integer to bitvector");
2020+
SMT2_TODO("can't convert non-constant integer to bitvector");
20212021
}
20222022
else if(src_type.id()==ID_struct) // flatten a struct to a bit-vector
20232023
{
@@ -2207,7 +2207,7 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
22072207
}
22082208
else if(dest_type.id()==ID_range)
22092209
{
2210-
TODO("range typecast");
2210+
SMT2_TODO("range typecast");
22112211
}
22122212
else if(dest_type.id()==ID_floatbv)
22132213
{
@@ -3031,11 +3031,11 @@ void smt2_convt::convert_floatbv_plus(const ieee_float_op_exprt &expr)
30313031
}
30323032
else if(type.id()==ID_complex)
30333033
{
3034-
TODO("+ for floatbv complex");
3034+
SMT2_TODO("+ for floatbv complex");
30353035
}
30363036
else if(type.id()==ID_vector)
30373037
{
3038-
TODO("+ for floatbv vector");
3038+
SMT2_TODO("+ for floatbv vector");
30393039
}
30403040
else
30413041
UNEXPECTEDCASE("unsupported type for +: "+type.id_string());
@@ -3093,7 +3093,7 @@ void smt2_convt::convert_minus(const minus_exprt &expr)
30933093
}
30943094
else if(expr.type().id()==ID_pointer)
30953095
{
3096-
TODO("pointer subtraction");
3096+
SMT2_TODO("pointer subtraction");
30973097
}
30983098
else if(expr.type().id()==ID_vector)
30993099
{
@@ -3527,7 +3527,7 @@ void smt2_convt::convert_with(const with_exprt &expr)
35273527
typecast_exprt index_tc(index, expr_type);
35283528

35293529
// TODO: SMT2-ify
3530-
TODO("SMT2-ify");
3530+
SMT2_TODO("SMT2-ify");
35313531
out << "(bvor ";
35323532
out << "(band ";
35333533

@@ -3565,7 +3565,7 @@ void smt2_convt::convert_update(const exprt &expr)
35653565
{
35663566
assert(expr.operands().size()==3);
35673567

3568-
TODO("smt2_convt::convert_update to be implemented");
3568+
SMT2_TODO("smt2_convt::convert_update to be implemented");
35693569
}
35703570

35713571
void smt2_convt::convert_index(const index_exprt &expr)
@@ -3651,7 +3651,7 @@ void smt2_convt::convert_index(const index_exprt &expr)
36513651
mp_integer index_int;
36523652
if(to_integer(expr.index(), index_int))
36533653
{
3654-
TODO("non-constant index on vectors");
3654+
SMT2_TODO("non-constant index on vectors");
36553655
}
36563656
else
36573657
{
@@ -3662,7 +3662,7 @@ void smt2_convt::convert_index(const index_exprt &expr)
36623662
}
36633663
else
36643664
{
3665-
TODO("index on vectors");
3665+
SMT2_TODO("index on vectors");
36663666
}
36673667
}
36683668
else

0 commit comments

Comments
 (0)