rename log-proof to store-proof

This commit is contained in:
Simon Cruanes 2019-02-01 19:16:38 -06:00 committed by Guillaume Bury
parent ebd8ad7110
commit c89a99e82b
4 changed files with 11 additions and 11 deletions

View file

@ -719,7 +719,7 @@ module Make(Plugin : PLUGIN)
st : st; st : st;
th: theory; th: theory;
log_proof: bool; (* do we store proofs? *) store_proof: bool; (* do we store proofs? *)
(* Clauses are simplified for eficiency purposes. In the following (* Clauses are simplified for eficiency purposes. In the following
vectors, the comments actually refer to the original non-simplified vectors, the comments actually refer to the original non-simplified
@ -787,7 +787,7 @@ module Make(Plugin : PLUGIN)
type solver = t type solver = t
(* Starting environment. *) (* Starting environment. *)
let create_ ~st ~log_proof (th:theory) : t = { let create_ ~st ~store_proof (th:theory) : t = {
st; th; st; th;
unsat_at_0=None; unsat_at_0=None;
next_decision = None; next_decision = None;
@ -809,16 +809,16 @@ module Make(Plugin : PLUGIN)
var_incr = 1.; var_incr = 1.;
clause_incr = 1.; clause_incr = 1.;
log_proof; store_proof;
restart_first = 100; restart_first = 100;
learntsize_factor = 1. /. 3. ; learntsize_factor = 1. /. 3. ;
} }
let create ?(log_proof=true) ?(size=`Big) (th:theory) : t = let create ?(store_proof=true) ?(size=`Big) (th:theory) : t =
let st = create_st ~size () in let st = create_st ~size () in
create_ ~st ~log_proof th create_ ~st ~store_proof th
let[@inline] st t = t.st let[@inline] st t = t.st
let[@inline] nb_clauses st = Vec.size st.clauses_hyps let[@inline] nb_clauses st = Vec.size st.clauses_hyps
@ -1402,7 +1402,7 @@ module Make(Plugin : PLUGIN)
(* add the learnt clause to the clause database, propagate, etc. *) (* add the learnt clause to the clause database, propagate, etc. *)
let record_learnt_clause st (confl:clause) (cr:conflict_res): unit = let record_learnt_clause st (confl:clause) (cr:conflict_res): unit =
let proof = if st.log_proof then History cr.cr_history else Empty_premise in let proof = if st.store_proof then History cr.cr_history else Empty_premise in
begin match cr.cr_learnt with begin match cr.cr_learnt with
| [] -> assert false | [] -> assert false
| [fuip] -> | [fuip] ->
@ -1474,7 +1474,7 @@ module Make(Plugin : PLUGIN)
List.iteri (fun i a -> c.atoms.(i) <- a) atoms; List.iteri (fun i a -> c.atoms.(i) <- a) atoms;
c c
) else ( ) else (
let proof = if st.log_proof then History (c::history) else Empty_premise in let proof = if st.store_proof then History (c::history) else Empty_premise in
Clause.make atoms proof Clause.make atoms proof
) )
in in

View file

@ -411,13 +411,13 @@ module type S = sig
(** Main solver type, containing all state for solving. *) (** Main solver type, containing all state for solving. *)
val create : val create :
?log_proof:bool -> ?store_proof:bool ->
?size:[`Tiny|`Small|`Big] -> ?size:[`Tiny|`Small|`Big] ->
theory -> theory ->
t t
(** Create new solver (** Create new solver
@param theory the theory @param theory the theory
@param log_proof if true, stores proof (default [true]). Otherwise @param store_proof if true, stores proof (default [true]). Otherwise
the functions that return proofs will fail with [No_proof] the functions that return proofs will fail with [No_proof]
@param size the initial size of internal data structures. The bigger, @param size the initial size of internal data structures. The bigger,
the faster, but also the more RAM it uses. *) the faster, but also the more RAM it uses. *)

View file

@ -24,7 +24,7 @@ module Process() = struct
let hyps = ref [] let hyps = ref []
let st = S.create ~log_proof:(not !no_proof) ~size:`Big () let st = S.create ~store_proof:(not !no_proof) ~size:`Big ()
let check_model sat = let check_model sat =
let check_clause c = let check_clause c =

View file

@ -271,7 +271,7 @@ end = struct
r r
let create g : t = let create g : t =
{ solver=S.create ~log_proof:false (Theory.create g); grid0=g } { solver=S.create ~store_proof:false (Theory.create g); grid0=g }
end end
let solve_grid (g:Grid.t) : Grid.t option = let solve_grid (g:Grid.t) : Grid.t option =