Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 3279920b authored by Sylvain Soliman's avatar Sylvain Soliman
Browse files

Stop looping if glucose.py exists but is in error

parent 9e076803
...@@ -72,13 +72,18 @@ add_solution(File, Solution) :- ...@@ -72,13 +72,18 @@ add_solution(File, Solution) :-
% @arg File Name of the cnf file in DIMACS format % @arg File Name of the cnf file in DIMACS format
% @arg Solution List of positive/negative integers for literals, or [] % @arg Solution List of positive/negative integers for literals, or []
run_sat(File, Solution) :- run_sat(File, Solution) :-
run_sat(File, no, [Line]), run_sat(File, no, Line),
( (
Line = 'UNSAT' Line = []
->
throw(error(process_error('glucose.py', 'Unknown error')))
;
Line = ['UNSAT']
-> ->
Solution = [] Solution = []
; ;
split_string(Line, " \n", " \n", CleanStrings), Line = [LLine],
split_string(LLine, " \n", " \n", CleanStrings),
append(RealClean, ["0"], CleanStrings), append(RealClean, ["0"], CleanStrings),
maplist(number_string, Solution, RealClean) maplist(number_string, Solution, RealClean)
). ).
......
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