Cosmetic changes.
[tatoo.git] / src / eval.ml
index b48d129..d0961d7 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-04-22 14:47:46 CEST by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-04-23 14:53:43 CEST by Kim Nguyen>
 *)
 
 INCLUDE "utils.ml"
@@ -62,7 +62,8 @@ END
           let c = get cache tree node in
           if c == Cache.N1.dummy cache then
            Ata.Config.make
-             { c.Ata.Config.node with Ata.todo = Ata.get_trans auto tag auto.Ata.states;
+             { c.Ata.Config.node with
+               Ata.todo = Ata.get_trans auto tag auto.Ata.states;
                summary = Ata.node_summary
                  (node == T.first_child tree parent) (* is_left *)
                  (node == T.next_sibling tree parent) (* is_right *)
@@ -114,10 +115,10 @@ END
         let acc0 = loop (T.next_sibling tree node) acc in
         let acc1 = loop (T.first_child tree node) acc0 in
 
-        if StateSet.intersect (get cache tree node).Ata.Config.node.Ata.sat auto.Ata.selection_states then
-          node::acc1
-        else
-          acc1
+        if StateSet.intersect
+          (get cache tree node).Ata.Config.node.Ata.sat
+          auto.Ata.selection_states then node::acc1
+        else acc1
     in
     loop node []
 
@@ -134,10 +135,11 @@ END
     Ata.reset auto;
     while !redo do
       redo := false;
+      Ata.reset auto; (* prevents the .cache2 and .cache4 memoization tables from growing too much *)
       redo := top_down_run auto tree node cache !iter;
       incr iter;
     done;
-    at_exit (fun () -> eprintf "INFO: %i iterations\n" !iter);
+    at_exit (fun () -> eprintf "@[STATS: %i iterations@]@." !iter);
     let r = get_results auto tree node cache in
     TRACE(Html.gen_trace (module T : Tree.S with type t = T.t) (tree));
     r