Mentions légales du service

Skip to content
Snippets Groups Projects
Commit edbc438b authored by François Bobot's avatar François Bobot
Browse files

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

parent 87b2b7a3
Branches
Tags
No related merge requests found
...@@ -313,8 +313,9 @@ let () = ...@@ -313,8 +313,9 @@ let () =
let fold_prob acc = function let fold_prob acc = function
| None, _ -> acc | None, _ -> acc
| Some f, _ -> | Some f, _ ->
let gen env task = let env = env in
let fwhy () = let task = !opt_task in
let tlist =
let fname, cin = match f with let fname, cin = match f with
| "-" -> "stdin", stdin | "-" -> "stdin", stdin
| f -> f, open_in f | f -> f, open_in f
...@@ -326,7 +327,11 @@ let () = ...@@ -326,7 +327,11 @@ let () =
let fold acc (n,l) = let fold acc (n,l) =
List.rev_append (List.map (fun v -> (n,v)) l) acc in List.rev_append (List.map (fun v -> (n,v)) l) acc in
th |> List.map map |> List.fold_left fold [] 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; { B.ptask = gen;
ptrans = transl; ptrans = transl;
}::acc in }::acc in
......
...@@ -72,6 +72,7 @@ let find_theory env sl s = ...@@ -72,6 +72,7 @@ let find_theory env sl s =
let env_tag env = env.env_tag let env_tag env = env.env_tag
module Wenv = Hashweak.Make(struct type t = env let tag = env_tag end)
(** Parsers *) (** Parsers *)
......
...@@ -25,6 +25,8 @@ type env ...@@ -25,6 +25,8 @@ type env
val env_tag : env -> Hashweak.tag val env_tag : env -> Hashweak.tag
module Wenv : Hashweak.S with type key = env
type retrieve_theory = env -> string list -> theory Mnm.t type retrieve_theory = env -> string list -> theory Mnm.t
val create_env : retrieve_theory -> env val create_env : retrieve_theory -> env
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment