X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fauto%2Fata.ml;h=6f74455462db3cbf4614e3ba3a6fb5822005e511;hb=1972639ed4bb0aab7136e3f09d6a46398afec709;hp=419ab570c09e9bc839be68d28bd584807a972fd8;hpb=57952070c7b8276b042854718020483859caf94a;p=tatoo.git diff --git a/src/auto/ata.ml b/src/auto/ata.ml index 419ab57..6f74455 100644 --- a/src/auto/ata.ml +++ b/src/auto/ata.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) 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