Commit edbc438b authored by François Bobot's avatar François Bobot

whybench : memoization don't work??!!?? so precompute....

parent 87b2b7a3
......@@ -313,8 +313,9 @@ let () =
let fold_prob acc = function
| None, _ -> acc
| Some f, _ ->
let gen env task =
let fwhy () =
let env = env in
let task = !opt_task in
let tlist =
let fname, cin = match f with
| "-" -> "stdin", stdin
| f -> f, open_in f
......@@ -326,7 +327,11 @@ let () =
let fold acc (n,l) =
List.rev_append (List.map (fun v -> (n,v)) l) acc in
th |> List.map map |> List.fold_left fold [] in
Scheduler.do_why_sync fwhy () in
(* let gen = Env.Wenv.memoize 3 (fun env -> *)
(* let memo = Trans.store (fun task -> gen env task) in *)
(* Trans.apply memo) in *)
let gen _ _ = tlist in
let gen env task = Scheduler.do_why_sync (gen env) task in
{ B.ptask = gen;
ptrans = transl;
}::acc in
......
......@@ -72,6 +72,7 @@ let find_theory env sl s =
let env_tag env = env.env_tag
module Wenv = Hashweak.Make(struct type t = env let tag = env_tag end)
(** Parsers *)
......
......@@ -25,6 +25,8 @@ type env
val env_tag : env -> Hashweak.tag
module Wenv : Hashweak.S with type key = env
type retrieve_theory = env -> string list -> theory Mnm.t
val create_env : retrieve_theory -> env
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment