/* nfadeterminize.c 8/9/97. * 25/9/98a - added -s option to output states of reverse automaton * as subsets of original state set (without minimizing). * * determinize an fsa and minimize result. * * SYNOPSIS: nfadeterminize [-s] [-op d/s] [-silent] [-v] [-l/-h] [filename] * Input is from filename (or stdin if not specified), * which should contain a fsa. * Output is to filename.determinize or stdout. * * OPTIONS: * -s output states as subsets of set of staes of input fsa * (and don't minimize the output fsa). * -op d/s output in dense or sparse format - default is as in current * value of table->printing_format, in the fsa. * Note: input must be in sparse format, since input is an nfa. * -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 fsadeterminize = %d.\n",
fsadeterminize->states->size);
} else { if (kbm_print_level > 1)
printf( " #Number of states of fsadeterminize before minimisation = %d.\n",
fsadeterminize->states->size);
fsa_minimize(fsadeterminize); if (kbm_print_level > 1)
printf(" #Number of states of fsadeterminize after minimisation = %d.\n",
fsadeterminize->states->size);
}
strcat(fsaname, "_determinize"); if (stringlen(inf) != 0)
wfile = fopen(outf, "w"); else
wfile = stdout;
fsa_print(wfile, fsadeterminize, fsaname); if (wfile != stdout && kbm_print_level > 0)
printf("#\"Determinized\" fsa with %d states computed.\n",
fsadeterminize->states->size); if (stringlen(inf) != 0)
fclose(wfile);
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.