-(*
- let stats run =
- let count = ref 0 in
- let len = Bitvector.length run.unstable in
- for i = 0 to len - 1 do
- if not (Bitvector.unsafe_get run.unstable i) then
- incr count
- done;
- Logger.msg `STATS
- "%i nodes over %i were skipped in iteration %i (%.2f %%), redo is: %b"
- !count len run.pass (100. *. (float !count /. float len))
- run.redo
-
-
- let eval auto tree node =
- let len = T.size tree in
- let run = { config = Array.create len Ata.dummy_config;
- unstable = Bitvector.create ~init:true len;
- redo = true;
- pass = 0
- }
- in
- while run.redo do
- run.redo <- false;
- Ata.reset auto; (* prevents the .cache2 and .cache4 memoization tables from growing too much *)
- run.redo <- top_down_run auto tree node run;
- stats run;
- run.pass <- run.pass + 1;
- done;
- at_exit (fun () -> Logger.msg `STATS "%i iterations" run.pass);
- at_exit (fun () -> stats run);
- let r = get_results auto tree node run.config in
-
- TRACE(Html.gen_trace (module T : Tree.S with type t = T.t) (tree));
-
- r
-*)