30 int i, j, first, last, strategy, out_type, option;
35 bool error, exact_cover;
75 while ((i =
util_getopt(argc, argv,
"D:S:de:o:r:stv:x")) != EOF) {
85 (void) fprintf(stderr,
"%s: bad subcommand \"%s\"\n",
86 argv[0], util_optarg);
99 (void) fprintf(stderr,
"%s: bad output type \"%s\"\n",
100 argv[0], util_optarg);
113 (void) fprintf(stderr,
"%s: bad espresso option \"%s\"\n",
114 argv[0], util_optarg);
134 (void) fprintf(stderr,
"%s: bad debug type \"%s\"\n",
135 argv[0], util_optarg);
153 strategy = atoi(util_optarg);
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);
174 for(i = 0; i < argc; i++) {
175 printf(
" %s", argv[i]);
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);
190 if (util_optind+1 < argc)
fatal(
"trailing arguments on command line");
191 getPLA(util_optind++, argc, argv, option, &PLA, out_type);
194 if (util_optind < argc)
fatal(
"trailing arguments on command line");
229 (void) fflush(stdout);
234 FREE(cube.part_size);
244 if (strategy < 0 || strategy > 1) {
251 if (strategy < 0 || strategy > 1) {
324 if (first < 0 || first >= cube.part_size[cube.output]) {
327 if (last < 0 || last >= cube.part_size[cube.output]) {
328 last = cube.part_size[cube.output] - 1;
330 opoall(PLA, first, last, strategy);
349 printf(
"ON-set is%sa tautology\n",
388 if (first < 0 || first >= cube.num_vars) {
391 if (last < 0 || last >= cube.num_vars) {
392 last = cube.num_vars - 1;
398 if (first < 0 || first >= cube.num_vars) {
401 if (last < 0 || last >= cube.num_vars) {
402 last = cube.num_vars - 1;
404 for(i = first; i <= last; i++) {
410 for(i = 0; i < cube.num_binary_vars; i++) {
418 printf(
"PLA comparison failed; the PLA's are not equivalent\n");
421 printf(
"PLA's compared equal\n");
427 Fold = PLA->
F; Dold = PLA->
D; F = PLA1->
F;
430 printf(
"PLA comparison failed; the PLA's are not equivalent\n");
433 printf(
"PLA's compared equal\n");
510 fatal(
"cover verification failed");
515 FREE(cube.part_size);
pcover primes_consensus()
ABC_NAMESPACE_IMPL_START pcover espresso(pcover F, pcover D1, pcover R)
void so_espresso(pPLA PLA, int strategy)
void PLA_summary(pPLA PLA)
pset_family sf_dupl(INOUT pset_family A)
void so_both_espresso(pPLA PLA, int strategy)
void disassemble_fsm(pPLA PLA, int verbose_mode)
void print_trace(pcover T, char *name, long time)
struct @49 option_table[]
pset_family d1merge(INOUT pset_family A, IN int var)
int read_pla(IN FILE *fp, IN bool needs_dcset, IN bool needs_offset, IN int pla_type, OUT pPLA *PLA_return)
pcover complement(pcube *T)
#define foreach_set(R, last, p)
struct @51 esp_opt_table[]
struct pla_types_struct pla_types[]
pcover unravel_range(IN pcover B, IN int start, IN int end)
pcover lex_sort(pcover T)
ABC_NAMESPACE_IMPL_START pset_family sf_contain(INOUT pset_family A)
static ABC_NAMESPACE_IMPL_START FILE * last_fp
getPLA(int opt, int argc, argv, int option, pPLA *PLA, int out_type)
void find_optimal_pairing()
pcube * cube2list(pcover A, pcover B)
ABC_NAMESPACE_IMPL_START void find_equiv_outputs(pPLA PLA)
bool echo_unknown_commands
backward_compatibility_hack(int *argc, char **argv, int *option, int *out_type)
ABC_NAMESPACE_IMPL_START void fprint_pla(INOUT FILE *fp, IN pPLA PLA, IN int output_type)
pcover simplify(pcube *T)
#define EXEC(fct, name, S)
pset_family sf_union(INOUT pset_family A, INOUT pset_family B)
#define EXECUTE(fct, i, S, cost)
pcube * cube1list(pcover A)