abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hack.c
Go to the documentation of this file.
1 /*
2  * Revision Control Information
3  *
4  * $Source$
5  * $Author$
6  * $Revision$
7  * $Date$
8  *
9  */
10 #include "espresso.h"
11 
13 
14 
15 void map_dcset(PLA)
16 pPLA PLA;
17 {
18  int var, i;
19  pcover Tplus, Tminus, Tplusbar, Tminusbar;
20  pcover newf, term1, term2, dcset, dcsetbar;
21  pcube cplus, cminus, last, p;
22 
23  if (PLA->label == NIL(char *) || PLA->label[0] == NIL(char))
24  return;
25 
26  /* try to find a binary variable named "DONT_CARE" */
27  var = -1;
28  for(i = 0; i < cube.num_binary_vars * 2; i++) {
29  if (strncmp(PLA->label[i], "DONT_CARE", 9) == 0 ||
30  strncmp(PLA->label[i], "DONTCARE", 8) == 0 ||
31  strncmp(PLA->label[i], "dont_care", 9) == 0 ||
32  strncmp(PLA->label[i], "dontcare", 8) == 0) {
33  var = i/2;
34  break;
35  }
36  }
37  if (var == -1) {
38  return;
39  }
40 
41  /* form the cofactor cubes for the don't-care variable */
42  cplus = set_save(cube.fullset);
43  cminus = set_save(cube.fullset);
44  set_remove(cplus, var*2);
45  set_remove(cminus, var*2 + 1);
46 
47  /* form the don't-care set */
48  EXEC(simp_comp(cofactor(cube1list(PLA->F), cplus), &Tplus, &Tplusbar),
49  "simpcomp+", Tplus);
50  EXEC(simp_comp(cofactor(cube1list(PLA->F), cminus), &Tminus, &Tminusbar),
51  "simpcomp-", Tminus);
52  EXEC(term1 = cv_intersect(Tplus, Tminusbar), "term1 ", term1);
53  EXEC(term2 = cv_intersect(Tminus, Tplusbar), "term2 ", term2);
54  EXEC(dcset = sf_union(term1, term2), "union ", dcset);
55  EXEC(simp_comp(cube1list(dcset), &PLA->D, &dcsetbar), "simplify", PLA->D);
56  EXEC(newf = cv_intersect(PLA->F, dcsetbar), "separate ", PLA->F);
57  free_cover(PLA->F);
58  PLA->F = newf;
59  free_cover(Tplus);
60  free_cover(Tminus);
61  free_cover(Tplusbar);
62  free_cover(Tminusbar);
63  free_cover(dcsetbar);
64 
65  /* remove any cubes dependent on the DONT_CARE variable */
66  (void) sf_active(PLA->F);
67  foreach_set(PLA->F, last, p) {
68  if (! is_in_set(p, var*2) || ! is_in_set(p, var*2+1)) {
69  RESET(p, ACTIVE);
70  }
71  }
72  PLA->F = sf_inactive(PLA->F);
73 
74  /* resize the cube and delete the don't-care variable */
75  setdown_cube();
76  for(i = 2*var+2; i < cube.size; i++) {
77  PLA->label[i-2] = PLA->label[i];
78  }
79  for(i = var+1; i < cube.num_vars; i++) {
80  cube.part_size[i-1] = cube.part_size[i];
81  }
82  cube.num_binary_vars--;
83  cube.num_vars--;
84  cube_setup();
85  PLA->F = sf_delc(PLA->F, 2*var, 2*var+1);
86  PLA->D = sf_delc(PLA->D, 2*var, 2*var+1);
87 }
88 
90 pPLA PLA;
91 {
92  pset_family newF, newD;
93  pset compress;
94  symbolic_t *p1;
95  symbolic_list_t *p2;
96  int i, bit, tot_size, base, old_size;
97 
98  /* Remove the DC-set from the ON-set (is this necessary ??) */
99  if (PLA->D->count > 0) {
100  sf_free(PLA->F);
101  PLA->F = complement(cube2list(PLA->D, PLA->R));
102  }
103 
104  /* tot_size = width added for all symbolic variables */
105  tot_size = 0;
106  for(p1=PLA->symbolic_output; p1!=NIL(symbolic_t); p1=p1->next) {
107  for(p2=p1->symbolic_list; p2!=NIL(symbolic_list_t); p2=p2->next) {
108  if (p2->pos<0 || p2->pos>=cube.part_size[cube.output]) {
109  fatal("symbolic-output index out of range");
110 /* } else if (p2->variable != cube.output) {
111  fatal("symbolic-output label must be an output");*/
112  }
113  }
114  tot_size += 1 << p1->symbolic_list_length;
115  }
116 
117  /* adjust the indices to skip over new outputs */
118  for(p1=PLA->symbolic_output; p1!=NIL(symbolic_t); p1=p1->next) {
119  for(p2=p1->symbolic_list; p2!=NIL(symbolic_list_t); p2=p2->next) {
120  p2->pos += tot_size;
121  }
122  }
123 
124  /* resize the cube structure -- add enough for the one-hot outputs */
125  old_size = cube.size;
126  cube.part_size[cube.output] += tot_size;
127  setdown_cube();
128  cube_setup();
129 
130  /* insert space in the output part for the one-hot output */
131  base = cube.first_part[cube.output];
132  PLA->F = sf_addcol(PLA->F, base, tot_size);
133  PLA->D = sf_addcol(PLA->D, base, tot_size);
134  PLA->R = sf_addcol(PLA->R, base, tot_size);
135 
136  /* do the real work */
137  for(p1=PLA->symbolic_output; p1!=NIL(symbolic_t); p1=p1->next) {
138  newF = new_cover(100);
139  newD = new_cover(100);
140  find_inputs(NIL(set_family_t), PLA, p1->symbolic_list, base, 0,
141  &newF, &newD);
142 /*
143  * Not sure what this means
144  find_dc_inputs(PLA, p1->symbolic_list,
145  base, 1 << p1->symbolic_list_length, &newF, &newD);
146  */
147  free_cover(PLA->F);
148  PLA->F = newF;
149 /*
150  * retain OLD DC-set -- but we've lost the don't-care arc information
151  * (it defaults to branch to the zero state)
152  free_cover(PLA->D);
153  PLA->D = newD;
154  */
155  free_cover(newD);
156  base += 1 << p1->symbolic_list_length;
157  }
158 
159  /* delete the old outputs, and resize the cube */
160  compress = set_full(newF->sf_size);
161  for(p1=PLA->symbolic_output; p1!=NIL(symbolic_t); p1=p1->next) {
162  for(p2=p1->symbolic_list; p2!=NIL(symbolic_list_t); p2=p2->next) {
163  bit = cube.first_part[cube.output] + p2->pos;
164  set_remove(compress, bit);
165  }
166  }
167  cube.part_size[cube.output] -= newF->sf_size - set_ord(compress);
168  setdown_cube();
169  cube_setup();
170  PLA->F = sf_compress(PLA->F, compress);
171  PLA->D = sf_compress(PLA->D, compress);
172  if (cube.size != PLA->F->sf_size) fatal("error");
173 
174  /* Quick minimization */
175  PLA->F = sf_contain(PLA->F);
176  PLA->D = sf_contain(PLA->D);
177  for(i = 0; i < cube.num_vars; i++) {
178  PLA->F = d1merge(PLA->F, i);
179  PLA->D = d1merge(PLA->D, i);
180  }
181  PLA->F = sf_contain(PLA->F);
182  PLA->D = sf_contain(PLA->D);
183 
184  free_cover(PLA->R);
185  PLA->R = new_cover(0);
186 
187  symbolic_hack_labels(PLA, PLA->symbolic_output,
188  compress, cube.size, old_size, tot_size);
189  set_free(compress);
190 }
191 
192 
193 void find_inputs(A, PLA, list, base, value, newF, newD)
194 pcover A;
195 pPLA PLA;
196 symbolic_list_t *list;
197 int base, value;
198 pcover *newF, *newD;
199 {
200  pcover S, S1;
201  register pset last, p;
202 
203  /*
204  * A represents th 'input' values for which the outputs assume
205  * the integer value 'value
206  */
207  if (list == NIL(symbolic_list_t)) {
208  /*
209  * Simulate these inputs against the on-set; then, insert into the
210  * new on-set a 1 in the proper position
211  */
212  S = cv_intersect(A, PLA->F);
213  foreach_set(S, last, p) {
214  set_insert(p, base + value);
215  }
216  *newF = sf_append(*newF, S);
217 
218  /*
219  * 'simulate' these inputs against the don't-care set
220  S = cv_intersect(A, PLA->D);
221  *newD = sf_append(*newD, S);
222  */
223 
224  } else {
225  /* intersect and recur with the OFF-set */
226  S = cof_output(PLA->R, cube.first_part[cube.output] + list->pos);
227  if (A != NIL(set_family_t)) {
228  S1 = cv_intersect(A, S);
229  free_cover(S);
230  S = S1;
231  }
232  find_inputs(S, PLA, list->next, base, value*2, newF, newD);
233  free_cover(S);
234 
235  /* intersect and recur with the ON-set */
236  S = cof_output(PLA->F, cube.first_part[cube.output] + list->pos);
237  if (A != NIL(set_family_t)) {
238  S1 = cv_intersect(A, S);
239  free_cover(S);
240  S = S1;
241  }
242  find_inputs(S, PLA, list->next, base, value*2 + 1, newF, newD);
243  free_cover(S);
244  }
245 }
246 
247 
248 #if 0
249 find_dc_inputs(PLA, list, base, maxval, newF, newD)
250 pPLA PLA;
251 symbolic_list_t *list;
252 int base, maxval;
253 pcover *newF, *newD;
254 {
255  pcover A, S, S1;
256  symbolic_list_t *p2;
257  register pset p, last;
258  register int i;
259 
260  /* painfully find the points for which the symbolic output is dc */
261  A = NIL(set_family_t);
262  for(p2=list; p2!=NIL(symbolic_list_t); p2=p2->next) {
263  S = cof_output(PLA->D, cube.first_part[cube.output] + p2->pos);
264  if (A == NIL(set_family_t)) {
265  A = S;
266  } else {
267  S1 = cv_intersect(A, S);
268  free_cover(S);
269  free_cover(A);
270  A = S1;
271  }
272  }
273 
274  S = cv_intersect(A, PLA->F);
275  *newF = sf_append(*newF, S);
276 
277  S = cv_intersect(A, PLA->D);
278  foreach_set(S, last, p) {
279  for(i = base; i < base + maxval; i++) {
280  set_insert(p, i);
281  }
282  }
283  *newD = sf_append(*newD, S);
284  free_cover(A);
285 }
286 #endif
287 
288 void map_symbolic(PLA)
289 pPLA PLA;
290 {
291  symbolic_t *p1;
292  symbolic_list_t *p2;
293  int var, base, num_vars, num_binary_vars, *new_part_size;
294  int new_size, size_added, num_deleted_vars, num_added_vars, newvar;
295  pset compress;
296 
297  /* Verify legal values are in the symbolic lists */
298  for(p1 = PLA->symbolic; p1 != NIL(symbolic_t); p1 = p1->next) {
299  for(p2=p1->symbolic_list; p2!=NIL(symbolic_list_t); p2=p2->next) {
300  if (p2->variable < 0 || p2->variable >= cube.num_binary_vars) {
301  fatal(".symbolic requires binary variables");
302  }
303  }
304  }
305 
306  /*
307  * size_added = width added for all symbolic variables
308  * num_deleted_vars = # binary variables to be deleted
309  * num_added_vars = # new mv variables
310  * compress = a cube which will be used to compress the set families
311  */
312  size_added = 0;
313  num_added_vars = 0;
314  for(p1 = PLA->symbolic; p1 != NIL(symbolic_t); p1 = p1->next) {
315  size_added += 1 << p1->symbolic_list_length;
316  num_added_vars++;
317  }
318  compress = set_full(PLA->F->sf_size + size_added);
319  for(p1 = PLA->symbolic; p1 != NIL(symbolic_t); p1 = p1->next) {
320  for(p2=p1->symbolic_list; p2!=NIL(symbolic_list_t); p2=p2->next) {
321  set_remove(compress, p2->variable*2);
322  set_remove(compress, p2->variable*2+1);
323  }
324  }
325  num_deleted_vars = ((PLA->F->sf_size + size_added) - set_ord(compress))/2;
326 
327  /* compute the new cube constants */
328  num_vars = cube.num_vars - num_deleted_vars + num_added_vars;
329  num_binary_vars = cube.num_binary_vars - num_deleted_vars;
330  new_size = cube.size - num_deleted_vars*2 + size_added;
331  new_part_size = ALLOC(int, num_vars);
332  new_part_size[num_vars-1] = cube.part_size[cube.num_vars-1];
333  for(var = cube.num_binary_vars; var < cube.num_vars-1; var++) {
334  new_part_size[var-num_deleted_vars] = cube.part_size[var];
335  }
336 
337  /* re-size the covers, opening room for the new mv variables */
338  base = cube.first_part[cube.output];
339  PLA->F = sf_addcol(PLA->F, base, size_added);
340  PLA->D = sf_addcol(PLA->D, base, size_added);
341  PLA->R = sf_addcol(PLA->R, base, size_added);
342 
343  /* compute the values for the new mv variables */
344  newvar = (cube.num_vars - 1) - num_deleted_vars;
345  for(p1 = PLA->symbolic; p1 != NIL(symbolic_t); p1 = p1->next) {
346  PLA->F = map_symbolic_cover(PLA->F, p1->symbolic_list, base);
347  PLA->D = map_symbolic_cover(PLA->D, p1->symbolic_list, base);
348  PLA->R = map_symbolic_cover(PLA->R, p1->symbolic_list, base);
349  base += 1 << p1->symbolic_list_length;
350  new_part_size[newvar++] = 1 << p1->symbolic_list_length;
351  }
352 
353  /* delete the binary variables which disappear */
354  PLA->F = sf_compress(PLA->F, compress);
355  PLA->D = sf_compress(PLA->D, compress);
356  PLA->R = sf_compress(PLA->R, compress);
357 
358  symbolic_hack_labels(PLA, PLA->symbolic, compress,
359  new_size, cube.size, size_added);
360  setdown_cube();
361  FREE(cube.part_size);
362  cube.num_vars = num_vars;
363  cube.num_binary_vars = num_binary_vars;
364  cube.part_size = new_part_size;
365  cube_setup();
366  set_free(compress);
367 }
368 
369 
371 pcover T;
372 symbolic_list_t *list;
373 int base;
374 {
375  pset last, p;
376  foreach_set(T, last, p) {
377  form_bitvector(p, base, 0, list);
378  }
379  return T;
380 }
381 
382 
383 void form_bitvector(p, base, value, list)
384 pset p; /* old cube, looking at binary variables */
385 int base; /* where in mv cube the new variable starts */
386 int value; /* current value for this recursion */
387 symbolic_list_t *list; /* current place in the symbolic list */
388 {
389  if (list == NIL(symbolic_list_t)) {
390  set_insert(p, base + value);
391  } else {
392  switch(GETINPUT(p, list->variable)) {
393  case ZERO:
394  form_bitvector(p, base, value*2, list->next);
395  break;
396  case ONE:
397  form_bitvector(p, base, value*2+1, list->next);
398  break;
399  case TWO:
400  form_bitvector(p, base, value*2, list->next);
401  form_bitvector(p, base, value*2+1, list->next);
402  break;
403  default:
404  fatal("bad cube in form_bitvector");
405  }
406  }
407 }
408 
409 
410 void symbolic_hack_labels(PLA, list, compress, new_size, old_size, size_added)
411 pPLA PLA;
412 symbolic_t *list;
413 pset compress;
414 int new_size, old_size, size_added;
415 {
416  int i, base;
417  char **oldlabel;
418  symbolic_t *p1;
419  symbolic_label_t *p3;
420 
421  /* hack with the labels */
422  if ((oldlabel = PLA->label) == NIL(char *))
423  return;
424  PLA->label = ALLOC(char *, new_size);
425  for(i = 0; i < new_size; i++) {
426  PLA->label[i] = NIL(char);
427  }
428 
429  /* copy the binary variable labels and unchanged mv variable labels */
430  base = 0;
431  for(i = 0; i < cube.first_part[cube.output]; i++) {
432  if (is_in_set(compress, i)) {
433  PLA->label[base++] = oldlabel[i];
434  } else {
435  if (oldlabel[i] != NIL(char)) {
436  FREE(oldlabel[i]);
437  }
438  }
439  }
440 
441  /* add the user-defined labels for the symbolic outputs */
442  for(p1 = list; p1 != NIL(symbolic_t); p1 = p1->next) {
443  p3 = p1->symbolic_label;
444  for(i = 0; i < (1 << p1->symbolic_list_length); i++) {
445  if (p3 == NIL(symbolic_label_t)) {
446  PLA->label[base+i] = ALLOC(char, 10);
447  (void) sprintf(PLA->label[base+i], "X%d", i);
448  } else {
449  PLA->label[base+i] = p3->label;
450  p3 = p3->next;
451  }
452  }
453  base += 1 << p1->symbolic_list_length;
454  }
455 
456  /* copy the labels for the binary outputs which remain */
457  for(i = cube.first_part[cube.output]; i < old_size; i++) {
458  if (is_in_set(compress, i + size_added)) {
459  PLA->label[base++] = oldlabel[i];
460  } else {
461  if (oldlabel[i] != NIL(char)) {
462  FREE(oldlabel[i]);
463  }
464  }
465  }
466  FREE(oldlabel);
467 }
468 
470 pcover F;
471 {
472  pcover D, R;
473  D = new_cover(0);
474  R = complement(cube1list(F));
475  F = espresso(F, D, R);
476  free_cover(D);
477  free_cover(R);
478  return F;
479 }
480 
481 
482 void disassemble_fsm(PLA, verbose_mode)
483 pPLA PLA;
484 int verbose_mode;
485 {
486  int nin, nstates, nout;
487  int before, after, present_state, next_state, i, j;
488  pcube next_state_mask, present_state_mask, state_mask, p, p1, last;
489  pcover go_nowhere, F, tF;
490 
491  /* We make the DISGUSTING assumption that the first 'n' outputs have
492  * been created by .symbolic-output, and represent a one-hot encoding
493  * of the next state. 'n' is the size of the second-to-last multiple-
494  * valued variable (i.e., before the outputs
495  */
496 
497  if (cube.num_vars - cube.num_binary_vars != 2) {
498  (void) fprintf(stderr,
499  "use .symbolic and .symbolic-output to specify\n");
500  (void) fprintf(stderr,
501  "the present state and next state field information\n");
502  fatal("disassemble_pla: need two multiple-valued variables\n");
503  }
504 
505  nin = cube.num_binary_vars;
506  nstates = cube.part_size[cube.num_binary_vars];
507  nout = cube.part_size[cube.num_vars - 1];
508  if (nout < nstates) {
509  (void) fprintf(stderr,
510  "use .symbolic and .symbolic-output to specify\n");
511  (void) fprintf(stderr,
512  "the present state and next state field information\n");
513  fatal("disassemble_pla: # outputs < # states\n");
514  }
515 
516 
517  present_state = cube.first_part[cube.num_binary_vars];
518  present_state_mask = new_cube();
519  for(i = 0; i < nstates; i++) {
520  set_insert(present_state_mask, i + present_state);
521  }
522 
523  next_state = cube.first_part[cube.num_binary_vars+1];
524  next_state_mask = new_cube();
525  for(i = 0; i < nstates; i++) {
526  set_insert(next_state_mask, i + next_state);
527  }
528 
529  state_mask = set_or(new_cube(), next_state_mask, present_state_mask);
530 
531  F = new_cover(10);
532 
533 
534  /*
535  * check for arcs which go from ANY state to state #i
536  */
537  for(i = 0; i < nstates; i++) {
538  tF = new_cover(10);
539  foreach_set(PLA->F, last, p) {
540  if (setp_implies(present_state_mask, p)) { /* from any state ! */
541  if (is_in_set(p, next_state + i)) {
542  tF = sf_addset(tF, p);
543  }
544  }
545  }
546  before = tF->count;
547  if (before > 0) {
548  tF = fsm_simplify(tF);
549  /* don't allow the next state to disappear ... */
550  foreach_set(tF, last, p) {
551  set_insert(p, next_state + i);
552  }
553  after = tF->count;
554  F = sf_append(F, tF);
555  if (verbose_mode) {
556  printf("# state EVERY to %d, before=%d after=%d\n",
557  i, before, after);
558  }
559  }
560  }
561 
562 
563  /*
564  * some 'arcs' may NOT have a next state -- handle these
565  * we must unravel the present state part
566  */
567  go_nowhere = new_cover(10);
568  foreach_set(PLA->F, last, p) {
569  if (setp_disjoint(p, next_state_mask)) { /* no next state !! */
570  go_nowhere = sf_addset(go_nowhere, p);
571  }
572  }
573  before = go_nowhere->count;
574  go_nowhere = unravel_range(go_nowhere,
575  cube.num_binary_vars, cube.num_binary_vars);
576  after = go_nowhere->count;
577  F = sf_append(F, go_nowhere);
578  if (verbose_mode) {
579  printf("# state ANY to NOWHERE, before=%d after=%d\n", before, after);
580  }
581 
582 
583  /*
584  * minimize cover for all arcs from state #i to state #j
585  */
586  for(i = 0; i < nstates; i++) {
587  for(j = 0; j < nstates; j++) {
588  tF = new_cover(10);
589  foreach_set(PLA->F, last, p) {
590  /* not EVERY state */
591  if (! setp_implies(present_state_mask, p)) {
592  if (is_in_set(p, present_state + i)) {
593  if (is_in_set(p, next_state + j)) {
594  p1 = set_save(p);
595  set_diff(p1, p1, state_mask);
596  set_insert(p1, present_state + i);
597  set_insert(p1, next_state + j);
598  tF = sf_addset(tF, p1);
599  set_free(p1);
600  }
601  }
602  }
603  }
604  before = tF->count;
605  if (before > 0) {
606  tF = fsm_simplify(tF);
607  /* don't allow the next state to disappear ... */
608  foreach_set(tF, last, p) {
609  set_insert(p, next_state + j);
610  }
611  after = tF->count;
612  F = sf_append(F, tF);
613  if (verbose_mode) {
614  printf("# state %d to %d, before=%d after=%d\n",
615  i, j, before, after);
616  }
617  }
618  }
619  }
620 
621 
622  free_cube(state_mask);
623  free_cube(present_state_mask);
624  free_cube(next_state_mask);
625 
626  free_cover(PLA->F);
627  PLA->F = F;
628  free_cover(PLA->D);
629  PLA->D = new_cover(0);
630 
631  setdown_cube();
632  FREE(cube.part_size);
633  cube.num_binary_vars = nin;
634  cube.num_vars = nin + 3;
635  cube.part_size = ALLOC(int, cube.num_vars);
636  cube.part_size[cube.num_binary_vars] = nstates;
637  cube.part_size[cube.num_binary_vars+1] = nstates;
638  cube.part_size[cube.num_binary_vars+2] = nout - nstates;
639  cube_setup();
640 
641  foreach_set(PLA->F, last, p) {
642  kiss_print_cube(stdout, PLA, p, "~1");
643  }
644 }
646 
void find_dc_inputs()
static pcover fsm_simplify(pcover F)
Definition: hack.c:469
pset set_or()
void fatal(char *s)
Definition: cvrmisc.c:140
struct symbolic_label_struct * next
Definition: espresso.h:300
ABC_NAMESPACE_IMPL_START void map_dcset(pPLA PLA)
Definition: hack.c:15
void form_bitvector(pset p, int base, int value, symbolic_list_t *list)
Definition: hack.c:383
#define set_free(r)
Definition: espresso.h:167
ABC_NAMESPACE_IMPL_START pcover espresso(pcover F, pcover D1, pcover R)
Definition: espresso.c:53
void map_symbolic(pPLA PLA)
Definition: hack.c:288
#define new_cube()
Definition: espresso.h:262
symbolic_label_t * symbolic_label
Definition: espresso.h:308
#define TWO
Definition: espresso.h:412
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define free_cover(r)
Definition: espresso.h:266
#define pcover
Definition: espresso.h:264
#define set_save(r)
Definition: espresso.h:166
pcover map_symbolic_cover(pcover T, symbolic_list_t *list, int base)
Definition: hack.c:370
int var(Lit p)
Definition: SolverTypes.h:62
void disassemble_fsm(pPLA PLA, int verbose_mode)
Definition: hack.c:482
symbolic_list_t * symbolic_list
Definition: espresso.h:306
pset_family d1merge(INOUT pset_family A, IN int var)
Definition: contain.c:161
ABC_NAMESPACE_IMPL_START void cube_setup()
Definition: cubestr.c:27
void map_output_symbolic(pPLA PLA)
Definition: hack.c:89
void sf_free()
void find_inputs(pcover A, pPLA PLA, symbolic_list_t *list, int base, int value, pcover *newF, pcover *newD)
Definition: hack.c:193
#define free_cube(r)
Definition: espresso.h:263
pset_family sf_delc()
bool setp_disjoint()
pcover complement(pcube *T)
Definition: compl.c:49
#define ONE
Definition: espresso.h:414
#define foreach_set(R, last, p)
Definition: espresso.h:135
#define RESET(set, flag)
Definition: espresso.h:123
#define ZERO
Definition: espresso.h:415
pset_family sf_compress()
#define GETINPUT(c, pos)
Definition: espresso.h:400
pcover unravel_range(IN pcover B, IN int start, IN int end)
Definition: cvrm.c:77
#define NIL(type)
Definition: avl.h:25
ABC_NAMESPACE_IMPL_START pset_family sf_contain(INOUT pset_family A)
Definition: contain.c:37
#define set_full(size)
Definition: espresso.h:165
pset_family sf_addset()
ABC_NAMESPACE_IMPL_START pcube * cofactor(IN pcube *T, IN register pcube c)
Definition: cofactor.c:44
pset set_diff()
void kiss_print_cube(FILE *fp, pPLA PLA, pcube p, char *out_string)
Definition: cvrout.c:474
void symbolic_hack_labels(pPLA PLA, symbolic_t *list, pset compress, int new_size, int old_size, int size_added)
Definition: hack.c:410
#define ALLOC(type, num)
Definition: avl.h:27
struct symbolic_list_struct * next
Definition: espresso.h:293
void setdown_cube()
Definition: cubestr.c:95
pcover cof_output(pcover T, int i)
Definition: cvrm.c:312
int sf_size
Definition: espresso.h:78
pcube * cube2list(pcover A, pcover B)
Definition: cofactor.c:306
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
#define FREE(obj)
Definition: avl.h:31
#define is_in_set(set, e)
Definition: espresso.h:170
#define new_cover(i)
Definition: espresso.h:265
void simp_comp(pcube *T, pcover *Tnew, pcover *Tbar)
Definition: compl.c:425
unsigned int * pset
Definition: espresso.h:73
char * sprintf()
int symbolic_list_length
Definition: espresso.h:307
pcover F
Definition: espresso.h:316
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Definition: compress_.c:59
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
#define set_remove(set, e)
Definition: espresso.h:171
pset_family sf_active()
#define set_insert(set, e)
Definition: espresso.h:172
pcover R
Definition: espresso.h:316
bool setp_implies()
pcover cv_intersect()
int strncmp()
pset_family sf_addcol()
int value
pset_family sf_append()
#define EXEC(fct, name, S)
Definition: espresso.h:418
#define ACTIVE
Definition: espresso.h:129
pset_family sf_union(INOUT pset_family A, INOUT pset_family B)
Definition: contain.c:121
pset_family sf_inactive()
static shot S[256]
Definition: kitPerm.c:40
#define pcube
Definition: espresso.h:261
pcube * cube1list(pcover A)
Definition: cofactor.c:289
struct symbolic_struct * next
Definition: espresso.h:310
int set_ord()