mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 03:35:38 -05:00
Fix use of asprintf (missing in 4.00.1)
This commit is contained in:
parent
a13906184c
commit
7776b6e2f0
1 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue