INCLUDE "debug.ml"
INCLUDE "utils.ml"
-
-
type jump_kind = [ `TAG of Tag.t | `CONTAINS of string | `NOTHING ]
(* Todo : move elsewhere *)
match f.pos with
| False -> 0
| True -> 1
- | Or (f1,f2) -> HASHINT3(PRIME2,HNode.hash f1,HNode.hash f2)
- | And (f1,f2) -> HASHINT3(PRIME3,HNode.hash f1,HNode.hash f2)
+ | Or (f1,f2) -> HASHINT3(PRIME2,HNode.uid f1,HNode.uid f2)
+ | And (f1,f2) -> HASHINT3(PRIME3,HNode.uid f1,HNode.uid f2)
| Atom(d,p,s) -> HASHINT4(PRIME4,hash_const_variant d,vb p,s)
end
struct
type t = Ptset.Int.t*Tag.t
let equal (s1,t1) (s2,t2) = (t1 == t2) && Ptset.Int.equal s1 s2
- let hash (s,t) = HASHINT2(Ptset.Int.hash s,Tag.hash t)
+ let hash (s,t) = HASHINT2(Ptset.Int.uid s, t)
end
module TransTable = Hashtbl
if Ptss.mem s c.sets then
{ c with results = IMap.add s (RS.concat r (IMap.find s c.results)) c.results}
else
- { hash = HASHINT2(c.hash,Ptset.Int.hash s);
+ { hash = HASHINT2(c.hash,Ptset.Int.uid s);
sets = Ptss.add s c.sets;
results = IMap.add s r c.results
}
in
let h,s =
Ptss.fold
- (fun s (ah,ass) -> (HASHINT2(ah,Ptset.Int.hash s),
+ (fun s (ah,ass) -> (HASHINT2(ah,Ptset.Int.uid s),
Ptss.add s ass))
(Ptss.union c1.sets c2.sets) (0,Ptss.empty)
in
let h_trans = Hashtbl.create 4096
let get_up_trans slist ptag a tree =
- let key = (HASHINT2(SList.hash slist,Tag.hash ptag)) in
+ let key = (HASHINT2(SList.uid slist,ptag)) in
try
Hashtbl.find h_trans key
with