Add AUTHORS file
[tatoo.git] / src / auto / ata.ml
index 419ab57..6f74455 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-15 23:42:43 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-17 20:26:59 CET by Kim Nguyen>
 *)
 
 INCLUDE "utils.ml"
@@ -193,7 +193,12 @@ let create s ss =
     Cache.N2.iteri (fun _ _ _ b -> if b then incr n2) auto.cache2;
     Cache.N6.iteri (fun _ _ _ _ _ _ _ b -> if b then incr n6) auto.cache6;
     Format.eprintf "INFO: automaton %i, cache2: %i entries, cache6: %i entries\n%!"
-      (auto.id :> int) !n2 !n6
+      (auto.id :> int) !n2 !n6;
+    let c2l, c2u = Cache.N2.stats auto.cache2 in
+    let c6l, c6u = Cache.N6.stats auto.cache6 in
+    Format.eprintf "INFO: cache2: length: %i, used: %i, occupation: %f\n%!" c2l c2u (float c2u /. float c2l);
+    Format.eprintf "INFO: cache6: length: %i, used: %i, occupation: %f\n%!" c6l c6u (float c6u /. float c6l)
+
   );
   auto
 
@@ -262,15 +267,13 @@ let int_of_conf is_left is_right has_left has_right kind =
     (Obj.magic has_right)
 
 let eval_trans auto ltrs fcs nss ps ss is_left is_right has_left has_right kind =
-  let i = int_of_conf is_left is_right has_left has_right kind
+  let n = int_of_conf is_left is_right has_left has_right kind
   and k = (fcs.StateSet.id :> int)
   and l = (nss.StateSet.id :> int)
-  and m = (ps.StateSet.id :> int)
-  in
-
+  and m = (ps.StateSet.id :> int) in
   let rec loop ltrs ss =
-    let j = (ltrs.TransList.id :> int)
-    and n = (ss.StateSet.id :> int) in
+    let i = (ltrs.TransList.id :> int)
+    and j = (ss.StateSet.id :> int) in
     let (new_ltrs, new_ss) as res =
       let res = Cache.N6.find auto.cache6 i j k l m n in
       if res == dummy6 then