77 unsigned tier1, tier2;
78 compute_tier_limits (
solver, stable, &tier1, &tier2);
81 uint64_t total_used = 0;
83 total_used += used_stats[glue];
84 const char *
mode = stable ?
"stable" :
"focused";
86 unsigned span = tier2 - tier1 + 1;
87 const unsigned max_printed = 5;
89 unsigned prefix, suffix;
90 if (span > max_printed) {
91 prefix = tier1 + max_printed / 2 - 1;
92 suffix = tier2 - max_printed / 2 + 1;
94 prefix = UINT_MAX, suffix = 0;
95 uint64_t accumulated_middle = 0;
96 int glue_digits = 1, clauses_digits = 1;
100 uint64_t used = used_stats[glue];
101 int tmp_glue = 0, tmp_clauses = 0;
102 if (glue <= prefix || suffix <= glue) {
103 tmp_glue = decimal_digits (glue);
104 tmp_clauses = decimal_digits (used);
106 accumulated_middle += used;
107 if (glue + 1 == suffix) {
108 tmp_glue = decimal_digits (prefix + 1) + decimal_digits (glue) + 1;
109 tmp_clauses = decimal_digits (accumulated_middle);
112 if (tmp_glue > glue_digits)
113 glue_digits = tmp_glue;
114 if (tmp_clauses > clauses_digits)
115 clauses_digits = tmp_clauses;
120 sprintf (fmt,
"%%%d" PRIu64, clauses_digits);
121 accumulated_middle = 0;
122 uint64_t accumulated = 0;
124 uint64_t used = used_stats[glue];
128 if (glue <= prefix || suffix <= glue + 1) {
129 fputs (
solver->prefix, stdout);
130 fputs (
mode, stdout);
131 fputs (
" glue ", stdout);
133 if (glue <= prefix || suffix <= glue) {
134 int len = printf (
"%u", glue);
135 while (len > 0 && len < glue_digits)
136 fputc (
' ', stdout), len++;
137 fputs (
" used ", stdout);
139 printf (
" clauses %5.2f%% accumulated %5.2f%%",
140 kissat_percent (used, total_used),
141 kissat_percent (accumulated, total_used));
143 fputs (
" tier1", stdout);
145 fputs (
" tier2", stdout);
146 fputc (
'\n', stdout);
148 accumulated_middle += used;
149 if (glue + 1 == suffix) {
150 int len = printf (
"%u-%u", prefix + 1, suffix - 1);
151 while (len > 0 && len < glue_digits)
152 fputc (
' ', stdout), len++;
153 fputs (
" used ", stdout);
154 printf (fmt, accumulated_middle);
155 printf (
" clauses %5.2f%% accumulated %5.2f%%\n",
156 kissat_percent (accumulated_middle, total_used),
157 kissat_percent (accumulated, total_used));