From f7eb38c1801fca41ddf26a17737ca28b2927cf8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 18 Aug 2015 10:20:48 +0200 Subject: [PATCH] Fix bug in wrong input type to CNF file generator This caused that instead of multiple numbers was parsed only one number including every single number character as separated number. Because of this was generated wrong CNF file and sometimes if zero was in number picosat failed with error. --- scripts/configurations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/configurations.py b/scripts/configurations.py index b346169..aae7a6f 100644 --- a/scripts/configurations.py +++ b/scripts/configurations.py @@ -177,7 +177,7 @@ def __generate_single__(var_num, conf_num): if not measure_list: return False tfile = __buildtempcnf__(var_num, (sf(conf.rules_file), - sf(conf.fixed_file)), (str(measure_list.pop()))) + sf(conf.fixed_file)), [str(measure_list.pop())]) with open(sf(conf.single_generated_file), 'w') as fo: for ln in measure_list: fo.write(str(ln) + '\n') @@ -192,7 +192,7 @@ def __generate_single__(var_num, conf_num): return True def __generate_random__(var_num, conf_num): - tfile = __buildtempcnf__(var_num, (sf(conf.rules_file), sf(conf.fixed_file)), ()) + tfile = __buildtempcnf__(var_num, (sf(conf.rules_file), sf(conf.fixed_file)), set()) try: confs = __exec_sat__(tfile, ['-i', '3']) for con in confs: -- 2.39.2