@@ -1868,7 +1868,8 @@ namespace nlsat {
1868
1868
m_valids.push_back (mk_clause_core (m_lazy_clause.size (), m_lazy_clause.data (), false , nullptr ));
1869
1869
}
1870
1870
1871
- DEBUG_CODE ({
1871
+ #ifdef Z3DEBUG
1872
+ {
1872
1873
unsigned sz = m_lazy_clause.size ();
1873
1874
for (unsigned i = 0 ; i < sz; i++) {
1874
1875
literal l = m_lazy_clause[i];
@@ -1881,7 +1882,8 @@ namespace nlsat {
1881
1882
SASSERT (l.sign () || m_bvalues[b] == l_true);
1882
1883
}
1883
1884
}
1884
- });
1885
+ }
1886
+ #endif
1885
1887
checkpoint ();
1886
1888
resolve_clause (b, m_lazy_clause.size (), m_lazy_clause.data ());
1887
1889
@@ -2191,19 +2193,20 @@ namespace nlsat {
2191
2193
// -----------------------
2192
2194
2193
2195
bool check_watches () const {
2194
- DEBUG_CODE (
2195
- for (var x = 0 ; x < num_vars (); x++) {
2196
+ # ifdef Z3DEBUG
2197
+ for (var x = 0 ; x < num_vars (); x++) {
2196
2198
clause_vector const & cs = m_watches[x];
2197
2199
unsigned sz = cs.size ();
2198
2200
for (unsigned i = 0 ; i < sz; i++) {
2199
2201
SASSERT (max_var (*(cs[i])) == x);
2200
2202
}
2201
- });
2203
+ }
2204
+ #endif
2202
2205
return true ;
2203
2206
}
2204
2207
2205
2208
bool check_bwatches () const {
2206
- DEBUG_CODE (
2209
+ # ifdef Z3DEBUG
2207
2210
for (bool_var b = 0 ; b < m_bwatches.size (); b++) {
2208
2211
clause_vector const & cs = m_bwatches[b];
2209
2212
unsigned sz = cs.size ();
@@ -2212,7 +2215,8 @@ namespace nlsat {
2212
2215
SASSERT (max_var (c) == null_var);
2213
2216
SASSERT (max_bvar (c) == b);
2214
2217
}
2215
- });
2218
+ }
2219
+ #endif
2216
2220
return true ;
2217
2221
}
2218
2222
@@ -2432,11 +2436,11 @@ namespace nlsat {
2432
2436
// undo_until_size(0)
2433
2437
undo_until_stage (null_var);
2434
2438
m_cache.reset ();
2435
- DEBUG_CODE ({
2436
- for (var x = 0 ; x < num_vars (); x++) {
2437
- SASSERT (m_watches[x].empty ());
2438
- }
2439
- });
2439
+ # ifdef Z3DEBUG
2440
+ for (var x = 0 ; x < num_vars (); x++) {
2441
+ SASSERT (m_watches[x].empty ());
2442
+ }
2443
+ # endif
2440
2444
// update m_perm mapping
2441
2445
for (unsigned ext_x = 0 ; ext_x < sz; ext_x++) {
2442
2446
// p: internal -> new pos
@@ -2452,12 +2456,12 @@ namespace nlsat {
2452
2456
SASSERT (m_infeasible[x] == 0 );
2453
2457
}
2454
2458
m_inv_perm.swap (new_inv_perm);
2455
- DEBUG_CODE ({
2456
- for (var x = 0 ; x < num_vars (); x++) {
2457
- SASSERT (x == m_inv_perm[m_perm[x]]);
2458
- SASSERT (m_watches[x].empty ());
2459
- }
2460
- });
2459
+ # ifdef Z3DEBUG
2460
+ for (var x = 0 ; x < num_vars (); x++) {
2461
+ SASSERT (x == m_inv_perm[m_perm[x]]);
2462
+ SASSERT (m_watches[x].empty ());
2463
+ }
2464
+ # endif
2461
2465
m_pm.rename (sz, p);
2462
2466
TRACE (" nlsat_bool_assignment_bug" , tout << " before reinit cache\n " ; display_bool_assignment (tout););
2463
2467
reinit_cache ();
@@ -2477,12 +2481,12 @@ namespace nlsat {
2477
2481
var_vector p;
2478
2482
p.append (m_perm);
2479
2483
reorder (p.size (), p.data ());
2480
- DEBUG_CODE ({
2481
- for (var x = 0 ; x < num_vars (); x++) {
2482
- SASSERT (m_perm[x] == x);
2483
- SASSERT (m_inv_perm[x] == x);
2484
- }
2485
- });
2484
+ # ifdef Z3DEBUG
2485
+ for (var x = 0 ; x < num_vars (); x++) {
2486
+ SASSERT (m_perm[x] == x);
2487
+ SASSERT (m_inv_perm[x] == x);
2488
+ }
2489
+ # endif
2486
2490
}
2487
2491
2488
2492
/* *
0 commit comments