Commit 2a0c9faa authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Fix bugs: minimum of steps increase despite of limitation because pb is still...

Fix bugs: minimum of steps increase despite of limitation because pb is still satisfiable ??; str instead of int in logger, sort cams during the export
parent 0a7e3483
......@@ -165,7 +165,7 @@ def main2(chart_file, cam_file, cam_step_file, cam_complete_file, cam_strong_fil
start_prop)
LOGGER.info(final_prop + \
":: Reload previous frontier places: " + \
len(previous_frontier_places))
str(len(previous_frontier_places)))
except IOError:
previous_frontier_places = set()
current_start_prop = start_prop
......@@ -280,7 +280,7 @@ def find_mac(mcla,
# If yes, in how many steps ?
min_step = mcla.unfolder.get_current_step()
if reacheable:
if reacheable and (min_step <= steps):
LOGGER.info(
final_prop + ":: Property {} is reacheable in {} steps".format(
final_prop, min_step
......@@ -309,7 +309,7 @@ def find_mac(mcla,
next_mac = sorted(next_mac_object.activated_frontier)
LOGGER.debug(final_prop + ":: Save next MAC: {}".format(next_mac))
with open(cam_file, 'a') as file:
file.write(' '.join(next_mac) + '\n')
file.write(" ".join(sorted(next_mac, key=lambda s: s.lower()))+'\n')
# Save min steps
min_step = mcla.unfolder.get_current_step() - 1 # Magic number !
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment