void Control_Check(char *ifile1, char *ifile2, char *ifile3, char *ifile4, int threefiles, int fourfiles, FILE *f10)
{
        FILE *f1, *f2, *f3, *f4;
        char varfname[MAX_LENGTH];
        
        /* Illustration of Control Checks made on a fsm.  For more information
        on control tests refer to the documentation. */

        if(!(threefiles || fourfiles))
        {
                ifile1 = "../data/control_plant.data";
                ifile2 = "../data/control_spec.data";
                ifile3 = "../data/control_plant.data_events";
                ifile4 = "../data/control.results";
        }
        else if(threefiles){ /*set up default file*/
                strcpy(ifile4, ifile3); /*move result filename to ifile4*/
                strcpy(varfname, ifile1);
                strcat(varfname, "_events");
                ifile3 = varfname;
        }

        f1 = fopen(ifile1, "r");
        f2 = fopen(ifile2, "r");        
        f3 = fopen(ifile3, "r");
        f4 = fopen(ifile4, "w");

        if(ControlTest(f1, f2, f3))
                fputs("Controllable", f4);
        else
                fputs("Not Controllable", f4);
        
        /*fsm_print(f3, &fsm1); used to return fsm*/
		
                                                 
        fclose(f1);
        fclose(f2);
        fclose(f3);
        fclose(f4);

        fprintf(f10, "Control check operation on input plant file:\n\t %s with spec input file %s\n", ifile1, ifile2);
        fprintf(f10, "Event/control information in input file:\n\t %s \n", ifile3);
        fprintf(f10, "Control check operation output file:\n\t ");
        fprintf(f10, "%s \n\n\n", ifile4);
        
        /*end y*/
}
