mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-11 21:48:50 -05:00
api: remove spurious () for calls to solve
This commit is contained in:
parent
1736b4a99e
commit
79bd88b999
5 changed files with 5 additions and 5 deletions
|
|
@ -2061,7 +2061,7 @@ module Make(Plugin : PLUGIN)
|
|||
let c = Clause.make c Hyp in
|
||||
add_clause_ st c
|
||||
|
||||
let solve (st:t) ?(assumptions=[]) () : res =
|
||||
let solve ?(assumptions=[]) (st:t) : res =
|
||||
cancel_until st 0;
|
||||
Vec.clear st.assumptions;
|
||||
List.iter (Vec.push st.assumptions) assumptions;
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ module type S = sig
|
|||
val add_clause_a : t -> atom array -> unit
|
||||
(** Lower level addition of clauses *)
|
||||
|
||||
val solve : t -> ?assumptions:atom list -> unit -> res
|
||||
val solve : ?assumptions:atom list -> t -> res
|
||||
(** Try and solves the current set of clauses.
|
||||
@param assumptions additional atomic assumptions to be temporarily added.
|
||||
The assumptions are just used for this call to [solve], they are
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ module Process = struct
|
|||
List.for_all (fun x -> x) l
|
||||
|
||||
let prove ~assumptions () =
|
||||
let res = S.solve st ~assumptions () in
|
||||
let res = S.solve ~assumptions st in
|
||||
let t = Sys.time () in
|
||||
begin match res with
|
||||
| S.Sat state ->
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ end = struct
|
|||
Log.debugf 2
|
||||
(fun k->k "(@[sudoku.solve@ :assumptions %a@])" (Fmt.Dump.list S.Atom.pp) assumptions);
|
||||
let r =
|
||||
match S.solve self.solver ~assumptions () with
|
||||
match S.solve self.solver ~assumptions with
|
||||
| S.Sat _ -> Some (Theory.grid (S.theory self.solver))
|
||||
| S.Unsat _ -> None
|
||||
in
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ module Solver = struct
|
|||
let to_int a : int = F.to_int @@ S.Atom.formula a
|
||||
let solve s ass =
|
||||
let ass = Array.to_list ass in
|
||||
match S.solve ~assumptions:ass s () with
|
||||
match S.solve ~assumptions:ass s with
|
||||
| S.Sat _ -> Ok ()
|
||||
| S.Unsat { unsat_assumptions; _ } ->
|
||||
let core = unsat_assumptions() in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue