mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
feat(pure-sat): correct timing printing
This commit is contained in:
parent
08606f4be0
commit
65f8a61913
1 changed files with 7 additions and 5 deletions
|
|
@ -231,6 +231,8 @@ end
|
||||||
!ok
|
!ok
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
let start = Sys.time ()
|
||||||
|
|
||||||
let solve ?(check = false) ?in_memory_proof (solver : SAT.t) :
|
let solve ?(check = false) ?in_memory_proof (solver : SAT.t) :
|
||||||
(unit, string) result =
|
(unit, string) result =
|
||||||
let res = Profile.with_ "solve" (fun () -> SAT.solve solver) in
|
let res = Profile.with_ "solve" (fun () -> SAT.solve solver) in
|
||||||
|
|
@ -239,18 +241,18 @@ let solve ?(check = false) ?in_memory_proof (solver : SAT.t) :
|
||||||
flush stdout;
|
flush stdout;
|
||||||
(match res with
|
(match res with
|
||||||
| SAT.Sat _ ->
|
| SAT.Sat _ ->
|
||||||
let t3 = Sys.time () -. t2 in
|
let t3 = Sys.time () in
|
||||||
Format.printf "Sat (%.3f/%.3f)@." t2 t3
|
Format.printf "Sat (%.3f/%.3f)@." (t2 -. start) (t3 -. t2)
|
||||||
| SAT.Unsat _ ->
|
| SAT.Unsat _ ->
|
||||||
if check then (
|
if check then (
|
||||||
match in_memory_proof with
|
match in_memory_proof with
|
||||||
| None ->
|
| None ->
|
||||||
Error.errorf "Cannot validate proof, no in-memory proof provided"
|
Error.errorf "Cannot validate proof, no in-memory proof provided"
|
||||||
| Some proof ->
|
| Some _proof ->
|
||||||
let ok = true (* FIXME check_proof proof *) in
|
let ok = true (* FIXME check_proof proof *) in
|
||||||
if not ok then Error.errorf "Proof validation failed"
|
if not ok then Error.errorf "Proof validation failed"
|
||||||
);
|
);
|
||||||
|
|
||||||
let t3 = Sys.time () -. t2 in
|
let t3 = Sys.time () in
|
||||||
Format.printf "Unsat (%.3f/%.3f)@." t2 t3);
|
Format.printf "Unsat (%.3f/%.3f)@." (t2 -. start) (t3 -. t2));
|
||||||
Ok ()
|
Ok ()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue