@@ -127,7 +127,6 @@ namespace smt {
127
127
#if 0
128
128
// possible fix for #2182, but effect of fix needs to be checked.
129
129
if (idx < m_bits[v_arg].size()) {
130
- //std::cout << mk_pp(n, get_manager()) << "\n";
131
130
ctx.mk_th_axiom(get_id(), m_bits[v_arg][idx], literal(bv, true));
132
131
ctx.mk_th_axiom(get_id(), ~m_bits[v_arg][idx], literal(bv, false));
133
132
}
@@ -162,7 +161,7 @@ namespace smt {
162
161
e = ctx.get_enode (n);
163
162
}
164
163
else {
165
- e = ctx.mk_enode (n, !m_params .m_bv_reflect , false , m_params .m_bv_cc );
164
+ e = ctx.mk_enode (n, !params () .m_bv_reflect , false , params () .m_bv_cc );
166
165
mk_var (e);
167
166
}
168
167
// SASSERT(e->get_th_var(get_id()) != null_theory_var);
@@ -179,7 +178,7 @@ namespace smt {
179
178
}
180
179
181
180
enode * theory_bv::get_arg (enode * n, unsigned idx) {
182
- if (m_params .m_bv_reflect ) {
181
+ if (params () .m_bv_reflect ) {
183
182
return n->get_arg (idx);
184
183
}
185
184
else {
@@ -933,15 +932,15 @@ namespace smt {
933
932
case OP_BSMOD0: return false ;
934
933
case OP_MKBV: internalize_mkbv (term); return true ;
935
934
case OP_INT2BV:
936
- if (m_params .m_bv_enable_int2bv2int ) {
935
+ if (params () .m_bv_enable_int2bv2int ) {
937
936
internalize_int2bv (term);
938
937
}
939
- return m_params .m_bv_enable_int2bv2int ;
938
+ return params () .m_bv_enable_int2bv2int ;
940
939
case OP_BV2INT:
941
- if (m_params .m_bv_enable_int2bv2int ) {
940
+ if (params () .m_bv_enable_int2bv2int ) {
942
941
internalize_bv2int (term);
943
942
}
944
- return m_params .m_bv_enable_int2bv2int ;
943
+ return params () .m_bv_enable_int2bv2int ;
945
944
default :
946
945
TRACE (" bv_op" , tout << " unsupported operator: " << mk_ll_pp (term, get_manager ()) << " \n " ;);
947
946
UNREACHABLE ();
@@ -985,7 +984,7 @@ namespace smt {
985
984
/* relevancy() is true and m_bv_lazy_le is false (the default configuration). */ \
986
985
/* So, we need to check also the m_bv_lazy_le flag here. */ \
987
986
/* Maybe, we should rename the le_atom to bridge_atom, and m_bv_lazy_le option to m_bv_lazy_bridge. */ \
988
- if (!ctx.relevancy () || !m_params .m_bv_lazy_le ) { \
987
+ if (!ctx.relevancy () || !params () .m_bv_lazy_le ) { \
989
988
ctx.mk_th_axiom (get_id (), l, ~def); \
990
989
ctx.mk_th_axiom (get_id (), ~l, def); \
991
990
} \
@@ -1018,7 +1017,7 @@ namespace smt {
1018
1017
le_atom * a = new (get_region ()) le_atom (l, def);
1019
1018
insert_bv2a (l.var (), a);
1020
1019
m_trail_stack.push (mk_atom_trail (l.var ()));
1021
- if (!ctx.relevancy () || !m_params .m_bv_lazy_le ) {
1020
+ if (!ctx.relevancy () || !params () .m_bv_lazy_le ) {
1022
1021
ctx.mk_th_axiom (get_id (), l, ~def);
1023
1022
ctx.mk_th_axiom (get_id (), ~l, def);
1024
1023
}
@@ -1120,14 +1119,14 @@ namespace smt {
1120
1119
// based on the number of bits used by the arguments.
1121
1120
//
1122
1121
bool theory_bv::approximate_term (app* n) {
1123
- if (m_params .m_bv_blast_max_size == INT_MAX) {
1122
+ if (params () .m_bv_blast_max_size == INT_MAX) {
1124
1123
return false ;
1125
1124
}
1126
1125
unsigned num_args = n->get_num_args ();
1127
1126
for (unsigned i = 0 ; i <= num_args; i++) {
1128
1127
expr* arg = (i == num_args)?n:n->get_arg (i);
1129
1128
sort* s = get_manager ().get_sort (arg);
1130
- if (m_util.is_bv_sort (s) && m_util.get_bv_size (arg) > m_params .m_bv_blast_max_size ) {
1129
+ if (m_util.is_bv_sort (s) && m_util.get_bv_size (arg) > params () .m_bv_blast_max_size ) {
1131
1130
if (!m_approximates_large_bvs) {
1132
1131
TRACE (" bv" , tout << " found large size bit-vector:\n " << mk_pp (n, get_manager ()) << " \n " ;);
1133
1132
get_context ().push_trail (value_trail<context, bool >(m_approximates_large_bvs));
@@ -1253,9 +1252,6 @@ namespace smt {
1253
1252
// TRACE("bv", tout << "has th_justification\n";);
1254
1253
// return;
1255
1254
// }
1256
- // for (auto kv : m_prop_queue) {
1257
- // std::cout << "v" << kv.first << "[" << kv.second << "]\n";
1258
- // }
1259
1255
m_prop_queue.reset ();
1260
1256
bit_atom * b = static_cast <bit_atom*>(a);
1261
1257
var_pos_occ * curr = b->m_occs ;
@@ -1405,17 +1401,17 @@ namespace smt {
1405
1401
if (a && !a->is_bit ()) {
1406
1402
le_atom * le = static_cast <le_atom*>(a);
1407
1403
ctx.mark_as_relevant (le->m_def );
1408
- if (m_params .m_bv_lazy_le ) {
1404
+ if (params () .m_bv_lazy_le ) {
1409
1405
ctx.mk_th_axiom (get_id (), le->m_var , ~le->m_def );
1410
1406
ctx.mk_th_axiom (get_id (), ~le->m_var , le->m_def );
1411
1407
}
1412
1408
}
1413
1409
}
1414
- else if (m_params .m_bv_enable_int2bv2int && m_util.is_bv2int (n)) {
1410
+ else if (params () .m_bv_enable_int2bv2int && m_util.is_bv2int (n)) {
1415
1411
ctx.mark_as_relevant (n->get_arg (0 ));
1416
1412
assert_bv2int_axiom (n);
1417
1413
}
1418
- else if (m_params .m_bv_enable_int2bv2int && m_util.is_int2bv (n)) {
1414
+ else if (params () .m_bv_enable_int2bv2int && m_util.is_int2bv (n)) {
1419
1415
ctx.mark_as_relevant (n->get_arg (0 ));
1420
1416
assert_int2bv_axiom (n);
1421
1417
}
@@ -1492,9 +1488,12 @@ namespace smt {
1492
1488
return false ;
1493
1489
}
1494
1490
1495
- theory_bv::theory_bv (ast_manager & m, theory_bv_params const & params, bit_blaster_params const & bb_params):
1491
+ smt_params const & theory_bv::params () const {
1492
+ return get_context ().get_fparams ();
1493
+ }
1494
+
1495
+ theory_bv::theory_bv (ast_manager & m, bit_blaster_params const & bb_params):
1496
1496
theory (m.mk_family_id(" bv" )),
1497
- m_params (params),
1498
1497
m_util (m),
1499
1498
m_autil (m),
1500
1499
m_bb (m, bb_params),
@@ -1509,7 +1508,7 @@ namespace smt {
1509
1508
}
1510
1509
1511
1510
theory* theory_bv::mk_fresh (context* new_ctx) {
1512
- return alloc (theory_bv, new_ctx->get_manager (), m_params, m_bb. get_params ());
1511
+ return alloc (theory_bv, new_ctx->get_manager (), new_ctx-> get_fparams ());
1513
1512
}
1514
1513
1515
1514
0 commit comments