Skip to content

Commit f04d40a

Browse files
author
Daniel Kroening
committed
removed dependency on linking module
1 parent d03aa42 commit f04d40a

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

src/solvers/smt1/smt1_conv.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ Author: Daniel Kroening, [email protected]
2121

2222
#include <langapi/language_util.h>
2323

24-
#include <linking/zero_initializer.h>
25-
2624
#include <solvers/flattening/boolbv_width.h>
2725
#include <solvers/flattening/pointer_logic.h>
2826
#include <solvers/flattening/flatten_byte_operators.h>
@@ -1555,7 +1553,7 @@ void smt1_convt::convert_typecast(
15551553
convert_expr(src, true);
15561554
out << " ";
15571555
convert_expr(
1558-
zero_initializer(src_type, expr.source_location(), ns),
1556+
from_integer(0, src_type),
15591557
true);
15601558
out << "))";
15611559
}
@@ -1584,7 +1582,7 @@ void smt1_convt::convert_typecast(
15841582
convert_expr(src, true);
15851583
out << " ";
15861584
convert_expr(
1587-
zero_initializer(src_type, expr.source_location(), ns),
1585+
from_integer(0, src_type),
15881586
true);
15891587
out << ")) "; // not, =
15901588
out << " bv1[" << to_width << "]";

src/solvers/smt2/smt2_conv.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Author: Daniel Kroening, [email protected]
2222

2323
#include <langapi/language_util.h>
2424

25-
#include <linking/zero_initializer.h>
26-
2725
#include <solvers/flattening/boolbv_width.h>
2826
#include <solvers/flattening/flatten_byte_operators.h>
2927
#include <solvers/flattening/c_bit_field_replacement_type.h>
@@ -2089,8 +2087,7 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
20892087
out << "(not (= ";
20902088
convert_expr(src);
20912089
out << " ";
2092-
convert_expr(
2093-
zero_initializer(src_type, expr.source_location(), ns));
2090+
convert_expr(from_integer(0, src_type));
20942091
out << "))";
20952092
}
20962093
else if(src_type.id()==ID_floatbv)
@@ -2116,8 +2113,7 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
21162113
out << "(not (= ";
21172114
convert_expr(src);
21182115
out << " ";
2119-
convert_expr(
2120-
zero_initializer(src_type, expr.source_location(), ns));
2116+
convert_expr(from_integer(0, src_type));
21212117
out << ")) "; // not, =
21222118
out << " (_ bv1 " << to_width << ")";
21232119
out << " (_ bv0 " << to_width << ")";

src/util/simplify_expr.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Author: Daniel Kroening, [email protected]
3232
#include "endianness_map.h"
3333
#include "simplify_utils.h"
3434

35-
#include <linking/zero_initializer.h>
36-
3735
// #define DEBUGX
3836

3937
#ifdef DEBUGX
@@ -277,8 +275,7 @@ bool simplify_exprt::simplify_typecast(exprt &expr)
277275
inequality.id(op_type.id()==ID_floatbv?ID_ieee_float_notequal:ID_notequal);
278276
inequality.add_source_location()=expr.source_location();
279277
inequality.lhs()=expr.op0();
280-
inequality.rhs()=
281-
zero_initializer(expr.op0().type(), expr.source_location(), ns);
278+
inequality.rhs()=from_integer(0, op_type);
282279
assert(inequality.rhs().is_not_nil());
283280
simplify_node(inequality);
284281
expr.swap(inequality);
@@ -294,8 +291,7 @@ bool simplify_exprt::simplify_typecast(exprt &expr)
294291
inequality.id(op_type.id()==ID_floatbv?ID_ieee_float_notequal:ID_notequal);
295292
inequality.add_source_location()=expr.source_location();
296293
inequality.lhs()=expr.op0();
297-
inequality.rhs()=
298-
zero_initializer(expr.op0().type(), expr.source_location(), ns);
294+
inequality.rhs()=from_integer(0, op_type);
299295
assert(inequality.rhs().is_not_nil());
300296
simplify_node(inequality);
301297
expr.op0()=inequality;

0 commit comments

Comments
 (0)