(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-03-13 18:27:13 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-13 18:54:08 CET by Kim Nguyen>
*)
INCLUDE "utils.ml"
end
= struct
- type cache = (int, StateSet.t) Hashtbl.t
- let get c t n =
- try Hashtbl.find c (T.preorder t n)
- with Not_found -> StateSet.empty
+ type cache = StateSet.t Cache.N1.t
+ let get c t n = Cache.N1.find c (T.preorder t n)
- let set c t n v = Hashtbl.replace c (T.preorder t n) v
+ let set c t n v = Cache.N1.add c (T.preorder t n) v
module Info = struct
type t = { is_left : bool;
(acct, StateSet.add q accs)
else
(Ata.TransList.cons trs acct, accs)
- ) ltrs (Ata.TransList.nil, ss)
+ ) ltrs (Ata.TransList.nil, ss)
in
Cache.N6.add cache i j k l m n res; res
else
loop node []
let eval auto tree node =
- let cache = Hashtbl.create 511 in
+ let cache = Cache.N1.create (T.size tree) StateSet.empty in
let redo = ref true in
let iter = ref 0 in
while !redo do