/* gpwa.c 8/11/94. * 15/3/96 amalgamated with gpwacos, to compute word-acceptors for coset * automatic structures. * Syntax for this is gpwa -cos groupname [cosname] * cosname defaults to "cos". * * Calculates word acceptor of an automatic group G. * The input is a word-difference fsa for the group * (from a run of kbprog with the -wd option). * * SYNOPSIS: gpwa [-op d/s] [-silent] [-v] [-l/-h] [-diff1/-diff2] * [-cos] groupname [cosname] * * Input is from groupname.diff1 or groupname.diff2 * or, if -cos, from groupname.cosname.midiff1 or groupname.cosname.midiff2 * Output is to groupname.wa or groupname.cosname.wa * * OPTIONS: * -cos Word-acceptor for coset automatic structure * -op d/s output in dense or sparse format - dense is default * -v verbose * -silent no diagnostics * -l/-h large/huge hash-tables (for big examples) * -diff1/diff2 take input from groupname.(mi)diff1 or groupname.(mi)diff2 * ((mi)diff2 is default). Latter needs more space and is * slower, but can sometimes save time later. *
*/
if (diff1_ip) { if (cosets)
strcat(inf, ".midiff1"); else
strcat(inf, ".diff1");
} else { if (cosets)
strcat(inf, ".midiff2"); else
strcat(inf, ".diff2");
}
tmalloc(fsawd, fsa, 1);
/* We always use dense format for the word-difference machine - * this is much faster, and the machine is usually not too big.
*/ if ((rfile = fopen(inf, "r")) == 0) {
fprintf(stderr, "Cannot open file %s.\n", inf); exit(1);
}
fsa_read(rfile, fsawd, DENSE, 0, 0, TRUE, fsaname);
fclose(rfile);
if (kbm_print_level > 1)
printf(" #Number of states of gpwa before minimisation = %d.\n",
gpwa->states->size);
fsa_minimize(gpwa); if (kbm_print_level > 1)
printf(" #Number of states of gpwa after minimisation = %d.\n",
gpwa->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.