17 except exceptions.DirtyRepository as e:
18 print("Warning: " + str(e))
20 database.database() # check if database is initialized
23 if os.path.isfile(sf(conf.measurechecked_file)):
24 print("Checking if all configurations can be measured skiped.")
25 print(" For new check remove file " + sf(conf.measurechecked_file))
27 print("Checking if all configurations can be measured...")
28 utils.build_symbol_map()
30 with open(sf(conf.variable_count_file)) as f:
31 var_num = f.readline().rstrip()
32 conf_num = f.readline().rstrip()
33 with open(sf(conf.measure_file), 'r') as fi:
35 measure_list.add(int(ln))
36 for measure in measure_list:
37 tfile1 = configurations.__buildtempcnf__(var_num, (sf(conf.rules_file),
38 sf(conf.fixed_file)), [str(measure)])
39 tfile2 = configurations.__buildtempcnf__(var_num, (sf(conf.rules_file),
40 sf(conf.fixed_file)), [str(-1 * measure)])
42 configurations.__exec_sat__(tfile1, [], conf_num)
43 except exceptions.NoSolution:
44 print("W: " + utils.smap[measure] + " won't be measured! Can't select.")
46 configurations.__exec_sat__(tfile2, [], conf_num)
47 except exceptions.NoSolution:
48 print("W: " + utils.smap[measure] + " won't be measured! Can't unselect.")
49 with open(sf(conf.measurechecked_file), 'w') as f:
50 f.write("Remove this file if you wanna execute check if all configurations can be measured once again.\n")
52 #################################################################################
54 if __name__ == '__main__':