Commit dc4c0616 authored by MARCHE Claude's avatar MARCHE Claude

Sudoku: do not use the randomized version

parent 8866bbfc
...@@ -279,4 +279,4 @@ module random.Random ...@@ -279,4 +279,4 @@ module random.Random
syntax val random_int "Why3__BigInt.random_int" syntax val random_int "Why3__BigInt.random_int"
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ ifeq ($(BENCH),yes) ...@@ -20,7 +20,7 @@ ifeq ($(BENCH),yes)
endif endif
MAIN=main MAIN=main
GEN = map__Map sudoku__Grid sudoku__TheClassicalSudokuGrid sudoku__Solver sudoku__RandomSolver GEN = map__Map sudoku__Grid sudoku__TheClassicalSudokuGrid sudoku__Solver
OBJ=$(GEN) OBJ=$(GEN)
GENML = $(addsuffix .ml, $(GEN)) GENML = $(addsuffix .ml, $(GEN))
......
...@@ -107,7 +107,7 @@ let solve_board rows _ = ...@@ -107,7 +107,7 @@ let solve_board rows _ =
done; done;
begin begin
try try
let a = Sudoku__RandomSolver.check_then_solve sudoku input_grid in let a = Sudoku__Solver.check_then_solve sudoku input_grid in
display_sol rows a display_sol rows a
with Sudoku__Solver.NoSolution -> no_sol rows with Sudoku__Solver.NoSolution -> no_sol rows
end; end;
......
...@@ -37,7 +37,7 @@ let print_grid fmt a = ...@@ -37,7 +37,7 @@ let print_grid fmt a =
let () = let () =
let sudoku = Sudoku__TheClassicalSudokuGrid.classical_sudoku () in let sudoku = Sudoku__TheClassicalSudokuGrid.classical_sudoku () in
printf "Problem: %a@." print_grid input_grid; printf "Problem: %a@." print_grid input_grid;
let a = Sudoku__RandomSolver.solve sudoku input_grid let a = Sudoku__Solver.solve sudoku input_grid
in in
printf "Solution: %a@." print_grid a printf "Solution: %a@." print_grid a
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<proof prover="3" timelimit="6"><result status="valid" time="1.06"/></proof> <proof prover="3" timelimit="6"><result status="valid" time="1.06"/></proof>
</goal> </goal>
</theory> </theory>
<theory name="Solver" sum="b469e9f218362f529979b7aa8794fb40" expanded="true"> <theory name="Solver" sum="2ff5b0732d3f991a59fb450771ba62fb" expanded="true">
<goal name="WP_parameter check_valid_chunk" expl="VC for check_valid_chunk" expanded="true"> <goal name="WP_parameter check_valid_chunk" expl="VC for check_valid_chunk">
<proof prover="2"><result status="valid" time="2.59"/></proof> <proof prover="2"><result status="valid" time="2.59"/></proof>
<proof prover="3"><result status="valid" time="0.81"/></proof> <proof prover="3"><result status="valid" time="0.81"/></proof>
<proof prover="4"><result status="valid" time="3.56"/></proof> <proof prover="4"><result status="valid" time="3.56"/></proof>
...@@ -632,14 +632,22 @@ ...@@ -632,14 +632,22 @@
</goal> </goal>
</transf> </transf>
</goal> </goal>
<goal name="WP_parameter solve" expl="VC for solve" expanded="true"> <goal name="WP_parameter solve" expl="VC for solve">
<proof prover="0"><result status="valid" time="0.02"/></proof> <proof prover="0"><result status="valid" time="0.02"/></proof>
<proof prover="4"><result status="valid" time="0.04"/></proof> <proof prover="4"><result status="valid" time="0.04"/></proof>
<proof prover="5"><result status="valid" time="0.04"/></proof> <proof prover="5"><result status="valid" time="0.04"/></proof>
</goal> </goal>
<goal name="WP_parameter check_then_solve" expl="VC for check_then_solve" expanded="true"> <goal name="WP_parameter check_then_solve" expl="VC for check_then_solve">
<proof prover="1"><result status="valid" time="0.13"/></proof> <proof prover="1"><result status="valid" time="0.13"/></proof>
<proof prover="4"><result status="valid" time="0.10" steps="69"/></proof> <proof prover="4"><result status="valid" time="0.10" steps="48"/></proof>
</goal>
</theory>
<theory name="RandomSolver" sum="7dbb8a684c2ba04fa97211933ee456e7" expanded="true">
<goal name="WP_parameter solve_aux" expl="VC for solve_aux" expanded="true">
</goal>
<goal name="WP_parameter solve" expl="VC for solve" expanded="true">
</goal>
<goal name="WP_parameter check_then_solve" expl="VC for check_then_solve" expanded="true">
</goal> </goal>
</theory> </theory>
<theory name="Test" sum="96bf6ded35162d43136dfbf608f579d3" expanded="true"> <theory name="Test" sum="96bf6ded35162d43136dfbf608f579d3" expanded="true">
......
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