if "-sp" in sys.argv[1:]: saf_output_patterns_file_name = package.generated_files_folder + "/" + "SAF" + sys.argv[ sys.argv.index('-sp') + 1] else: saf_output_patterns_file_name = package.generated_files_folder + "/" + "SAFpatterns.txt" input_file_name, verbose, debug, output_table_file_name, output_patterns_file_name, scanning_table_file_name, redundant_function_reduction = package.parse_program_arg( sys.argv, package.generated_files_folder) data_width = package.data_width print "data_width:", data_width start_time = time.time() function_dict = copy.deepcopy( package.parse_input_pattern_file(input_file_name)) len_of_list = len(function_dict[function_dict.keys()[0]]) number_of_lines = len(function_dict.keys()) try: table_file = open(output_table_file_name, 'w') scanning_table_file = open(scanning_table_file_name, 'w') saf_test_patterns_file = open(saf_output_patterns_file_name, 'w') test_patterns_file = open(output_patterns_file_name, 'w') except IOError: print "Could not open input pattern file, test pattern file, conformity or scanning table file!" sys.exit() deletion_dic = {} used_dic = {} number_of_ones_in_experiments = 0
if verbose: print "\tbingo! all ones!" return or_op else: if debug and verbose: print "\tdidnt reach all ones!" return or_op input_file_name, verbose, debug, output_table_file_name, output_patterns_file_name, scanning_table_file_name, redundant_function_reduction = package.parse_program_arg(sys.argv, package.generated_files_folder) data_width = package.data_width print "data_width:", data_width start_time = time.time() function_dict = copy.deepcopy(package.parse_input_pattern_file(input_file_name)) len_of_list = len(function_dict[function_dict.keys()[0]]) number_of_lines = len(function_dict.keys()) try: table_file = open(output_table_file_name, 'w') scanning_table_file = open(scanning_table_file_name, 'w') test_patterns_file = open(output_patterns_file_name, 'w') saf_test_patterns_file = open(saf_output_patterns_file_name, 'w') except IOError: print "Could not open input pattern file, test pattern file, conformity or scanning table file!" sys.exit() if package.test_subset: function_list = []