projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hash-conses each node configuration.
[tatoo.git]
/
src
/
hcons.ml
diff --git
a/src/hcons.ml
b/src/hcons.ml
index
a820e08
..
cc7327a
100644
(file)
--- a/
src/hcons.ml
+++ b/
src/hcons.ml
@@
-13,14
+13,18
@@
(* *)
(***********************************************************************)
(* *)
(***********************************************************************)
-include Sigs.HCONS
+(*
+ Time-stamp: <Last modified on 2013-03-18 00:16:08 CET by Kim Nguyen>
+*)
+
+include Hcons_sig
module type TableBuilder =
functor
module type TableBuilder =
functor
- (H :
Sigs.AUX
.HashedType) ->
-
Sigs.AUX
.HashSet with type data = H.t
+ (H :
Common_sig
.HashedType) ->
+
Common_sig
.HashSet with type data = H.t
-module Builder (TB : TableBuilder) (H :
Sigs.AUX
.HashedType) =
+module Builder (TB : TableBuilder) (H :
Common_sig
.HashedType) =
struct
type data = H.t
type t = { id : Uid.t;
struct
type data = H.t
type t = { id : Uid.t;
@@
-44,9
+48,10
@@
struct
let init () =
T.clear pool;
uid_make := Uid.make_maker ()
let init () =
T.clear pool;
uid_make := Uid.make_maker ()
+ let dummy x = { id = Uid.dummy; hash = H.hash x; node = x }
let make x =
let make x =
- let cell =
{ id = Uid.dummy; hash = H.hash x; node = x }
in
+ let cell =
dummy x
in
try
T.find pool cell
with
try
T.find pool cell
with
@@
-56,7
+61,7
@@
struct
cell
end
cell
end
-module Make = Builder (
Utils
.HashSet)
+module Make = Builder (
Misc
.HashSet)
module Weak = Builder (Weak.Make)
module PosInt =
module Weak = Builder (Weak.Make)
module PosInt =
@@
-72,7
+77,7
@@
struct
let hash v = v
let uid v = Uid.of_int v
let hash v = v
let uid v = Uid.of_int v
-
+ let dummy _ = ~-1
let equal x y = x == y
let init () = ()
let equal x y = x == y
let init () = ()