Fix use of asprintf (missing in 4.00.1)

This commit is contained in:
Guillaume Bury 2017-02-15 14:03:10 +01:00
parent a13906184c
commit 7776b6e2f0

View file

@ -19,7 +19,7 @@ module Make(St : Solver_types.S) = struct
exception Resolution_error of string exception Resolution_error of string
(* Log levels *) (* Log levels *)
(* let error = 1 *) let error = 1
let warn = 3 let warn = 3
let info = 10 let info = 10
let debug = 80 let debug = 80
@ -132,8 +132,8 @@ module Make(St : Solver_types.S) = struct
c' c'
end end
| _ -> | _ ->
raise (Resolution_error Log.debugf error "Error while proving atom %a" (fun k -> k St.pp_atom a);
(Format.asprintf "Cannot prove atom %a" St.pp_atom a)) raise (Resolution_error "Cannot prove atom")
let prove_unsat conflict = let prove_unsat conflict =
if Array.length conflict.St.atoms = 0 then conflict if Array.length conflict.St.atoms = 0 then conflict
@ -179,9 +179,9 @@ module Make(St : Solver_types.S) = struct
chain_res (new_clause, l) r chain_res (new_clause, l) r
end end
| _ -> | _ ->
raise (Resolution_error ( Log.debugf error "While resolving clauses:@[<hov>%a@\n%a@]"
Format.asprintf "Cannot resolve the clauses: %a && %a" (fun k -> k St.pp_clause c St.pp_clause d);
St.pp_clause c St.pp_clause d)) raise (Resolution_error "Clause mismatch")
end end
| _ -> | _ ->
raise (Resolution_error "Bad history") raise (Resolution_error "Bad history")
@ -196,8 +196,8 @@ module Make(St : Solver_types.S) = struct
| St.Local -> | St.Local ->
{ conclusion; step = Assumption; } { conclusion; step = Assumption; }
| St.History [] -> | St.History [] ->
raise (Resolution_error ( Log.debugf error "Empty history for clause: %a" (fun k -> k St.pp_clause conclusion);
Format.asprintf "Empty history for %a" St.pp_clause conclusion)) raise (Resolution_error "Empty history")
| St.History [ c ] -> | St.History [ c ] ->
let duplicates, res = analyze (list c) in let duplicates, res = analyze (list c) in
assert (cmp_cl res (list conclusion) = 0); assert (cmp_cl res (list conclusion) = 0);