/* $Id: inst.c,v 1.24 2001/06/06 13:53:18 bertl Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "rw1.h" #include "rw2.h" #define ROBUST 0 #ifdef SVC #include "svc.h" #include "svcerrno.h" #endif #ifdef BCG #include "bcg_user.h" #endif /* #define CASEFUNCTION 1 */ char *who = "Instantiator"; static FILE *out = NULL; #define P(msg) fprintf(stderr,"%s\n",msg) #define ERRORLENGTH 1024 static char filename[ERRORLENGTH], outputfile[ERRORLENGTH]; static ATerm false_term, true_term, term_terminated, tau_term, i_term; char* ctau_name; ATbool CRreducing=ATfalse; extern int tarjan; static unsigned int cursor = 0, explored = 0, deadlock = 0, order = 1, hash = 1, prerewrite = 0, caseflag = 0; #ifdef SVC static unsigned int svc = 0; static SVCbool svc_num = 0; static SVCfile svcFile[1]; static SVCparameterIndex parameterIndex; #endif #ifdef BCG static BCG_TYPE_BOOLEAN bcg = BCG_FALSE; #endif static ATbool monitor = ATfalse, cadp = ATfalse; static void helpmsg(void) { P("Usage: instantiator [options] [input file]"); P(""); P("The following options can be used"); P("-help:\t\tyields this message"); P("-version:\tget the version number of this release"); P("-i:\t\ttau replaced by i (Needed for CADP)"); P("-case:\t\tchecks case functions during rewriting"); P("-simple:\truns an instantiator without extra features."); P("\t\tThis instantiator runs fast on \"small\" specifications"); P("\t\tinstead of a compiled rewrite system."); P("-nohash:\tno hash tables will be used"); P("-deadlock:\tonly print the deadlock states, and an account of how states"); P("\t\thave been visited. Use a .dlk file instead of a .aut file"); P("-monitor:\tMonitor function on"); P("-confluent :\t Declares as the confluent tau action and"); P("\t\t\t enables confluent tau reduction using an algorithm"); P("\t\t\t derived from the Tarjan SCC algorithm."); P("-confluent-old : Declares as the confluent tau action and"); P("\t\t\t enables confluent tau reduction using the old algorithm."); P("\t\t\t The old algorithm may fail for confluent tau loops."); P("\t\t\t This option is provided for testing only."); P("\t\t\t WARNING: This tool does not check if that action is confluent"); P("-svc:\t\twrites transition system in SVC format"); P("-svc-num:\tsee -svc, either states are represented by numbers"); P("\t\t(instead of statevectors)"); #ifdef BCG P("-bcg:\t\twrites transition system in BCG format"); #endif P("-order