diff --git a/rulegen.cpp b/rulegen.cpp index 3111c04f..0497b7e4 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -94,6 +94,9 @@ static const flagtype w_skip_transducer_terminate = Flag(34); /*< skip terminati static const flagtype w_r3_all_errors = Flag(35); /*< consider all errors for R3 */ #endif +/** these control the output */ +EX flagtype rdebug_flags; + EX int honeycomb_value = 1; /* how far to build local for honeycombs */ EX flagtype flags = 0; @@ -1893,6 +1896,12 @@ EX void clean_parents() { while(c) { c->parent_dir = MYSTERY; c = c->next; } } +int qshortcuts() { + int res = 0; + for(auto& sh: shortcuts) res += isize(sh); + return res; + } + void clear_treestates() { treestates.clear(); for(auto a: all_analyzers) @@ -1910,7 +1919,7 @@ EX void rules_iteration() { clean_parents(); } - if(debugflags & DF_GEOM) println(hlog, "attempt: ", try_count, " important = ", isize(important), " cells = ", tcellcount); + if(rdebug_flags & 1) println(hlog, "attempt: ", try_count, " important = ", isize(important), " cells = ", tcellcount, " shortcuts = ", qshortcuts()); parent_updates = 0; clear_treestates(); @@ -1918,7 +1927,7 @@ EX void rules_iteration() { cq = important; - if(debugflags & DF_GEOM) + if(rdebug_flags & 2) println(hlog, "important = ", cq); for(int i=0; i= max_retries) throw; } @@ -2638,6 +2647,11 @@ int readRuleArgs() { rulegen::flags ^= Flag(argi()); } + else if(argis("-ruledflags")) { + shift(); + rulegen::rdebug_flags = argi(); + } + else return 1; return 0; }