/* fsamin.c 27/10/94. * 25/1/00 added -s option. * Minimises a finite state automaton * Can either use stdin/stdout or files. * * SYNOPSIS: fsamin [-ip d/s] [-op d/s] [-silent] [-v] [-s] [filename] * * Input is from filename (or stdin if not specified) , * which should contain an fsa. * Output is to filename.min, or stdout. * * OPTIONS: * -ip d/s 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) * -s print out the old state - new state correspondence * to stdout after minimization. *
*/
if (kbm_print_level > 1)
printf(" #Number of states of fsa before minimisation = %d.\n",
testfsa.states->size); if (fsa_minimize(&testfsa) == -1) exit(1); if (kbm_print_level > 1)
printf(" #Number of states of fsa after minimisation = %d.\n",
testfsa.states->size);
if (op_format_set)
testfsa.table->printing_format = op_format;
strcat(fsaname, "_min");
if (stringlen(inf) != 0)
fclose(wfile); if (wfile != stdout && kbm_print_level > 0)
printf("#Minimized fsa with %d states computed.\n", testfsa.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 und die Messung sind noch experimentell.