30 pcube base = cube.temp[0],
p, last;
31 int expansion, place, skip,
var,
size, offset;
32 register int i, j, k, n;
39 for(var = start; var <= end; var++) {
40 if ((size =
set_dist(c, cube.var_mask[var])) < 2) {
41 (void)
set_or(base, base, cube.var_mask[var]);
50 B1->count += expansion;
56 for(var = start; var <= end; var++) {
57 if ((size =
set_dist(c, cube.var_mask[var])) > 1) {
61 for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) {
63 for(j = n; j < expansion; j += skip) {
64 for(k = 0; k < place; k++) {
82 int var, total_size, expansion,
size;
83 register pcube p, last, startbase = cube.temp[1];
86 (void)
set_copy(startbase, cube.emptyset);
87 for(var = 0; var < start; var++)
88 (
void)
set_or(startbase, startbase, cube.var_mask[var]);
89 for(var = end+1; var < cube.num_vars; var++)
90 (
void)
set_or(startbase, startbase, cube.var_mask[var]);
96 for(var = start; var <= end; var++)
97 if ((size =
set_dist(p, cube.var_mask[var])) >= 2)
98 if ((expansion *= size) > 1000000)
99 fatal(
"unreasonable expansion in unravel");
100 total_size += expansion;
145 register int *count, cnt, n = cube.size, i;
156 for(i = 0; i < n; i++)
164 qsort((
char *) (F1 =
sf_list(F)), F->count,
sizeof(
pcube), compare);
165 F_sorted =
sf_unlist(F1, F->count, F->sf_size);
177 register int bestsize = -1,
size, n = cube.num_vars;
187 largest =
p, bestsize =
size;
193 T_sorted =
sf_unlist(T1, T->count, T->sf_size);
209 for(i = F->count - 1; i > 0; i--) {
217 k = (i*23 + 997) % i;
237 unsigned int comp_debug;
239 register pcube *T1,
p, seed, cof;
247 for(T1 = T+2; (p = *T1++) != NULL; ) {
263 for(T1 = T+2; (p = *T1++) != NULL; ) {
277 (void) printf(
"COMPONENT_REDUCTION: split into %d %d\n",
278 count, numcube - count);
281 if (count != numcube) {
291 for(T1 = T+2; (p = *T1++) != NULL; ) {
301 (*A)[1] = (
pcube) A1;
303 (*B)[1] = (
pcube) B1;
306 return numcube - count;
317 register pcube p, last, pdest, mask;
319 mask = cube.var_mask[cube.output];
323 pdest =
GETSET(T1, T1->count++);
339 register pcube p, last, mask;
345 mask = cube.var_mask[cube.output];
372 for(i = 0; i < cube.part_size[cube.output]; i++) {
376 PLA1->
F =
cof_output(PLA->F, i + cube.first_part[cube.output]);
377 PLA1->
R =
cof_output(PLA->R, i + cube.first_part[cube.output]);
378 PLA1->
D =
cof_output(PLA->D, i + cube.first_part[cube.output]);
381 if ((*func)(PLA1, i) == 0) {
387 PLA1->
F =
uncof_output(PLA1->
F, i + cube.first_part[cube.output]);
388 PLA1->
R =
uncof_output(PLA1->
R, i + cube.first_part[cube.output]);
389 PLA1->
D =
uncof_output(PLA1->
D, i + cube.first_part[cube.output]);
392 if ((*func1)(PLA1, i) == 0) {
454 (void)
sprintf(word,
"ESPRESSO-POS(%d)", i);
468 (void)
sprintf(word,
"EXACT-POS(%d)", i);
492 (void)
sprintf(word,
"ESPRESSO-POS(%d)", i);
497 (void)
sprintf(word,
"ESPRESSO-NEG(%d)", i);
512 (void)
sprintf(word,
"EXACT-POS(%d)", i);
517 (void)
sprintf(word,
"EXACT-NEG(%d)", i);
529 if (PLA->F->count > PLA->R->count) {
533 i += cube.first_part[cube.output];
#define INLINEset_diff(r, a, b)
ABC_NAMESPACE_IMPL_START pcover espresso(pcover F, pcover D1, pcover R)
void so_espresso(pPLA PLA, int strategy)
pcover unravel(IN pcover B, IN int start)
void so_both_espresso(pPLA PLA, int strategy)
pcover size_sort(pcover T)
#define INLINEset_and(r, a, b)
pcover sort_reduce(IN pcover T)
#define PUTSIZE(set, size)
int so_do_espresso(pPLA PLA, int i)
#define foreach_remaining_set(R, last, pfirst, p)
pcover mini_sort(pcover F, int(*compare)())
int so_both_do_exact(pPLA PLA, int i)
#define foreach_set(R, last, p)
int so_save(pPLA PLA, int i)
pcover random_order(pcover F)
#define INLINEset_or(r, a, b)
pcover unravel_range(IN pcover B, IN int start, IN int end)
pcover lex_sort(pcover T)
pcover uncof_output(pcover T, int i)
void foreach_output_function(pPLA PLA, int(*func)(), int(*func1)())
static ABC_NAMESPACE_IMPL_START void cb_unravel(IN register pcube c, IN int start, IN int end, IN pcube startbase, INOUT pcover B1)
#define INLINEset_copy(r, a)
int so_both_save(pPLA PLA, int i)
pcover cof_output(pcover T, int i)
unsigned __int64 word
DECLARATIONS ///.
#define EXEC_S(fct, name, S)
#define ABC_NAMESPACE_IMPL_END
#define is_in_set(set, e)
int cubelist_partition(pcube *T, pcube **A, pcube **B, unsigned int comp_debug)
int so_do_exact(pPLA PLA, int i)
static int descend(struct saucy *s, struct coloring *c, int target, int min)
#define ABC_NAMESPACE_IMPL_START
#define set_remove(set, e)
pset * sf_list(IN register pset_family A)
pset_family sf_unlist(IN pset *A1, IN int totcnt, IN int size)
#define set_insert(set, e)
#define GETSET(family, index)
int so_both_do_espresso(pPLA PLA, int i)
pset * sf_sort(IN pset_family A, IN int(*compare)())