ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
main.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/*
11 * Main driver for espresso
12 *
13 * Old style -do xxx, -out xxx, etc. are still supported.
14 */
15
16#include "espresso.h"
17#include "base/main/main.h"
18
20 /* table definitions for options */
21
22static FILE *last_fp;
23static int input_type = FD_type;
24
25
26main(argc, argv)
27int argc;
28char *argv[];
29{
30 int i, j, first, last, strategy, out_type, option;
31 pPLA PLA, PLA1;
32 pcover F, Fold, Dold;
33 pset last1, p;
34 cost_t cost;
35 bool error, exact_cover;
36 long start;
37 extern char *util_optarg;
38 extern int util_optind;
39
40 start = ptime();
41
42 error = FALSE;
44#ifdef RANDOM
45 srandom(314973);
46#endif
47
48 option = 0; /* default -D: ESPRESSO */
49 out_type = F_type; /* default -o: default is ON-set only */
50 debug = 0; /* default -d: no debugging info */
51 verbose_debug = FALSE; /* default -v: not verbose */
52 print_solution = TRUE; /* default -x: print the solution (!) */
53 summary = FALSE; /* default -s: no summary */
54 trace = FALSE; /* default -t: no trace information */
55 strategy = 0; /* default -S: strategy number */
56 first = -1; /* default -R: select range */
57 last = -1;
58 remove_essential = TRUE; /* default -e: */
62 pos = FALSE;
66 kiss = FALSE;
69 exact_cover = FALSE; /* for -qm option, the default */
70
71 backward_compatibility_hack(&argc, argv, &option, &out_type);
72
73
74 /* parse command line options*/
75 while ((i = util_getopt(argc, argv, "D:S:de:o:r:stv:x")) != EOF) {
76 switch(i) {
77 case 'D': /* -Dcommand invokes a subcommand */
78 for(j = 0; option_table[j].name != 0; j++) {
79 if (strcmp(util_optarg, option_table[j].name) == 0) {
80 option = j;
81 break;
82 }
83 }
84 if (option_table[j].name == 0) {
85 (void) fprintf(stderr, "%s: bad subcommand \"%s\"\n",
86 argv[0], util_optarg);
87 exit(1);
88 }
89 break;
90
91 case 'o': /* -ooutput selects and output option */
92 for(j = 0; pla_types[j].key != 0; j++) {
93 if (strcmp(util_optarg, pla_types[j].key+1) == 0) {
94 out_type = pla_types[j].value;
95 break;
96 }
97 }
98 if (pla_types[j].key == 0) {
99 (void) fprintf(stderr, "%s: bad output type \"%s\"\n",
100 argv[0], util_optarg);
101 exit(1);
102 }
103 break;
104
105 case 'e': /* -eespresso selects an option for espresso */
106 for(j = 0; esp_opt_table[j].name != 0; j++) {
107 if (strcmp(util_optarg, esp_opt_table[j].name) == 0) {
108 *(esp_opt_table[j].variable) = esp_opt_table[j].value;
109 break;
110 }
111 }
112 if (esp_opt_table[j].name == 0) {
113 (void) fprintf(stderr, "%s: bad espresso option \"%s\"\n",
114 argv[0], util_optarg);
115 exit(1);
116 }
117 break;
118
119 case 'd': /* -d turns on (softly) all debug switches */
120 debug = debug_table[0].value;
121 trace = TRUE;
122 summary = TRUE;
123 break;
124
125 case 'v': /* -vdebug invokes a debug option */
127 for(j = 0; debug_table[j].name != 0; j++) {
128 if (strcmp(util_optarg, debug_table[j].name) == 0) {
129 debug |= debug_table[j].value;
130 break;
131 }
132 }
133 if (debug_table[j].name == 0) {
134 (void) fprintf(stderr, "%s: bad debug type \"%s\"\n",
135 argv[0], util_optarg);
136 exit(1);
137 }
138 break;
139
140 case 't':
141 trace = TRUE;
142 break;
143
144 case 's':
145 summary = TRUE;
146 break;
147
148 case 'x': /* -x suppress printing of results */
150 break;
151
152 case 'S': /* -S sets a strategy for several cmds */
153 strategy = atoi(util_optarg);
154 break;
155
156 case 'r': /* -r selects range (outputs or vars) */
157 if (sscanf(util_optarg, "%d-%d", &first, &last) < 2) {
158 (void) fprintf(stderr, "%s: bad output range \"%s\"\n",
159 argv[0], util_optarg);
160 exit(1);
161 }
162 break;
163
164 default:
165 usage();
166 exit(1);
167 }
168 }
169
170 /* provide version information and summaries */
171 if (summary || trace) {
172 /* echo command line and arguments */
173 printf("#");
174 for(i = 0; i < argc; i++) {
175 printf(" %s", argv[i]);
176 }
177 printf("\n");
178 printf("# %s\n", VERSION);
179 }
180
181 /* the remaining arguments are argv[util_optind ... argc-1] */
182 PLA = PLA1 = NIL(PLA_t);
183 switch(option_table[option].num_plas) {
184 case 2:
185 if (util_optind+2 < argc) fatal("trailing arguments on command line");
186 getPLA(util_optind++, argc, argv, option, &PLA, out_type);
187 getPLA(util_optind++, argc, argv, option, &PLA1, out_type);
188 break;
189 case 1:
190 if (util_optind+1 < argc) fatal("trailing arguments on command line");
191 getPLA(util_optind++, argc, argv, option, &PLA, out_type);
192 break;
193 }
194 if (util_optind < argc) fatal("trailing arguments on command line");
195
196 if (summary || trace) {
197 if (PLA != NIL(PLA_t)) PLA_summary(PLA);
198 if (PLA1 != NIL(PLA_t)) PLA_summary(PLA1);
199 }
200
201/*
202 * Now a case-statement to decide what to do
203 */
204
205 switch(option_table[option].key) {
206
207
208/******************** Espresso operations ********************/
209
210 case KEY_ESPRESSO:
211 Fold = sf_save(PLA->F);
212 PLA->F = espresso(PLA->F, PLA->D, PLA->R);
213 EXECUTE(error=verify(PLA->F,Fold,PLA->D), VERIFY_TIME, PLA->F, cost);
214 if (error) {
216 PLA->F = Fold;
217 (void) check_consistency(PLA);
218 } else {
219 free_cover(Fold);
220 }
221 break;
222
223 case KEY_MANY_ESPRESSO: {
224 int pla_type;
225 do {
226 EXEC(PLA->F=espresso(PLA->F,PLA->D,PLA->R),"ESPRESSO ",PLA->F);
227 if (print_solution) {
228 fprint_pla(stdout, PLA, out_type);
229 (void) fflush(stdout);
230 }
231 pla_type = PLA->pla_type;
232 free_PLA(PLA);
233 setdown_cube();
234 FREE(cube.part_size);
235 } while (read_pla(last_fp, TRUE, TRUE, pla_type, &PLA) != EOF);
236 exit(0);
237 }
238
239 case KEY_simplify:
240 EXEC(PLA->F = simplify(cube1list(PLA->F)), "SIMPLIFY ", PLA->F);
241 break;
242
243 case KEY_so: /* minimize all functions as single-output */
244 if (strategy < 0 || strategy > 1) {
245 strategy = 0;
246 }
247 so_espresso(PLA, strategy);
248 break;
249
250 case KEY_so_both: /* minimize all functions as single-output */
251 if (strategy < 0 || strategy > 1) {
252 strategy = 0;
253 }
254 so_both_espresso(PLA, strategy);
255 break;
256
257 case KEY_expand: /* execute expand */
258 EXECUTE(PLA->F=expand(PLA->F,PLA->R,FALSE),EXPAND_TIME, PLA->F, cost);
259 break;
260
261 case KEY_irred: /* extract minimal irredundant subset */
262 EXECUTE(PLA->F = irredundant(PLA->F, PLA->D), IRRED_TIME, PLA->F, cost);
263 break;
264
265 case KEY_reduce: /* perform reduction */
266 EXECUTE(PLA->F = reduce(PLA->F, PLA->D), REDUCE_TIME, PLA->F, cost);
267 break;
268
269 case KEY_essen: /* check for essential primes */
270 foreach_set(PLA->F, last1, p) {
271 SET(p, RELESSEN);
272 RESET(p, NONESSEN);
273 }
274 EXECUTE(F = essential(&(PLA->F), &(PLA->D)), ESSEN_TIME, PLA->F, cost);
275 free_cover(F);
276 break;
277
278 case KEY_super_gasp:
279 PLA->F = super_gasp(PLA->F, PLA->D, PLA->R, &cost);
280 break;
281
282 case KEY_gasp:
283 PLA->F = last_gasp(PLA->F, PLA->D, PLA->R, &cost);
284 break;
285
286 case KEY_make_sparse: /* make_sparse step of Espresso */
287 PLA->F = make_sparse(PLA->F, PLA->D, PLA->R);
288 break;
289
290 case KEY_exact:
291 exact_cover = TRUE;
292
293 case KEY_qm:
294 Fold = sf_save(PLA->F);
295 PLA->F = minimize_exact(PLA->F, PLA->D, PLA->R, exact_cover);
296 EXECUTE(error=verify(PLA->F,Fold,PLA->D), VERIFY_TIME, PLA->F, cost);
297 if (error) {
299 PLA->F = Fold;
300 (void) check_consistency(PLA);
301 }
302 free_cover(Fold);
303 break;
304
305 case KEY_primes: /* generate all prime implicants */
306 EXEC(PLA->F = primes_consensus(cube2list(PLA->F, PLA->D)),
307 "PRIMES ", PLA->F);
308 break;
309
310 case KEY_map: /* print out a Karnaugh map of function */
311 map(PLA->F);
313 break;
314
315
316
317/******************** Output phase and bit pairing ********************/
318
319 case KEY_opo: /* sasao output phase assignment */
320 phase_assignment(PLA, strategy);
321 break;
322
323 case KEY_opoall: /* try all phase assignments (!) */
324 if (first < 0 || first >= cube.part_size[cube.output]) {
325 first = 0;
326 }
327 if (last < 0 || last >= cube.part_size[cube.output]) {
328 last = cube.part_size[cube.output] - 1;
329 }
330 opoall(PLA, first, last, strategy);
331 break;
332
333 case KEY_pair: /* find an optimal pairing */
334 find_optimal_pairing(PLA, strategy);
335 break;
336
337 case KEY_pairall: /* try all pairings !! */
338 pair_all(PLA, strategy);
339 break;
340
341
342
343/******************** Simple cover operations ********************/
344
345 case KEY_echo: /* echo the PLA */
346 break;
347
348 case KEY_taut: /* tautology check */
349 printf("ON-set is%sa tautology\n",
350 tautology(cube1list(PLA->F)) ? " " : " not ");
352 break;
353
354 case KEY_contain: /* single cube containment */
355 PLA->F = sf_contain(PLA->F);
356 break;
357
358 case KEY_intersect: /* cover intersection */
359 PLA->F = cv_intersect(PLA->F, PLA1->F);
360 break;
361
362 case KEY_union: /* cover union */
363 PLA->F = sf_union(PLA->F, PLA1->F);
364 break;
365
366 case KEY_disjoint: /* make cover disjoint */
367 PLA->F = make_disjoint(PLA->F);
368 break;
369
370 case KEY_dsharp: /* cover disjoint-sharp */
371 PLA->F = cv_dsharp(PLA->F, PLA1->F);
372 break;
373
374 case KEY_sharp: /* cover sharp */
375 PLA->F = cv_sharp(PLA->F, PLA1->F);
376 break;
377
378 case KEY_lexsort: /* lexical sort order */
379 PLA->F = lex_sort(PLA->F);
380 break;
381
382 case KEY_stats: /* print info on size */
383 if (! summary) PLA_summary(PLA);
385 break;
386
387 case KEY_minterms: /* explode into minterms */
388 if (first < 0 || first >= cube.num_vars) {
389 first = 0;
390 }
391 if (last < 0 || last >= cube.num_vars) {
392 last = cube.num_vars - 1;
393 }
394 PLA->F = sf_dupl(unravel_range(PLA->F, first, last));
395 break;
396
397 case KEY_d1merge: /* distance-1 merge */
398 if (first < 0 || first >= cube.num_vars) {
399 first = 0;
400 }
401 if (last < 0 || last >= cube.num_vars) {
402 last = cube.num_vars - 1;
403 }
404 for(i = first; i <= last; i++) {
405 PLA->F = d1merge(PLA->F, i);
406 }
407 break;
408
409 case KEY_d1merge_in: /* distance-1 merge inputs only */
410 for(i = 0; i < cube.num_binary_vars; i++) {
411 PLA->F = d1merge(PLA->F, i);
412 }
413 break;
414
415 case KEY_PLA_verify: /* check two PLAs for equivalence */
416 EXECUTE(error = PLA_verify(PLA, PLA1), VERIFY_TIME, PLA->F, cost);
417 if (error) {
418 printf("PLA comparison failed; the PLA's are not equivalent\n");
419 exit(1);
420 } else {
421 printf("PLA's compared equal\n");
422 exit(0);
423 }
424 break; /* silly */
425
426 case KEY_verify: /* check two covers for equivalence */
427 Fold = PLA->F; Dold = PLA->D; F = PLA1->F;
428 EXECUTE(error=verify(F, Fold, Dold), VERIFY_TIME, PLA->F, cost);
429 if (error) {
430 printf("PLA comparison failed; the PLA's are not equivalent\n");
431 exit(1);
432 } else {
433 printf("PLA's compared equal\n");
434 exit(0);
435 }
436 break; /* silly */
437
438 case KEY_check: /* check consistency */
439 (void) check_consistency(PLA);
441 break;
442
443 case KEY_mapdc: /* compute don't care set */
444 map_dcset(PLA);
445 out_type = FD_type;
446 break;
447
448 case KEY_equiv:
451 break;
452
453 case KEY_separate: /* remove PLA->D from PLA->F */
454 PLA->F = complement(cube2list(PLA->D, PLA->R));
455 break;
456
457 case KEY_xor: {
458 pcover T1 = cv_intersect(PLA->F, PLA1->R);
459 pcover T2 = cv_intersect(PLA1->F, PLA->R);
460 free_cover(PLA->F);
461 PLA->F = sf_contain(sf_join(T1, T2));
462 free_cover(T1);
463 free_cover(T2);
464 break;
465 }
466
467 case KEY_fsm: {
470 break;
471 }
472
473 case KEY_test: {
474 pcover T, E;
475 T = sf_join(PLA->D, PLA->R);
476 E = new_cover(10);
477 sf_free(PLA->F);
478 EXECUTE(PLA->F = complement(cube1list(T)), COMPL_TIME, PLA->F, cost);
479 EXECUTE(PLA->F = expand(PLA->F, T, FALSE), EXPAND_TIME, PLA->F, cost);
480 EXECUTE(PLA->F = irredundant(PLA->F, E), IRRED_TIME, PLA->F, cost);
481 sf_free(T);
482 T = sf_join(PLA->F, PLA->R);
483 EXECUTE(PLA->D = expand(PLA->D, T, FALSE), EXPAND_TIME, PLA->D, cost);
484 EXECUTE(PLA->D = irredundant(PLA->D, E), IRRED_TIME, PLA->D, cost);
485 sf_free(T);
486 sf_free(E);
487 break;
488 }
489
490
491 }
492
493 /* Print a runtime summary if trace mode enabled */
494 if (trace) {
495 runtime();
496 }
497
498 /* Print total runtime */
499 if (summary || trace) {
500 print_trace(PLA->F, option_table[option].name, ptime()-start);
501 }
502
503 /* Output the solution */
504 if (print_solution) {
505 EXECUTE(fprint_pla(stdout, PLA, out_type), WRITE_TIME, PLA->F, cost);
506 }
507
508 /* Crash and burn if there was a verify error */
509 if (error) {
510 fatal("cover verification failed");
511 }
512
513 /* cleanup all used memory */
514 free_PLA(PLA);
515 FREE(cube.part_size);
516 setdown_cube(); /* free the cube/cdata structure data */
517 sf_cleanup(); /* free unused set structures */
518 sm_cleanup(); /* sparse matrix cleanup */
519
520 exit(0);
521}
522
523
524getPLA(opt, argc, argv, option, PLA, out_type)
525int opt;
526int argc;
527char *argv[];
528int option;
529pPLA *PLA;
530int out_type;
531{
532 FILE *fp;
534 char *fname;
535
536 if (opt >= argc) {
537 fp = stdin;
538 fname = "(stdin)";
539 } else {
540 fname = argv[opt];
541 if (strcmp(fname, "-") == 0) {
542 fp = stdin;
543 } else if ((fp = fopen(argv[opt], "r")) == NULL) {
544 (void) fprintf(stderr, "%s: Unable to open %s\n", argv[0], fname);
545 exit(1);
546 }
547 }
548 if (option_table[option].key == KEY_echo) {
549 needs_dcset = (out_type & D_type) != 0;
550 needs_offset = (out_type & R_type) != 0;
551 } else {
552 needs_dcset = option_table[option].needs_dcset;
553 needs_offset = option_table[option].needs_offset;
554 }
555
556 if (read_pla(fp, needs_dcset, needs_offset, input_type, PLA) == EOF) {
557 (void) fprintf(stderr, "%s: Unable to find PLA on file %s\n", argv[0], fname);
558 exit(1);
559 }
560 (*PLA)->filename = util_strsav(fname);
561 filename = (*PLA)->filename;
562/* (void) fclose(fp);*/
563/* hackto support -Dmany */
564 last_fp = fp;
565}
566
567
569{
570 int i;
571 long total = 1, temp;
572
573 for(i = 0; i < TIME_COUNT; i++) {
574 total += total_time[i];
575 }
576 for(i = 0; i < TIME_COUNT; i++) {
577 if (total_calls[i] != 0) {
578 temp = 100 * total_time[i];
579 printf("# %s\t%2d call(s) for %s (%2ld.%01ld%%)\n",
581 temp/total, (10 * (temp%total)) / total);
582 }
583 }
584}
585
586
588{
589 total_name[READ_TIME] = "READ ";
590 total_name[WRITE_TIME] = "WRITE ";
591 total_name[COMPL_TIME] = "COMPL ";
592 total_name[REDUCE_TIME] = "REDUCE ";
593 total_name[EXPAND_TIME] = "EXPAND ";
594 total_name[ESSEN_TIME] = "ESSEN ";
595 total_name[IRRED_TIME] = "IRRED ";
596 total_name[GREDUCE_TIME] = "REDUCE_GASP";
597 total_name[GEXPAND_TIME] = "EXPAND_GASP";
598 total_name[GIRRED_TIME] = "IRRED_GASP ";
599 total_name[MV_REDUCE_TIME] ="MV_REDUCE ";
600 total_name[RAISE_IN_TIME] = "RAISE_IN ";
601 total_name[VERIFY_TIME] = "VERIFY ";
602 total_name[PRIMES_TIME] = "PRIMES ";
603 total_name[MINCOV_TIME] = "MINCOV ";
604}
605
606
608{
609 int i, col;
610 printf(" ");
611 col = 16;
612 for(i = 0; option_table[i].name != 0; i++) {
613 if ((col + strlen(option_table[i].name) + 1) > 76) {
614 printf(",\n ");
615 col = 16;
616 } else if (i != 0) {
617 printf(", ");
618 }
619 printf("%s", option_table[i].name);
620 col += strlen(option_table[i].name) + 2;
621 }
622 printf("\n");
623}
624
625
627{
628 printf("%s\n\n", VERSION);
629 printf("SYNOPSIS: espresso [options] [file]\n\n");
630 printf(" -d Enable debugging\n");
631 printf(" -e[opt] Select espresso option:\n");
632 printf(" fast, ness, nirr, nunwrap, onset, pos, strong,\n");
633 printf(" eat, eatdots, kiss, random\n");
634 printf(" -o[type] Select output format:\n");
635 printf(" f, fd, fr, fdr, pleasure, eqntott, kiss, cons\n");
636 printf(" -rn-m Select range for subcommands:\n");
637 printf(" d1merge: first and last variables (0 ... m-1)\n");
638 printf(" minterms: first and last variables (0 ... m-1)\n");
639 printf(" opoall: first and last outputs (0 ... m-1)\n");
640 printf(" -s Provide short execution summary\n");
641 printf(" -t Provide longer execution trace\n");
642 printf(" -x Suppress printing of solution\n");
643 printf(" -v[type] Verbose debugging detail (-v '' for all)\n");
644 printf(" -D[cmd] Execute subcommand 'cmd':\n");
645 subcommands();
646 printf(" -Sn Select strategy for subcommands:\n");
647 printf(" opo: bit2=exact bit1=repeated bit0=skip sparse\n");
648 printf(" opoall: 0=minimize, 1=exact\n");
649 printf(" pair: 0=algebraic, 1=strongd, 2=espresso, 3=exact\n");
650 printf(" pairall: 0=minimize, 1=exact, 2=opo\n");
651 printf(" so_espresso: 0=minimize, 1=exact\n");
652 printf(" so_both: 0=minimize, 1=exact\n");
653}
654
655/*
656 * Hack for backward compatibility (ACK! )
657 */
658
659backward_compatibility_hack(argc, argv, option, out_type)
660int *argc;
661char **argv;
662int *option;
663int *out_type;
664{
665 int i, j;
666
667 /* Scan the argument list for something to do (default is ESPRESSO) */
668 *option = 0;
669 for(i = 1; i < (*argc)-1; i++) {
670 if (strcmp(argv[i], "-do") == 0) {
671 for(j = 0; option_table[j].name != 0; j++)
672 if (strcmp(argv[i+1], option_table[j].name) == 0) {
673 *option = j;
674 delete_arg(argc, argv, i+1);
675 delete_arg(argc, argv, i);
676 break;
677 }
678 if (option_table[j].name == 0) {
679 (void) fprintf(stderr,
680 "espresso: bad keyword \"%s\" following -do\n",argv[i+1]);
681 exit(1);
682 }
683 break;
684 }
685 }
686
687 for(i = 1; i < (*argc)-1; i++) {
688 if (strcmp(argv[i], "-out") == 0) {
689 for(j = 0; pla_types[j].key != 0; j++)
690 if (strcmp(pla_types[j].key+1, argv[i+1]) == 0) {
691 *out_type = pla_types[j].value;
692 delete_arg(argc, argv, i+1);
693 delete_arg(argc, argv, i);
694 break;
695 }
696 if (pla_types[j].key == 0) {
697 (void) fprintf(stderr,
698 "espresso: bad keyword \"%s\" following -out\n",argv[i+1]);
699 exit(1);
700 }
701 break;
702 }
703 }
704
705 for(i = 1; i < (*argc); i++) {
706 if (argv[i][0] == '-') {
707 for(j = 0; esp_opt_table[j].name != 0; j++) {
708 if (strcmp(argv[i]+1, esp_opt_table[j].name) == 0) {
709 delete_arg(argc, argv, i);
710 *(esp_opt_table[j].variable) = esp_opt_table[j].value;
711 break;
712 }
713 }
714 }
715 }
716
717 if (check_arg(argc, argv, "-fdr")) input_type = FDR_type;
718 if (check_arg(argc, argv, "-fr")) input_type = FR_type;
719 if (check_arg(argc, argv, "-f")) input_type = F_type;
720}
721
722
723/* delete_arg -- delete an argument from the argument list */
724delete_arg(argc, argv, num)
725int *argc, num;
726register char *argv[];
727{
728 register int i;
729 (*argc)--;
730 for(i = num; i < *argc; i++) {
731 argv[i] = argv[i+1];
732 }
733}
734
735
736/* check_arg -- scan argv for an argument, and return TRUE if found */
737bool check_arg(argc, argv, s)
738int *argc;
739register char *argv[], *s;
740{
741 register int i;
742 for(i = 1; i < *argc; i++) {
743 if (strcmp(argv[i], s) == 0) {
744 delete_arg(argc, argv, i);
745 return TRUE;
746 }
747 }
748 return FALSE;
749}
751
#define TRUE
Definition abcBm.c:38
#define FALSE
Definition abcBm.c:37
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define NIL(type)
Definition avl.h:25
#define FREE(obj)
Definition avl.h:31
ABC_NAMESPACE_IMPL_END int main(int argc, char *argv[])
GLOBAL VARIABLES ///.
Definition main.c:9
ABC_NAMESPACE_IMPL_START typedef signed char value
pcover simplify(pcube *T)
Definition compl.c:566
pcover complement(pcube *T)
Definition compl.c:49
void setdown_cube()
Definition cubestr.c:95
ABC_NAMESPACE_IMPL_START pcover espresso(pcover F, pcover D1, pcover R)
Definition espresso.c:53
#define pcover
Definition espresso.h:264
#define RELESSEN
Definition espresso.h:132
#define EXPAND_TIME
Definition espresso.h:376
void PLA_summary()
void find_equiv_outputs()
int util_getopt()
pcover expand()
#define VERSION
Definition espresso.h:367
pcover make_sparse()
#define REDUCE_TIME
Definition espresso.h:378
#define GEXPAND_TIME
Definition espresso.h:379
struct PLA_t * pPLA
void opoall()
#define PRIMES_TIME
Definition espresso.h:382
struct cost_struct cost_t
bool recompute_onset
Definition globals.c:32
void map()
pset_family sf_contain()
bool echo_unknown_commands
Definition globals.c:26
#define FDR_type
Definition espresso.h:348
void fatal()
#define print_time(t)
Definition espresso.h:22
pset_family d1merge()
pcover cv_intersect()
#define ESSEN_TIME
Definition espresso.h:375
#define COMPL_TIME
Definition espresso.h:373
bool PLA_verify()
pcube * cube2list()
#define F_type
Definition espresso.h:337
void so_both_espresso()
pcover cv_sharp()
bool kiss
Definition globals.c:29
pset_family sf_dupl()
#define RAISE_IN_TIME
Definition espresso.h:385
int total_calls[TIME_COUNT]
Definition globals.c:23
void sf_free()
void free_PLA()
#define TIME_COUNT
Definition espresso.h:371
void sf_cleanup()
Definition set.c:374
struct pla_types_struct pla_types[]
Definition globals.c:42
bool single_expand
Definition globals.c:34
pcover make_disjoint()
#define EXECUTE(fct, i, S, cost)
Definition espresso.h:422
void pair_all()
void print_trace()
#define MINCOV_TIME
Definition espresso.h:383
#define free_cover(r)
Definition espresso.h:266
pcover super_gasp()
void map_dcset()
bool trace
Definition globals.c:36
long total_time[TIME_COUNT]
Definition globals.c:22
int read_pla()
#define GREDUCE_TIME
Definition espresso.h:381
pset_family sf_union()
bool verify()
#define READ_TIME
Definition espresso.h:372
pcover espresso()
pcover essential()
pset_family sf_save()
bool print_solution
Definition globals.c:31
void find_optimal_pairing()
#define R_type
Definition espresso.h:339
pcover reduce()
#define foreach_set(R, last, p)
Definition espresso.h:135
bool summary
Definition globals.c:35
unsigned int debug
Definition globals.c:19
#define SET(set, flag)
Definition espresso.h:122
bool verbose_debug
Definition globals.c:20
bool remove_essential
Definition globals.c:33
pcover minimize_exact()
#define D_type
Definition espresso.h:338
#define IRRED_TIME
Definition espresso.h:377
#define FD_type
Definition espresso.h:345
pcover cv_dsharp()
void so_espresso()
#define NONESSEN
Definition espresso.h:128
pcover unravel_range()
bool use_super_gasp
Definition globals.c:39
#define RESET(set, flag)
Definition espresso.h:123
pcover lex_sort()
void phase_assignment()
bool force_irredundant
Definition globals.c:27
#define GIRRED_TIME
Definition espresso.h:380
pcover irredundant()
pcover last_gasp()
unsigned int * pset
Definition espresso.h:73
bool use_random_order
Definition globals.c:38
#define WRITE_TIME
Definition espresso.h:387
#define EXEC(fct, name, S)
Definition espresso.h:418
bool tautology()
bool check_consistency()
bool pos
Definition globals.c:30
char * total_name[TIME_COUNT]
Definition globals.c:21
void fprint_pla()
bool unwrap_onset
Definition globals.c:37
pset_family sf_join()
char * filename
Definition globals.c:40
#define VERIFY_TIME
Definition espresso.h:386
bool echo_comments
Definition globals.c:25
#define FR_type
Definition espresso.h:346
pcube * cube1list()
pcover primes_consensus()
#define new_cover(i)
Definition espresso.h:265
pcover complement()
#define MV_REDUCE_TIME
Definition espresso.h:384
Cube * p
Definition exorList.c:222
void disassemble_fsm(pPLA PLA, int verbose_mode)
Definition hack.c:482
void sm_cleanup()
Definition matrix.c:552
init_runtime()
Definition main.c:587
getPLA(int opt, int argc, argv, int option, pPLA *PLA, int out_type)
Definition main.c:524
bool check_arg(int *argc, argv, *s)
Definition main.c:737
subcommands()
Definition main.c:607
runtime()
Definition main.c:568
delete_arg(int *argc, argv, int num)
Definition main.c:724
backward_compatibility_hack(int *argc, char **argv, int *option, int *out_type)
Definition main.c:659
usage()
Definition main.c:626
int num_plas
Definition main.h:26
bool needs_dcset
Definition main.h:28
@ KEY_stats
Definition main.h:16
@ KEY_essen
Definition main.h:12
@ KEY_gasp
Definition main.h:13
@ KEY_opoall
Definition main.h:14
@ KEY_exact
Definition main.h:12
@ KEY_mapdc
Definition main.h:14
@ KEY_taut
Definition main.h:16
@ KEY_super_gasp
Definition main.h:16
@ KEY_union
Definition main.h:17
@ KEY_test
Definition main.h:17
@ KEY_echo
Definition main.h:12
@ KEY_irred
Definition main.h:13
@ KEY_make_sparse
Definition main.h:13
@ KEY_intersect
Definition main.h:13
@ KEY_expand
Definition main.h:12
@ KEY_reduce
Definition main.h:15
@ KEY_so_both
Definition main.h:16
@ KEY_dsharp
Definition main.h:12
@ KEY_check
Definition main.h:11
@ KEY_d1merge_in
Definition main.h:18
@ KEY_d1merge
Definition main.h:11
@ KEY_PLA_verify
Definition main.h:11
@ KEY_qm
Definition main.h:15
@ KEY_equiv
Definition main.h:17
@ KEY_so
Definition main.h:16
@ KEY_contain
Definition main.h:11
@ KEY_separate
Definition main.h:18
@ KEY_simplify
Definition main.h:16
@ KEY_sharp
Definition main.h:15
@ KEY_ESPRESSO
Definition main.h:11
@ KEY_map
Definition main.h:14
@ KEY_primes
Definition main.h:15
@ KEY_fsm
Definition main.h:18
@ KEY_verify
Definition main.h:17
@ KEY_lexsort
Definition main.h:13
@ KEY_disjoint
Definition main.h:12
@ KEY_xor
Definition main.h:18
@ KEY_pair
Definition main.h:15
@ KEY_MANY_ESPRESSO
Definition main.h:17
@ KEY_minterms
Definition main.h:14
@ KEY_opo
Definition main.h:14
@ KEY_pairall
Definition main.h:15
struct @060113036201364324367155034342073342004372134160 esp_opt_table[]
char * name
Definition main.h:24
struct @326027241050146061117104276160063134244164301102 debug_table[]
enum keys key
Definition main.h:25
bool needs_offset
Definition main.h:27
struct @343331366030336041362022230040300014147206137312 option_table[]
pcover D
Definition espresso.h:316
pcover R
Definition espresso.h:316
pcover F
Definition espresso.h:316
int pla_type
Definition espresso.h:318
Definition exor.h:123
Definition options.h:228
VOID_HACK srandom()
#define ptime()
Definition util_old.h:283
int strlen()
char * util_optarg
int util_optind
int strcmp()
VOID_HACK exit()