/* fsareverse.c 18/4/96. * Calculates finite state automaton that accepts w_1 if and only if * input automaton accepts w_1 read backwards. * 11/9/97 added -midfa option which returns the reverse fsa as a labeled MIDFA * with initial states the (labeled) singleton accept states of input fsa. * 2/5/96 - added -s option to output states of reverse automaton * as subsets of original state set. * Note: -s and -midfa cannot currently be used together. * * SYNOPSIS: fsareverse [-s] [-midfa] [-ip d/s[dr]] [-op d/s] * [-silent] [-v] [-l/-h] filename * * Input is from filename, which should contain a fsa. * Output is to filename.reverse * * OPTIONS: * -midfa return the reverse fsa as a labeled MIDFA with initial states * the (labeled) singleton accept states of input fsa. * -s output states as subsets of set of staes of input fsa * (and don't minimize the output fsa). * -ip d/s[dr] input in dense or sparse format - dense is default * -op d/s output in dense or sparse format - default is as in current * value of table->printing_format, in the fsa. * -v verbose * -silent no diagnostics * -l/-h large/huge hash-tables (for big examples)
*/
if (subsets) { if (kbm_print_level > 1)
printf(" Number of states of fsareverse = %d.\n",
fsareverse->states->size);
} elseif (midfa) { if (kbm_print_level > 1)
printf(" Number of states of fsamireverse before minimisation = %d.\n",
fsareverse->states->size); if (midfa_labeled_minimize(fsareverse) == -1) exit(1); if (kbm_print_level > 1)
printf(" Number of states of fsamireverse after minimisation = %d.\n",
fsareverse->states->size);
} else { if (kbm_print_level > 1)
printf(" Number of states of fsareverse before minimisation = %d.\n",
fsareverse->states->size); if (fsa_minimize(fsareverse) == -1) exit(1); if (kbm_print_level > 1)
printf(" Number of states of fsareverse after minimisation = %d.\n",
fsareverse->states->size);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.