/* fsaconcat.c 9/2/99. * calculates concatenation of two finite state automata * * SYNOPSIS: fsaconcat [-ip d/s[dr]] [-op d/s] [-silent] [-v] filename1 filename2 outfilename * * Input is from filename1 concat filename2, which should contain fsa's. * Output is to outfilename * * OPTIONS: * -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
*/
fsaconcatnd = fsa_concat(&fsa1, &fsa2, TRUE); if (fsaconcatnd == 0) exit(1);
if (fsaconcatnd->flags[NFA]) {
strcpy(tempfilename, inf1);
strcat(tempfilename, "temp_mid_XXX"); if (kbm_print_level > 1)
printf( " #Number of states of fsaconcat before determinimization = %d.\n",
fsaconcatnd->states->size);
fsaconcat =
nfa_determinize(fsaconcatnd, op_store, TRUE, TRUE, FALSE, tempfilename); if (fsaconcat == 0) exit(1);
tfree(fsaconcatnd);
} else {
fsaconcat = fsaconcatnd;
fsaconcat->table->printing_format = op_store;
} if (kbm_print_level > 1)
printf(" #Number of states of fsaconcat before minimization = %d.\n",
fsaconcat->states->size); if (fsa_minimize(fsaconcat) == -1) exit(1); if (kbm_print_level > 1)
printf(" #Number of states of fsaconcat after minimization = %d.\n",
fsaconcat->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.