diff --git a/src/main/main.ml b/src/main/main.ml index a998d1aa..a89f5018 100644 --- a/src/main/main.ml +++ b/src/main/main.ml @@ -9,6 +9,7 @@ module Fmt = CCFormat module Term = Sidekick_base.Term module Solver = Sidekick_smtlib.Solver module Process = Sidekick_smtlib.Process +module Proof = Sidekick_smtlib.Proof_trace open E.Infix type 'a or_error = ('a, string) E.t @@ -121,8 +122,7 @@ let check_limits () = raise Out_of_space let main_smt () : _ result = - let module Proof = Sidekick_smtlib.Proof in - let tst = Term.create ~size:4_096 () in + let tst = Term.Store.create ~size:4_096 () in let enable_proof_ = !check || !p_proof || !proof_file <> "" in Log.debugf 1 (fun k -> k "(@[proof-enable@ %B@])" enable_proof_); @@ -144,23 +144,26 @@ let main_smt () : _ result = run_with_tmp_file @@ fun temp_proof_file -> Log.debugf 1 (fun k -> k "(@[temp-proof-file@ %S@])" temp_proof_file); - let config = - if enable_proof_ then - Proof.Config.default |> Proof.Config.enable true - |> Proof.Config.store_on_disk_at temp_proof_file - else - Proof.Config.empty - in + (* FIXME + let config = + if enable_proof_ then + Proof.Config.default |> Proof.Config.enable true + |> Proof.Config.store_on_disk_at temp_proof_file + else + Proof.Config.empty + in - (* main proof object *) - let proof = Proof.create ~config () in + (* main proof object *) + let proof = Proof.create ~config () in + *) + let proof = Proof.dummy in let solver = let theories = (* TODO: probes, to load only required theories *) - [ Process.th_bool; Process.th_data; Process.th_lra ] + [ Process.th_bool; Process.th_data (* FIXME Process.th_lra *) ] in - Process.Solver.create ~proof ~theories tst () () + Process.Solver.create_default ~proof ~theories tst in let finally () = @@ -192,16 +195,17 @@ let main_smt () : _ result = res let main_cnf () : _ result = - let module Proof = Pure_sat_solver.Proof in let module S = Pure_sat_solver in let proof, in_memory_proof = - if !check then ( - let pr, inmp = Proof.create_in_memory () in - pr, Some inmp - ) else if !proof_file <> "" then - Proof.create_to_file !proof_file, None - else - Proof.dummy, None + (* FIXME + if !check then ( + let pr, inmp = Proof.create_in_memory () in + pr, Some inmp + ) else if !proof_file <> "" then + Proof.create_to_file !proof_file, None + else + *) + Proof.dummy, None in let stat = Stat.create () in @@ -211,9 +215,10 @@ let main_cnf () : _ result = Proof.close proof in CCFun.protect ~finally @@ fun () -> - let solver = S.SAT.create ~size:`Big ~proof ~stat () in + let tst = Term.Store.create () in + let solver = S.SAT.create_pure_sat ~size:`Big ~proof ~stat () in - S.Dimacs.parse_file solver !file >>= fun () -> + S.Dimacs.parse_file solver tst !file >>= fun () -> let r = S.solve ~check:!check ?in_memory_proof solver in (* FIXME: if in memory proof and !proof_file<>"", then dump proof into file now *) diff --git a/src/smtlib/Process.ml b/src/smtlib/Process.ml index afe6d5a1..57f81096 100644 --- a/src/smtlib/Process.ml +++ b/src/smtlib/Process.ml @@ -10,7 +10,7 @@ type 'a or_error = ('a, string) CCResult.t module E = CCResult module Fmt = CCFormat -module Solver = Sidekick_smt_solver.Solver +module Solver = Sidekick_base.Solver module Check_cc = struct module SI = Sidekick_smt_solver.Solver_internal @@ -326,10 +326,14 @@ let process_stmt ?gc ?restarts ?(pp_cnf = false) ?proof_file ?pp_model | Statement.Stmt_data _ -> E.return () | Statement.Stmt_define _ -> Error.errorf "cannot deal with definitions yet" -module Th_data = Th_data -module Th_bool = Th_bool -module Th_lra = Th_lra +module Th_data = Sidekick_base.Th_data +module Th_bool = Sidekick_base.Th_bool +(* FIXME + module Th_lra = Sidekick_base.Th_lra +*) let th_bool : Solver.theory = Th_bool.theory let th_data : Solver.theory = Th_data.theory -let th_lra : Solver.theory = Th_lra.theory +(* FIXME + let th_lra : Solver.theory = Th_lra.theory +*) diff --git a/src/smtlib/Process.mli b/src/smtlib/Process.mli index 99785ff3..b731a92a 100644 --- a/src/smtlib/Process.mli +++ b/src/smtlib/Process.mli @@ -1,11 +1,13 @@ (** {1 Process Statements} *) open Sidekick_base -module Solver = Sidekick_smt_solver.Solver +module Solver = Sidekick_base.Solver val th_bool : Solver.theory val th_data : Solver.theory -val th_lra : Solver.theory +(* FIXME + val th_lra : Solver.theory +*) type 'a or_error = ('a, string) CCResult.t