Skip to content

Commit 897af4f

Browse files
committed
Allow command line control, better printing
1 parent 8749d25 commit 897af4f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/comp_analyzer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ void CompAnalyzer::calc_blocked(
4646
{
4747
const uint32_t n = max_var+1;
4848
clid_to_blocking_lits.resize(long_irred_cls.size()+1);
49+
if (!conf.do_blocked_clauses) return;
50+
4951
if (counter->get_opt_indep_support_end() >= max_var+1) {
5052
verb_print(1, "No need to calculate blocked clauses, as all vars are opt independent");
5153
return;
@@ -232,6 +234,7 @@ void CompAnalyzer::initialize(
232234
auto long_irred_cls = _long_irred_cls;
233235
std::stable_sort(long_irred_cls.begin(), long_irred_cls.end(), mysorter);
234236
calc_blocked(watches, alloc, long_irred_cls);
237+
uint32_t example_blocked_cls = 0;
235238

236239
max_clid = 1;
237240
max_tri_clid = 1;
@@ -252,6 +255,8 @@ void CompAnalyzer::initialize(
252255
if (!blk_lits.empty()) {
253256
std::shuffle(blk_lits.begin(), blk_lits.end(), mtrand);
254257
example_blocking = blk_lits[0];
258+
verb_print(5, "Example blocking: " << example_blocking << " for cl: " << cl);
259+
example_blocked_cls++;
255260
}
256261

257262
if (cl.size() > 3) {
@@ -290,6 +295,8 @@ void CompAnalyzer::initialize(
290295
/* cout << endl; */
291296
max_clid++;
292297
}
298+
verb_print(1, "Example blocked cls: " << example_blocked_cls << " / " << long_irred_cls.size()
299+
<< " = " << (double)example_blocked_cls/(double)long_irred_cls.size()*100 << "%");
293300
/* cout << "max clid: " << max_clid << " max_tri_clid: " << max_tri_clid << endl;; */
294301
debug_print(COLBLBACK "Built occ list in CompAnalyzer::initialize.");
295302

src/counter_config.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ struct CounterConfiguration {
4040
int max_num_rst = -1;
4141
uint32_t lbd_cutoff_always_keep_cube = 3;
4242
uint32_t max_num_cubes_per_restart = 6;
43+
int do_blocked_clauses = 1;
4344

4445
int cache_time_update = 2;
4546

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ void add_ganak_options()
132132
myopt("--appmct", conf.appmc_timeout, atof, "after K seconds");
133133
myopt("--epsilon", conf.appmc_epsilon, atof, "AppMC epsilon");
134134
myopt("--chronobt", conf.do_chronobt, atof, "ChronoBT. SAT must be DISABLED or this will fail");
135+
myopt("--blocked", conf.do_blocked_clauses, atof, "Blocked clauses, semi-dynamic, with example lit");
135136
//
136137
// Arjun options
137138
myopt("--arjun", do_arjun, atoi, "Use arjun");

0 commit comments

Comments
 (0)